OSDN Git Service

* c-lang.c (LANG_HOOKS_NAME): New.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2
3         * cp-lang.c (LANG_HOOKS_NAME): Override.
4         (struct lang_hooks): Constify.
5         * lex.c (cxx_init_options): Update.
6         (lang_identify): Remove.
7         * parse.y (language_string): Remove.    
8
9 2001-11-08  Andreas Franck  <afranck@gmx.de>
10
11         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
12         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
13         suggested by autoconf.
14         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
15         (c++.install-common): Use the transformed target alias names.
16
17 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
18
19         * Make-lang.in: Update.
20         * cp-lang.c: Include langhooks-def.h.
21
22 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
23
24         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
25
26 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
27
28         * lex.c (copy_lang_type): Add static prototype.
29
30 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
31
32         * pt.c (unify): Handle SCOPE_REF.
33
34 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
35
36         * tree.c (cp_copy_res_decl_for_inlining): Adjust
37         DECL_ABSTRACT_ORIGIN for the return variable.
38
39 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
40
41         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
42
43 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
44
45         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
46         semantics.c, spew.c: Fix spelling errors.
47
48 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
49
50         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
51
52 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
53
54         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
55         pop_everything.
56
57 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
58
59         * cp-lang.c (cxx_get_alias_set): New function.
60         Point LANG_HOOKS_GET_ALIAS_SET to it.
61
62 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
63
64         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
65         * cp-tree.h (make_unbound_class_template): Prototype new function.
66         * decl.c (make_unbound_class_template): New function.
67         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
68         * error.c (dump_type): Likewise.
69         * mangle.c (write_type): Likewise.
70         * parse.y (template_parm): Likewise.
71         (template_argument): Use make_unbound_class_template.
72         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
73         (tsubst): Likewise.
74         (tsubst_copy): Likewise.
75         (unify): Likewise.
76         * tree.c (walk_tree): Likewise.
77         * typeck.c (comptypes): Likewise.
78
79 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
80
81         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
82         extra calls into fewer ones.
83
84 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
85
86         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
87         Warn when merging inline with attribute noinline.
88         (start_decl, start_function): Warn if inline and attribute
89         noinline appear in the same declaration.
90
91 2001-10-16  H.J. Lu <hjl@gnu.org>
92
93         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
94         for tree checking disabled.
95
96 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
97
98         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
99         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
100
101 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
102
103         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
104         (unify): Only handle MINUS_EXPR specially if the above flag is set
105         and the subtracted constant is 1.  Clear the flag on recursive calls.
106         Set it when unifying the maximum value in an INTEGER_TYPE's range.
107
108 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
109
110         * decl.c (bad_specifiers): Don't allow exception specifications
111         on any typedefs.
112
113 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
114
115         * cp/lex.c (init_cp_pragma): Similarly.
116
117 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
118
119         * pt.c (lookup_template_class): Build complete template arguments
120         for BOUND_TEMPLATE_TEMPLATE_PARM.
121
122 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
123
124         * cp-tree.h (TYPE_BINFO): Update comment.
125         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
126         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
127         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
128         (copy_type): Prototype new function.
129         * lex.c (copy_lang_decl): Gather tree node statistics.
130         (copy_lang_type): New function.
131         (copy_type): Likewise.
132         (cp_make_lang_type): Create lang_type for
133         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
134         and BOUND_TEMPLATE_TEMPLATE_PARM.
135         * pt.c (tsubst): Use copy_type instead of copy_node.
136         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
137
138 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
139
140         * pt.c (determine_specialization): Ignore functions without
141         DECL_TEMPLATE_INFO.
142
143 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
144
145         PR g++/4476
146         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
147
148 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
149
150         * typeck2.c (store_init_value): Don't re-digest a bracketed
151         initializer.
152
153         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
154         ANON_AGGR_TYPE_P.
155
156 2001-10-11  Richard Henderson  <rth@redhat.com>
157
158         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
159         of an asm statement.
160         (build_vtbl_ref_1): Split out from build_vtbl_ref.
161         (build_vfn_ref): Use it to handle vtable descriptors before
162         calling build_vtable_entry_ref.
163         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
164
165 2001-10-10  Richard Henderson  <rth@redhat.com>
166
167         * parse.y (asm_operand): Allow named operands.
168         * semantics.c (finish_asm_stmt): Tweek for changed location
169         of the operand constrant.
170
171 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
172
173         * call.c (standard_conversion): Add bad conversion between
174         integers and pointers.
175         (convert_like_real): Don't use convert_for_initialization for bad
176         conversions; complain here and use cp_convert.
177         (build_over_call): Don't handle bad conversions specially.
178         (perform_implicit_conversion): Allow bad conversions.
179         (can_convert_arg_bad): New fn.
180         * cp-tree.h: Declare it.
181         * typeck.c (convert_for_assignment): Use it.
182         (ptr_reasonably_similar): Any target type is similar to void.
183
184 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
185
186         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
187         (cp/cp-lang.o): New rule.
188         * cp-tree.h: Declare hooks.
189         * tree.c: Make hooks non-static.
190         (init_tree): Don't initialize hooks here.
191         * lex.c: Likewise.  Move definition of lang_hooks to...
192         * cp-lang.c: ... new file.
193
194 2001-10-08  Richard Henderson  <rth@redhat.com>
195
196         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
197         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
198
199 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
200
201         * class.c (build_vtable_entry_ref): Const-ify.
202         * decl.c (predefined_identifier,
203         initialize_predefined_identifiers): Likewise.
204         * init.c (build_new_1): Likewise.
205         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
206         Likewise.
207
208 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
209
210         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
211         (INSNS_PER_STMT): Likewise.
212         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
213         (copy_body, initialize_inlined_parameters): Likewise.
214         (declare_return_variable, inlinable_function_p): Likewise.
215         (expand_call_inline, expand_calls_inline): Likewise.
216         (optimize_inline_calls, clone_body): Likewise.
217         * tree.c (walk_tree): Moved to ../tree-inline.c.
218         (walk_tree_without_duplicates): Likewise.
219         (copy_tree_r, remap_save_expr): Likewise.
220
221 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
222
223         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
224         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
225         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
226         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
227         (flag_inline_trees): Moved declaration to ../tree-inline.h.
228         (walk_tree): Moved declaration to ../tree-inline.h.
229         (walk_tree_without_duplicates, copy_tree_r): Likewise.
230         (remap_save_expr): Likewise.
231         * decl.c: Include tree-inline.h.
232         (lang_mark_tree): Don't mark inlined_fns.
233         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
234         * optimize.c: Include tree-inline.h.
235         (optimize_inline_calls): Move declaration to ../tree.h, as
236         non-static.
237         (remap_decl): Use language-independent constructs and hooks.
238         (remap_block, copy_body_r, declare_return_variable): Likewise.
239         (inlinable_function_p): Likewise.  Don't test for
240         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
241         no longer language-specific.
242         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
243         call of dump_function to...
244         (optimize_function): Here...
245         (clone_body): New function, extracted from...
246         (maybe_clone_body): ... here.  Build decl_map locally and pass
247         it on to clone_body.
248         * pt.c, semantics.c: Include tree-inline.h.
249         * tree.c: Likewise.
250         (cp_walk_subtrees): New language-specific hook for tree inlining.
251         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
252         cp_is_overload_p, cp_auto_var_in_fn_p,
253         cp_copy_res_decl_for_inlining): Likewise.
254         (walk_tree): Move language-specific constructs into...
255         (cp_walk_subtrees): this new function.
256         (copy_tree_r): Use language-independent constructs and hooks.
257         (init_tree): Initialize tree inlining hooks.
258         (remap_save_expr): Adjust prototype so that the declaration
259         does not require the definition of splay_tree.
260
261 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
262
263         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
264         to build the declaration instead of the declaration itself.
265
266 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
267
268         * decl2.c (cxx_decode_option): Add 'else'.
269
270         * spew.c (end_input): No longer static.
271         * cp-tree.h: Declare it.
272         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
273
274 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
275
276         * call.c (build_over_call), typeck.c (build_function_call_real):
277         Pass type attributes to check_function_format rather than name or
278         assembler name.  Don't require there to be a name or assembler
279         name to check formats.
280
281 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
282
283         * decl.c (init_decl_processing): Don't call
284         init_function_format_info.  Initialize lang_attribute_table
285         earlier.
286         (builtin_function): Call decl_attributes.
287         (insert_default_attributes): New.
288
289 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
290
291         * decl.c (grokdeclarator): Copy array typedef handling from C
292         frontend.
293
294         * decl.c (grokdeclarator): Copy too-large array handling from C
295         frontend.
296
297 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
298
299         * config-lang.in (target_libs): Added target-gperf, so that we
300         don't try to build it if C++ is disabled.
301
302 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
303
304         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
305         (cp/errfn.o): Delete rule.
306         (cp/error.o): Depend on flags.h.
307         * errfn.c: Delete file.
308         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
309         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
310         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
311         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
312         internal_error respectively.  Make cp_deprecated into a macro.
313         Don't define cp_printer typedef or declare cp_printers.
314         * error.c: Include flags.h.
315         Delete: struct tree_formatting_info, print_function_argument_list,
316         print_declaration, print_expression, print_function_declaration,
317         print_function_parameter, print_type_id, print_cv_qualifier_seq,
318         print_type_specifier_seq, print_simple_type_specifier,
319         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
320         print_parameter_declaration_clause, print_exception_specification,
321         print_nested_name_specifier, and definition of cp_printers.
322         (locate_error): New function.
323         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
324         rewritten in terms of locate_error and diagnostic.c.
325         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
326         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
327         (init_error): Adjust to match.
328
329 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
330
331         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
332
333 2001-09-21  Richard Henderson  <rth@redhat.com>
334
335         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
336         (build_vtbl_initializer): Likewise.
337         (build_vfn_ref): New.
338         * cp-tree.h: Declare it.
339         * call.c (build_over_call): Use it.
340         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
341         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
342
343 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
344
345         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
346
347 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
348
349         Table-driven attributes.
350         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
351         * decl2.c (cplus_decl_attributes): Only take one attributes
352         parameter.
353         * cp-tree.c (cplus_decl_attributes): Update prototype.
354         * class.c (finish_struct), decl.c (start_decl, start_function),
355         decl2.c (grokfield), friend.c (do_friend), parse.y
356         (parse_bitfield): Update calls to cplus_decl_attributes.
357         * decl.c (grokdeclarator): Take a pointer to a single ordinary
358         attribute list.
359         * decl.h (grokdeclarator): Update prototype.
360         * decl2.c (grokfield): Take a single ordinary attribute list.
361         * friend.c (do_friend): Likewise.
362         * decl.c (shadow_tag, groktypename, start_decl,
363         start_handler_parms, grokdeclarator, grokparms, start_function,
364         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
365         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
366         (process_template_parm, do_decl_instantiation): Pass single
367         ordinary attribute lists around.
368         * decl.c (grokdeclarator): Correct handling of nested attributes.
369         Revert the patch
370         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
371                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
372                 not the left.
373         .
374         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
375         (cp_attribute_table): Declare.
376         * decl.c (valid_lang_attribute): Don't define.
377         (lang_attribute_table): Define.
378         (init_decl_processing): Initialize lang_attribute_table instead of
379         valid_lang_attribute.
380         * tree.c (cp_valid_lang_attribute): Remove.
381         (handle_java_interface_attribute, handle_com_interface_attribute,
382         handle_init_priority_attribute): New functions.
383         (cp_attribute_table): New array.
384         * decl2.c (import_export_class): Don't use
385         targetm.valid_type_attribute.
386
387 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
388
389                 * Make-lang.in (cp/error.o): Depend on real.h
390                 * error.c: #include "real.h"
391
392 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
393
394         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
395         xmalloc/strcpy/strcat.
396
397 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
398
399         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
400         Const-ification.
401         * pt.c (tsubst_decl): Likewise.
402
403 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
404
405         * decl2.c (lang_f_options): Const-ification.
406         * lex.c (cplus_tree_code_name): Likewise.
407         * spew.c (yyerror): Likewise.
408
409 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
410
411         PR c++/3986
412         * class.c (force_canonical_binfo_r): Check & move an indirect
413         primary base first.
414         (force_canonical_binfo): Check that it's not already
415         canonical.
416         (mark_primary_virtual_base): Remove BINFO parameter.
417         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
418
419 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
420
421         Remove TYPE_NONCOPIED_PARTS.
422         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
423         CLASSTYPE_PURE_VIRTUALS.
424         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
425         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
426         (layout_class_type): Don't call fixup_inline_methods here ...
427         (finish_struct_1): ... call it here.
428
429 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
430
431         * decl.c (duplicate_decls): Remove code deadling with
432         DECL_SAVED_INSNS.
433         * decl2.c (finish_file): Likewise.
434         * pt.c (instantiate_decl): Likewise.
435         * semantics.c (expand_body): Don't defer local functions if
436         they wouldn't be deferred for some other reason.  Don't
437         generate RTL for functions that will not be emitted.
438         (genrtl_start_function): Remove code deadling with
439         DECL_SAVED_INSNS.
440         (genrtl_finish_function): Likewise.
441
442 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
443
444         PR c++/4203
445         * call.c (build_over_call): Do not optimize any empty base
446         construction.
447
448 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
449
450         * error.c (dump_template_decl): Output template parameters
451         together with their specifiers.
452         Output `class' prefix for template template parameter.
453         (dump_decl): Fix formatting.
454
455 2001-08-30  Kurt Garloff  <garloff@suse.de>
456
457         * optimize.c (inlinable_function_p): Allow only smaller single
458         functions. Halve inline limit after reaching recursive limit.
459
460 2001-08-30  Joern Rennecke <amylaar@redhat.com>
461             Jason Merrill  <jason_merrill@redhat.com>
462
463         * class.c (build_vtable_entry_ref): Subtract in char*, not
464         ptrdiff_t.
465
466 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
467
468         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
469         (build_cplus_array_type): Use cp_build_qualified_type, not
470         TYPE_MAIN_VARIANT, to get an unqualified version.
471
472         * decl2.c (grok_alignof): Lose.
473         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
474         * typeck.c (c_alignof): Lose.
475         * semantics.c (finish_sizeof, finish_alignof): New.
476         * parse.y: Use them.
477         * cp-tree.h: Declare them.
478
479 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
480
481         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
482         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
483         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
484
485 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
486
487         * typeck2.c (add_exception_specifier): Only require complete type if
488         not in processing template declaration.
489
490 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
491
492         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
493         GNU_xref_start_scope and GNU_xref_end_scope.
494
495         * tree.c (TYPE_HASH): Moved to ../tree.h.
496
497 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
498
499         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
500         on COMPOUND_EXPRs.
501
502 2001-08-14  Richard Henderson  <rth@redhat.com>
503
504         * class.c, cp-tree.h (build_vfn_ref): Remove.
505         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
506
507 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
508
509         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
510         empty class assignment as having side-effects to avoid
511         spurious warnings.
512
513 2001-08-13  Zack Weinberg  <zackw@panix.com>
514
515         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
516         * except.c: Include libfuncs.h.
517
518 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
519
520         * decl.c (grokdeclarator): Clarify diagnostic message.
521
522 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
523
524         * decl2.c (do_nonmember_using_decl): Replace using directive
525         with using declaration in the error message.
526
527 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
528
529         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
530         criterion to avoid rebuilding expression tree instead of
531         processing_template_decl.
532
533 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
534
535         Support named return value optimization for inlines, too.
536         * decl.c (finish_function): Nullify returns here.
537         * semantics.c (genrtl_start_function): Not here.
538         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
539         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
540         Also nullify the CLEANUP_STMT for the nrv.
541         * cp-tree.h: Declare it.
542         * optimize.c (declare_return_variable): Replace the nrv with the
543         return variable.
544         * typeck.c (check_return_expr): Be more flexible on alignment check.
545         Ignore cv-quals when checking for a matching type.
546
547 2001-08-09  Richard Henderson  <rth@redhat.com>
548
549         * decl2.c (finish_objects): Use target hooks instead of
550         assemble_constructor and assemble_destructor.
551
552 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
553
554         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
555
556 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
557
558         PR c++/3820
559         Stop using TYPE_NONCOPIED_PARTS.
560         * call.c (build_over_call): Be careful when copy constructing
561         or assigning to an empty class.
562         * class.c (check_bases_and_members): It has a
563         COMPLEX_ASSIGN_REF if it has a vptr.
564         (layout_class_type): Don't add empty class padding to
565         TYPE_NONCOPIED_PARTS.
566         (finish_struct_1): Don't add the VFIELD either.
567         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
568         initialization.
569
570 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
571
572         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
573
574 2001-08-06  Richard Henderson  <rth@redhat.com>
575
576         * decl2.c (finish_objects): Pass a symbol_ref and priority to
577         assemble_{constructor,destructor}.  Remove priority handling.
578
579 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
580
581         Don't allow template-id in using-declaration.
582         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
583         (do_class_using_decl): Likewise.
584
585 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
586
587         * cp/spew.c (read_token): No need to pop buffers.
588
589 2001-08-02  Stan Shebs  <shebs@apple.com>
590
591         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
592         (fnaddr_from_vtable_entry): Remove decl.
593         * method.c (use_thunk): Update comment.
594
595 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
596
597         * repo.c (get_base_filename): Change return value to const char
598         pointer.
599
600 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
601
602         Kill -fhonor-std.
603         * NEWS: Document.
604         * cp-tree.h (flag_honor_std): Remove.
605         (CPTI_FAKE_STD): Remove.
606         (std_node): Remove comment about it being NULL.
607         (fake_std_node): Remove.
608         * decl.c (in_fake_std): Remove.
609         (walk_namespaces_r): Remove fake_std_node check.
610         (push_namespace): Remove in_fake_std code.
611         (pop_namespace): Likewise.
612         (lookup_name_real): Remove fake_std_node check.
613         (init_decl_processing): Always create std_node. Always add
614         std:: things there.
615         (builtin_function): Always put non '_' fns in std.
616         * decl2.c (flag_honor_std): Remove.
617         (lang_f_options): Remove honor-std.
618         (unsupported_options): Add honor-std.
619         (set_decl_namespace): Remove fake_std_node check.
620         (validate_nonmember_using_decl): Likewise.
621         (do_using_directive): Likewise.
622         (handle_class_head): Likewise.
623         * dump.c (cp_dump_tree): Likewise.
624         * except.c (init_exception_processing): Adjust.
625         * init.c (build_member_call): Remove fake_std_node check.
626         (build_offset_ref): Likewise.
627         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
628         * rtti.c (init_rtti_processing): Adjust.
629
630 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
631
632         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
633         operand while calling cp_tree_equal.
634
635 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
636
637         The 3.0 ABI no longer has vbase pointer fields.
638         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
639         FORMAT_VBASE_NAME): Remove.
640         * method.c (do_build_copy_constructor): Adjust.
641         (do_build_assign_ref): Adjust.
642         * search.c (lookup_field_r): Adjust.
643         * typeck.c (build_component_ref): Adjust.
644
645         The 3.0 ABI always has a vtable pointer at the start of every
646         polymorphic class.
647         * rtti.c (build_headof_sub): Remove.
648         (build_headof): Adjust.
649         (get_tinfo_decl_dynamic): No need to check flag_rtti
650         here. Adjust.
651         (create_real_tinfo_var): Explain why we need a hidden name.
652
653 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
654
655         PR c++/3631
656         * class.c (update_vtable_entry_for_fn): The fixed adjustment
657         of a virtual thunk should be from declaring base.
658
659 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
660
661         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
662         the shared virtual base, so preserving inheritance graph order.
663
664 2001-07-30  Andreas Jaeger  <aj@suse.de>
665
666         * decl2.c: Remove unused var global_temp_name_counter.
667
668 2001-07-28  Richard Henderson  <rth@redhat.com>
669
670         * method.c (pending_inlines): Remove.
671
672 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
673
674         * class.c (mark_primary_virtual_base): Don't adjust base
675         offsets here.
676         (dfs_unshared_virtual_bases): Adjust them here.
677         (mark_primary_bases): Explain why we adjust at the end.
678
679 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
680
681         * class.c (finish_struct_1): When copying the primary base's
682         VFIELD, make sure we find it is at offset zero.
683
684 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
685
686         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
687         tsubst_expr for default template arguments.
688
689 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
690
691         PR c++/3621
692         * spew.c (yylex): Only copy the token's lineno, if it is
693         non-zero.
694
695 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
696
697         PR c++/3624
698         * call.c (resolve_args): Simplify, call
699         convert_from_reference.
700         (build_new_op): Resolve and convert from reference ARG1
701         earlier. Adjust ARG2 & ARG3 resolve and conversion.
702
703 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
704
705         * decl.c (last_function_parm_tags): Remove.
706         (current_function_parm_tags): Remove.
707         (init_decl_processing): Adjust.
708         (start_function): Adjust.
709         (store_parm_decls): Adjust.
710
711         PR c++/3152
712         * decl.c (grokdeclarator): Detect when a function typedef is
713         declaring a function, and create last_function_parms correctly.
714
715 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
716
717         * call.c (joust): Only prefer a non-builtin candidate to a builtin
718         one if they have the same signature.
719
720         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
721         it rather than toplevel_bindings_p.  Give it a mangled name if static.
722         (convert_to_reference): Adjust.
723         * decl2.c (get_temp_name): Lose.
724         * mangle.c (mangle_ref_init_variable): New fn.
725         (mangle_guard_variable): Strip the ref-init header.
726         * cp-tree.h: Adjust.
727         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
728         initializer.
729         (grok_reference_init): Always use DECL_INITIAL.
730
731 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
732
733         PR c++/3416
734         * call.c (build_conditional_expr): Recheck args after
735         conversions.
736         * cp-tree.h (build_conditional_expr): Move to correct file.
737         * typeck.c (decay_conversion): Diagnose any unknown types
738         reaching here.
739         (build_binary_op): Don't do initial decay or default
740         conversions on overloaded functions.
741         (build_static_cast): Don't do a decay conversion here.
742
743 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
744
745         PR c++/3543
746         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
747         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
748
749 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
750
751         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
752         (create_vtbl_ptr): ... here.
753
754 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
755
756         * class.c (build_vbase_offset_vbtl_entries): Look for
757         non-primary base of which we are a sub vtable.
758
759 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
760
761         * semantics.c (finish_this_expr):  Remove unused code.
762
763 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
764
765         Simplify rtti, now we've only one ABI.
766         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
767         CPTI_TINFO_VAR_ID.
768         (tinfo_decl_id, tinfo_var_id): Remove.
769         (get_typeid_1): Remove.
770         * rtti.c
771         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
772         (typeid_ok_p): New function.
773         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
774         (get_tinfo_decl): Remove old abi documentation.
775         (tinfo_from_decl): Remove.
776         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
777         (get_typeid_1): Remove.
778         (get_base_offset): Remove.
779         (synthesize_tinfo_var): Absorb get_base_offset.
780         (create_real_tinfo_var): Don't use tinfo_decl_id.
781
782 2001-07-23  Graham Stott  <grahams@redhat.com>
783
784         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
785         variable has_two_argument_delete_p.
786
787 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
788
789         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
790         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
791         (CPTI_INDEX_IDENTIFIER): Remove.
792         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
793         (delta2_identifier): Remove.
794         (index_identifier): Remove.
795         (pfn_or_delta2_identifier): Remove.
796         (flag_vtable_thunks): Remove.
797         (VTABLE_DELTA2_NAME): Remove.
798         (VTABLE_INDEX_NAME): Remove.
799         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
800         (vfunc_ptr_type_node): Adjust.
801         (VTABLE_NAME_PREFIX): Adjust.
802         (build_vfn_ref): Lose first parameter.
803         (fixup_all_virtual_upcast_offsets): Remove.
804         * decl.c (initialize_predefined_identifiers): Remove
805         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
806         (init_decl_processing): Remove no-vtable-thunk code.
807         * decl2.c (flag_vtable_thunks): Remove.
808         (mark_vtable_entries): Remove no-vtable-thunk code.
809         * error.c (dump_decl): Remove no-vtable-thunk code.
810         (dump_expr): Adjust ptr to member function code.
811         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
812         code.
813         * rtti.c (build_headof): Remove no-vtable-thunk code.
814         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
815         * search.c (get_base_distance): Remove expand_upcast_fixups case.
816         (virtual_context) Remove.
817         (expand_upcast_fixups): Remove.
818         (fixup_virtual_upcast_offsets): Remove.
819         (fixup_all_virtual_upcast_offsets): Remove.
820         * typeck.c (get_member_function_from_ptrfunc): Remove
821         no-vtable-thunk code.
822         * call.c (build_over_call): Adjust call to build_vfn_ref.
823         * class.c (build_vfn_ref): Lose first parameter. Remove
824         no-vtable-thunk code.
825         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
826         (build_vtable_entry): Remove no-vtable-thunk code.
827
828 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
829
830         Remove old-abi remnants. Remove comments about old abi
831         behaviour. Remove refences to 'new-abi' in comments.
832         * cp-tree.h: Adjust comments.
833         (vbase_offsets_in_vtable_p): Delete.
834         (vcall_offsets_in_vtable_p): Delete.
835         (vptrs_present_everywhere_p): Delete.
836         (all_overridden_vfuns_in_vtables_p): Delete.
837         (merge_primary_and_secondary_vtables_p): Delete.
838         (TYPE_CONTAINS_VPTR_P): Adjust.
839         (VTT_NAME_PREFIX): Remove.
840         (CTOR_VTBL_NAME_PREFIX): Remove.
841         (init_vbase_pointers): Remove.
842         * class.c: Adjust coments.
843         (build_vbase_pointer_fields): Delete.
844         (build_vbase_pointer): Remove old-abi code.
845         (build_secondary_vtable): Likewise.
846         (modify_all_vtables): Likewise.
847         (create_vtable_ptr): Likewise.
848         (layout_class_type): Likewise.
849         (finish_struct_1): Likewise.
850         (finish_vtbls): Likewise.
851         (dfs_finish_vtbls): Delete.
852         (build_vbase_offset_vtbl_entries): Remove old-abi code.
853         * cvt.c: Adjust comments.
854         * decl.c: Adjust comments.
855         * decl2.c: Adjust comments.
856         * init.c: Adjust comments.
857         (construct_virtual_bases): Remove old-abi code.
858         * lang-specs.h: Remove -fno-new-abi.
859         * mangle.c: Adjust comments.
860         * rtti.c: Adjust comments.
861         (get_base_offset): Remove old-abi-code.
862         * search.c: Adjust comments.
863         (dfs_init_vbase_pointers): Remove.
864         (dfs_vtable_path_unmark): Remove.
865         (init_vbase_pointers): Remove.
866         * semantics.c: Adjust comments.
867         (emit_associated_thunks): Remove old-abi code.
868         * typeck.c: Adjust comments.
869
870 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
871
872         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
873         params.h.
874
875 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
876
877         * class.c (finish_struct_anon): Forbid nested classes.
878
879 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
880
881         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
882         * optimize.c: Include debug.h.
883         (maybe_clone_body): Use debug hook.
884         * semantics.c: Include debug.h.
885         (expand_body): Use debug hook.
886
887 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
888
889         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
890
891 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
892
893         * class.c (type_requires_array_cookie): New function.
894         (check_methods): Don't try to figure out whether the type needs a
895         cookie here.
896         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
897         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
898         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
899         * pt.c (instantiate_class_template): Don't set
900         TYPE_VEC_DELETE_TAKES_SIZE.
901         * NEWS: Document ABI changes from GCC 3.0.
902
903 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
904             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
905
906         * NEWS (Changes in GCC 3.0): Fix typo.
907
908 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
909
910         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
911         which attributes are to be attached, and a flags argument.  Update
912         call to decl_attributes.
913         (grokfield): Update call to decl_attributes.
914         * class.c (finish_struct): Update call to cplus_decl_attributes.
915         * cp-tree.h (cplus_decl_attributes): Update prototype.
916         * decl.c (start_decl, grokdeclarator, start_function): Update
917         calls to decl_attributes and cplus_decl_attributes.
918         * friend.c (do_friend): Update call to cplus_decl_attributes.
919         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
920
921 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
922
923         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
924         for `register' variables with an asm-specification.
925
926 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
927
928         * semantics.c (finish_asm_stmt): Mark the output operands
929         to an asm addressable, if necessary.
930
931 2001-07-11  Ben Elliston  <bje@redhat.com>
932
933         * Revert this change -- there is a subtle bug.
934
935         PR c++/80
936         * decl.c (finish_enum): New "attributes" argument; pass it to
937         cplus_decl_attributes.  Use a narrower type if the enum is packed.
938         * cp-tree.h (finish_enum): Adjust prototype.
939         * parse.y (enum_head): New non-terminal.
940         (structsp): Use it. Enums now may be preceded or followed by
941         optional attributes -- pass their chained tree to finish_enum().
942         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
943
944 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
945
946         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
947         variables.
948
949 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
950
951         * semantics.c (cp_expand_stmt): Fix for null
952         current_function_return_value.
953
954 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
955
956         * call.c (build_op_delete_call): Initialize fn.
957         (convert_like_real): Delete conditional.
958         (joust): Initialize *w and *l.
959         * class.c: Add prototype for binfo_ctor_vtable.
960         (get_primary_binfo): Initialize result.
961         * init.c (build_java_class_ref): Initialize name.
962
963 2001-07-09  Erik Rozendaal  <dlr@acm.org>
964
965         * typeck.c (unary_complex_lvalue): Do not duplicate the
966         argument to modify, pre-, or post-increment when used as an
967         lvalue and when the argument has side-effects.
968
969 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
970
971         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
972         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
973         cplus_decl_attributes even if attrs is NULL.
974         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
975
976 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
977
978         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
979         calls to decl_attributes.
980
981 2001-07-06  Ira Ruben   <ira@apple.com>
982
983         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
984         be DECL_TEMPLATE_RESULT.
985
986 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
987
988         * cp-tree.h (copy_template_template_parm): Rename to ...
989         (bind_template_template_parm): ... here.
990         * tree.c (copy_template_template_parm): Rename to ...
991         (bind_template_template_parm): ... here.  Remove the case when
992         NEWARGS is NULL_TREE.
993         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
994         BOUND_TEMPLATE_TEMPLATE_PARM.
995         * pt.c (lookup_template_class): Adjust.
996
997 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
998
999         * cvt.c (convert_lvalue): New fn.
1000         * cp-tree.h: Declare it.
1001         * method.c (do_build_assign_ref): Use it.
1002         (do_build_copy_constructor): Convert parm to base types
1003         before calling base constructors.
1004
1005         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
1006         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
1007         optimize.
1008         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
1009
1010 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
1011
1012         * optimize.c (optimize_inline_calls): New function, broken out
1013         of ...
1014         (optimize_function): ... here. Call it. Don't inline if it is
1015         a thunk.
1016         (dump_function): Print name of dump flag causing this dump.
1017         * semantics.c (expand_body): Move thunk inline check to
1018         optimize_function.
1019
1020 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1021
1022         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
1023         (comptypes): Use target.comp_type_attributes.
1024
1025 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
1026
1027         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
1028
1029 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
1030
1031         * error.c (lang_print_error_function): Add a `diagnostic_context *'
1032         parameter. Tweak.
1033
1034 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
1035
1036         * decl2.c (import_export_class): Update.
1037
1038 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
1039
1040         * error.c (init_error): Adjust settings.
1041
1042 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
1043
1044         * error.c (init_error): Adjust settings.
1045
1046 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
1047
1048         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
1049         return pointers to data members by reference rather than by value.
1050
1051 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
1052
1053         Implement the Named Return Value optimization.
1054         * cp-tree.h (struct cp_language_function): Add x_return_value.
1055         (current_function_return_value): Now a macro.
1056         * decl.c: Don't define it.
1057         (define_label, finish_case_label): Don't clear it.
1058         (init_decl_processing): Don't register it with GC.
1059         * semantics.c (genrtl_finish_function): Don't check it for
1060         no_return_label.  Copy the RTL from the return value to
1061         current_function_return_value and walk, calling...
1062         (nullify_returns_r): ...this new fn.
1063         * typeck.c (check_return_expr): Set current_function_return_value.
1064
1065 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
1066
1067         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
1068         sharing a ctor vtable with.  Merge code for cases 1 and 2.
1069         (binfo_ctor_vtable): New fn.
1070         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
1071
1072 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
1073
1074         * class.c (dfs_find_final_overrider): Fix logic.
1075
1076         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
1077         virtual thunk instead of non-virtual.
1078         (get_matching_virtual): Uncomment.
1079
1080         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
1081         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
1082         PARM, not ARG.
1083
1084 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1085
1086         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
1087         we've not emerged from the hierarchy of RTTI_BINFO on reaching
1088         a non-virtual base.
1089
1090 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
1091
1092         * NEWS: Update release number.
1093
1094 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
1095
1096         PR c++/3130, c++/3131, c++/3132
1097         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
1098         * class.c (force_canonical_binfo_r): Move
1099         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
1100         virtual bases unless they're primary and what they're primary
1101         too has been moved.
1102         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
1103         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
1104         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
1105         derived binfo.
1106         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
1107         (layout_nonempty_base_or_field): Add most derived type
1108         parameter. Adjust.
1109         (layout_empty_base): Likewise.
1110         (build_base_field): Likewise.
1111         (build_base_fields): Likewise.
1112         (propagate_binfo_offsets): Add most derived type
1113         parameter. Skip non canonical virtual bases too.
1114         (dfs_set_offset_for_unshared_vbases): Don't skip primary
1115         bases. Do skip canonical bases.
1116         (layout_virtual_bases): Adjust.
1117         (layout_class_type): Adjust.
1118         (dfs_get_primary_binfo): Build list of virtual primary base
1119         candidates.
1120         (get_primary_binfo): Check that the shared virtual primary
1121         base candidate was found first.
1122         (accumulate_vtbl_inits): Don't do anything for non-vptr
1123         containing binfos. For case 1 primary virtual bases, keep
1124         checking that we've not emerged from the hierarchy of RTTI_BINFO.
1125
1126 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
1127
1128         PR c++/3089
1129         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
1130         hierarchy looking for primary bases for a ctor
1131         vtable. Recursively call oneself, if we meet our primary via
1132         this route and haven't met it yet via inheritance graph order.
1133
1134 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
1135
1136         * lang-options.h: Emit documentation for -fno-honor-std, not
1137         -fhonor-std.
1138
1139 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
1140
1141         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
1142         Don't clobber delta.
1143         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
1144
1145 2001-06-10  Mark Mitchell <mark@codesourcery.com>
1146             Gabriel Dos Reis  <gdr@codesourcery.com>
1147
1148         * Make-lang.in (cp/call.o): Depend on diagnostic.h
1149         (cp/typeck.o): Depend on diagnostic.h
1150         (cp/typeck2.o): Depend on diagnostic.h
1151         (cp/repo.o): Depend on dignostic.h
1152         * typeck.c: #include diagnostic.h
1153         (convert_for_initialization): Remove extern declaration for
1154         warningcount and errorcount.
1155
1156         * call.c: #include diagnostic.h
1157         (convert_like_real): Remove extern declaration for warnincount and
1158         errorcount.
1159
1160         * repo.c: #include diagnostic.h
1161         * typeck2.c: #include diagnostic.h
1162
1163 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
1164
1165         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
1166         in previous change.
1167
1168 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
1169
1170         PR c++/2929
1171         * friend.c (do_friend): Use push_decl_namespace for classes at
1172         namespace scope.
1173
1174 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
1175             Jason Merrill <jason_merrill@redhat.com>
1176
1177         PR c++/3061
1178         * class.c (build_secondary_vtable): Use assert, rather than an error
1179         message.
1180         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
1181         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
1182         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
1183         Don't set BINFO_VTABLE for a primary virtual base.
1184
1185 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
1186
1187         * decl.c (duplicate_decls): Update source position information
1188         when a template function is defined.
1189
1190 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
1191
1192         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
1193
1194 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
1195
1196         PR c++/2914
1197         * decl.c (pushtag): Don't push into a complete type's scope.
1198
1199 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
1200
1201         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
1202         (struct lang_decl_flags): Lose generate_with_vtable_p.
1203         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
1204         * class.c (copy_virtuals): Adjust.
1205         * decl2.c (mark_vtable_entries): Adjust.
1206         * method.c (make_thunk, build_vtable_entry): Adjust.
1207         * class.c (update_vtable_entry_for_fn): Only look as far as the
1208         first defining class.
1209         (build_vtbl_initializer): Put nothing in the slot for a function only
1210         defined in a lost primary virtual base.
1211         (add_vcall_offset_vtbl_entries_1): Use the same code for
1212         the lost primary case and the normal case.
1213         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
1214         (get_vfield_offset, get_derived_offset): Lose.
1215         (dfs_find_final_overrider): Use look_for_overrides_here.
1216         (get_matching_virtual): New fn.
1217         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
1218         not BV_VCALL_INDEX.
1219         * search.c (look_for_overrides_here): Split out from...
1220         (look_for_overrides_r): Here.
1221
1222         * class.c (find_final_overrider): Return error_mark_node on error.
1223
1224         * decl2.c (key_method): #if 0 accidental change.
1225
1226 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1227
1228         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
1229         (build_over_call): Likewise.
1230         * decl.c (grokparms): Likewise.
1231         * pt.c (tsubst_decl): Likewise.
1232         * typeck.c (convert_arguments): Likewise.
1233
1234 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
1235
1236         * semantics.c (begin_class_definition): Robustify.
1237
1238         * pt.c (instantiate_decl): Tell the repository code about the
1239         clones, not the cloned functions.
1240         * repo.c (repo_template_used): Explicitly instantiate the cloned
1241         function, not the clones.
1242
1243 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1244
1245         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
1246         ICS_BAD_FLAG on created conversion.
1247         (compare_ics): Break out rank.
1248
1249 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1250
1251         * decl.c (xref_tag): Remove extraneous %s on dependent name
1252         lookup warning.
1253
1254 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1255
1256         * class.c (layout_vtable_decl): Fix off by one error on
1257         build_index_type.
1258         (build_vtt): Likewise.
1259         (build_ctor_vtbl_group): Likewise.
1260
1261 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1262
1263         * class.c (maybe_indent_hierarchy): New function.
1264         (dump_class_hierarchy_r): Add flags. Dump extra binfo
1265         information, if enabled. Use maybe_indent_hierarchy. Adjust
1266         output format.
1267         (dump_class_hierarchy): Adjust prototype. Adjust output format.
1268         (dump_array, dump_vtable, dump_vtt): New functions.
1269         (finish_struct_1): Adjust hierarchy dumping.
1270         (initialize_vtable): Call dump_vtable.
1271         (build_vtt): Call dump_vtt.
1272         (build_ctor_vtbl_group): Call dump_vtable.
1273         * decl2.c (flag_dump_class_layout): Remove.
1274         (cxx_decode_option): Remove dump translation unit
1275         and dump class hierarchy check. Call dump_switch_p.
1276         (finish_file): Adjust dumping.
1277         (dump.c): Only dump base classes if not TDF_SLIM.
1278         Only dump namespace members if not TDF_SLIM.
1279         * optimize.c (dump_function): New function.
1280         (optimize_function): Call dump_function.
1281         * semantics.c (expand_body): Use dump_enabled_p.
1282
1283 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
1284
1285         PR g++/2936
1286         Part missed from first commit
1287         * decl2.c (finish_anon_union): Copy context.
1288
1289 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
1290
1291         PR g++/2936
1292         * optimize.c (remap_decl): Remap anonymous aggregate members too.
1293
1294 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
1295
1296         PR g++/2823
1297         * semantics.c (expand_body): Don't optimize thunks.
1298
1299 2001-05-25  Sam TH  <sam@uchicago.edu>
1300
1301         * cp-tree.h lex.h: Fix header include guards.
1302
1303 2001-05-25  Mark Mitchell <mark@codesourcery.com>
1304
1305         * decl.c (init_decl_processing): Tweak.
1306
1307 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
1308
1309         * decl.c (duplicate_decls): Tidy.
1310         (init_decl_processing): Always set flag_no_builtin.
1311
1312 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
1313
1314         PR c++/2184
1315         * decl2.c (do_local_using_decl): Push the decls, even in a
1316         template.
1317
1318 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
1319
1320         * optimize.c (initialize_inlined_parameters): Don't set
1321         TREE_READONLY for a VAR_DECL taking the place of an inlined
1322         PARM_DECL.
1323
1324 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
1325
1326         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
1327         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
1328         attribute.
1329
1330 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
1331
1332         * parse.y: Refer to compound literals as such, not as
1333         constructor-expressions.
1334
1335 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
1336
1337         * call.c (build_op_delete_call): Ignore exception-specifications
1338         when looking for matching delete operators.
1339         * init.c (build_new_1): Compute whether or not the allocation
1340         function used is a placement allocation function or not, and
1341         communicate this information to build_op_delete_call.
1342
1343 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
1344
1345         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
1346         (build_vtbl_ref): Adjust.
1347         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
1348         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
1349         Re-add vtable-gc.
1350         (unsupported_options): Correspondingly.
1351
1352         * decl2.c (maybe_make_one_only): Check flag_weak, not
1353         supports_one_only().
1354
1355         * cp-tree.def (START_CATCH_STMT): Lose.
1356         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
1357         * tree.c (cp_statement_code_p): Don't case it.
1358         * semantics.c (cp_expand_stmt): Likewise.
1359         * cp-tree.h (START_CATCH_TYPE): Lose.
1360         (HANDLER_TYPE): New.
1361         * except.c (expand_start_catch_block): Don't start any blocks.
1362         Return the type.
1363         (expand_end_catch_block): Don't end any blocks.
1364         * parse.y (handler): Don't pass anything from finish_handler_parms
1365         to finish_handler.
1366         * pt.c (tsubst_expr): Likewise.
1367         * semantics.c (begin_handler): Call note_level_for_catch here.
1368         (finish_handler_parms): Don't return anything.
1369         (genrtl_catch_block, begin_catch_block): Lose.
1370         (genrtl_handler): Call expand_start_catch here.
1371
1372 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
1373
1374         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
1375         (get_vtable_decl, build_vtt): Not here.
1376
1377 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
1378
1379         PR c++/2781
1380         * optimize.c (update_cloned_parm): Copy addressability and other
1381         flags.
1382
1383 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1384
1385         * pt.c (determine_specialization): Ignore artificial functions.
1386
1387 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
1388
1389         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
1390         (C_RID_CODE): Remove.
1391         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
1392         (init_parse): Don't do it here.
1393
1394 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
1395
1396         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
1397         function declaration to avoid stripping the symbol's attributes.
1398
1399 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
1400
1401         * decl.c (pushdecl): Adjust error string.
1402         (xref_tag): Adjust friend class injection warning. Remove the
1403         inherited name from the class shadowed scope.
1404
1405 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
1406
1407         * except.c (cp_protect_cleanup_actions): New function.
1408         (init_exception_processing): Don't set protect_cleanup_actions
1409         here.  Do set lang_protect_cleanup_actions.
1410
1411 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
1412
1413         * spew.c (read_token): Call yyerror on all unexpected tokens.
1414
1415 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
1416
1417         * init.c (member_init_ok_or_else): Take a tree rather than
1418         string for name.
1419         (expand_member_init): Adjust.
1420
1421 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
1422
1423         * decl.c (duplicate_decls): Suppress warning about duplicate
1424         decls if the first decl is a friend.
1425
1426 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
1427
1428         * except.c (choose_personality_routine): Export.  Add
1429         explanatory comment.  Take an enum languages, not a boolean.
1430         (initialize_handler_parm): Adjust to match.
1431         * cp-tree.h: Prototype choose_personality_routine.
1432         * lex.c (handle_pragma_java_exceptions): New function.
1433         (init_cp_pragma): Register #pragma GCC java_exceptions.
1434
1435 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
1436
1437         * method.c (build_mangled_C99_name): Remove unused prototype.
1438
1439 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
1440
1441         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
1442         * typeck.c (get_member_function_from_ptrfunc,
1443         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
1444         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
1445
1446         Reverted Geoff Keating's 2001-05-03's patch.
1447
1448 2001-05-11  Ira Ruben   <ira@apple.com>
1449
1450         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
1451
1452 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
1453
1454         * cp-tree.h (finish_label_expr, lookup_label): Delete.
1455         * parse.y: Update for '&&'; don't issue warning here.
1456         * semantics.c (finish_label_expr): Delete.
1457
1458 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
1459
1460         * splay-tree.h (splay_tree_max): New function.
1461         (splay_tree_min): Likewise.
1462
1463 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
1464
1465         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
1466         (pfn_vflag_identifier): Define.
1467         Update comment about layout of pointer functions.
1468         (build_ptrmemfunc1): Update prototype.
1469         (expand_ptrmemfunc_cst): Update prototype.
1470         * decl.c (initialize_predefined_identifiers): Initialize
1471         pfn_vflag_identifier.
1472         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
1473         an extra field to the type.
1474         * expr.c (cplus_expand_constant): Pass 'flag' between
1475         expand_ptrmemfunc_cst and build_ptrmemfunc1.
1476         * typeck.c (get_member_function_from_ptrfunc): When
1477         FUNCTION_BOUNDARY < 16, look at additional field to determine
1478         if a pointer-to-member is a real pointer or a vtable offset.
1479         (build_ptrmemfunc1): Add new parameter to contain extra field.
1480         (build_ptrmemfunc): Pass the extra field around.
1481         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
1482         (pfn_from_ptrmemfunc): Ignore the extra field.
1483
1484 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
1485
1486         * cp-tree.h (flag_inline_trees): Update documentation.
1487         * decl.c (init_decl_processing): Adjust handling of
1488         flag_inline_functions and flag_inline_trees to support -O3.
1489         (grokfndecl): Set DECL_INLINE on all functions if that's what
1490         the user requested.
1491         (save_function_data): Clear DECL_INLINE in
1492         current_function_cannot_inline is non-NULL.
1493         * decl2.c (flag_inline_trees): Update documentation.
1494
1495 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
1496
1497         * dump.c (cp_dump_tree, USING_STMT case): New case.
1498         * tree.c (cp_statement_code_p): Add USING_STMT.
1499         * decl2.c (do_using_directive): Add the using directive statement.
1500
1501         * tree.c (walk_tree): Reformat an if block.
1502
1503 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
1504
1505         * decl.c (compute_array_index_type): Don't try to do anything with
1506         the indices when processing a template.
1507
1508 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1509
1510         * call.c: NULL_PTR -> NULL.
1511         * class.c: Likewise.
1512         * cvt.c: Likewise.
1513         * decl.c: Likewise.
1514         * decl2.c: Likewise.
1515         * except.c: Likewise.
1516         * init.c: Likewise.
1517         * rtti.c: Likewise.
1518         * search.c: Likewise.
1519         * tree.c: Likewise.
1520         * typeck.c: Likewise.
1521         * typeck2.c: Likewise.
1522
1523 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
1524
1525         * decl2.c (do_using_directive): Revert previous patch.
1526
1527 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1528
1529         * cp-tree.def (USING_STMT): New statement node.
1530         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
1531         * decl2.c (do_using_directive): Add USING_STMT to statement
1532         tree. Don't emit errors when processing template decl.
1533         * pt.c (tsubst_expr, USING_STMT case): New case.
1534         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
1535
1536 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1537
1538         * call.c (build_new_op): Convert args from reference here.
1539         (build_conditional_expr): Don't convert here.
1540
1541 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1542
1543         * spew.c (last_token_id): New static variable.
1544         (read_token): Set it here.
1545         (yyerror): Use it here.
1546
1547 2001-04-30  Richard Henderson  <rth@redhat.com>
1548
1549         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
1550         * decl.c: Likewise.
1551
1552 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
1553
1554         * gxxint.texi: Remove.
1555         * Make-lang.in: Remove all traces of gxxint.texi.
1556
1557 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
1558
1559         * decl2.c (start_static_initialization_or_destruction): Correct
1560         logic to handle the -fno-use-cxa-atexit case.
1561
1562 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
1563
1564         * optimize.c (update_cloned_parm): New function.
1565         (maybe_clone_body): Use it.  Update the `this' parameter too.
1566
1567 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1568
1569         * decl2.c (unsupported_options): Add new-abi.
1570         * lang-options.h: Remove no longer supported options.
1571
1572 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
1573
1574         * except.c (can_convert_eh): Don't check template parms,
1575         typename types etc.
1576
1577 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
1578
1579         * optimize.c (maybe_clone_body): Copy parameter names and locations.
1580
1581 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
1582
1583         * cp-tree.h (adjust_clone_args): Prototype new function.
1584         * class.c (adjust_clone_args): New function.
1585         * decl.c (start_function): Call it for in charge ctors.
1586
1587 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
1588
1589         * method.c (use_thunk): Make sure that thunks really are emitted
1590         when requested.
1591
1592 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
1593
1594         * mangle.c (write_chars): New macro.
1595         (hwint_to_ascii): New function
1596         (write_number): Use it.
1597         (write_integer_cst): Deal with really big numbers.
1598
1599 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
1600
1601         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
1602         the clone.
1603
1604 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
1605
1606         * decl.c (grokdeclarator): Set context of namespace scope
1607         TYPE_DECLS.
1608
1609 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
1610
1611         * cp/optimize.c: Include hashtab.h.
1612         (struct inline_data): Add tree_pruner.
1613         (expand_call_inline, expand_calls_inline): Use it when calling
1614         walk_tree.
1615         (optimize_function): Initialize and free tree_pruner.
1616
1617 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
1618
1619         Lazy __FUNCTION__ generation.
1620         * cp-tree.def (FUNCTION_NAME): Remove.
1621         * cp-tree.h (function_name_declared_p): Remove.
1622         (cp_fname_init): Prototype.
1623         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
1624         don't call declare_function_name. Call start_fname_decls.
1625         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
1626         clobber the line number.
1627         (cp_fname_init): New function.
1628         (start_function): Call start_fname_decls.
1629         (finish_function): Call finish_fname_decls.
1630         * lex.c (reswords): Add slots for __FUNCTION__ et al.
1631         (rid_to_yy): Add mappings for __FUNCTION__ et al.
1632         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
1633         * parse.y (VAR_FUNC_NAME): New token.
1634         (primary): Add VAR_FUNC_NAME.
1635         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
1636         generation.
1637         (tsubst, FUNCTION_NAME case): Remove.
1638         (tsubst_copy, FUNCTION_NAME case): Remove.
1639         (tsubst_expr, DECL_STMT case): Be careful with a
1640         DECL_PRETTY_FUNCTION_P.
1641         (instantiate_decl): Remove function_name_declared_p.
1642         * semantics.c (begin_compound_statement): Don't call
1643         declare_function_name here.
1644         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
1645         (finish_translation_unit): Call finish_fname_decls.
1646         (expand_body): Remove function_name_declared_p.
1647         * typeck2.c (digest_init): Allow any ERROR_MARK.
1648
1649 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
1650
1651         * pt.c (tsubst_decl): Use VOID_TYPE_P.
1652         * semantics.c: Fix some typos.
1653
1654 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
1655
1656         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
1657
1658 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1659
1660         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
1661
1662 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
1663
1664         * except.c (build_throw): Wrap the initialization of the exception
1665         object in a MUST_NOT_THROW_EXPR.
1666         (do_free_exception): #if 0.
1667
1668 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
1669
1670         * cp-tree.h (finish_enum): Change prototype.
1671         * decl.c (finish_enum): Reorganize.
1672         * parse.y (structsp): Adjust calls to finish_enum.
1673
1674 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1675
1676         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
1677         't' case.
1678
1679 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1680
1681         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
1682         (layout_empty_base): Return at end flag.
1683         (build_base_field): Likewise.
1684         (build_base_fields): Likewise.
1685         (layout_virtual_bases): Don't add 1 to eoc value.
1686         (end_of_class): Use full size for empty bases.
1687         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
1688         empty bases. Don't add 1 to eoc value. Only add trailing padding
1689         if we're an empty class with no empty bases.
1690         (dump_class_hierarchy): Dump size and alignment.
1691
1692 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
1693
1694         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
1695         ICS_BAD_FLAG.
1696
1697 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
1698
1699         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
1700         is found, look first if name does not match the structure name.
1701
1702 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
1703
1704         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
1705         set.
1706         (SET_DECL_LANGUAGE): New macro.
1707         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
1708         (pushdecl): Likewise.
1709         (build_library_fn_1): Likewise.
1710         (build_cp_library_fn): Likewise.
1711         (grokfndecl): Likewise.
1712         (grokvardecl): Mark `extern "C"' variables as having C linkage.
1713         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
1714         * lex.c (retrofit_lang_decl): Likewise.
1715         * mangle.c (mangle_decl_string): Don't mangle the names of
1716         variables declared with C language linkage.
1717         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
1718
1719 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1720
1721         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
1722         flag_access_control from uninitialized storage.
1723
1724 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
1725
1726         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
1727         * mangle.c (write_pointer_to_member_type): Fix mangling of
1728         pointers to cv-qualified member function types.
1729
1730         * init.c (build_delete): Create a SAVE_EXPR for the address if
1731         we're going to use it more than once.
1732
1733 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
1734
1735         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
1736         (expand_ptremfunc_cst): Change prototype.
1737         (delta2_from_ptrmemfunc): Remove.
1738         * expr.c (cplus_expand_constant): Adjust call to
1739         expand_ptrmemfunc_cst.
1740         * typeck.c (build_ptrmemfunc1): Simplify.
1741         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
1742         results in a constant.
1743         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
1744         (delta2_from_ptrmemfunc): Remove.
1745         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
1746
1747 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
1748
1749         * cp-tree.h (decl_namespace_list): New macro.
1750         (struct saved_scope): Add decl_ns_list.
1751         * decl.c (mark_saved_scope): Mark it.
1752         * decl2.c: Lose static decl_namespace_list.
1753         (init_decl2): Don't save it.
1754
1755 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1756
1757         * cp-tree.h (warn_return_type, yylex): Delete redundant
1758         declarations.
1759
1760         * decl.c (current_class_depth, global_namespace): Likewise.
1761
1762         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
1763
1764         * repo.c (flag_use_repository): Likewise.
1765
1766 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1767
1768         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
1769         set_block, pushdecl, getdecls, gettags, init_decl_processing,
1770         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
1771         lvalue_or_else, print_lang_statistics, comp_target_types,
1772         unsigned_type, signed_type, signed_or_unsigned_type,
1773         build_function_call, mark_addressable, incomplete_type_error):
1774         Delete redundant declarations.
1775
1776 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
1777
1778         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
1779         (TYPE_ANONYMOUS_P): New macro.
1780         (TAGGED_TYPE_P): New macro.
1781         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
1782         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
1783         * tree.c (no_linkage_helper): Likewise.
1784         * semantics.c (begin_class_definition): Likewise.
1785         * pt.c (convert_template_argument): Likewise.
1786         * lex.c (check_for_missing_semicolon): Likewise.
1787
1788 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
1789
1790         * class.c (dfs_unshared_virtual_bases): New function.
1791         (mark_primary_bases): Call it.
1792         (check_bases): Ignore virtual bases when determining
1793         nearly-emptiness.
1794
1795 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
1796
1797         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
1798
1799 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
1800
1801         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
1802         cloned function to the clone.
1803
1804 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1805
1806         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
1807
1808         * semantics.c: Include expr.h.
1809
1810 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
1811
1812         * method.c (implicitly_declare_fn): Commonize code for copy ctor
1813         and assignment op. Set TREE_USED for parameter.
1814
1815 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
1816
1817         * class.c (find_final_overrider_data): Add `candidates'.
1818         (dfs_find_final_overrider): Don't issue error messages
1819         prematurely.
1820         (find_final_overrider): Issue error messages here.
1821         (build_base_field): Don't warn about amgibuous direct bases here.
1822         (warn_about_ambiguous_direct_bases): New function.
1823         (layout_class_type): Use it.
1824
1825 2001-04-10  Richard Henderson  <rth@redhat.com>
1826
1827         * typeck.c (build_array_ref): Push the array reference inside
1828         COMPOUND_EXPR and COND_EXPR.
1829
1830 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
1831
1832         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
1833         * decl.c (duplicate_decls): Adjust accordingly.
1834         (maybe_commonize_var): Likewise.
1835         (grokfndecl): Likewise.
1836         (start_function): Likewise.
1837         (start_method): Likewise.
1838         * decl2.c (key_method): Likewise.
1839         (import_export_decl): Likewise.
1840         * method.c (implicitly_declare_fn): Likewise.
1841         * optimize.c (maybe_clone_body): Likewise.
1842
1843 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
1844
1845         * lang-specs.h: Add __DEPRECATED.
1846
1847 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
1848
1849         * search.c (get_dynamic_cast_base_type): When building a new
1850         constant, set its type to ssizetype.
1851
1852 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
1853
1854         * optimize.c (expand_call_inline): Only add newly inlined statements
1855         into inlined_stmts.
1856
1857 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
1858
1859         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
1860         (OPERATOR_FORMAT): Likewise.
1861         (OPERATOR_TYPENAME_FORMAT): Likewise.
1862         * operators.def: Remove old name-mangling information.
1863         * decl.c (grok_op_properties): Adjust accordingly.
1864         * lex.c (init_operators): Likewise.
1865         * rtti.c (get_tinfo_decl): Issue error messages about types that
1866         have variable size.
1867
1868 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
1869
1870         * decl2.c (import_export_decl): Don't call import_export_class
1871         when processing an inline member function.
1872         * semantics.c (expand_body): Call import_export_decl before
1873         emitting inline functions.
1874
1875 2001-03-28  Richard Henderson  <rth@redhat.com>
1876
1877         IA-64 ABI Exception Handling:
1878         * cp-tree.def (EH_SPEC_BLOCK): New.
1879         (MUST_NOT_THROW_EXPR): New.
1880         * cp-tree.h: Update changed function declarations.
1881         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
1882         (CPTI_CALL_UNEXPECTED): New.
1883         (struct cp_language_function): Rename x_eh_spec_try_block
1884         to x_eh_spec_block.
1885         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
1886         * decl.c (current_binding_level): If no current function
1887         bindings, revert to scope_chain.
1888         (initialize_predefined_identifiers): Remove __cp_push_exception.
1889         (store_parm_decls): Use begin_eh_spec_block.
1890         (finish_function): Use finish_eh_spec_block.
1891         (mark_lang_function): Update for name changes.
1892         * decl2.c (finish_file): No mark_all_runtime_matches.
1893         * dump.c (cp_dump_tree): Handle new tree codes.
1894         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
1895         * except.c (catch_language_init, catch_language): Remove.
1896         (init_exception_processing): Don't set language code.
1897         Initialize call_unexpected_node, protect_cleanup_actions,
1898         eh_personality_libfunc, lang_eh_runtime_type.
1899         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
1900         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
1901         (prepare_eh_type): Split out type canonicalizations ...
1902         (build_eh_type_type): ... from here.
1903         (build_eh_type_type_ref): Remove.
1904         (mark_all_runtime_matches): Remove.
1905         (build_exc_ptr): New.
1906         (do_begin_catch, do_end_catch): New.
1907         (do_pop_exception): Remove.
1908         (build_terminate_handler): Remove.
1909         (choose_personality_routine): Split out language choice from ...
1910         (initialize_handler_parm): ... here.
1911         Use MUST_NOT_THROW_EXPR.
1912         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
1913         exception object handling.
1914         (expand_start_eh_spec, expand_end_eh_spec): Remove.
1915         (expand_exception_blocks, alloc_eh_object): Remove.
1916         (begin_eh_spec_block, finish_eh_spec_block): New.
1917         (do_allocate_exception, do_free_exception): New.
1918         (expand_throw): Merge into ...
1919         (build_throw): ... here.  Update for abi.
1920         * expr.c (cplus_expand_expr): No expand_internal_throw.
1921         Handle MUST_NOT_THROW_EXPR.
1922         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
1923         * semantics.c (*) Update for except.h name changes.
1924         (genrtl_try_block): No protect_with_terminate.
1925         (genrtl_eh_spec_block): New.
1926         (genrtl_handler): Don't emit the goto here.
1927         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
1928         (genrtl_finish_function): Don't expand_exception_blocks.
1929         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
1930
1931 2001-03-28  Richard Henderson  <rth@redhat.com>
1932
1933         * decl.c (struct named_label_list): Rename eh_region to
1934         in_try_scope, add in_catch_scope.
1935         (struct binding_level): Rename eh_region to is_try_scope,
1936         add is_catch_scope.
1937         (note_level_for_try): Rename from note_level_for_eh.
1938         (note_level_for_catch): New.
1939         (poplevel): Copy both is_try_scope and is_catch_scope to
1940         the named_label_list struct.
1941         (check_previous_goto_1): Don't check for catch block via
1942         DECL_ARTIFICIAL; use in_try_scope instead.
1943         (check_goto): Likewise.
1944         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
1945         * except.c (expand_start_catch_block): Call note_level_for_catch.
1946         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
1947
1948 2001-03-27  Richard Henderson  <rth@redhat.com>
1949
1950         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
1951         exceptions_via_longjmp.
1952
1953 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
1954
1955         * pt.c (check_default_tmpl_args):  Make error messages clearer.
1956
1957 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
1958
1959         * error.c:  Also undefine 'A' macro used for cp_printers definition.
1960
1961 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1962
1963         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1964
1965 2001-03-26  Mike Yang <yang@research.att.com>
1966             Mark Mitchell  <mark@codesourcery.com>
1967
1968         * dump.c (dump_access): New function.
1969         (cp_dump_tree): Use it.  Dump basetype information for class
1970         types.
1971
1972 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
1973
1974         * Makefile.in (optimize.o): Depend on params.h.
1975         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
1976         (init_decl_processing): Set flag_no_inline when doing
1977         inlining-on-trees.
1978         * optimize.c: Include params.h.
1979         (struct inline_data): Improve documentation of FNS.  Add
1980         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
1981         (INSNS_PER_STMT): New macro.
1982         (remap_block): Use CLONING_P.
1983         (inlinable_function_p): Don't inline big functions.
1984         (expand_call_inline): Keep track of how much inlining we've done.
1985         (optimize_function): Set FIRST_INLINED_FN.
1986         (maybe_clone_body): Set CLONING_P.
1987         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
1988         tree nodes.
1989         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
1990         rest_of_compilation.  Clear DECL_RTL for local variables
1991         afterwards.
1992         (clear_decl_rtl): New function.
1993
1994 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
1995
1996         Implement DR 209
1997         * cp-tree.h (skip_type_access_control,
1998         reset_type_access_control): Prototype.
1999         * decl.c (grokdeclarator): Access of friends is not checked.
2000         * parse.y (component_decl_list): Reset type access control.
2001         * semantics.c (decl_type_access_control): Clear
2002         current_type_lookups.
2003         (save_type_access_control): Don't save if not deferring.
2004         (skip_type_access_control, reset_type_access_control): New
2005         functions.
2006         (begin_class_definition): Do type access control for basetypes.
2007         Start deferred access control.
2008         (finish_class_definition): Resume immediate access control if
2009         this is a local class.
2010
2011 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2012
2013         * class.c (add_method): Use memcpy/memmove, not bcopy.
2014
2015         * decl.c (duplicate_decls): Likewise.
2016
2017 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
2018
2019         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
2020         not `_'.
2021
2022 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
2023
2024         * decl.c (local_names): Define.
2025         (push_local_name): New.
2026         (grok_reference_init): Return init if initializing static reference
2027         variable with non-constant instead of emitting it.
2028         Move expand_static_init call to cp_finish_decl.
2029         (layout_var_decl): Call push_local_name.
2030         (maybe_commonize_var): Allow inlining functions even if they have
2031         static local variables, use comdat_linkage for them if flag_weak.
2032         (check_initializer): Call obscure_complex_init if
2033         grok_reference_init returned non-zero.
2034         (save_function_data): Clear x_local_names.
2035         (pop_cp_function_context): Free x_local_names.
2036         (mark_inlined_fns): Remove.
2037         (mark_lang_function): Mark x_local_names.
2038         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
2039         Mark inlined_fns as tree, remove call to mark_inlined_fns.
2040         * class.c (alter_access): Ensure DECL_ACCESS is never set if
2041         DECL_DISCRIMINATOR_P.
2042         * cp-tree.h (cp_language_function): Add x_local_names.
2043         (lang_decl_flags): Add discriminator into u2.
2044         (lang_decl_inlined_fns): Remove.
2045         (lang_decl): inlined_fns is now a TREE_VEC.
2046         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
2047         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
2048         TREE_VEC, not a custom structure.
2049         (optimize_function): Likewise.
2050         * mangle.c (discriminator_for_local_entity): Discriminate among
2051         VAR_DECL local entities.
2052         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
2053         is not valid.
2054
2055 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
2056
2057         Add support for Java interface method calls.
2058         * cp-tree.h (struct lang_type): Add java_interface flag.
2059         (TYPE_JAVA_INTERFACE): New macro.
2060         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
2061         by setting TYPE_JAVA_INTERFACE.
2062         * call.c (java_iface_lookup_fn): New static.
2063         (build_over_call): If calling a method declared in a
2064         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
2065         expression which resolves the function address.
2066         (build_java_interface_fn_ref): New function.
2067
2068 2001-03-22  Richard Henderson  <rth@redhat.com>
2069
2070         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
2071         * except.c: Don't include it.
2072
2073 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
2074             based on an idea from Joe Buck <jbuck@synopsys.com>
2075
2076         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
2077         New nonterminals.
2078         (data_def, component_decl): Add reductions to bad_decl.
2079
2080 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
2081
2082         * method.c (do_build_assign_ref): Don't use build_modify_expr for
2083         anonymous aggregates, since they don't have assignment operator
2084         method.
2085         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
2086         assignment operators for anonymous structure fields.
2087
2088 2001-03-21  Jason Merrill  <jason@redhat.com>
2089
2090         * pt.c (instantiate_decl): Abort if we see a member constant
2091         instantiation that doesn't already have its initializer.
2092         Downgrade explicit instantiation without definition to pedwarn.
2093
2094         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
2095         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
2096         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
2097
2098         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
2099         (pending_vtables): Remove.
2100         * decl2.c (pending_vtables): Remove.
2101         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
2102         CLASSTYPE_VTABLE_NEEDS_WRITING.
2103         (import_export_class): Likewise.
2104         (init_decl2): Don't mark pending_vtables.
2105         * lex.c (handle_pragma_vtable): Just sorry.
2106         * pt.c (instantiate_class_template): Don't mess with
2107         CLASSTYPE_VTABLE_NEEDS_WRITING.
2108         (mark_class_instantiated): Likewise.
2109         * ptree.c (print_lang_type): Don't print it.
2110         * semantics.c (begin_class_definition): Don't set it.
2111
2112         * pt.c (template_tail): Replace with last_pending_template.
2113         (maybe_templates, maybe_template_tail): Remove.
2114         (add_pending_template): Adjust.
2115         (instantiate_pending_templates): Adjust.
2116
2117         * cp-tree.h (struct saved_scope): Remove lang_stack field.
2118         (current_lang_stack): Remove.
2119         * decl.c (maybe_push_to_top_level): Don't initialize it.
2120         (duplicate_decls): Use current_lang_depth.
2121         (xref_basetypes): Likewise.
2122         * class.c (current_lang_depth): New fn.
2123         (push_lang_context): Use more varray functionality.
2124         (pop_lang_context): Likewise.
2125
2126         * error.c (GLOBAL_THING): Always use '__'.
2127
2128 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
2129
2130         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
2131
2132         * mangle.c (mangle_decl_string): Mangle the names of overloaded
2133         operators, even when they have `extern "C"' linkage.
2134
2135 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
2136
2137         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
2138         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
2139         where it's not necessary.
2140         (add_method): Remove optimization involving comparison of
2141         DECL_ASSEMBLER_NAME.
2142         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
2143         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
2144         where it's not necessary.
2145         (check_methods): Likewise.
2146         (build_clone): Likewise.
2147         (built_vtt): Likewise.
2148         * cp-tree.h (DECL_NEEDED_P): Likewise.
2149         * decl.c (pushtag): Likewise.
2150         (duplicate_decls): Likewise.
2151         (pushdecl): Likewise.
2152         (builtin_function): Likewise.
2153         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
2154         (build_cp_library_fn): Likewise.
2155         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
2156         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
2157         where it's not necessary.
2158         (make_rtl_for_nonlocal_decl): Likewise.
2159         (cp_finish_decl): Likewise.
2160         (grokfndecl): Likewise.
2161         (grokvardecl): Likewise.
2162         (grokdeclarator): Likewise.
2163         (start_function): Likewise.
2164         (cp_missing_return_ok_p): Likewise.
2165         * decl2.c (grokclassfn): Likewise.
2166         (check_classfn): Likewise.
2167         (finish_static_data_member_decl): Likewise.
2168         (grokfield): Likewise.
2169         * error.c (GLOBAL_IORD_P): Remove.
2170         (dump_global_iord): Improve output.
2171         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
2172         * except.c (nothrow_libfn_p): Summarily reject any function not in
2173         namespace-scope.
2174         * init.c (build_java_class_ref): Don't explicitly set
2175         DECL_ASSEMBLER_NAME after calling mangle_decl.
2176         * mangle.c (mangle_decl_string): Handle extern "C" functions.
2177         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
2178         * method.c (set_mangled_name_for_decl): Don't explicitly set
2179         DECL_ASSEMBLER_NAME after calling mangle_decl.
2180         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
2181         IDENTIFIER_GLOBAL_VALUE for the thunk.
2182         * pt.c (set_mangled_name_for_template_decl): Remove.
2183         (check_explicit_specialization): Don't use it.
2184         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
2185         (tsubst_friend_function): Likewise.
2186         (tsubst_decl): Likewise.
2187         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
2188         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
2189         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
2190         where it's not necessary.
2191         (tinfo_base_init): Likewise.
2192         (create_real_tinfo_var): Likewise.
2193         * search.c (looup_field_1): Likewise.
2194         * semantics.c (finish_named_return_value): Likewise.
2195         * tree.c (init_tree): Set lang_set_decl_assembler_name.
2196
2197 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2198
2199         Correct semantics restrictions checking in throw-expression.
2200         * except.c (is_admissible_throw_operand): New function.
2201         (build_throw): Use it.
2202
2203 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
2204
2205         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
2206         and its ilk.
2207
2208 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
2209
2210         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
2211         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
2212         * decl.c (duplicate_decls): Likewise.
2213         (builtin_function): Likewise.
2214         (build_library_fn): Likewise.
2215         (build_cp_library_fn): Likewise.
2216         (check_initializer): Likewise.
2217         (cp_finish_decl): Likewise.
2218         * decl2.c (grokfield): Likewise.
2219         (grok_function_init): Remove #if 0'd code.
2220         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
2221         * friend.c (do_friend): Likewise.
2222         * init.c (get_temp_regvar): Likewise.
2223         * method.c (make_thunk): Likewise.
2224         * pt.c (tsubst_friend_function): Likewise.
2225         (tsubst_decl): Likewise.
2226         (regenerate_decl_from_template): Likewise.
2227         * semantics.c (genrtl_named_return_value): Likewise.
2228         (expand_body): Likewise.
2229         (genrtl_finish_function): Likewise.
2230         * tree.c (cp_tree_equal): Likewise.
2231
2232 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
2233
2234         * call.c (convert_like_real): Add extra semantics to INNER
2235         parameter. Don't convert to temporary if a user conversion
2236         gives us an lvalue that we're about to bind to a reference.
2237         Set INNER to indicate pending reference binding on recursive
2238         calls.
2239
2240 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
2241
2242         * cp/lex.c: Delete duplicate pending_lang_change.
2243
2244 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
2245
2246         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
2247         Similarly.
2248         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
2249         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
2250
2251 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
2252
2253         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
2254
2255 2001-03-08  Stan Shebs  <shebs@apple.com>
2256
2257         * cp-tree.h (set_identifier_local_value): Remove unused decl.
2258
2259 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
2260
2261         * spew.c: Remove references to CPP_OSTRING.
2262
2263 2001-03-06  Andrew Haley  <aph@redhat.com>
2264
2265         * typeck.c (convert_arguments): Check that we have an fndecl.
2266
2267 2001-03-05  Andrew Haley  <aph@redhat.com>
2268
2269         * typeck.c (convert_arguments): Don't do ellipsis conversion for
2270         __built_in_constant_p.
2271
2272 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
2273
2274         * typeck.c (build_static_cast): Allow enum to enum conversions
2275         as per DR 128.
2276
2277 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
2278
2279         * class.c (check_field_decls): Pointers to member do not a
2280         non-pod struct make, as per DR 148.
2281
2282 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
2283
2284         * call.c (joust): cp_pedwarn when using gnu extension concerning
2285         worst conversion sequences.
2286
2287 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
2288
2289         * decl.c: Replace all uses of 'boolean' with 'bool'.
2290
2291 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
2292
2293         * lang-specs.h: Add zero initializer for cpp_spec field to
2294         all array elements that need one.  Don't put an #ifdef inside
2295         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
2296         use it.
2297
2298 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
2299
2300         Implement using decls inside template functions.
2301         * decl2.c (validate_nonmember_using_decl): Don't special case
2302         fake_std_node in the global namespace. Don't reject early when
2303         processing a template.
2304         (do_local_using_decl): Add to statement tree. Don't do further
2305         processing when building a template.
2306         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
2307
2308 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
2309
2310         * decl2.c (do_nonmember_using_decl): Don't complain if we find
2311         same function. Do complain about ambiguating extern "C"
2312         declarations.
2313
2314 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
2315
2316         Remove floating point and complex type template constant parms.
2317         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
2318         COMPLEX_TYPE extensions.
2319         (invalid_nontype_parm_type_p): Likewise.
2320
2321 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
2322
2323         * except.c (call_eh_info): Revert "match_function"'s type.
2324
2325 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
2326
2327         Fix ctor vtable vcall offsets.
2328         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
2329         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
2330         (get_matching_base): Remove.
2331         (get_original_base): New function.
2332         (build_vtbl_initializer): Initialize vid.rtti_binfo.
2333         Use a virtual thunk for a ctor vtable with an index
2334         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
2335         primary base within a constructor vtable. Only set
2336         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
2337         when primary base has been lost.
2338         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
2339
2340 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
2341
2342         * call.c (joust): Ensure more_specialized()'s argument length
2343         parameter has correct value for constructors.
2344
2345 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
2346
2347         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
2348
2349         * decl.c (mark_inlined_fns): Prototype.
2350
2351 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
2352
2353         * spew.c (yylex): Correct handling of friends.
2354
2355 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
2356
2357         * mangle.c (write_encoding): Pass write_function_type the
2358         FUNCTION_DECL for the function being encoded.
2359         (write_function_type): Pass it along to write_bare_function_type.
2360         (write_bare_function_type): Pass it along to write_method_parms.
2361         (write_method_parms): Don't mangle the compiler-generated
2362         parameters to a constructor or destructor.
2363
2364 2001-02-22  Andreas Jaeger  <aj@suse.de>
2365
2366         * optimize.c: Include toplev.h for
2367         note_deferral_of_defined_inline_function prototype.
2368
2369 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
2370
2371         * cp-tree.h (struct lang_decl_inlined_fns): New.
2372         (struct lang_decls): Add inlined_fns.
2373         (DECL_INLINED_FNS): New macro.
2374         * optimize.c (struct inline_data): Add inlined_fns.
2375         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
2376         (inlinable_function_p): Likewise, fix typo in comment,
2377         function is not inlinable if it already inlined function currently
2378         being optimized.
2379         (expand_call_inline): Add fn to inlined_fns if necessary.
2380         (optimize_function): Initialize inlined_fns.
2381         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
2382         * decl.c (mark_inlined_fns): New function.
2383         (lang_mark_tree): Call it.
2384
2385 2001-02-21  Jason Merrill  <jason@redhat.com>
2386
2387         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
2388         (DECL_UNINLINABLE): Move to middle-end.
2389
2390         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
2391         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
2392         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
2393         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
2394         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
2395
2396         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
2397         second parm of op=.
2398
2399 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
2400
2401         * decl2.c (set_decl_namespace): Allow explicit instantiations in
2402         any namespace.
2403
2404 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2405
2406         * optimize.c (expand_call_inline): Don't walk subtrees of type
2407         nodes.
2408
2409 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
2410
2411         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
2412         for a destructor.
2413
2414 2001-02-18  Jason Merrill  <jason@redhat.com>
2415
2416         Do put the VTT parameter in DECL_ARGUMENTS.
2417         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
2418         (current_vtt_parm): New macro.
2419         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
2420         (DECL_HAS_VTT_PARM_P): New macro.
2421         (DECL_VTT_PARM): Remove.
2422         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
2423         * decl.c (duplicate_decls): Only copy the operator code if
2424         appropriate.
2425         (start_function): Set current_vtt_parm.
2426         (lang_mark_tree): Don't mark vtt_parm.
2427         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
2428         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
2429         * class.c (build_clone): Maybe remove the VTT parm.
2430         * optimize.c (maybe_clone_body): Set up the VTT parm.
2431         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
2432         * call.c (build_over_call): Just allow the VTT arg.
2433         * method.c (make_thunk): Don't set DECL_VTT_PARM.
2434         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
2435         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
2436         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
2437         * error.c (dump_function_decl): Likewise.
2438         * call.c (build_user_type_conversion_1, convert_like_real): Abort
2439         if we try to call a constructor with in-charge or VTT parms.
2440         * method.c (skip_artificial_parms_for): New fn.
2441         * call.c (add_function_candidate, build_over_call): Call it.
2442         * call.c (build_new_method_call): Use current_vtt_parm.
2443         * init.c (expand_virtual_init): Likewise.
2444         * class.c (same_signature_p): No longer static.
2445         * cp-tree.h: Declare it.
2446         * search.c (look_for_overrides_r): Use it.
2447
2448 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
2449
2450         * cp-tree.h (new_abi_rtti_p): Remove.
2451         (name_mangling_version): Likewise.
2452         (flag_do_squangling): Likewise.
2453         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
2454         * decl.c (grokfndecl): Likewise.
2455         * decl2.c (name_mangling_version): Remove.
2456         (flag_do_squangling): Likewise.
2457         (lang_f_options): Remove `squangle'.
2458         (unsupported_options): Add `squangle'.
2459         (cxx_decode_option): Issue a warning about uses of
2460         -fname-mangling-version.
2461         (finish_file): Remove old ABI support.
2462         * pt.c (check_explicit_specialization): Likewise.
2463         (tsubst_decl): Likewise.
2464         * rtti.c (init_rtti_processing): Likewise.
2465         (build_headof): Likewise.
2466         (get_tinfo_decl_dynamic): Likewise.
2467         (tinfo_from_decl): Likewise.
2468         (build_dynamic_cast_1): Likewise.
2469         (synthesize_tinfo_var): Likewise.
2470         * init.c (build_new): Allow enumeration types for the array-bounds
2471         in a direct-new-declarator.
2472
2473         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
2474
2475         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
2476         TREE_PROTECTED from the template being specialized.
2477
2478 2001-02-17  Jason Merrill  <jason@redhat.com>
2479
2480         * decl2.c (build_artificial_parm): Set TREE_READONLY.
2481
2482         * decl.c (bad_specifiers): Allow throw specs on things with
2483         pointer-to-function or -member-function type.
2484         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
2485         a pmf.
2486
2487 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
2488
2489         * call.c (check_dtor_name): Handle template names correctly.
2490
2491 2001-02-16  Jason Merrill  <jason@redhat.com>
2492
2493         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
2494         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
2495         * optimize.c (maybe_clone_body): Don't substitute it.
2496         * call.c (build_new_method_call): Check in_chrg instead.
2497         * init.c (expand_virtual_init): Likewise.
2498
2499 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
2500
2501         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
2502         class-type introduces at least a type-name.
2503
2504 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
2505
2506         * call.c (convert_like_real): Create a temporary for non-lvalue.
2507
2508 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
2509
2510         * cp-tree.h: Fix typos in comments.
2511
2512 2001-02-16  Jason Merrill  <jason@redhat.com>
2513
2514         * optimize.c (remap_block): If we're compiling a clone, pass the
2515         new block to insert_block.
2516
2517 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
2518
2519         * semantics.c (finish_asm_stmt): Robustify.
2520
2521 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
2522
2523         * pt.c (push_template_decl_real): Don't remangle the name of a
2524         class template.
2525
2526 2001-02-15  Jim Meyering  <meyering@lucent.com>
2527
2528         * Make-lang.in (c++.install-common): Depend on installdirs.
2529         (c++.install-info): Likewise.
2530         (c++.install-man): Likewise.
2531
2532 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
2533
2534         * typeck2.c (build_m_component_ref): Robustify.
2535
2536 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
2537
2538         * friend.c (do_friend): Don't take the nested [template] class
2539         into account when deciding whether to warn about the friend
2540         function not referring to a template function.
2541
2542 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
2543
2544         * typeck.c (build_unary_op): Clarify error message.
2545
2546 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
2547
2548         * parse.y (component_constructor_declarator): allow optional
2549         parentheses around constructor class name.
2550
2551 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2552
2553         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
2554         section.
2555         * init.c (emit_base_init): Remove incorrect comment about
2556         virtual bases.
2557         * method.c (make_thunk): Fix comment alignment.
2558
2559 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2560
2561         Kill remnants of this is variable.
2562         * cp-tree.h (flag_this_is_variable): Remove.
2563         * decl2.c (flag_this_is_variable): Remove.
2564         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
2565         (build_vbase_path): The path is non-static, even in a cdtor.
2566         (resolves_to_fixed_type_p): Add additional return value.
2567         * search.c (init_vbase_pointers): Adjust.
2568         * tree.c (lvalue_p_1): Adjust.
2569         * typeck.c (mark_addressable): Adjust.
2570
2571 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2572
2573         * pt.c (unify): Don't check cv quals of array types.
2574
2575 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2576
2577         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
2578         check whether we already have the type.
2579
2580 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
2581
2582         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
2583         * call.c (build_op_delete_call): Simplify to remove duplicate
2584         code.
2585         * class.c (clone_function_decl): Don't build the deleting variant
2586         of a non-virtual destructor.
2587         * decl.c (finish_destructor_body): Don't call delete if this is a
2588         non-virtual destructor.
2589         * init.c (build_delete): Explicitly call `operator delete' when
2590         deleting an object with a non-virtual destructor.
2591
2592 2001-02-13  Jason Merrill  <jason@redhat.com>
2593
2594         * lang-specs.h: Add more __EXCEPTIONS.
2595
2596 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
2597
2598         * typeck2.c (process_init_constructor): Check
2599         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
2600
2601 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
2602
2603         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
2604         Remove spurious information in comment. Allow further
2605         adjustments of REFERENCE_TYPE args.
2606
2607 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
2608
2609         * errfn.c (cp_deprecated): Tweak diagnostic text.
2610         * parse.y (new_initializer): Deprecate initializer lists
2611         extension.
2612
2613 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
2614
2615         Remove old ABI support.
2616
2617 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
2618
2619         * decl2.c (flag_vtable_thunks): Always set it to 1.
2620         (flag_new_abi): Likewise.
2621         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
2622
2623         * Makefile.in (g++spec.o): Fix typo.
2624
2625 2001-02-09  Jason Merrill  <jason@redhat.com>
2626
2627         * lang-specs.h: Restore definition of __EXCEPTIONS.
2628
2629 2001-02-08  Jason Merrill  <jason@redhat.com>
2630
2631         * search.c (shared_member_p): New function.
2632         (lookup_field_r): Use it.
2633         * cp-tree.h (SHARED_MEMBER_P): Remove.
2634
2635         * method.c (process_overload_item): Handle template-dependent array
2636         bounds.
2637         * pt.c (type_unification_real): If we end up with undeduced nontype
2638         parms, try again.
2639
2640         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
2641         types.
2642
2643         * typeck2.c (friendly_abort): Don't say anything if we have
2644         earlier errors or sorries.
2645
2646         * decl.c (check_tag_decl): Notice attempts to redefine bool and
2647         wchar_t.  Ignore if in_system_header.
2648
2649         * decl.c (maybe_push_cleanup_level): New fn...
2650         (start_decl_1): ...split out from here.
2651         * cvt.c (build_up_reference): Use it.
2652         * cp-tree.h: Declare it.
2653
2654 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
2655
2656         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
2657         spec.
2658
2659 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
2660
2661         * pt.c (lookup_template_class): Make sure it's a primary
2662         template or template_template_parm when called from the parser.
2663         (instantiate_template_class): Add assertion.
2664
2665 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
2666
2667         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
2668         from error_mark_node.
2669
2670 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
2671
2672         Fix specification and implementation bugs in V3 ABI
2673         construction vtables.
2674         * cp-tree.h (flag_dump_class_layout): New flag.
2675         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
2676         (BINFO_LOST_PRIMARY_P): New flag.
2677         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
2678         (BINFO_PRIMARY_MARKED_P): Rename to ...
2679         (BINFO_PRIMARY_P): ... here.
2680         (binfo_via_virtual): New prototype.
2681         * decl2.c (flag_dump_class_layout): New flag.
2682         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
2683         use `=' as a file name separator.
2684         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
2685         bases.
2686         (build_vtbl_address): If this is a virtual primary base, then
2687         get the vtbl of what it is ultimately primary for.
2688         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
2689         for BINFO_PRIMARY_P.
2690         (dfs_skip_nonprimary_vbases_markedp): Likewise.
2691         (get_shared_vbase_if_not_primary): Likewise.
2692         (dfs_get_pure_virtuals): Likewise.
2693         (expand_upcast_fixups): Likewise.
2694         (fixup_virtual_upcast_offsets): Likewise.
2695         (dfs_find_vbase_instance): Likewise.
2696         (find_vbase_instance): Likewise.
2697         (binfo_from_vbase): Adjust comment to reflect reality.
2698         (binfo_via_virtual): New function.
2699         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
2700         for binfo walking during VTT construction.
2701         (dfs_mark_primary_bases): Remove.
2702         (force_canonical_binfo_r): New function.
2703         (force_canonical_binfo): New function.
2704         (mark_primary_virtual_base): New function.
2705         (mark_primary_bases): Walk in inheritance graph order, use
2706         mark_primary_virtual_base.
2707         (determine_primary_base): Use some more intermediate variables.
2708         (dfs_find_final_overrider): Don't check for overriding along a
2709         virtual path.
2710         (dfs_modify_vtables): Walk into primary virtual bases too.
2711         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
2712         (build_base_fields): Likewise.
2713         (dfs_set_offset_for_unshared_vbases): Likewise.
2714         (layout_virtual_bases): Likewise.
2715         (end_of_class): Likewise.
2716         (finish_struct_1): Call dump_class_hierarchy, if requested.
2717         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
2718         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
2719         (dump_class_hierarchy): Add file parameter. Append to file, if
2720         required.
2721         (finish_vtbls): Adjust accumulate_vtbl_inits call.
2722         Use canonical base for virtual bases.
2723         (build_vtt): Add more comments. Adjust build_vtt_inits call.
2724         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
2725         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
2726         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
2727         virtual VTTs.
2728         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
2729         from DATA.  We want virtual primary bases and all bases via virtual.
2730         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
2731         virtual base when not a construction vtable.
2732         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
2733         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
2734         Use canonical bases when processing virtual bases.
2735         (accumulate_vtbl_inits): We're interested in any base via a
2736         virtual path.
2737         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
2738         within a construction vtable, determine what is being overridden.
2739         (build_vtbl_initializer): Add more comments
2740         (add_vcall_offset_vtbl_entries_1): Adjust comment.
2741         (build_rtti_vtbl_entries): Check if the base has lost its
2742         primary.
2743
2744 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
2745
2746         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
2747
2748 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2749
2750         * decl.c (pushdecl): Call abort instead of fatal.
2751         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
2752         * init.c (build_new_1): Likewise.
2753         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
2754         * decl.c (build_typename_type): hash_table_init now returns void.
2755         decl.c (init_decl_processing): Make an error non-fatal.
2756
2757 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
2758
2759         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
2760         Document.
2761         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2762         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2763         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2764         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2765         * decl.c (maybe_commonize_var): Use the new name-mangling where
2766         appropriate.
2767         * decl2.c (comdat_linkage): Enhance comments.  Make all
2768         compiler-generated things static, if COMDAT is not available.
2769         (get_tinfo_decl): Do not make typeinfo objects that belong in the
2770         library COMDAT.
2771         (tinfo_base_init): Use the correct mangled name for typeinfo
2772         strings, and push them into the global scope.
2773         (typeinfo_in_lib_p): New function.
2774         (synthesize_tinfo_var): Use it.
2775         (create_real_tinfo_var): Likewise.
2776
2777 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
2778
2779         * decl.c (push_class_binding): Use context_for_name_lookup instead
2780         of CP_DECL_CONTEXT.
2781         * search.c (context_for_name_lookup): Remove static.  Check for NULL
2782         context in the loop.
2783         * cp-tree.h (context_for_name_lookup): Add prototype.
2784
2785 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
2786
2787         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
2788         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
2789         Remove.
2790         * call.c (convert_class_to_reference, build_user_type_conversion_1,
2791         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
2792
2793 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
2794
2795         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
2796         of macros used when compiling g++spec.c.
2797         * g++spec.c (lang_specific_driver): Link with the shared
2798         libgcc by default.
2799
2800 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2801
2802         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
2803         make_reference_declarator, make_call_declarator), method.c
2804         (implicitly_declare_fn), parse.y (namespace_using_decl,
2805         notype_unqualified_id, expr_or_declarator, new_type_id,
2806         after_type_declarator, direct_after_type_declarator,
2807         notype_declarator, complex_notype_declarator,
2808         complex_direct_notype_declarator, qualified_id,
2809         notype_qualified_id, overqualified_id, direct_new_declarator,
2810         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
2811         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
2812         instead of build_parse_node.
2813
2814 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2815
2816         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
2817         (minus_one_node): Moved to top level gcc directory.  Renamed
2818         to integer_minus_one_node.
2819
2820         * init.c (init_init_processing): Don't set minus_one_node.
2821         (build_vec_init): Use integer_minus_one_node.
2822
2823         * rtti.c (get_tinfo_decl_dynamic): Likewise.
2824
2825 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
2826
2827         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
2828         identical and they would be replaced with constant, remove
2829         MODIFY_EXPR from the tree.
2830
2831 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2832
2833         * Make-lang.in: Remove all dependencies on defaults.h.
2834         * call.c: Don't include defaults.h.
2835         * decl.c: Likewise.
2836         * decl2.c: Likewise.
2837         * except.c: Likewise.
2838         * pt.c: Likewise.
2839         * rtti.c: Likewise.
2840         * tree.c: Likewise.
2841         * typeck.c: Likewise.
2842
2843 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
2844
2845         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
2846         operators even in "C" linkage.
2847         * method.c (set_mangled_name_for_decl): Likewise.
2848         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
2849         overloaded operators in "C" linkage.
2850
2851 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
2852
2853         * pt.c (tsubst_decl): Remove IN_DECL parameter.
2854         (tsubst_arg_types): Check parameter is not void.
2855         (tsubst): Adjust tsubst_decl call.
2856
2857 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
2858
2859         * call.c (add_builtin_candidate): Quote std properly, from
2860         previous change.
2861
2862 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2863
2864         * pt.c (check_explicit_specialization): Clone constructors and
2865         destructors.
2866
2867 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
2868
2869         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
2870         indicates anything special about template depth. Make sure we
2871         only count the user visible template classes.
2872
2873 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
2874
2875         * call.c (build_conv): Typo in comment.
2876         (add_builtin_candidate): Add more explanation.
2877         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
2878         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
2879         when we have enumeral types.
2880         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
2881         candidates for relops and eqops.
2882         (joust): Simplify control flow. Allow a non-template user
2883         function to hide a builtin.
2884
2885 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
2886
2887         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
2888         (more_specialized): Add deduction parameter.
2889         * call.c (joust): Adjust more_specialized call.
2890         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
2891         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
2892         (get_bindings_order): Remove.
2893         (get_bindings_real): Add DEDUCE parameter.
2894         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
2895         REFERENCE_TYPE jig for DEDUCE_ORDER.
2896         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
2897         maybe_adjust_types_for_deduction.
2898         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
2899         directly.
2900         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
2901         (check_cv_quals_for_unify): Use new unify qualifier flags.
2902         (unify): Clear new unify qualifier flags.
2903         (get_bindings_real): Add DEDUCE parameter.
2904         (get_bindings): Adjust call to get_bindings_real.
2905         (get_bindings_overload): Likewise.
2906         (most_specialized_instantiation): Adjust call to
2907         more_specialized.
2908
2909 2001-01-19  Jason Merrill  <jason@redhat.com>
2910
2911         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
2912
2913         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
2914         -fnew-abi.
2915
2916 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
2917
2918         * decl2.c (arg_assoc_class): Fix double iteration logic.
2919
2920 2001-01-19  Jason Merrill  <jason@redhat.com>
2921
2922         * init.c (build_delete): Always call convert_force to strip cv-quals.
2923
2924         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
2925         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
2926         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
2927
2928 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
2929
2930         * search.c (get_vbase_1): Count only virtual bases.
2931
2932 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
2933
2934         * class.c (duplicate_tag_error): Robustify flag clearing.
2935
2936 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
2937
2938         * cp-tree.h (lookup_template_class): Add complain parm.
2939         * decl.c (lookup_namespace_name): Adjust call to
2940         lookup_template_class.
2941         (make_typename_type): Likewise.
2942         * semantics.c (finish_template_type): Likewise.
2943         * pt.c (lookup_template_class): Add complain parm. Adjust.
2944         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
2945         (tsubst): Likewise.
2946
2947 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
2948
2949         * pt.c (copy_default_args_to_explicit_spec): Preserve
2950         object's CV quals. Reorganize.
2951
2952 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2953
2954         * typeck.c (build_modify_expr): Say `initialization' for
2955         INIT_EXPRs.
2956         * init.c (build_default_init): Convert to enumeral type, if
2957         needed.
2958
2959 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
2960
2961         * parse.y (nomods_initdcl0): Properly set things up for
2962         initdcl0_innards.
2963
2964 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2965
2966         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
2967         (type_unification_real): Set it.
2968         (unify): Use it.
2969
2970 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2971
2972         * decl.c (finish_destructor_body): Convert to vbase pointer here.
2973
2974 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2975
2976         * semantics.c (begin_class_definition): Check we're not inside a
2977         template parm list.
2978
2979 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2980
2981         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
2982         BASELINK_P.
2983
2984 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2985
2986         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
2987         * call.c (build_over_call): Add comment.
2988
2989 2001-01-16 Daniel Berlin <dberlin@redhat.com>
2990
2991         * cvt.c (ocp_convert): Handle vector type conversion
2992         * typeck2.c (digest_init): Handle vector type initializations
2993
2994 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
2995
2996         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
2997           was given.
2998
2999 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
3000
3001         * pt.c (check_nontype_parm): Rename to ...
3002         (invalid_nontype_parm_type_p): ... here.
3003         (process_template_parm): Adjust.
3004         (convert_template_argument): Adjust.
3005
3006 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
3007
3008         * pt.c (check_nontype_parm): New function.
3009         (process_template_parm): Use it.
3010         (convert_template_argument): Use it.
3011         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
3012         member.
3013
3014 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
3015
3016         * tree.c: Add defaults.h
3017         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
3018         * Make-lang.in (cp/tree.o): Add defaults.h.
3019
3020 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3021
3022         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
3023
3024 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3025
3026         * g++.1: Change to be ".so man1/gcc.1".
3027
3028 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3029
3030         * Make-lang.in (c++.info, c++.install-info): Build and install g++
3031         internals info.
3032         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
3033         ($(srcdir)/cp/g++int.info): New target.
3034         * gxxint.texi: Add info directory entry.  Use @@ in email address.
3035         * .cvsignore: Update.
3036
3037 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
3038
3039         * typeck.c (build_c_cast): Do template processing earlier.
3040         Always pedwarn on array casts.
3041
3042 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
3043
3044         * friend.c (make_friend_class): Make sure a templated class is
3045         actually a template.
3046
3047 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3048
3049         * decl2.c (get_guard): Set linkage from guarded decl.
3050
3051 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3052
3053         * call.c (convert_default_arg): Check for unprocessed
3054         DEFAULT_ARG.
3055         * cp-tree.h (replace_defarg): Move to spew.c.
3056         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
3057         spew.c, which is where they really are.
3058         (done_pending_defargs): Declare.
3059         (unprocessed_defarg_fn): Declare.
3060         * decl.c (replace_defarg): Move to spew.c
3061         * parse.y (structsp): Call done_pending_defargs.
3062         * spew.c (defarg_fns): Rearrange list structure.
3063         (defarg_fnsdone): New static variable.
3064         (defarg_depfns): New static variable.
3065         (init_spew): Adjust.
3066         (add_defarg_fn): Store the type in TREE_TYPE.
3067         (do_pending_defargs): Detect and deal with ordering constraints
3068         and circularity.
3069         (done_pending_defargs): New function.
3070         (unprocessed_defarg_fn): New function.
3071         (replace_defarg): Moved from decl.c. Robustify. Don't save
3072         if circularity detected.
3073
3074 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3075
3076         * pt.c (unify): Check array has a domain, before checking
3077         whether it is variable sized.
3078
3079 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3080
3081         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
3082         parameters with pointers to arrays of unknown bound.
3083
3084 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3085
3086         * parse.y (template_parm_header, template_spec_header): New
3087         reductions. Split out from ...
3088         (template_header): ... here. Use them.
3089         (template_template_parm): Use template_parm_header.
3090         * semantics.c (finish_template_template_parm): Add assert.
3091
3092 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
3093
3094         * mangle.c (write_builtin_type): Fix thinko.
3095
3096         * pt.c (copy_default_args_to_explicit_spec_1): New function.
3097         (copy_default_args_to_explicit_spec): Likewise.
3098         (check_explicit_specialization): Use it.
3099
3100         * class.c (finish_struct_1):  Remove last argument in call to
3101         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
3102         * decl.c (builtin_function): Likewise.
3103         (build_cp_library_fn): Likewise.
3104         (check_initializer): Likewise.
3105         (make_rtl_for_nonlocal_decl): Likewise.
3106         (cp_finish_decl): Likewise.
3107         (start_function): Likewise.
3108         * decl2.c (finish_anon_union): Likewise.
3109         * friend.c (do_friend): Likewise.
3110         * init.c (build_java_class_ref): Likewise.
3111         * method.c (make_thunk): Likewise.
3112         * pt.c (tsubst_friend_function): Likewise.
3113         * semantics.c (expand_body): Likewise.
3114
3115 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
3116
3117         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
3118         looking at DECL_CLONED_FUNCTION for non-functions.
3119
3120 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
3121
3122         * error.c (dump_template_parameter): Use parm to determine how
3123         to print default value.
3124
3125 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
3126
3127         * class.c (duplicate_tag_error): Clear more flags.
3128
3129 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
3130
3131         * call.c (build_new_method_call): Use binfo_for_vbase.
3132
3133 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
3134
3135         * cp-tree.h (flag_cond_mismatch): Don't declare.
3136         * decl2.c (flag_cond_mismatch): Don't define.
3137         (lang_f_options): Remove cond-mismatch.
3138         (unsupported_options): Add cond-mismatch.
3139
3140 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
3141
3142         * class.c (handle_using_decl): Reject using of constructor name
3143         of sourcing class. Allow injecting of a method with same name as
3144         nested class. Fixup error messages.
3145
3146 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
3147
3148         * decl2.c (lang_decode_option): Handle -Wformat=2.
3149
3150 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
3151
3152         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
3153         initialized_in_class.
3154         (DECL_DEFINED_IN_CLASS_P): Rename to ...
3155         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
3156         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
3157         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
3158         * pt.c (check_default_tmpl_args): Adjust for
3159         DECL_INITIALIZED_IN_CLASS_P.
3160         (instantiate_class_template): Likewise.
3161         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
3162
3163         * class.c (finish_struct): Constify saved_filename.
3164
3165 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
3166
3167         * class.c (duplicate_tag_error): Adjust diagnostic.
3168         (finish_struct): Locally set location to start of struct.
3169         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
3170
3171 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
3172
3173         * decl.c (struct binding_level): Adjust class_shadowed comments
3174         to reflect reality.
3175         (push_class_level_binding): Ajust comments to reflect reality.
3176         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
3177         Don't set TREE_VALUE on the class_shadowed list.
3178
3179 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3180
3181         * decl2.c (acceptable_java_type): Allow references too.
3182         * init.c (build_java_class_ref): When using the new ABI, search
3183         `class$' and have it mangled with `mangle_decl.'
3184         * mangle.c (write_java_integer_type_codes): New function.
3185         (write_builtin_type): Detect and mangle Java integer and real
3186         types.
3187
3188 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
3189
3190         * decl2.c (grokfield): Don't accept `asm' specifiers for
3191         non-static data members.
3192
3193 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3194
3195         * expr.c (cplus_expand_expr): Don't reset `target'.
3196
3197 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3198
3199         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
3200
3201 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
3202
3203         * parse.y (template_datadef): Check for error_mark_node.
3204
3205 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
3206
3207         * cp-tree.def (DEFAULT_ARG): Make `x' class.
3208
3209 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
3210
3211         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
3212         (record_builtin_type): Make non-static.
3213         (flag_short_double): Don't declare.
3214         (init_decl_processing): Remove the creation of many tree nodes now
3215         in c_common_nodes_and_builtins.
3216         (build_void_list_node): New function.
3217         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
3218         * cp-tree.h (flag_short_wchar): Don't declare.
3219
3220 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
3221
3222         * call.c (build_conv): Don't use build1 for USER_CONV.
3223         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
3224
3225 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
3226
3227         * lex.c (lang_init): Call c_common_lang_init.
3228
3229 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
3230
3231         * search.c (lookup_fnfields_here): Remove.
3232         (look_for_overrides_r): Use lookup_fnfields_1.
3233         Ignore functions from using declarations.
3234
3235 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
3236
3237         Implement exceptions specifiers for implicit member functions.
3238         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
3239         * method.c (synthesize_exception_spec): New function.
3240         (locate_dtor, locate_ctor, locate_copy): New functions.
3241         (implicitly_declare_fn): Generate the exception spec too.
3242         * search.c (check_final_overrider): Check artificial functions
3243         too.
3244         * typeck2.c (merge_exception_specifiers): New function.
3245
3246 2001-01-03  Jason Merrill  <jason@redhat.com>
3247
3248         * init.c (build_default_init): New fn.
3249         (perform_member_init): Split out from here.
3250         (build_new_1): Use it.  Simplify initialization logic.
3251         (build_vec_init): Take an array, rather than a pointer and maxindex.
3252         Speed up simple initializations.  Don't clean up if we're assigning.
3253         * cp-tree.h: Adjust.
3254         * decl2.c (do_static_initialization): Remove TREE_VEC case.
3255         * parse.y (new_initializer): Return void_zero_node for ().
3256         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
3257         * typeck2.c (digest_init): Only complain about user-written
3258         CONSTRUCTORs.
3259
3260 2000-12-22  Mike Stump  <mrs@wrs.com>
3261
3262         * decl2.c: (max_tinst_depth): Increase to 50.
3263
3264 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
3265
3266         * class.c (invalidate_class_lookup_cache): Zero the
3267         previous_class_values.
3268         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
3269         TREE_INT_CST_HIGH.
3270         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
3271         * decl.c (free_bindings): New variable.
3272         (push_binding): Don't create a new binding if we have one on the
3273         free list.
3274         (pop_binding): Put old bindings on the free list.
3275         (init_decl_processing): Use size_int, not build_int_2.
3276         Register free_bindings as a GC root.
3277         (cp_make_fname_decl): Use size_int, not build_int_2.
3278         (push_inline_template_parms_recursive): Likewise.
3279         (end_template_parm_list): Likewise.
3280         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
3281         (tsubst_template_parms): Use size_int, not build_int_2.
3282         (tsubst): Likewise.
3283         * rtti.c (get_vmi_pseudo_type_info): Likewise.
3284
3285 2001-01-02  Richard Henderson  <rth@redhat.com>
3286
3287         * parse.y (asm): Set ASM_INPUT_P.
3288
3289 2001-01-02  Jason Merrill  <jason@redhat.com>
3290
3291         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
3292         for v3 ABI.
3293
3294         * typeck.c (cp_truthvalue_conversion): New fn.
3295         * cvt.c (ocp_convert): Use it.
3296
3297         * cp-tree.h: Lose c-common.c decls.
3298
3299         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
3300         * cvt.c (convert_to_void): Use type_unknown_p.
3301
3302         * typeck.c (strip_all_pointer_quals): Also strip quals from
3303         pointer-to-member types.
3304
3305         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
3306         parse.y as C.
3307
3308         * call.c (build_new_method_call): Do evaluate the object parameter
3309         when accessing a static member.
3310         * typeck.c (build_component_ref): Likewise.
3311
3312 2001-01-02  Andreas Jaeger  <aj@suse.de>
3313
3314         * decl.c (cp_missing_noreturn_ok_p): New.
3315         (init_decl_processing): Set lang_missing_noreturn_ok_p.
3316
3317 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
3318
3319         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
3320
3321 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
3322
3323         * class.c (pushclass): Remove #if 0'd code.
3324         * cp-tree.h (overload_template_name): Remove.
3325         * decl.c (store_bindings): Simplify.
3326         (pop_from_top_level): Likewise.
3327         * pt.c (overload_template_name): Remove.
3328         (instantiate_decl): Don't call push_to_top_level if it's not
3329         needed.
3330
3331 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
3332
3333         * pt.c (register_local_specialization): Don't return a value.
3334         (lookup_template_class): Use move-to-front heuristic when looking
3335         up template instantiations.
3336         (instantiate_decl): Only push_to_top_level when we're actually
3337         going to instantiate the template.
3338
3339 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
3340
3341         * search.c (binfo_for_vtable): Return least derived class, not
3342         most.  Handle secondary vtables.
3343
3344 2000-12-22  Jason Merrill  <jason@redhat.com>
3345
3346         * pt.c (more_specialized): Don't optimize len==0.
3347         (fn_type_unification): If we're adding the return type, increase len.
3348
3349         * typeck.c (build_binary_op): Fix pmf comparison logic.
3350
3351         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
3352         DECL_STATIC_FUNCTION_P.
3353
3354         * semantics.c (genrtl_finish_function): Don't try to jump to
3355         return_label unless it exists.
3356
3357         In partial ordering for a call, ignore parms for which we don't have
3358         a real argument.
3359         * call.c (joust): Pass len to more_specialized.
3360         (add_template_candidate_real): Strip 'this', pass len.
3361         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
3362         (get_bindings_order): New fn.  Pass len down.
3363         (get_bindings_real): Strip 'this', pass len.
3364         (fn_type_unification): Likewise.
3365         (type_unification_real): Succeed after checking 'len' args.
3366         (most_specialized_instantiation): Lose explicit_args parm.
3367         * class.c (resolve_address_of_overloaded_function): Strip 'this',
3368         pass len.
3369
3370 2000-12-21  Jason Merrill  <jason@redhat.com>
3371
3372         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
3373         DECL_TEMPLATE_RESULT.
3374
3375         * search.c (lookup_field_r): Call lookup_fnfields_1, not
3376         lookup_fnfields_here.
3377
3378         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
3379
3380         * call.c (build_object_call): Also allow conversions that return
3381         reference to pointer to function.
3382         (add_conv_candidate): Handle totype being ref to ptr to fn.
3383         (build_field_call): Also allow members of type reference to function.
3384         Lose support for calling pointer to METHOD_TYPE fields.
3385
3386         * error.c (dump_expr): Handle *_CAST_EXPR.
3387
3388         * typeck2.c (build_scoped_ref): Always convert to the naming class.
3389
3390         * tree.c (break_out_cleanups): Lose.
3391         * cp-tree.h: Remove prototype.
3392         * typeck.c (build_component_ref): Don't break_out_cleanups.
3393         (build_compound_expr): Likewise.
3394         * semantics.c (finish_expr_stmt): Likewise.
3395
3396 2000-12-20  Richard Henderson  <rth@redhat.com>
3397
3398         * cp-tree.h: Update declarations.
3399         * decl.c (finish_case_label): Return the new stmt node.
3400         * semantics.c (finish_goto_stmt): Likewise.
3401         (finish_expr_stmt, finish_return_stmt): Likewise.
3402         (finish_break_stmt, finish_continue_stmt): Likewise.
3403         (finish_asm_stmt): Likewise.
3404         * parse.y (already_scoped_stmt): Set STMT_LINENO.
3405         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
3406         (simple_if, simple_stmt): Return the new stmt node.
3407         (save_lineno): New.
3408
3409 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
3410
3411         * cp-tree.h: Don't declare warn_long_long.
3412
3413 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3414
3415         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
3416         IS_AGGR_TYPE.
3417
3418 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3419
3420         * pt.c (unify): Handle when both ARG and PARM are
3421         BOUND_TEMPLATE_TEMPLATE_PARM.
3422
3423 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3424
3425         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
3426         DECL_TEMPLATE_PARM_P.
3427
3428 2000-12-15  Jason Merrill  <jason@redhat.com>
3429
3430         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
3431
3432         * init.c (build_new_1): Don't strip quals from type.
3433
3434         * decl.c (pushdecl): Don't check for linkage on a non-decl.
3435
3436         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
3437
3438         * call.c (build_new_function_call): Lose space before paren in
3439         error message.
3440         (build_new_method_call): Likewise.
3441
3442         * typeck2.c (build_m_component_ref): Propagate quals from datum.
3443
3444 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3445
3446         * pt.c (check_explicit_specialization): Propagate default
3447         function arguments to explicit specializations.
3448
3449 2000-12-13  DJ Delorie  <dj@redhat.com>
3450
3451         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
3452         and <? operators.
3453
3454 2000-12-08  Jason Merrill  <jason@redhat.com>
3455
3456         * error.c (dump_function_name): Don't let the user see __comp_ctor.
3457
3458         Clean up copy-initialization in overloading code.
3459         * call.c (build_user_type_conversion_1): Die if we are asked to
3460         convert to the same or a base type.
3461         (implicit_conversion): Avoid doing so.  Lose reference binding code.
3462         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
3463         direct-initialization.  Also do direct-init part of copy-init.
3464         (build_user_type_conversion): Don't provide context to convert_like.
3465         * cvt.c (ocp_convert): build_user_type_conversion will now provide
3466         the constructor call for copy-init.
3467
3468         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
3469         instantiation of a member template.
3470         (do_decl_instantiation): Not here.
3471
3472 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
3473
3474         * class.c (check_field_decls): Don't special case anonymous
3475         fields in error messages.
3476         (note_name_declared_in_class): Use %D on diagnostic.
3477
3478         * tree.c (pod_type_p): Use strip_array_types.
3479         (cp_valid_lang_attribute): Likewise.
3480         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
3481         multiple evaluations.
3482         (cp_has_mutable_p): Use strip_array_types.
3483
3484 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
3485
3486         * cp-tree.h (sufficient_parms_p): Declare new function.
3487         * call.c (sufficient_parms_p): New function, broken out of ...
3488         (add_function_candidate): ... here. Use it.
3489         (add_conv_candidate): Use it.
3490         * decl.c (grok_ctor_properties): Use it.
3491
3492 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
3493
3494         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
3495
3496 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
3497
3498         * decl2.c (lang_decode_option): Handle -Wformat-security.
3499
3500 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3501
3502         * pt.c (verify_class_unification): New function.
3503         (get_class_bindings): Use it.
3504         (try_class_unification): Tidy.
3505         (unify): Handle when argument of a template-id is not
3506         template parameter dependent.
3507         (template_args_equal): Handle when TREE_CODE's do not match.
3508
3509 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
3510
3511         * lang-specs.h (c++): When invoking the stand-alone preprocessor
3512         for -save-temps, pass all relevant -Defines to it, and then don't
3513         pass them to cc1plus.
3514
3515 2000-12-05  Will Cohen  <wcohen@redhat.com>
3516
3517         * decl.c (finish_case_label): Cleared
3518         more_cleanups_ok in surrounding function scopes.
3519         (define_label): Likewise.
3520
3521 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
3522
3523         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
3524         (get_matching_virtual): Remove.
3525         (look_for_overrides): Declare new function.
3526         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
3527         DECL_VINDEX here.
3528         * class.c (check_for_override): Move base class iteration code
3529         to look_for_overrides.
3530         * search.c (next_baselink): Remove.
3531         (get_virtuals_named_this): Remove.
3532         (get_virtual_destructor): Remove.
3533         (tree_has_any_destructors_p): Remove.
3534         (struct gvnt_info): Remove.
3535         (check_final_overrider): Remove `virtual' from error messages.
3536         (get_matching_virtuals): Remove. Move functionality to ...
3537         (look_for_overrides): ... here, and ...
3538         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
3539         to be overriding.
3540
3541 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
3542
3543         * typeck.c (get_delta_difference): If via a virtual base,
3544         return zero.
3545         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
3546         adjustment.
3547
3548 2000-12-04  Richard Henderson  <rth@redhat.com>
3549
3550         * error.c (dump_tree): Use output_add_string not OB_PUTS.
3551
3552 2000-12-04  Jason Merrill  <jason@redhat.com>
3553
3554         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
3555         (write_builtin_type): Pass intSI_type_node and the like through
3556         type_for_mode.
3557         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
3558         Pass intSI_type_node and the like through type_for_mode.
3559         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
3560         * pt.c (tsubst, unify): Likewise.
3561         * tree.c (walk_tree): Likewise.
3562         * error.c (dump_type): Likewise.
3563         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
3564
3565         * Make-lang.in: Tweak top comment for emacs.
3566         (cp/TAGS): Restore.
3567
3568         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
3569
3570         * class.c (clone_function_decl): Robustify.
3571
3572 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
3573
3574         * decl.c (store_bindings): Only search in the non modified
3575         old_bindings for duplicates.
3576
3577 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
3578
3579         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
3580         TYPE_POLYMORPHIC_P.
3581
3582         * typeck.c (build_static_cast): Remove unused variable.
3583
3584 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3585
3586         * pt.c: Fix typo in comment.
3587
3588 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
3589
3590         * decl2.c (warn_format): Remove definition.
3591         (lang_decode_option): Handle -Wformat-nonliteral,
3592         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
3593
3594 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
3595
3596         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
3597         (init_decl_processing): Don't create string_type_node,
3598         const_string_type_node, wint_type_node, intmax_type_node,
3599         uintmax_type_node, default_function_type, ptrdiff_type_node and
3600         unsigned_ptrdiff_type_node.  Adjust position of call to
3601         c_common_nodes_and_builtins.
3602         (identifier_global_value): New function.
3603
3604 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
3605
3606         * call.c (standard_conversion): Reject pointer to member
3607         conversions from ambiguous, inaccessible or virtual bases.
3608         * typeck.c (build_static_cast): Don't check pointers to members
3609         specially.
3610
3611 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
3612
3613         * method.c (do_build_copy_constructor): Preserve cv
3614         qualifications when accessing source object members.
3615         (do_build_assign_ref): Likewise. Remove separate diagnostics for
3616         unnamed fields.
3617
3618 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
3619
3620         * method.c (do_build_assign_ref): Construct appropriately
3621         CV-qualified base reference. Don't allow const casts in base
3622         conversion.
3623
3624 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
3625
3626         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
3627         incomplete return type.
3628
3629 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3630
3631         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
3632         * semantics.c (finish_base_specifier): Accept a _TYPE not a
3633         _DECL.
3634
3635 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3636
3637         * spew.c (yyerror): Cope if yylval.ttype is NULL.
3638
3639 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3640
3641         * decl.c (grokdeclarator): Diagnose undefined template contexts.
3642
3643 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3644
3645         * decl.c (grokdeclarator): Do type access control on friend
3646         class.
3647
3648 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
3649
3650         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
3651         bison parser ickiness.
3652         * pt.c (tsubst_friend_function): Enter namespace scope when
3653         tsubsting the function name.
3654         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
3655
3656 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
3657
3658         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
3659         * cvt.c (cp_convert_to_pointer): Add force parameter.
3660         Allow conversions via virtual base if forced.
3661         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
3662         (ocp_convert): Likewise.
3663         * search.c (binfo_from_vbase): Return the virtual base's binfo.
3664         * typeck.c (get_delta_difference): Adjust handling of virtual
3665         bases.
3666
3667 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
3668
3669         * tree.c (struct list_hash): Remove.
3670         (list_hash_table): Make it be an htab.
3671         (struct list_proxy): New type.
3672         (list_hash_eq): New function.
3673         (list_hash_pieces): Renamed from ...
3674         (list_hash): ... this.
3675         (list_hash_lookup): Remove.
3676         (list_hash_add): Remove.
3677         (hash_tree_cons): Use the generic hashtable.
3678         (mark_list_hash): Remove.
3679         (init_tree): Create the hashtable.
3680
3681 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
3682
3683         * method.c (build_mangled_C9x_name): Rename to
3684         build_mangled_C99_name.  Change C9X references in comments to
3685         refer to C99.
3686
3687 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
3688
3689         * parse.y (unary_expr): Move VA_ARG from here ...
3690         (primary): ... to here.
3691
3692 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
3693
3694         * semantics.c (finish_id_expr): If type is error_mark, return
3695         error_mark.
3696
3697 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
3698
3699         * pt.c (lookup_template_class): Simplify loop exit constructs.
3700         Cope when there is no partial instantiation of a template
3701         template member.
3702
3703 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
3704
3705         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
3706
3707 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
3708
3709         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
3710         prefix.
3711
3712         * pt.c (do_decl_instantiate): Explicitly clone constructors and
3713         destructors that haven't already been cloned.
3714
3715 2000-11-20  Richard Henderson  <rth@redhat.com>
3716
3717         * parse.y (yyparse_1): Rename the parser entry point.
3718
3719 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
3720
3721         * mangle.c (write_name): Use <unscoped-name> for names directly in
3722         function scope.
3723         (write_unscoped_name): Accept names directly in function scope.
3724
3725 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
3726
3727         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
3728         * parse.y (extdef): Add EXPORT reduction.
3729         * spew.c (yylex): Don't skip export here.
3730
3731 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
3732
3733         * decl.c (init_decl_processing): Correct name of pure virtual
3734         function under the new ABI.
3735         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
3736         (throw_bad_typeid): Likewise for bad typeid function.
3737
3738 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
3739
3740         * decl.c (grokparms): Don't even function types of `void' type,
3741         either.
3742         * mangle.c (write_type): Don't crash when confronted with the
3743         error_mark_node.
3744
3745         * decl.c (grokparms): Don't create parameters of `void' type.
3746
3747 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
3748
3749         * lex.c (mark_impl_file_chain): Delete.
3750         (init_parse): Remove call to ggc_add_string_root.  No need to
3751         ggc_strdup a string constant.  Do not add impl_file_chain to GC
3752         roots.
3753         (handle_pragma_implementation): No need to ggc_strdup main_filename.
3754
3755 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
3756
3757         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
3758
3759 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
3760
3761         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
3762         * decl.c (grokdeclarator): Don't reject void parms here.
3763         (require_complete_types_for_parms): Simplify, use
3764         complete_type_or_else.
3765         (grokparms): Remove bitrot. Remove funcdef parm.
3766         Deal with ellipsis parm lists here.
3767         * semantics.c (finish_parmlist): Don't append void_list_node
3768         here. Set PARMLIST_ELLIPSIS_P.
3769
3770 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
3771
3772         * typeck2.c (incomplete_type_error): Reorganise to avoid
3773         excessive diagnostics.
3774
3775 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
3776
3777         * lex.c (struct impl_files, internal_filename): Constify a char *.
3778
3779 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
3780
3781         * mangle.c (write_special_name_constructor): Don't generate
3782         assembler junk when confronted with an old-style constructor.
3783         (write_special_name_destructor): Likewise.
3784         (mangle_decl_string): Do it here instead.
3785
3786 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
3787
3788         * call.c (op_error): Make error messages clearer.
3789
3790 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
3791
3792         * decl.c (wrapup_globals_for_namespace): Don't mark things
3793         TREE_ASM_WRITTEN when they're not.
3794
3795 2000-11-15  Jason Merrill  <jason@redhat.com>
3796
3797         * typeck2.c (friendly_abort): Uncount the error before handing
3798         off to fancy_abort.
3799
3800 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
3801
3802         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
3803
3804 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
3805
3806         * class.c (build_vtbl_initializer): Fix typo in comment.
3807         * typeck.c (expr_sizeof): Don't crash on errors.
3808
3809 2000-11-14  Jim Wilson  <wilson@redhat.com>
3810
3811         * lang-specs.h: Add %2 after %(cc1_options).
3812
3813 2000-11-14  Richard Henderson  <rth@redhat.com>
3814
3815         * typeck.c (c_sizeof): Be strict about casting result value
3816         back to c_size_type_node.
3817         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
3818
3819 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3820
3821         * typeck.c (build_unary_op): Use boolean_increment from
3822         c-common.c, moving the relevant code there.
3823
3824 2000-11-11  Jason Merrill  <jason@redhat.com>
3825
3826         * typeck.c (mark_addressable): Don't call put_var_into_stack.
3827
3828         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
3829         in inlines.
3830
3831 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3832
3833         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
3834         * lex.c (copy_lang_decl): Likewise.
3835
3836 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
3837
3838         * dump.c (cp_dump_tree): Don't dump function bodies here.
3839
3840         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3841         (dump.o): Update dependency list.
3842         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
3843         (flag_dump_translation_unit): Likewise.
3844         (CP_TYPE_QUALS): Adjust definition.
3845         (DECL_C_BIT_FIELD): Remove.
3846         (SET_DECL_C_BIT_FIELD): Likewise.
3847         (CLEAR_DECL_C_BIT_FIELD): Likewise.
3848         (add_maybe_template): Likewise.
3849         (strip_array_types): Likewise.
3850         (dump_node_to_file): Likewise.
3851         (cp_dump_tree): New function.
3852         * decl.c (init_decl_processing): Set lang_dump_tree.
3853         * decl2.c (flag_dump_translation_unit): Remove.
3854         * dump.c: Move most of it to ../c-dump.c.
3855         (cp_dump_tree): New function.
3856         * pt.c (add_maybe_template): Remove.
3857         * typeck.c (strip_array_types): Likewise.
3858
3859 2000-11-07  Eric Christopher  <echristo@redhat.com>
3860
3861         * decl.c (init_decl_processing): Change definition of
3862         __wchar_t to wchar_t.  Remove artificial declaration of
3863         wchar_t.
3864         * lex.c: Change instances of __wchar_t to wchar_t.
3865
3866 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
3867
3868         * lex.c (do_identifier): Don't lookup_name for operators.
3869         * parse.y (operator): Save looking_for_typename.
3870         (unoperator): Restore it.
3871         * spew.c (frob_opname): Use nth_token for lookahead.
3872
3873 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
3874
3875         * decl.c (grok_op_properties): Always use coerce_new_type and
3876         coerce_delete_type.
3877         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
3878         exception specification. Tidy up.
3879         (coerce_delete_type): Preserve exception specification. Tidy up.
3880
3881 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
3882
3883         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
3884         (push_binding_level), error.c (cp_tree_printer), pt.c
3885         (process_partial_specialization, tsubst_template_arg_vector),
3886         search.c (lookup_member): Use memset () instead of bzero ().
3887
3888 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
3889
3890         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
3891
3892 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
3893
3894         * Make-lang.in (c++.distdir): Remove.
3895
3896 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
3897
3898         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
3899         declarations from different namespaces to be combined.
3900
3901 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
3902
3903         * decl.c: Include tm_p.h.
3904
3905 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
3906
3907         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
3908
3909 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
3910
3911         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
3912         (build_overload_value), repo.c (open_repo_file), xref.c
3913         (open_xref_file): Use strchr () and strrchr () instead of index ()
3914         and rindex ().
3915
3916 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
3917
3918         * call.c (build_over_call): Call fold on the CALL_EXPR.
3919
3920 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
3921
3922         * error.c (dump_template_decl): Separate template hearders with
3923         space not comma.
3924
3925 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
3926
3927         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
3928         TS_* flags with corresponding TFF_*.  Adjust prototypes of
3929         functions (which used to take a tree_string_flags) to take an int.
3930
3931         * cp-tree.h (enum tree_string_flags): Remove
3932         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
3933         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
3934         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3935         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3936         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
3937         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
3938         (type_as_string, decl_as_string, expr_as_string,
3939         context_as_string): Adjust prototype.
3940
3941         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
3942         instead of TS_PLAIN.
3943
3944         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
3945         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
3946         plain `0'.
3947
3948 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
3949
3950         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
3951         (linkage_kind): New enumeration.
3952         (decl_linkage): New function.
3953         * decl2.c (comdat_linkage): Extend comment.
3954         * error.c (dump_function_decl): Print the arguments used to
3955         instantiate a template, even when not printing the type of the
3956         function.
3957         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
3958         not TREE_PUBLIC, to test for external linkage.
3959         * tree.c (decl_linkage): New function.
3960
3961 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
3962
3963         * pt.c (instantiate_decl): Always instantiate static data members
3964         initialized in-class.
3965
3966 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
3967
3968         * Make-lang.in: Move all build rules here from Makefile.in,
3969         adapt to new context.  Wrap all rules that change the current
3970         directory in parentheses.  Expunge all references to $(P).
3971         When one command depends on another and they're run all at
3972         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
3973         all object-file generation rules.  Delete obsolete variables.
3974
3975         * Makefile.in: Delete.
3976         * config-lang.in: Delete outputs= line.
3977
3978 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3979
3980         * error.c (dump_function_decl): Print no space between
3981         `ptr-operator' the `type-specifier' of the return type.
3982         (dump_type_prefix): Make sure we put space at the appropriate
3983         place.
3984
3985 2000-10-23  Jason Merrill  <jason@redhat.com>
3986
3987         * call.c (equal_functions): Also call decls_match for extern "C" fns.
3988
3989 2000-10-22  Jason Merrill  <jason@redhat.com>
3990
3991         * call.c (build_conditional_expr): Use ocp_convert to force
3992         rvalue conversion.
3993
3994 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
3995
3996         * call.c (standard_conversion): Use RVALUE_CONVs for all
3997         expressions that satisfy lvalue_p, not just those that satisfy
3998         real_lvalue_p.
3999
4000         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
4001
4002         * typeck.c (c_sizeof): Return an expression of `size_t' type,
4003         not one with TYPE_IS_SIZETYPE set.
4004         (dubious_conversion_warnings): Remove special-case code.
4005
4006 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
4007
4008         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
4009         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
4010         (dump_type_prefix): Print vector-of-int as 'int vector'.
4011         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
4012         * tree.c (walk_tree): Handle VECTOR_TYPE.
4013
4014         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
4015
4016 2000-10-21  Jason Merrill  <jason@redhat.com>
4017
4018         * parse.y (operator): Set got_object from got_scope.
4019         Set looking_for_typename.
4020         * decl.c (lookup_name_real): Clear val after setting from_obj.
4021         Reorganize diagnostic.
4022
4023 2000-10-20  Jason Merrill  <jason@redhat.com>
4024
4025         * tree.c (walk_tree): Don't walk into default args.
4026
4027         * error.c (dump_expr): Use host_integerp.
4028
4029 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
4030
4031         * typeck2.c (abstract_virtuals_error): Use "because" instead of
4032         "since" in error message.
4033
4034 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4035
4036         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
4037
4038 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
4039
4040         * decl.c (revert_static_member_fn): Fixed typo.
4041
4042 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
4043
4044         * class.c (subobject_offset_fn): New type.
4045         (dfs_record_base_offsets): Remove.
4046         (record_base_offsets): Likewise.
4047         (dfs_search_base_offsets): Likewise.
4048         (record_subobject_offset): New function.
4049         (check_subobject_offset): Likewise.
4050         (walk_subobject_offsets): Likewise.
4051         (record_subobject_offsets): Likewise.
4052         (layout_conflict_p): Reimplement.
4053         (layout_nonempty_base_or_field): Correct handling of type
4054         conflicts during layout.
4055         (layout_empty_base): Likewise.
4056         (build_base_field): Adjust to handle new representation of empty
4057         base offset table.
4058         (build_base_fields): Likewise.
4059         (layout_virtual_bases): Likewise.
4060         (splay_tree_compare_integer_csts): New function.
4061         (layout_class_type): Use a splay_tree, rather than a varray, to
4062         represent the offsets of empty bases.
4063
4064         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
4065         * decl.c (select_decl): Don't return declarations that are
4066         DECL_ANTICIPATED.
4067
4068 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
4069
4070         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
4071         (fake_std_node): New macro.
4072         * decl.c (in_std): Rename to ...
4073         (in_fake_std): ... this.
4074         (flag_no_builtin): Remove.
4075         (flag_no_nonansi_builtin): Likewise.
4076         (walk_namespaces_r): Use fake_std_node.
4077         (push_namespace): Use std_identifier.
4078         (pop_namespace): Use in_fake_std.
4079         (lookup_name_real): Use fake_std_node.
4080         (init_decl_processing): When -fhonor-std, create the `std'
4081         namespace.  Don't create a dummy fake_std_node in that case.
4082         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
4083         (builtin_function): Put builtins whose names don't begin
4084         with `_' in the std namespace.
4085         * decl2.c (flag_no_builtin): Remove.
4086         (flag_no_nonansi_builtin): Likewise.
4087         (set_decl_namespace): Use fake_std_node.
4088         (validate_nonmember_using_decl): Likewise.
4089         (do_using_directive): Likewise.
4090         (handle_class_head): Likewise.
4091         * dump.c (dequeue_and_dump): Likewise.
4092         * except.c (init_exception_processing): Use std_identifier.
4093         * init.c (build_member_call): Use fake_std_node.
4094         * rtti.c (init_rtti_processing): Use std_identifier.
4095
4096 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
4097
4098         * cp-tree.h (back_end_hook): Remove declaration.
4099         * decl2.c (back_end_hook): Remove definition.
4100
4101         * dump.c (dequeue_and_dump): Dump TREE_USED.
4102
4103 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
4104
4105         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
4106
4107 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
4108
4109         * decl.c (WINT_TYPE): Define.
4110         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
4111         c_size_type_node, signed_size_type_node and wint_type_node.
4112
4113 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
4114
4115         * decl2.c (warn_missing_format_attribute): New variable.
4116         (lang_decode_option): Decode -Wmissing-format-attribute.
4117
4118 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
4119
4120         * typeck.c (qualify_type): Remove.
4121         (composite_pointer_type): Fix handling of conversions to `cv void*'.
4122
4123 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4124
4125         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
4126
4127 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4128
4129         * Makefile.in (parse.c, parse.h): Create atomically.
4130
4131 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
4132
4133         * class.c (current_obstack): Remove.
4134         * decl.c (ggc_p): Remove.
4135         (start_decl): Don't use decl_tree_cons.
4136         (grokdeclarator): Don't use build_decl_list.
4137         (start_function): Don't use decl_tree_cons.
4138         (finish_function): Don't mess with obstacks.
4139         * decl2.c (grok_x_components): Don't use build_decl_list.
4140         * lex.c (make_call_declarator): Don't call decl_tree_cons.
4141         (implicitly_declare_fn): Don't call build_decl_list.
4142         * parse.y (frob_specs): Don't call build_decl_list or
4143         decl_tree_cons.
4144         (expr_or_declarator_intern): Don't call decl_tree_cons.
4145         (primary): Don't call build_decl_list.
4146         (fcast_or_absdcl): Likewise.
4147         (typed_declspecs): Don't call decl_tree_cons.
4148         (reserved_declspecs): Don't call build_decl_list.
4149         (declmods): Likewise.
4150         (reserved_typespecquals): Likewise.
4151         (aggr): Likewise.
4152         (new_type_id): Likewise.
4153         (cv_qualifiers): Likewise.
4154         (after_type_declarator_intern): Likewise.
4155         (notype_declarator_intern): Likewise.
4156         (absdcl_intern): Likewise.
4157         (named_parm): Likewise.
4158         * pt.c (most_specialized_class): Likewise.
4159         * repo.c (temporary_obstack): Make it a structure, not a pointer.
4160         (init_repo): Initialize it.
4161         * search.c (current_obstack): Remove.
4162         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
4163
4164 2000-10-09  Richard Henderson  <rth@cygnus.com>
4165
4166         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
4167         (c++ language support bits for libgcc): Remove.
4168         (c++.clean): Remove cplib2.txt cleanup.
4169         * config-lang.in (headers, lib2funcs): Remove.
4170
4171         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
4172         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
4173         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
4174         * inc/new.h, inc/typeinfo: Remove files.
4175
4176 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
4177
4178         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
4179         defined.
4180         (init_decl_processing): Initialize intmax_type_node and
4181         uintmax_type_node.
4182
4183 2000-10-06  Richard Henderson  <rth@cygnus.com>
4184
4185         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
4186         (original_result_rtx): Remove.
4187         * decl.c (save_function_data): Don't clear x_result_rtx.
4188         (mark_lang_function): Don't mark it either.
4189         * expr.c (fixup_result_decl): Remove.
4190         * semantics.c (genrtl_named_return_value): Frob the return decl
4191         before calling emit_local_var.
4192         (genrtl_finish_function): Don't call fixup_result_decl.
4193         Always emit the jump to return_label.
4194
4195 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
4196
4197         * pt.c (lookup_template_class): Set current access for enum.
4198         (tsubst_enum): Set file & line for enum decl.
4199
4200         * spew.c (yylex): Remove unused variable.
4201
4202 2000-10-05  Richard Henderson  <rth@cygnus.com>
4203
4204         * semantics.c (genrtl_finish_function): Don't init or check
4205         can_reach_end; remove noreturn and return value checks.
4206
4207 2000-10-05  Tom Tromey  <tromey@cygnus.com>
4208
4209         * init.c (build_java_class_ref): Use `build_static_name' with a
4210         suffix, not a prefix, to build the class object's name.
4211
4212 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
4213
4214         * cp-tree.h (access_kind): Fix comment typo.
4215         * decl2.c (grokfield): Fix diagnostic typo.
4216         * semantics.c (finish_template_type): Fix comment typo.
4217         (finish_qualified_object_call_expr): Likewise.
4218
4219 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
4220
4221         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
4222         tsubsting fails.
4223
4224 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
4225
4226         * spew.c (frob_id): New static function.
4227         (frob_opname): Use it.
4228         (yylex): Use it.
4229
4230 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
4231
4232         * decl.c (lang_mark_false_label_stack): Remove.
4233         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
4234
4235 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
4236
4237         * gxxint.texi: Use @email for formatting email addresses.
4238
4239 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
4240
4241         * error.c: Remove direct obstack manipulation.  Replace with
4242         output_buffer-based formatting.  Adjust calls to removed macros.
4243         (obstack_chunk_alloc, obstack_chunk_free): Remove.
4244         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
4245         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
4246
4247 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
4248
4249         * ir.texi: Move to ../c-tree.texi.
4250
4251 2000-09-20  Jason Merrill  <jason@redhat.com>
4252
4253         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
4254
4255 2000-09-21  Andreas Jaeger  <aj@suse.de>
4256
4257         * errfn.c: Move declaration of cp_printer and cp_printers to ...
4258         * cp-tree.h: ... here.
4259
4260         * error.c: Remove declaration of cp_printer.
4261
4262 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
4263
4264         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
4265
4266 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
4267
4268         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
4269         users.
4270
4271 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
4272
4273         * decl.c (start_function): Robustify.
4274
4275 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4276
4277         * cp-tree.h (check_function_format): Accept a `status' parameter.
4278
4279         * call.c, typeck.c: Updates calls to `check_function_format'.
4280
4281 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
4282
4283         * decl2.c (handle_class_head): Always push some scope even
4284         in the error case.
4285
4286 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
4287
4288         * cp-tree.h (struct cp_language_function): Remove
4289         x_scope_stmt_stack and name_declared.
4290         (current_scope_stmt_stack): Remove.
4291         (function_name_declared_p): New macro.
4292         (struct lang_decl_flags): Use c_lang_decl as a base class.
4293         (context): Remove.
4294         (struct lang_decl): Replace saved_tree with context.
4295         (DECL_FRIEND_CONTEXT): Adjust accordingly.
4296         (SET_DECL_FRIEND_CONTEXT): Likewise.
4297         (DECL_VIRTUAL_CONTEXT): Likewise.
4298         (DECL_SAVED_TREE): Remove.
4299         (C_DECLARED_LABEL_FLAG): Likewise.
4300         (cplus_expand_expr_stmt): Don't declare.
4301         (add_decl_stmt): Likewise.
4302         (add_scope_stmt): Likewise.
4303         * decl.c (mark_stmt_tree): Remove.
4304         (case_compare): Likewise.
4305         (finish_case_label): Use c_add_case_label.
4306         (init_decl_processing): Set more language-specific hooks.
4307         (build_enumerator): Fix typo in comment.
4308         (cplus_expand_expr_stmt): Remove.
4309         (mark_lang_function): Use mark_c_language_function.
4310         (lang_mark_tree): Use c_mark_lang_decl.
4311         * decl2.c: Change order of inclusion.
4312         * except.c: Likewise.
4313         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
4314         back on c_expand_expr.
4315         * friend.c: Include expr.h.
4316         * init.c: Change order of inclusion.
4317         * Makefile.in: Update dependencies.
4318         * lex.h (free_lang_decl_chain): Remove.
4319         * optimize.c (maybe_clone_body): Use function_name_declared_p.
4320         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
4321         it doesn't exist.
4322         (instantiate_decl): Use function_name_declared_p.
4323         * semantics.c (lang_expand_expr_stmt): Remove.
4324         (set_current_function_name_declared): Likewise.
4325         (current_function_name_declared): Likewise.
4326         (begin_compound_stmt): Use function_name_declared_p.
4327         (add_decl_stmt): Remove.
4328         (setup_vtbl_ptr): Use function_name_declared_p.
4329         (add_scope_stmt): Remove.
4330         (current_scope_stmt_stack): New function.
4331         (cp_expand_stmt): Don't handle SCOPE_STMTs.
4332         (expand_body): Use function_name_declared_p.
4333         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
4334         * typeck.c: Change order of includes.
4335         (convert_sequence): Remove.
4336
4337 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
4338
4339         * lex.c (reswords): Add _Complex.
4340
4341 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4342
4343         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
4344
4345 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
4346
4347         * init.c (begin_init_stmts): Don't use // comments.
4348
4349 2000-09-12  Jason Merrill  <jason@redhat.com>
4350
4351         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
4352         all non-extern arrays.
4353
4354         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
4355         typenames, too.  Downgrade complaint to pedwarn.
4356         (xref_tag): Warn about surprising behavior of 'friend struct T'.
4357         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
4358         'class This::Inherited'.
4359
4360 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
4361
4362         * decl.c (finish_case_label): Given the LABEL_DECL a
4363         DECL_CONTEXT.
4364
4365 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
4366
4367         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
4368         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
4369         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
4370         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
4371         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
4372         New macros.
4373         (sorry_for_unsupported_tree, print_scope_operator,
4374         print_left_paren, print_right_paren, print_left_bracket,
4375         print_right_bracket, print_whitespace): Likewise.
4376         (aggr_variety): Rename to class_key_or_enum.
4377         (print_type): Rename to print_type_id.
4378         (print_type_specifier_seq, print_simple_type_specifier,
4379         print_elaborated_type_specifier,
4380         print_rest_of_abstract_declarator,
4381         print_parameter_declaration_clause, print_exception_specification,
4382         print_nested_name_specifier, print_template_id,
4383         typedef_original_name,  print_template_argument_list_start,
4384         print_template_argument_list_end): New functions.
4385
4386 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
4387
4388         * ir.texi: Add more documentation.
4389
4390 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
4391
4392         * cp-tree.h (struct saved_scope): Remove x_function_parms.
4393         (current_function_parms): Don't define.
4394         (struct cp_language_function): Remove parms_stored.
4395         (current_function_just_assigned_this): Don't define.
4396         (current_function_parms_stored): Likewise.
4397         (static_ctors): Declare.
4398         (static_dtors): Likewise.
4399         (SF_EXPAND): Don't define.
4400         (expand_start_early_try_stmts): Remove declaration.
4401         (store_parm_decls): Likewise.
4402         * decl.c (static_ctors): Don't declare.
4403         (static_dtors): Likewise.
4404         (struct binding_level): Remove this_block.
4405         (poplevel): Remove dead code.
4406         (set_block): Likewise.
4407         (mark_binding_level): Don't mark this_block.
4408         (mark_saved_scope): Don't mark x_function_parms.
4409         (init_decl_processing): Don't add current_function_parms as a GC
4410         root.
4411         (check_function_type): Change prototype.
4412         (start_function): Remove RTL-generation code.
4413         (expand_start_early_try_stmts): Remove.
4414         (store_parm_decls): Give it internal linkage.  Remove
4415         RTL-generation code.
4416         (finish_function): Remove RTL-generation code.
4417         * decl2.c (static_ctors): Fix formatting.
4418         (static_dtors): Likewise.
4419         * method.c (use_thunk): Don't call store_parm_decls.
4420         (synthesize_method): Likewise.
4421         * optimize.c (maybe_clone_body): Likewise.
4422         * parse.y (fn.def2): Likewise.
4423         (.set_base_init): Likewise.
4424         (nodecls): Likewise.
4425         * pt.c (instantiate_decl): Likewise.
4426         * rtti.c (synthesize_tinfo_fn): Likewise.
4427         * semantics.c (genrtl_try_block): Simplify.
4428         (expand_body): Use genrtl_start_function and
4429         genrtl_finish_function.
4430         (genrtl_start_function): New function.
4431         (genrtl_finish_function): Likewise.
4432
4433 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
4434
4435         * error.c (cp_tree_printer, case 'P'): Append break.
4436
4437 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
4438
4439         * cp-tree.h (frob_opname): Declare.
4440         * parse.y (saved_scopes): New static variable.
4441         (cp_parse_init): Adjust.
4442         (do_id): If lastiddecl is NULL, do do_identifier.
4443         (operator): Save scope information.
4444         (unoperator): New reduction. Restore scope information.
4445         (operator_name): Append unoperator. Call frob_opname.
4446         * spew.c (frob_opname): Define.
4447
4448 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
4449
4450         * decl.c, rtti.c: Include defaults.h if not already included.
4451         Don't define the *_TYPE_SIZE macros.
4452
4453 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
4454
4455         * cp-tree.h (push_switch): Change prototype.
4456         (check_cp_case_value): Remove declaration.
4457         (decl_constant_value): Likewise.
4458         * decl.c (struct cp_switch): Add switch_stmt and cases.
4459         (case_compare): New function.
4460         (push_switch): Set switch_stmt.  Initialize cases.
4461         (pop_switch): Clean up cases.
4462         (define_case_label): Rename to ...
4463         (finish_case_label): ... this.  Do semantic analysis for case
4464         labels here.
4465         (start_function): Correct comment.
4466         * decl2.c (check_cp_case_value): Remove.
4467         * expr.c (do_case): Remove.
4468         * pt.c (tsubst_expr): Adjust call to finish_case_label.
4469         * semantics.c (genrtl_do_poplevel): Remove declaration.
4470         (RECHAIN_STMTS): Remove.
4471         (finish_break_stmt): Use build_break_stmt.
4472         (finish_continue_stmt): Use build_continue_stmt.
4473         (finish_switch_cond): Adjust condition here, rater than in
4474         c_expand_start_case.
4475         (finish_case_label): Remove.
4476         * typeck.c (c_expand_return): Remove.
4477         (c_expand_start_case): Likewise.
4478
4479 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
4480
4481         * ir.texi: Document type nodes.
4482
4483 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
4484
4485         * cp-tree.h (init_cp_semantics): Declare.
4486         (genrtl_try_block): Don't declare.
4487         (genrtl_handler): Likewise.
4488         (genrtl_catch_block): Likewise.
4489         (genrtl_ctor_stmt): Likewise.
4490         (genrtl_subobject): Likewise.
4491         (genrtl_do_poplevel): Likewise.
4492         (genrtl_named_return_value): Likewise.
4493         * lex.c (init_parse): Call init_cp_semantics.
4494         * semantics.c (genrtl_try_block): Give it internal linkage.
4495         (genrtl_handler): Likewise.
4496         (genrtl_catch_block): Likewise.
4497         (genrtl_ctor_stmt): Likewise.
4498         (genrtl_subobject): Likewise.
4499         (genrtl_do_poplevel): Likewise.
4500         (genrtl_named_return_value): Likewise.
4501         (lang_expand_stmt): Rename to ...
4502         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
4503         (init_cp_semantics): Define.
4504
4505         * decl.c (initialize_local_var): Remove RTL-generating code.
4506         * semantics.c (genrtl_try_block): Fix formatting.
4507
4508         Move statement-tree facilities from C++ to C front-end.
4509         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
4510         (void_zero_node): Remove.
4511         (stmt_tree): Likewise.
4512         (scope_chain): Adjust.
4513         (language_function): Rename to cp_language_function.
4514         (cp_function_chain): Adjust.
4515         (current_stmt_tree): Remove.
4516         (last_tree): Likewise.
4517         (last_expr_type): Likewise.
4518         (struct lang_decl): Adjust.
4519         (STMT_IS_FULL_EXPR_P): Remove.
4520         (add_tree): Remove.
4521         (begin_stmt_tree): Likewise.
4522         (finish_stmt_tree): Likewise.
4523         (walk_tree_fn): Likewise.
4524         (walk_stmt_tree): Likewise.
4525         * class.c (finish_struct): Replace use of add_tree with add_stmt.
4526         * decl.c (mark_stmt_tree): Adjust type.
4527         (init_decl_processing): Don't build void_zero_node.
4528         (initialize_local_var): Adjust usage of current_stmt_tree.
4529         (finish_enum): Use add_stmt, not add_tree.
4530         (save_function_data): Adjust use of language_function.
4531         (finish_constructor_body): Use add_stmt, not add_tree.
4532         (finish_destructor_body): Likewise.
4533         (push_cp_function_context): Adjust use of language_function.
4534         (pop_cp_function_context): Likewise.
4535         (mark_lang_function): Likewise.
4536         (mark_cp_function_context): Likewise.
4537         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
4538         (build_vec_init): Likewise.
4539         * semantics.c (SET_LAST_STMT): Remove.
4540         (RECHAIN_STMTS): Don't use it.
4541         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
4542         (current_stmt_tree): Define.
4543         (add_tree): Remove.
4544         (finish_goto_stmt): Use add_stmt, not add_tree.
4545         (finish_expr_stmt): Likewise.
4546         (begin_if_stmt): Likewise.
4547         (finish_then_clause): Likewise.
4548         (begin_while_stmt): Likewise.
4549         (begin_do_stmt): Likewise.
4550         (finish_return_stmt): Likewise.
4551         (begin_for_stmt): Likewise.
4552         (finish_break_stmt): Likewise.
4553         (finish_continue_stmt): Likewise.
4554         (begin_switch_stmt): Likewise.
4555         (finish_case_label): Likewise.
4556         (begin_try_block): Likewise.
4557         (begin_function_try_block): Likewise.
4558         (begin_handler): Likewise.
4559         (begin_catch_block): Likewise.
4560         (begin_compound_stmt): Likewise.
4561         (begin_asm_stmt): Likewise.
4562         (finish_asm_stmt): Likewise.
4563         (finish_label_stmt): Likewise.
4564         (add_decl_stmt): Likewise.
4565         (finish_subobject): Likewise.
4566         (finish_decl_cleanup): Likewise.
4567         (finish_named_return_value): Likewise.
4568         (setup_vtbl_ptr): Likewise.
4569         (add_scope_stmt): Likewise.
4570         (finish_stmt_expr): Likewise.
4571         (prune_unused_decls): Remove.
4572         (begin_stmt_tree): Likewise.
4573         (finish_stmt_tree): Likewise.
4574         (prep_stmt): Adjust use of current_stmt_tree.
4575         (lang_expand_stmt): Likewise.
4576         * tree.c (statement_code_p): Remove.
4577         (cp_statement_code_p): New function.
4578         (walk_stmt_tree): Remove.
4579         (init_tree): Set lang_statement_code_p.
4580
4581 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
4582
4583         Integrated preprocessor.
4584
4585         * Make-lang.in, Makefile.in: Remove all references to input.c,
4586         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
4587         * gxx.gperf, hash.h, input.c: Delete.
4588         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
4589         initialized properly.
4590
4591         * class.c (fixup_pending_inline): Take a tree, not a
4592         struct pending_inline *.  All callers changed.
4593         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
4594         RID_PROTECTED entries in ridpointers[] array here.
4595         * decl.c (duplicate_decls): Do not refer to struct
4596         pending_inline.
4597         (record_builtin_type, init_decl_processing): Use RID_MAX not
4598         CP_RID_MAX.
4599         (grokdeclarator): Use C_IS_RESERVED_WORD.
4600         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
4601         cpplib.
4602         (grok_x_components): Do not inspect pending_inlines chain.
4603
4604         * cp-tree.h (struct lang_identifier): Add rid_code entry.
4605         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
4606         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
4607         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
4608         TIME_IDENTIFIER_FILEINFO): Kill.
4609         Update prototypes.
4610         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
4611         single 32-bit word.
4612         * parse.y: Call do_pending_inlines unconditionally.
4613         reinit_parse_for_method is now snarf_method.  fn.defpen is no
4614         longer necessary.  Remove unnecessary <itype> annotation on
4615         SCOPE.  Do not refer to end_of_file or struct pending_inline.
4616         * semantics.c (begin_inline_definitions): Call
4617         do_pending_inlines unconditionally.
4618
4619         * lex.c: Remove all code now shared with C front end.
4620         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
4621         into the get_identifier table.  Rewrite pragma handling to
4622         work with the registry.  Move code to save tokens for later
4623         processing to spew.c.
4624
4625         * spew.c: Rewrite everything in terms of token streams instead
4626         of text.  Move routines here from lex.c / input.c as
4627         appropriate.  GC-mark trees hanging off the pending inlines
4628         chain.
4629
4630 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
4631
4632         * NEWS: Mention that the named return value extension has been
4633         deprecated.
4634         * cp-tree.h (original_result_rtx): Define.
4635         (TREE_REFERENCE_EXPR): Remove.
4636         (DECL_VPARENT): Likewise.
4637         (pushdecl_nonclass_level): Likewise.
4638         (store_return_init): Likewise.
4639         (reinit_lang_specific): Likewise.
4640         (genrtl_named_return_value): Change prototype.
4641         * decl.c (original_result_rtx): Remove.
4642         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
4643         Do not generate RTL for local variables here.
4644         (store_return_init): Remove.
4645         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
4646         store_return_init.
4647         (finish_named_return_value): Adjust accordingly.  Warn that this
4648         extension is deprecated.
4649         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
4650
4651 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4652
4653         * pt.c (type_unification_real): Replace switch with if.
4654         (unify): Tsubst non-type parms before comparing.
4655
4656 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4657
4658         * error.c (dump_typename): New function, broken out of ...
4659         (dump_type): ... here. Use it.
4660         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
4661
4662 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4663
4664         * init.c (build_offset_ref): Deal with namespace scoped
4665         TEMPLATE_ID_EXPRs.
4666
4667 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4668
4669         * class.c (resolve_address_of_overloaded_function): Add
4670         explanation message.
4671         * decl.c (define_case_label): Reformat explanation.
4672         * decl2.c (finish_static_data_member_decl): Likewise.
4673         (grokfield): Likewise.
4674         * friend.c (do_friend): Likewise.
4675
4676 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
4677
4678         * tree.c (walk_tree): Expose tail recursion.
4679         (walk_stmt_tree): New function.
4680         * cp-tree.h: Prototype walk_stmt_tree.
4681         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
4682         the BLOCKs directly.  If a BLOCK has no variables after
4683         pruning, discard it.
4684         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
4685         restore the line number.
4686
4687 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
4688
4689         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
4690         (pt.o): Remove dependency on HTAB_H.
4691         * cp-tree.h: Include hashtab.h.
4692         (walk_tree): Change prototype.
4693         (walk_tree_without_duplicates): New function.
4694         * decl.c (check_default_argument): Use it.
4695         * optimize.c (remap_decl): Adjust calls to walk_tree.
4696         (copy_body): Likewise.
4697         (expand_calls_inline): Likewise.
4698         (calls_setjmp_p): Use walk_tree_without_duplicates.
4699         * pt.c: Don't include hashtab.h.
4700         (for_each_template_parm): Use walk_tree_without_duplicates.
4701         * semantics.c (finish-stmt_tree): Likewise.
4702         (expand_body): Likewise.
4703         * tree.c (walk_tree): Add additional parameter.
4704         (walk_tree_without_duplicates): New function.
4705         (count_trees): Use it.
4706         (verify_stmt_tree): Adjust call to walk_tree.
4707         (find_tree): Use walk_tree_without_duplicates.
4708         (no_linkage_check): Likewise.
4709         (break_out_target_exprs): Adjust call to walk_tree.
4710         (cp_unsave): Likewise.
4711
4712 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4713
4714         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
4715         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4716         * cp-tree.h (TYPE_BINFO): Adjust comment.
4717         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4718         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
4719         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4720         (TYPE_TEMPLATE_INFO): Likewise.
4721         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
4722         * class.c (push_nested_class): Likewise.
4723         * decl.c (lookup_name_real): Likewise.
4724         (grokdeclarator): Likewise.
4725         (grok_op_properties): Likewise.
4726         (xref_tag): Likewise.
4727         (xref_basetypes): Likewise.
4728         * decl2.c (constructor_name_full): Likewise.
4729         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
4730         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4731         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
4732         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4733         (dump_type_suffix): Likewise.
4734         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
4735         instead.
4736         (get_aggr_from_typedef): Likewise.
4737         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
4738         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4739         (write_template_parm): Likewise.
4740         (write_template_template_parm): Check tree code instead of
4741         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4742         * method.c (build_overload_nested_name): Add
4743         BOUND_TEMPLATE_TEMPLATE_PARM.
4744         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
4745         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4746         * pt.c (convert_template_argument): Check tree code instead of
4747         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4748         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
4749         (for_each_template_parm): Adjust comment.
4750         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
4751         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4752         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
4753         template_args_equal to compare template template parameter cases.
4754         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4755         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
4756         instead.
4757         * tree.c (copy_template_template_parm): Decide whether to create
4758         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
4759         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4760         (copy_tree_r): Likewise.
4761         * typeck.c (comptypes): Likewise.  Check tree code instead of
4762         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4763
4764 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
4765
4766         * decl.c (finish_function): Move the code for handling functions
4767         marked with the constructor and destructor attributes inside the
4768         expand_p block.
4769
4770 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4771
4772         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
4773
4774 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4775
4776         * pt.c (lookup_template_class): Remove abort.
4777         * tree.c (get_type_decl): Allow error_mark_node.
4778
4779 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4780
4781         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
4782         TEMPLATE_ID_EXPRs.
4783
4784 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
4785
4786         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
4787         new ABI mangling.
4788
4789 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
4790
4791         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
4792         union tag mismatch error reporting.
4793
4794 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
4795
4796         * call.c (build_scoped_method_call): Check it is not a namespace.
4797
4798 2000-08-30  Jason Merrill  <jason@redhat.com>
4799
4800         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
4801
4802         * tree.c (bot_manip): Check TREE_CONSTANT rather than
4803         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
4804         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
4805
4806         * decl.c (start_function): Always call make_function_rtl.
4807
4808 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
4809
4810         * semantics.c (prune_unused_decls): New function.
4811         (finish_stmt_tree): Call it via walk_tree.
4812
4813 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
4814
4815         * class.c (build_secondary_vtable): Constify a char *.
4816         * decl.c (init_decl_processing): Initialize function_id_node,
4817         pretty_function_id_node, and func_id_node.
4818         * input.c (struct input_source): Constify 'str'.
4819         (feed_input): Constify first argument.
4820         * mangle.c (write_identifier): Constify argument.
4821         * pt.c (mangle_class_name_for_template): Constify argument.
4822
4823 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
4824
4825         * typeck.c (mark_addressable): Remove code that pokes around in
4826         RTL.
4827
4828 2000-08-28  Jason Merrill  <jason@redhat.com>
4829
4830         * lex.c (file_name_nondirectory): Move to toplev.c.
4831
4832         * cp-tree.h (LOCAL_CLASS_P): New macro.
4833         * class.c (finish_struct_1): Use it.
4834
4835 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
4836
4837         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
4838         (write_encoding): Pass another argument to write_name.
4839         (write_name): Add ignore_local_scope parameter.  Fix handling of
4840         local names.
4841         (write_nested_name): Use write_unqualified_name.
4842         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
4843         (write_template_prefix): Use write_unqualified_name.
4844         (write_component): Remove.
4845         (write_local_name): Add parameter.  Use direct local entity to
4846         discriminator calculation.
4847         (write_class_enum_type): Pass another argument to write_name.
4848         (write_template_template_arg): Likewise.
4849         (make_guard_variable): Likewise.
4850
4851 2000-08-27  Jason Merrill  <jason@redhat.com>
4852
4853         * decl.c (pushdecl): Matching decls for local externs are found in
4854         the current level.  Propagate linkage information from previous
4855         declarations.
4856
4857 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
4858
4859         * ir.texi (Expressions): Fix typo.
4860
4861 2000-08-25  Greg McGary  <greg@mcgary.org>
4862
4863         * tree.c (init_tree): Use ARRAY_SIZE.
4864
4865 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
4866
4867         * error.c (cp_tree_printer): Rework.
4868
4869 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
4870
4871         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
4872         dyn-string.o.
4873         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
4874         (cp-demangle.o): Remove target.
4875         (dyn-string.o): Likewise.
4876
4877         * decl.c (grokfndecl): Require that `main' return an `int'.
4878         * mangle.c (write_encoding): Don't mangle return types for
4879         conversion functions.
4880
4881 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
4882
4883         * error.c (tree_formatting_info): New data type.
4884         (tree_being_formatted): New macro.
4885         (tree_formatting_flags): Likewise.
4886         (put_whitespace): Likewise.
4887         (print_tree_identifier): Likewise.
4888         (print_identifier): Likewise.
4889         (cp_tree_printer, print_function_argument_list, print_declaration,
4890         print_expression, print_function_declaration,
4891         print_function_parameter, print_type, print_cv_qualifier): New
4892         functions.
4893         (init_error): Initialize lang_printer.
4894
4895 2000-08-24  Jason Merrill  <jason@redhat.com>
4896
4897         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
4898         adjustment necessary.
4899
4900 2000-08-24  Greg McGary  <greg@mcgary.org>
4901
4902         * cp-tree.h (MAIN_NAME_P): Remove macro.
4903
4904 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
4905
4906         * error.c (print_instantiation_context): Don't forget to flush the
4907         buffer.
4908
4909 2000-08-23  Jason Merrill  <jason@redhat.com>
4910
4911         * typeck.c (build_ptrmemfunc): Save the input pmf.
4912
4913         * method.c (process_modifiers): Use same_type_p.
4914
4915 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
4916
4917         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
4918         * mangle.c (write_function_type): Change prototype.
4919         (write_encoding): Don't mangle return types for
4920         constructors or destructors.
4921         (write_type): Adjust call to write_function_type.
4922         * pt.c (instantiate_template): Instantiate alternate entry points
4923         when instantiating the main function.
4924
4925 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
4926
4927         * error.c (cp_print_error_function): Don't use embedded '\n' in
4928         output_printf.
4929
4930 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
4931
4932         * decl.c (init_decl_processing): Remove bogus initialization.
4933         * error.c (lang_print_error_function): Restore here.
4934         (init_error): Initialize print_error_function.
4935
4936 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
4937
4938         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
4939
4940 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
4941
4942         * Makefile.in (error.o): Depends on diagnostic.h
4943
4944         * cp-tree.h (problematic_instantiation_changed,
4945         record_last_problematic_instantiation, current_instantiation,
4946         print_instantiation_context): Declare.
4947         (maybe_print_template_context): Remove.
4948
4949         * decl.c (init_decl_processing): Set print_error_function to NULL.
4950         (lang_print_error_function): Remove, since we're using a new
4951         machinery.
4952
4953         * error.c: #include diagnostic.h
4954         (function_category): New function.
4955         (cp_diagnostic_starter): Likewise.
4956         (cp_diagnostic_finalizer): Likewise.
4957         (cp_print_error_function): Likewise.
4958         (maybe_print_instantiation_context): Likewise.
4959         (print_instantiation_full_context): Likewise.
4960         (print_instantiation_partial_context): Likewise.
4961         (print_instantiation_context): Define.
4962         (init_error): Initialize diagnostic pager and finalizer.
4963
4964         * pt.c (problematic_instantiation_changed): Define.
4965         (record_last_problematic_instantiation): Likewise.
4966         (current_instantiation): Likewise.
4967         (maybe_print_template_context): Remove.
4968         (print_template_context): Likewise.
4969         (current_tinst_level): Make static to reflect Brendan Kehoe's
4970         change of 1995-04-13.
4971         (push_tinst_level): Call print_instantiation_context.
4972
4973 2000-08-21  Nix  <nix@esperi.demon.co.uk>
4974
4975         * lang-specs.h: Do not process -o or run the assembler if
4976         -fsyntax-only.
4977
4978 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
4979
4980         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
4981         variables.
4982         * decl2.c (lang_decode_option): Disable gettext attributes for
4983         -ansi.
4984
4985 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
4986
4987         * lex.c (lang_init_options): Default diagnostic message maximum
4988         length to 80, when line-wrapping.
4989
4990 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
4991
4992         * class.c (build_vtbl_initializer): Clear the entire
4993         vtbl_init_data.  Start keeping track of the functions for which we
4994         have created vcall offsets here.
4995         (dfs_build_vcall_offset_vtbl_entries): Remove.
4996         (build_vcall_offset_vtbl_entries): Reimplement.
4997         (add_vcall_offset_vtbl_entries_r): New function.
4998         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
4999         computing when vcall offsets are necessary.
5000
5001 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5002
5003         * decl.c (member_function_or_else): Use cp_error ... %T.
5004         (grokdeclarator): Likewise.
5005         (start_method): Likewise.
5006         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
5007
5008 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5009
5010         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
5011         TYPE_DECLs.
5012
5013 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5014
5015         * cp-tree.h (PTRMEM_OK_P): New macro.
5016         (itf_ptrmem_ok): New enumeration value.
5017         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
5018         argument. Diagnose implicit pointer to member.
5019         (instantiate_type): Don't diagnose implicit pointer to member
5020         here. Pass itf_ptrmem_ok if ok. Adjust calls to
5021         resolve_address_of_overloaded_function.
5022         * init.c (build_offset_ref): Set PTRMEM_OK_P.
5023         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
5024         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
5025         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
5026         (build_unary_op): Deal with single non-static member in
5027         microsoft-land.
5028
5029 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5030
5031         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
5032
5033 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5034
5035         * cp-tree.h (enum_name_string): Remove prototype.
5036         (report_case_error): Remove prototype.
5037         * cp/typeck2.c (enum_name_string): Remove.
5038         (report_case_error): Remove.
5039         * error.c (dump_expr): Deal with enum values directly.
5040         Correctly negate integer constant.
5041
5042 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5043
5044         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
5045         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
5046         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
5047         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
5048         (__cxa_vec_new): Use __cxa_vec_new2.
5049         (__cxa_vec_delete): Use __cxa_vec_delete2.
5050
5051 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5052
5053         * vec.cc (__cxa_vec_new): Set "C" linkage.
5054         (__cxa_vec_ctor): Likewise.
5055         (__cxa_vec_cctor): Likewise.
5056         (__cxa_vec_dtor): Likewise.
5057         (__cxa_vec_delete): Likewise.
5058         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
5059         (__cxa_vec_ctor): Likewise.
5060         (__cxa_vec_cctor): Likewise.
5061         (__cxa_vec_dtor): Likewise.
5062         (__cxa_vec_delete): Likewise.
5063
5064 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5065
5066         * class.c (instantiate_type): Reinstate local variable
5067         deleted in previous change.
5068
5069         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
5070         itf_no_attributes.
5071
5072 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5073
5074         * cp-tree.h (instantiate_type_flags): New enumeration.
5075         (instantiate_type): Change parameter.
5076         * class.c (instantiate_type): Adjust prototype. Adjust.
5077         * call.c (standard_conversion): Adjust instantiate_type call.
5078         (reference_binding): Likewise.
5079         (build_op_delete_call): Likewise.
5080         (convert_like_real): Likewise.
5081         * cvt.c (cp_convert_to_pointer): Likewise.
5082         (convert_to_reference): Likewise.
5083         * pt.c (convert_nontype_argument): Likewise.
5084         * typeck.c (build_binary_op): Likewise.
5085         (build_ptrmemfunc): Likewise.
5086         (convert_for_assignment): Likewise.
5087
5088 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5089
5090         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
5091         (current_aggr): Define.
5092         * decl.c (grokdeclarator): Make sure a friend class is an
5093         elaborated type specifier.
5094         * parse.y (current_aggr): Remove static definition.
5095         (cp_parse_init): Adjust.
5096         (structsp): Clear and restore current_aggr.
5097         (component_decl_list): Clear current_aggr.
5098
5099         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
5100         aggregate tag on the typename's context.
5101
5102         * pt.c (tsubst_friend_class): Return error_mark_node, if
5103         parms becomes NULL.
5104         (instantiate_class_template): Ignore error_mark_node friend types.
5105
5106 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
5107
5108         * cvt.c (warn_ref_binding): New static function, broken out of ...
5109         (convert_to_reference): ... here. Use it.
5110
5111 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5112
5113         * parse.y (template_arg): Add rule for template qualified with
5114         global scope.
5115
5116 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5117
5118         * decl2.c (add_function): Reorganize.
5119         (arg_assoc): Do not consider function template decls.
5120
5121 2000-08-11  Jason Merrill  <jason@redhat.com>
5122
5123         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
5124         looking inside.
5125
5126 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
5127
5128         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
5129         (lookup_nested_tag): Likewise.
5130
5131         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
5132         can be produced.
5133
5134 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
5135
5136         * parse.y (named_complex_class_head_sans_basetype): Remove
5137         always true if.
5138
5139 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
5140
5141         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
5142         explicit TEMPLATE_ID_EXPR args.
5143         (build_expr_from_tree, case CALL_EXPR): Likewise.
5144
5145 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
5146
5147         * decl.c (check_tag_decl): Diagnose typename's which don't
5148         declare anything.
5149
5150 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
5151
5152         * init.c (build_aggr_init): Reject bogus array initializers
5153         early.
5154
5155 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
5156
5157         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
5158         runtime.
5159         * cp/tinfo.cc (__dynamic_cast): Likewise.
5160         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
5161
5162 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
5163
5164         * cvt.c (convert_to_pointer_force): Fix error message when
5165         attempting to cast from ambiguous base.
5166
5167 2000-08-08  Jason Merrill  <jason@redhat.com>
5168
5169         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
5170         (tsubst_template_arg_vector): Likewise.
5171
5172         * decl2.c (build_anon_union_vars): Choose the largest field; don't
5173         assume that one will be as large as the union.
5174
5175 2000-08-07  Kazu Hirata  <kazu@hxi.com>
5176
5177         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
5178         * decl.c (pop_labels): Likewise.
5179
5180 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
5181
5182         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
5183         specifications.
5184         (__pointer_to_member_type_info): Likewise.
5185         (__base_class_info): Likewise.
5186         (__class_type_info): Likewise.
5187         (__si_class_type_info): Likewise.
5188         (__vmi_class_type_info): Likewise.
5189         * tinfo.cc (__si_class_type_info::__do_find_public_src):
5190         Changed member names to match specifications.
5191         (__vmi_class_type_info::__do_find_public_src): Likewise.
5192         (__si_class_type_info::__do_dyncast): Likewise.
5193         (__vmi_class_type_info::__do_dyncast): Likewise.
5194         (__si_class_type_info::__do_upcast): Likewise.
5195         (__vmi_class_type_info::__do_upcast): Likewise.
5196         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
5197         (__pbase_type_info::__pointer_catch): Likewise.
5198         (__pointer_type_info::__pointer_catch): Likewise.
5199         (__pointer_to_member_type_info::__pointer_catch): Likewise.
5200
5201 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
5202
5203         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
5204         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
5205         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
5206
5207 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
5208
5209         * cp-tree.h (add_method): Change prototype.
5210         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
5211         Don't double the size of the method vector in the error case.
5212         (handle_using_decl): Adjust call to add_method.
5213         (add_implicitly_declared_members): Likewise.
5214         (clone_function_decl): Likewise.
5215         * decl2.c (check_classfn): Likewise.
5216         * semantics.c (finish_member_declaration): Likewise.
5217
5218 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5219
5220         * decl.c (flag_isoc94): New variable.
5221
5222 2000-08-02  Jason Merrill  <jason@redhat.com>
5223
5224         * pt.c (do_type_instantiation): Add complain parm; don't complain
5225         if called recursively.
5226         * cp-tree.h, parse.y: Adjust.
5227
5228 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
5229
5230         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
5231         -Wno-strict-prototypes.
5232
5233         * g++spec.c: Adjust type of second argument to
5234         lang_specific_driver, and update code as necessary.
5235
5236         * cp-tree.h: Don't prototype min_precision here.
5237         (my_friendly_assert): Cast expression to void.
5238         * semantics.c (do_poplevel): Initialize scope_stmts.
5239
5240 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
5241
5242         * cp-tree.h (DECL_NEEDED_P): Tweak.
5243
5244 2000-07-28  Jason Merrill  <jason@redhat.com>
5245
5246         * lang-specs.h: Use %i in rule for .ii files.
5247
5248 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
5249
5250         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
5251
5252 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
5253
5254         Allow indirect primary bases.
5255         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
5256         primary_base.
5257         (CLASSTYPE_VFIELD_PARENT): Remove.
5258         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
5259         (BINFO_PRIMARY_BINFO): Remove.
5260         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
5261         (BINFO_VBASE_PRIMARY_P): Likewise.
5262         (BINFO_PRIMARY_BASE_OF): New macro.
5263         (BINFO_INDIRECT_PRIMARY_P): Likewise.
5264         (get_primary_binfo): New function.
5265         * decl.c (lang_mark_tree): Make lang_type::primary_base.
5266         * class.c (vcall_offset_data_s): Rename to ...
5267         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
5268         and add ctor_vtbl_p.
5269         (get_derived_offset): Use get_primary_binfo.
5270         (dfs_mark_primary_bases): Adjust handling of virtual primary
5271         bases.
5272         (mark_primary_bases): Likewise.
5273         (set_primary_base): Take a binfo, not an integer, as a
5274         representation of the primary base.
5275         (indirect_primary_base_p): Remove.
5276         (determine_primary_base): Adjust for indirect primary bases.
5277         (dfs_find_final_overrider): Fix typo in coment.
5278         (update_vtable_entry_for_fn): Use get_primary_binfo.
5279         (layout_nonempty_base_or_field): Tweak.
5280         (build_base_fields): Adjust for new primary base semantics.
5281         (dfs_propagate_binfo_offsets): Remove.
5282         (propagate_binfo_offsets): Rewrite.
5283         (dfs_set_offset_for_shared_vbases): Remove.
5284         (layout_virtual_bases): Don't use it.
5285         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
5286         ABI.
5287         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
5288         CLASSTYPE_VFIELD_PARENT.
5289         (dfs_get_primary_binfo): New function.
5290         (get_primary_binfo): Likewise.
5291         (dump_class_hierarchy_r): Tweak printing of primary bases.
5292         (build_vtbl_initializer): Fix typo in comments.  Use
5293         vtbl_init_data.
5294         (build_vcall_and_vbase_vtbl_entries): Likewise.
5295         (build_vbaes_offset_vtbl_entries): Likewise.
5296         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
5297         BV_VCALL_INDEX to handle indirect primary bases.
5298         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
5299         (build_rtti_vtbl_entries): Likewise.
5300         * search.c (get_shared_vbase_if_not_primary): Tweak.
5301         (find_vbase_instance): Likewise.
5302         (binfo_for_vtable): Simplify.
5303         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
5304         (make_binfo): Make it have 11 entries.
5305
5306 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
5307
5308         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
5309         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
5310         ascertaining primaryness.
5311         (G): Remove template_args.
5312         (decl_is_template_id): New function.
5313         (write_encoding): Use decl_is_template_id.
5314         (write_name): Likewise.  Handle type_decls.  Get main variant of
5315         type decls.
5316         (write_nested_name): Likewise.
5317         (write_prefix): Likewise.
5318         (write_template_prefix): Likewise.
5319         (write_special_name_constructor): Remove defunct production from
5320         comment.
5321         (write_bare_function_type): Remove comment about absent parameter.
5322         (write_template_template_arg): Add missing grammar production to
5323         comment.
5324
5325 2000-07-27  Jason Merrill  <jason@redhat.com>
5326
5327         * decl.c (duplicate_decls): If common_type produces a non-typedef
5328         type for a typedef, just use the old type.
5329
5330 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
5331
5332         * cp-tree.h (function_depth): Declare.
5333         (verify_stmt_tree): Likewise.
5334         (find_tree): Likewise.
5335         * decl.c (function_depth): Give it external linkage.
5336         * optimize.c (optimize_function): Increment and decrement it.
5337         * tree.c (verify_stmt_tree_r): New function.
5338         (verify_stmt_tree): Likewise.
5339         (find_tree_r): Likewise.
5340         (find_tree): Likewise.
5341
5342 2000-07-27  Jason Merrill  <jason@redhat.com>
5343
5344         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
5345         TYPE_PTRMEMFUNC_P.
5346         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
5347
5348 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
5349
5350         * decl.c (start_cleanup_fn): Mark the function as `inline'.
5351         * decl2.c (get_guard): Call cp_finish_decl, not
5352         rest_of_decl_compilation, for local guards.
5353         * lex.c (do_identifier): Remove unused variable.
5354
5355 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
5356
5357         * parse.y:  Add missing ';'.
5358
5359 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
5360
5361         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
5362         of `extern "C++"'.
5363
5364 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5365
5366         Kill strict_prototype. Backwards compatibility only for
5367         non NO_IMPLICIT_EXTERN_C systems.
5368         * cp-tree.h (flag_strict_prototype): Remove.
5369         (strict_prototype): Remove.
5370         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
5371         * decl.c (maybe_push_to_top_level): Adjust.
5372         (pop_from_top_level): Adjust.
5373         (decls_match): Only allow sloppy parm matching for ancient
5374         system headers.
5375         (init_decl_processing): Adjust.
5376         (grokdeclarator): Adjust.
5377         * decl2.c (flag_strict_prototype): Remove.
5378         (strict_prototype): Remove.
5379         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
5380         (lang_f_options): Remove "strict-prototype".
5381         (unsupported-options): Add "strict-prototype".
5382         * lex.c (do_identifier): Adjust.
5383         (do_scoped_id): Adjust.
5384         * parse.y (empty_parms): Adjust.
5385         * class.c (push_lang_context): Adjust.
5386         (pop_lang_context): Adjust.
5387         * typeck.c (comp_target_parms): Adjust.
5388
5389 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5390
5391         * decl.c (poplevel): Deal with anonymous variables at for scope.
5392         (maybe_inject_for_scope_var): Likewise.
5393
5394 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
5395
5396         * decl.c: Remove all signal handling code, now done in toplev.c.
5397
5398 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
5399
5400         * decl.c (make_rtl_for_nonlocal_decl): Rework.
5401
5402         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
5403         correctly.
5404
5405 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
5406
5407         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
5408         Define my_friendly_assert and my_friendly_abort as macros
5409         which may call friendly_abort.  Prototype friendly abort, not
5410         my_friendly_abort or my_friendly_assert.
5411         * decl.c (signal_catch): Report the signal caught in the error
5412         message.  Call fatal directly.
5413         * typeck2.c (ack, my_friendly_assert): Delete.
5414         (my_friendly_abort): Rename to friendly_abort.  Expect file,
5415         line, and function parameters.  Report the abort code, then
5416         call fancy_abort.  Do not mask an abort if errors have
5417         already occurred.
5418
5419 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
5420
5421         * typeck.c (comp_target_parms): Remove obsolete parameter.
5422         (comp_target_types): Adjust.
5423
5424 2000-07-17  Jason Merrill  <jason@redhat.com>
5425
5426         * typeck.c (mark_addressable): Never set TREE_USED.
5427         * call.c (build_call): Don't abort on calls to library functions
5428         that have been declared normally.
5429
5430         * typeck.c (build_binary_op): Fix grammar in warning.
5431
5432         * exception.cc (__eh_free): Fix prototype.
5433
5434         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
5435
5436         * decl.c (pushdecl): Handle seeing an OVERLOAD in
5437         IDENTIFIER_NAMESPACE_VALUE.
5438
5439 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
5440
5441         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
5442         * method.c (use_thunk): Correct handling of vcall offsets.
5443
5444 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
5445
5446         * .cvsignore: parse.h and parse.c have no cp- prefix.
5447
5448 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
5449
5450         * .cvsignore: New file.
5451
5452 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
5453
5454         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
5455
5456 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
5457
5458         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
5459         * parse.c: Remove.
5460         * parse.h: Likewise.
5461
5462 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
5463
5464         * class.c (layout_class_type): Add pointers to virtual bases after
5465         base classes under the old ABI.
5466
5467 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
5468
5469         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
5470         (finish_continue_stmt): Likewise.
5471         (begin_for_stmt): Remove call to note_level_for_for.
5472         (finish_goto_stmt): Change call from build_min_nt
5473         to build_stmt.
5474         (finish_expr_stmt): Likewise.
5475         (begin_if_stmt): Likewise.
5476         (begin_while_stmt): Likewise.
5477         (finish_while_stmt): Likewise.
5478         (finish_return_stmt): Likewise.
5479         (begin_for_stmt): Likewise.
5480         (finish_for_stmt): Likewise.
5481         (finish_break_stmt): Likewise.
5482         (begin_switch_stmt): Likewise.
5483         (finish_case_label): Likewise.
5484         (genrtl_try_block): Likewise.
5485         (begin_try_block): Likewise.
5486         (begin_handler): Likewise.
5487         (begin_compound_stmt): Likewise.
5488         (finish_asm_stmt): Likewise.
5489         (finish_label_stmt): Likewise.
5490         (add_decl_stmt): Likewise.
5491         (finish_subobject): Likewise.
5492         (finish_decl_cleanup): Likewise.
5493         (finish_named_return_value): Likewise.
5494         (setup_vtbl_ptr): Likewise.
5495         (add_scope_stmt): Likewise.
5496         * decl.c (finish_constructor_body): Likewise.
5497         (finish_destructor_body): Likewise.
5498         * optimize.c (copy_body_r): Likewise.
5499         (initialize_inlined_parameters): Likewise.
5500         (declare_return_variable): Likewise.
5501         (expand_call_inline): Likewise.
5502
5503 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
5504
5505         * semantics.c (expand_body): Sync interface information
5506         at the end of function body expansion.
5507
5508 2000-07-09  Jason Merrill  <jason@redhat.com>
5509
5510         * init.c (build_new_1): Bail early if the call to new fails.
5511
5512         * decl.c (compute_array_index_type): Check specifically for
5513         an INTEGER_CST, not just TREE_CONSTANT.
5514
5515         * decl.c (duplicate_decls): Don't call duplicate_decls on
5516         the DECL_TEMPLATE_RESULT.
5517         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
5518         codes.
5519
5520         * error.c (dump_template_bindings): Don't crash if we had an
5521         invalid argument list.
5522
5523         * typeck.c (c_expand_start_case): Do narrowing here.
5524         * semantics.c (finish_switch_cond): Not here.
5525
5526 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
5527
5528         * parse.y (asm_clobbers): Do string concatenation.
5529
5530 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
5531
5532         * decl.c (pushtag): Don't put local classes in template functions
5533         on the local_classes list.
5534
5535 2000-07-04  Scott Snyder  <snyder@fnal.gov>
5536
5537         * decl2.c (get_guard): Add missing return for old ABI local
5538         variable case.
5539
5540 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
5541
5542         * cp-tree.h (char_type_p): New function.
5543         * decl.c (init_decl_processing): Don't initialize
5544         signed_wchar_type_node or unsigned_wchar_type_node.
5545         (complete_array_type): Handle brace-enclosed string-constants.
5546         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
5547         * tree.c (char_type_p): New function.
5548         * typeck2.c (digest_init): Use char_type_p.
5549
5550 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5551
5552         * pt.c (tsubst): Don't layout type, if it's error_mark.
5553
5554 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5555
5556         * pt.c (instantiate_pending_templates): Reset template level.
5557
5558 2000-07-05  Jason Merrill  <jason@redhat.com>
5559
5560         * call.c (joust): Don't complain about `operator char *()' beating
5561         `operator const char *() const'.
5562
5563 2000-07-04  scott snyder  <snyder@fnal.gov>
5564             Jason Merrill  <jason@redhat.com>
5565
5566         * repo.c (repo_get_id): Handle the case where a class with virtual
5567         bases has a null TYPE_BINFO_VTABLE.
5568
5569 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
5570             Jason Merrill  <jason@redhat.com>
5571
5572         * parse.y (member_init): Just pass in the type.
5573         * init.c (expand_member_init): Handle getting a type.
5574
5575 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5576             Jason Merrill  <jason@redhat.com>
5577
5578         * decl.c (finish_function): Warn if a function has no return
5579         statement.
5580         Suggested by Andrew Koenig.
5581         * typeck.c (check_return_expr): Do set current_function_returns_value
5582         if we got an error_mark_node.
5583
5584 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
5585
5586         * decl2.c (push_decl_namespace): Push the original namespace.
5587
5588 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
5589
5590         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
5591         * semantics.c (begin_class_definition): Clear it.
5592
5593 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
5594
5595         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
5596         (genrtl_expr_stmt): Likewise.
5597         (genrtl_decl_stmt): Likewise.
5598         (genrtl_if_stmt): Likewise.
5599         (genrtl_while_stmt): Likewise.
5600         (genrtl_do_stmt): Likewise.
5601         (genrtl_return_stmt): Likewise.
5602         (genrtl_for_stmt): Likewise.
5603         (genrtl_break_stmt): Likewise.
5604         (genrtl_continue_stmt): Likewise.
5605         (genrtl_scope_stmt): Likewise.
5606         (genrtl_switch_stmt): Likewise.
5607         (genrtl_case_label): Likewise.
5608         (genrtl_begin_compound_stmt): Likewise.
5609         (genrtl_finish_compound_stmt): Likewise.
5610         (genrtl_compound_stmt): Likewise.
5611         (genrtl_asm_stmt): Likewise.
5612
5613         * init.c (begin_init_stmts): Remove call to
5614         genrtl_begin_compound_stmt.
5615         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
5616
5617         * semantics.c (lang_expand_stmt): Changed call to
5618         genrtl_compound_stmt to ignore return value.
5619
5620 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
5621
5622         * mangle.c (canonicalize_for_substitution): Return the canonical
5623         variant of a type.
5624
5625         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
5626         TYPE_DECL.
5627         * typeck.c (commonparms): Remove obstack manipulations.
5628
5629 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
5630
5631         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
5632
5633         * Makefile.in (OBJS): Added ../c-semantics.o.
5634         (OBJDEPS): Likewise.
5635
5636         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
5637         ../c-common.h.
5638         (struct stmt_tree): Added comment.
5639         (current_function_name_declared): Removed.
5640         (stmts_are_full_exprs_p): Likewise.
5641         (genrtl_do_pushlevel): Likewise.
5642         (genrtl_clear_out_block): Likewise.
5643         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
5644         (DECL_ANON_UNION_ELEMS): Likewise.
5645         (emit_local_var): Likewise.
5646         (make_rtl_for_local_static): Likewise.
5647         (do_case): Likewise.
5648         (expand_stmt): Likewise.
5649         (genrtl_decl_cleanup): Likewise.
5650         (c_expand_asm_operands): Likewise.
5651         (c_expand_return): Likewise.
5652         (c_expand_start_case): Likewise.
5653
5654         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
5655         (emit_local_var): Likewise.
5656         (initialize_local_var): Change reference to
5657         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5658         Change reference to stmts_are_full_exprs_p to
5659         current_stmt_tree->stmts_are_full_exprs_p.
5660         (push_cp_function_context): Likewise.
5661
5662         * expect.c (expand_throw): Change reference to
5663         stmts_are_full_exprs_p.
5664
5665         * init.c (build_aggr_init): Change reference to
5666         stmts_are_full_exprs_p.
5667         (build_vec_init): Likewise.
5668
5669         * optimize.c (maybe_clone_body): Change reference to
5670         current_function_name_declared to
5671         cp_function_chain->name_declared.
5672
5673         * pt.c (instantiate_decl): Change reference to
5674         current_function_name_declared to
5675         cp_function_chain->name_declared.
5676
5677         * semantics.c (expand_cond): Moved declaration to c-common.h.
5678         (genrtl_do_pushlevel): Moved to c-semantics.c.
5679         (genrtl_clear_out_block): Likewise.
5680         (genrtl_goto_stmt): Likewise.
5681         (genrtl_expr_stmt): Likewise.
5682         (genrtl_decl_stmt): Likewise.
5683         (gerntl_if_stmt): Likewise.
5684         (genrtl_while_stmt): Likewise.
5685         (genrtl_do_stmt): Likewise.
5686         (genrtl_return_stmt): Likewise.
5687         (genrtl_for_stmt): Likewise.
5688         (genrtl_break_stmt): Likewise.
5689         (genrtl_continue_stmt): Likewise.
5690         (genrtl_scope_stmt): Likewise.
5691         (genrtl_switch_stmt): Likewise.
5692         (genrtl_case_label): Likewise.
5693         (genrtl_begin_compound_stmt): Likewise.
5694         (genrtl_finish_compound_stmt): Likewise.
5695         (genrtl_compound_stmt): Likewise.
5696         (genrtl_asm_stmt): Likewise.
5697         (genrtl_decl_cleanup): Likewise.
5698         (expand_cond): Likewise.
5699         (expand_stmt): Renamed to ...
5700         (lang_expand_stmt): ... this.
5701         (lang_expand_expr_stmt): Initialize.
5702         (set_current_function_name_declared): Likewise.
5703         (stmts_are_full_exprs_p): Likewise.
5704         (current_function_name_declared): Likewise.
5705         (anon_aggr_type_p): Likewise.
5706         (do_poplevel): Change reference to
5707         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5708         Change reference to stmts_are_full_exprs_p to
5709         current_stmt_tree->stmts_are_full_exprs_p.
5710         (add_tree): Likewise.
5711         (finish_expr_stmt): Likewise.
5712         (prep_stmt): Likewise.
5713         (lang_expand_stmt): Likewise.
5714         (begin_compound_stmt): Change reference to
5715         current_function_name_declared to
5716         cp_function_chain->name_declared and call to
5717         current_function_name_declared().
5718         (setup_vtbl_ptr): Likewise.
5719         (genrtl_do_poplevel): Removed.
5720
5721 2000-06-30  Jason Merrill  <jason@redhat.com>
5722
5723         * init.c (init_init_processing): Go back to aligning like
5724         double_type_node for old ABI.
5725         (get_cookie_size): Make cookie larger if we get a type that needs
5726         more alignment.
5727         (build_vec_delete): Call it.
5728
5729         * typeck.c (qualify_type_recursive): New fn.
5730         (composite_pointer_type): Use it.
5731         (build_binary_op): Use composite_pointer_type.
5732
5733 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
5734             Jason Merrill  <jason@redhat.com>
5735
5736         * typeck.c (check_return_expr): Don't complain about returning
5737         NULL from operator new if -fcheck-new.
5738         * cp-tree.h: Declare flag_check_new here.
5739         * init.c: Not here.
5740
5741 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
5742
5743         * mangle.c (find_substitution): Use same_type_p.
5744         (write_encoding): Don't check for substitutions.
5745
5746 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
5747
5748         * parse.y (expr_no_comma_rangle): New non-terminal.
5749         (template_parm): Use it for default parameter case.
5750         (template_arg): Use it.
5751         (expr_no_commas): Remove commented out undefined extensions.
5752         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5753         * parse.h, parse.c: Rebuilt.
5754
5755 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
5756
5757         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
5758         (finish_asm_stmt): Do it here, instead.
5759
5760         * cp-tree.h (ridpointers): Don't declare.
5761         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
5762         (record_builtin_java_type): Likewise.
5763         (init_decl_processing): Likewise.
5764         * lex.c: Move inclusion of lex.h.
5765         (ridpointers): Don't define.
5766         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
5767         RID_MAX.
5768         * lex.h (enum rid): Rename to ...
5769         (enum cp_rid): ... this.
5770         (ridpointers): Don't declare.
5771         * parse.y: Move inclusion of lex.h.
5772         * parse.c: Regenerated.
5773         * spew.c: Move inclusion of lex.h.
5774
5775         * cp-tree.h (struct language_function): Remove temp_name_counter.
5776         (temp_name_counter): Remove.
5777         (get_temp_name): Change prototype.
5778         (get_guard): New function.
5779         (get_guard_cond): Likewise.
5780         (set_guard): Likewise.
5781         * cvt.c (build_up_reference): Adjust call to get_temp_name.
5782         * decl.c (expand_static_init): Use get_guard and friends to
5783         implement guard variables.
5784         * decl2.c (get_temp_name): Assume that the variables created are
5785         always static.
5786         (get_sentry): Rename to ...
5787         (get_guard): ... this.  Implement new ABI guard variables.
5788         (get_guard_bits): New function.
5789         (get_guard_cond): Likewise.
5790         (set_guard): Likewise.
5791         (start_static_initialization_or_destruction): Use them.
5792         (do_static_initialization): Replace sentry with guard throughout.
5793         (do_static_destruction): Likewise.
5794         * init.c (create_temporary_var): Add comment.
5795
5796 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
5797
5798         * mangle.c (find_substitution): Use same_type_p.
5799         (write_encoding): Don't check for substitutions.
5800
5801 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
5802
5803         * parse.y (expr_no_comma_rangle): New non-terminal.
5804         (template_parm): Use it for default parameter case.
5805         (template_arg): Use it.
5806         (expr_no_commas): Remove commented out undefined extensions.
5807         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5808         * parse.h, parse.c: Rebuilt.
5809
5810 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
5811
5812         * cp-tree.h (flag_const_strings): Remove.
5813         (warn_parentheses): Likewise.
5814         (warn_format): Likewise.
5815         (common_type): Likewise.
5816         (default_conversion): Likewise.
5817         (build_binary_op): Likewise.
5818         (cp_build_binary_op): New macro.
5819         * call.c (build_new_op): Use cp_build_binary_op instead of
5820         build_binary_op.
5821         * class.c (build_vtable_entry_ref): Likewise.
5822         * decl.c (expand_static_init): Likewise.
5823         (compute_array_index_type): Likewise.
5824         (build_enumerator): Likewise.
5825         * decl2.c (delete_sanity): Likewise.
5826         (start_static_initialization_or_destruction): Likewise.
5827         * error.c (dump_type_suffix): Likewise.
5828         * init.c (resolve_offset_ref): Likewise.
5829         (build_new): Likewise.
5830         (build_new_1): Likewise.
5831         (build_vec_delete_1): Likewise.
5832         (build_vec_init): Likewise.
5833         (build_delete): Likewise.
5834         * rtti.c (synthesize_tinfo_fn): Likewise.
5835         (synthesize_tinfo_var): Likewise.
5836         * search.c (expand_upcast_fixups): Likewise.
5837         (fixup_all_virtual_upcast_offsets): Likewise.
5838         * typeck.c (build_array_ref): Likewise.
5839         (get_member_function_from_ptrfunc): Likewise.
5840         (build_binary_op): Add parameter.
5841         (pointer_int_sum): Use cp_build_binary_op.
5842         (pointer_diff): Likewise.
5843         (build_modify_expr): Likewise.
5844         (get_delta_difference): Likewise.
5845         (build_ptrmemfunc): Likewise.
5846
5847 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
5848
5849         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
5850         * decl.c (create_implicit_typedef): Adjust.
5851         * decl2.c (build_artificial_parm): Adjust.
5852         * method.c (implicitly_declare_fn): Adjust.
5853         * pt.c (push_inline_template_parms_recursive): Adjust.
5854         (process_template_parm): Adjust.
5855         (overloaded_template_name): Adjust.
5856         * semantics.c (finish_template_template_parm): Adjust.
5857
5858 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
5859
5860         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
5861         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
5862         where to emit thunks.
5863         (build_vtt): Adjust call to build_vtt_inits.
5864         (build_vtt_inits): Add parameter to indicate whether or not
5865         sub-VTTs for virtual bases should be included.  Adjust handling of
5866         construction vtables.
5867         (get_matching_base): New function.
5868         (dfs_build_vtt_inits): Rename to ...
5869         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
5870         construction vtables.
5871         (dfs_fixup_binfo_vtbls): Likewise.
5872         (build_ctor_vtbl_groups): Build construction vtables for virtual
5873         bases, too.
5874         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
5875         to build construction vtbls.
5876         (dfs_accumulate_vtbl_inits): Adjust handling of
5877         construction vtables.
5878
5879         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
5880         types correctly.
5881
5882 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
5883
5884         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
5885
5886 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
5887
5888         * search.c (hides): Remove.
5889         (is_subobject_of_p): Add most_derived parameter. Use
5890         CANONICAL_BINFO.
5891         (lookup_field_queue_p): Adjust.
5892         (lookup_field_r): Adjust.
5893
5894 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
5895
5896         * decl2.c (handle_class_head): Bash typedefs to the type's main
5897         decl.
5898
5899 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
5900
5901         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
5902         (begin_global_stmt_expr): ... this.
5903         (genrtl_finish_stmt_expr): Rename to ...
5904         (finish_global_stmt_expr): ... this.
5905         * init.c (begin_init_stmts): Adjust calls.
5906         (finish_init_stmts): Likewise.
5907         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
5908         (begin_global_stmt_expr): ... this.
5909         (genrtl_finish_stmt_expr): Rename to ...
5910         (finish_global_stmt_expr): ... this.
5911
5912 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5913
5914         * search.c (lookup_member): Fix typo in comment.
5915
5916 2000-06-24  Jason Merrill  <jason@redhat.com>
5917
5918         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
5919         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
5920
5921 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5922
5923         * parse.y (complex_direct_notype_declarator): Support global_scope.
5924         * Makefile.in: Adjust conflict count.
5925
5926 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5927
5928         * parse.y (template_arg): Convert TEMPLATE_DECL
5929         that is a template template paramter to
5930         TEMPLATE_TEMPLATE_PARM here.
5931
5932         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
5933         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
5934         (copy_template_template_parm): Adjust prototype.
5935         * decl.c (grokdeclarator): Remove dead code.
5936         * pt.c (process_template_parm): Tidy.
5937         (lookup_template_class): Construct nodes in
5938         copy_template_template_parm.
5939         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
5940         lookup_template_class.  Use TYPE_TI_TEMPLATE.
5941         * tree.c (copy_template_template_parm): Add NEWARGS
5942         parameter.
5943         (mapcar): Adjust call to copy_template_template_parm.
5944         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
5945         * method.c (build_template_template_parm_names): Change error
5946         code to avoid compilation warning.
5947
5948         * gxxint.texi: Document template template parameter
5949         name mangling.
5950
5951 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
5952
5953         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
5954         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
5955         (cp-demangle.o): New rule.
5956         (dyn-string.o): Likewise.
5957         * inc/cxxabi.h (__cxa_demangle): New declaration.
5958
5959 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
5960
5961         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
5962         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
5963         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
5964         a tree, not an int.
5965         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
5966         (make_thunk): Change prototype.
5967         (emit_thunk): Rename to use_thunk.
5968         (mangle_thunk): Change prototype.
5969         * class.c (get_derived_offset): Simplify.
5970         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
5971         BV_GENERATE_THUNK_WITH_VTABLE_P.
5972         (build_primary_vtable): Simplify.
5973         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
5974         (dfs_find_base): Remove.
5975         (update_vtable_entry_for_fn): Correct bug in finding the base
5976         where a virtual function was first declared.  Figure out whether
5977         or not to emit a vcall-thunk with the vtables in which it appears.
5978         Correct logic for deciding whether to use an ordinary thunk, or a
5979         vcall thunk.
5980         (finish_struct_1): Remove unnecssary code.
5981         (build_vtbl_initializer): Use ssize_int for the running counter of
5982         negative indices.
5983         (build_vtbl_initializer): Only use vcall thunks where necessary.
5984         Mark thunks as needing to be emitted with their vtables, or not.
5985         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
5986         indices.  Use size_binop.
5987         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
5988         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
5989         size_binop.
5990         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
5991         (build_vtable_entry): Mark thunks as needing to be emitted with
5992         their vtables, or not.
5993         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
5994         * decl2.c (mark_vtable_entries): Use use_thunk instead of
5995         emit_thunk.
5996         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
5997         information.
5998         * error.c (dump_expr): Use BV_FN.
5999         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
6000         not an int.
6001         * method.c (make_thunk): Likewise.
6002         (emit_thunk): Rename to use_thunk.  Allow callers to decide
6003         whether or not to actually emit the thunk.  Adjust for changes in
6004         representation of vcall offsets.
6005         * search.c (dfs_get_pure_virtuals): Use BV_FN.
6006         * semantics.c (emit_associated_thunks): New function.
6007         (expand_body): Use it.
6008         * ir.texi: Adjust decriptions of thunks.
6009
6010 2000-06-22  Jason Merrill  <jason@redhat.com>
6011
6012         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
6013         (tsubst_friend_function): Copy it here.
6014
6015         * decl.c (grok_op_properties): Fix typo.
6016
6017         * decl2.c (delete_sanity): Clarify warning, avoid failure on
6018         deleting void*.
6019
6020         * pt.c (check_explicit_specialization): Clarify error.
6021
6022         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
6023         an old OVERLOAD when we're declaring a non-function.
6024         (pushdecl, destroy_local_var): Check for error_mark_node.
6025         (warn_extern_redeclared_static): Also bail early if
6026         we're a CONST_DECL.
6027         (push_overloaded_decl): Ignore an old error_mark_node.
6028
6029 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
6030
6031         * call.c (build_x_va_arg): Check if in a template decl.
6032         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
6033
6034 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6035
6036         * class.c (push_lang_context): TYPE_NAME gets you to the Java
6037         types DECLs.
6038         * decl.c (check_goto): Computed gotos assumed OK.
6039
6040 2000-06-20  Jason Merrill  <jason@redhat.com>
6041
6042         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
6043         for which we don't need to look for instantiations.
6044
6045 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
6046
6047         * parse.y (program): Always call finish_translation_unit.
6048         * parse.c, parse.h: Rebuilt.
6049
6050 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
6051
6052         * method.c: Don't include hard-reg-set.h.
6053
6054 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6055
6056         * rtti.c (get_base_offset): Cope when vbase field is in a base.
6057
6058 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6059
6060         * call.c (build_conditional_expr): Use VOID_TYPE_P.
6061         * cvt.c (cp_convert_to_pointer): Likewise.
6062         (convert_to_void): Likewise.
6063         * error.c (dump_expr): Likewise.
6064         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
6065         * init.c (build_delete): Likewise.
6066         * method.c (emit_thunk): Likewise.
6067         * optmize.c (declare_return_variable): Likewise.
6068         * rtti.c (get_tinfo_decl_dynamic): Likewise.
6069         (get_typeid): Likewise.
6070         (build_dynamic_cast_1): Likewise.
6071         * typeck.c (composite_pointer_type): Likewise.
6072         (common_type): Likewise.
6073         (build_indirect_ref): Likewise.
6074         (build_binary_op): Likewise.
6075         (build_x_compound_expr): Likewise.
6076         (check_return_expr): Likewise.
6077         * typeck2.c (add_exception_specifier): Likewise.
6078
6079         * mangle.c (write_method_parms): Use direct comparison for end
6080         of parmlist.
6081
6082 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
6083
6084         * cp-tree.h (genrtl_try_block): Declare function.
6085         (genrtl_handler): Likewise.
6086         (genrtl_catch_block): Likewise.
6087         (genrtl_ctor_stmt): Likewise.
6088         (genrtl_subobject): Likewise.
6089         (genrtl_decl_cleanup): Likewise.
6090         (genrtl_do_poplevel): Likewise.
6091         (genrtl_do_pushlevel): Likewise.
6092         (genrtl_clear_out_block): Likewise.
6093         (genrtl_goto_stmt): Likewise.
6094         (genrtl_expr_stmt): Likewise.
6095         (genrtl_decl_stmt): Likewise.
6096         (genrtl_if_stmt): Likewise.
6097         (genrtl_while_stmt): Likewise.
6098         (genrtl_do_stmt): Likewise.
6099         (genrtl_return_stmt): Likewise.
6100         (genrtl_for_stmt): Likewise.
6101         (genrtl_break_stmt): Likewise.
6102         (genrtl_continue_stmt): Likewise.
6103         (genrtl_scope_stmt): Likewise.
6104         (genrtl_switch_stmt): Likewise.
6105         (genrtl_case_label): Likewise.
6106         (genrtl_begin_compound_stmt): Likewise.
6107         (genrtl_finish_compound_stmt): Likewise.
6108         (genrtl_compound_stmt): Likewise.
6109         (genrtl_asm_stmt): Likewise.
6110         (genrtl_named_return_value): Likewise.
6111         (genrtl_begin_stmt_expr): Likewise.
6112         (genrtl_finish_stmt_expr): Likewise.
6113         (finish_for_stmt): Removed first argument.
6114         (finish_switch_stmt): Likewise.
6115
6116         * semantics.c (genrtl_try_block): Define function.
6117         (genrtl_handler): Likewise.
6118         (genrtl_catch_block): Likewise.
6119         (genrtl_ctor_stmt): Likewise.
6120         (genrtl_subobject): Likewise.
6121         (genrtl_decl_cleanup): Likewise.
6122         (genrtl_do_poplevel): Likewise.
6123         (genrtl_do_pushlevel): Likewise.
6124         (genrtl_clear_out_block): Likewise.
6125         (genrtl_goto_stmt): Likewise.
6126         (genrtl_expr_stmt): Likewise.
6127         (genrtl_decl_stmt): Likewise.
6128         (genrtl_if_stmt): Likewise.
6129         (genrtl_while_stmt): Likewise.
6130         (genrtl_do_stmt): Likewise.
6131         (genrtl_return_stmt): Likewise.
6132         (genrtl_for_stmt): Likewise.
6133         (genrtl_break_stmt): Likewise.
6134         (genrtl_continue_stmt): Likewise.
6135         (genrtl_scope_stmt): Likewise.
6136         (genrtl_switch_stmt): Likewise.
6137         (genrtl_case_label): Likewise.
6138         (genrtl_begin_compound_stmt): Likewise.
6139         (genrtl_finish_compound_stmt): Likewise.
6140         (genrtl_compound_stmt): Likewise.
6141         (genrtl_asm_stmt): Likewise.
6142         (genrtl_named_return_value): Likewise.
6143         (genrtl_begin_stmt_expr): Likewise.
6144         (genrtl_finish_stmt_expr): Likewise.
6145         (finish_for_stmt): Removed first argument and generate rtl
6146         specific code.
6147         (finish_switch_stmt): Likewise.
6148         (do_poplevel): Removed generate rtl specific code.
6149         (do_pushlevel): Likewise.
6150         (add_tree): Likewise.
6151         (finish_goto_stmt): Likewise.
6152         (finish_expr_stmt): Likewise.
6153         (begin_if_stmt): Likewise.
6154         (finish_if_stmt_cond): Likewise.
6155         (finish_then_clause): Likewise.
6156         (begin_else_clause): Likewise.
6157         (finish_else_clause): Likewise.
6158         (finish_if_stmt): Likewise.
6159         (clear_out_block): Likewise.
6160         (begin_while_stmt): Likewise.
6161         (finish_while_stmt_cond): Likewise.
6162         (finish_while_stmt): Likewise.
6163         (begin_do_stmt): Likewise.
6164         (finish_do_body): Likewise.
6165         (finish_do_stmt): Likewise.
6166         (finish_return_stmt): Likewise.
6167         (begin_for_stmt): Likewise.
6168         (finish_for_init_stmt): Likewise.
6169         (finish_for_cond): Likewise.
6170         (finish_for_expr): Likewise.
6171         (finish_break_stmt): Likewise.
6172         (finish_continue_stmt): Likewise.
6173         (begin_switch_stmt): Likewise.
6174         (finish_switch_cond): Likewise.
6175         (finish_case_label): Likewise.
6176         (begin_try_block): Likewise.
6177         (begin_function_try_block): Likewise.
6178         (finish_try_block): Likewise.
6179         (finish_cleanup_try_block): Likewise.
6180         (finish_cleanup): Likewise.
6181         (finish_function_try_block): Likewise.
6182         (finish_handler_sequence): Likewise.
6183         (finish_function_handler_sequence): Likewise.
6184         (begin_handler): Likewise.
6185         (finish_handler_parms): Likewise.
6186         (begin_catch_block): Likewise.
6187         (finish_handler): Likewise.
6188         (begin_compound_stmt): Likewise.
6189         (finish_compound_stmt): Likewise.
6190         (finish_asm_stmt): Likewise.
6191         (finish_label_stmt): Likewise.
6192         (finish_label_decl): Likewise.
6193         (finish_subobject): Likewise.
6194         (finish_decl_cleanup): Likewise.
6195         (finish_named_return_value): Likewise.
6196         (begin_stmt_expr): Likewise.
6197         (finish_stmt_expr): Likewise.
6198
6199         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
6200         to call genrtl_expr_stmt when appropriate.
6201
6202         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
6203         begin_compound_expr to call genrtl_begin_stmt_expr and
6204         genrtl_begin_compound_expr when appropriate.
6205         (finish_init_stmts): Changed calls to finish_compound_expr and
6206         finish_stmt_expr to call genrtl_finish_compound_expr and
6207         genrtl_finish_stmt_expr when appropriate.
6208         (expand_default_init): Changed call to finish_expr_stmt to call
6209         genrtl_expr_stmt when appropriate.
6210         (build_vec_init): Likewise.
6211
6212         * parse.y (simple_stmt): Removed first argument from call to
6213         finish_for_stmt. Removed first argument from call to
6214         finish_switch_stmt.
6215
6216         * parse.c: Regenerated.
6217
6218         * pt.c (tsubst_expr): Removed first argument from call to
6219         finish_for_stmt. Removed first argument from call to
6220         finish_switch_stmt.
6221
6222 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
6223
6224         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
6225         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
6226
6227         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
6228         (cplus_tree_code_length[]): Likewise.
6229         (cplus_tree_code_name[]): Likewise.
6230         (init_parse): Added call to add_c_tree_codes. Changed
6231         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
6232
6233 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
6234
6235         * cp-tree.h (finish_mem_initializers): Declare.
6236         (count_trees): Likewise.
6237         * parse.y (base_init): Use finish_mem_initializers.
6238         * semantics.c (finish_mem_initializers): New function.
6239
6240         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
6241         the number of trees.
6242         (n_trees): Remove.
6243         (count_trees): Don't use it.
6244
6245 2000-06-15  Jason Merrill  <jason@redhat.com>
6246
6247         * tree.c (count_trees): New debugging function.
6248
6249         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
6250         * init.c (build_member_call): Pull out the name of a DECL.
6251
6252         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
6253         * semantics.c (expand_body): Push to TV_INTEGRATION here.
6254         * optimize.c (optimize_function): Not here.
6255         * pt.c (instantiate_decl): Push to TV_PARSE.
6256
6257 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
6258
6259         * cp-tree.h (struct language_function): Remove x_base_init_list
6260         and x_member_init_list.
6261         (current_base_init_list): Remove.
6262         (current_member_init_list): Likewise.
6263         (setup_vtbl_ptr): Change prototype.
6264         (emit_base_init): Likewise.
6265         (expand_member_init): Likewise.
6266         (reinit_parse_for_function): Remove.
6267         * decl.c (save_function_data): Don't clear x_base_init_list and
6268         x_member_init_list.
6269         (mark_language_function): Don't mark them.
6270         * init.c (perform_member_init): Tweak comment.
6271         (sort_member_init): Take the list of initializers as an argument.
6272         (sort_base_init): Likewise.
6273         (emit_base_init): Likewise.
6274         (expand_member_init): Return the initializer.  Don't use global
6275         variables.
6276         * lex.c (reinit_parse_for_function): Remove.
6277         * method.c (build_template_parm_names): Correct substitution.
6278         (do_build_copy_constructor): Don't use current_member_init_list
6279         and current_base_init_list.
6280         (synthesize_method): Likewise.
6281         * parse.y (base_init): Split mem-initializers into
6282         base-initializers and field-initializers.
6283         (member_init_list): Build up the list here.
6284         (member_init): Return the initializer.
6285         (fn.depfn): Don't use reinit_parse_for_function.
6286         * parse.c: Regenerated.
6287         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
6288         ERROR_MARK.
6289         (tsubst_expr): Don't use current_member_init_list
6290         and current_base_init_list.
6291         (tsubst_expr_values): Rename to ...
6292         (tsubst_initializer_list): ... this.  Use convert_from_reference.
6293         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
6294         and current_base_init_list.
6295         (begin_function_definition): Don't call reinit_parse_for_function.
6296
6297         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
6298
6299         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
6300         correctly.
6301
6302         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
6303
6304 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
6305
6306         * cp-tree.h (IF_COND): Move to c-common.h.
6307         (THEN_CLAUSE): Likewise.
6308         (ELSE_CLAUSE): Likewise.
6309         (WHILE_COND): Likewise.
6310         (WHILE_BODY): Likewise.
6311         (DO_COND): Likewise.
6312         (DO_BODY): Likewise.
6313         (RETURN_EXPR): Likewise.
6314         (EXPR_STMT_EXPR): Likewise.
6315         (FOR_INIT_STMT): Likewise.
6316         (FOR_COND): Likewise.
6317         (FOR_EXPR): Likewise.
6318         (FOR_BODY): Likewise.
6319         (SWITCH_COND): Likewise.
6320         (SWITCH_BODY): Likewise.
6321         (CASE_LOW): Likewise.
6322         (CASE_HIGH): Likewise.
6323         (GOTO_DESTINATION): Likewise.
6324         (COMPOUND_BODY): Likewise.
6325         (ASM_CV_QUAL): Likewise.
6326         (ASM_STRING): Likewise.
6327         (ASM_OUTPUTS): Likewise.
6328         (ASM_INPUTS): Likewise.
6329         (ASM_CLOBBERS): Likewise.
6330         (DECL_STMT_DECL): Likewise.
6331         (STMT_EXPR_STMT): Likewise.
6332         (LABEL_STMT_LABEL): Likewise.
6333         (SCOPE_BEGIN_P): Likewise.
6334         (SCOPE_END_P): Likewise.
6335         (SCOPE_STMT_BLOCK): Likewise.
6336         (SCOPE_NULLIFIED_P): Likewise.
6337         (SCOPE_NO_CLEANUPS_P): Likewise.
6338         (SCOPE_PARTIAL_P): Likewise.
6339         (ASM_VOLATILE_P): Likewise.
6340         (STMT_LINENO): Likewise.
6341         (STMT_LINENO_FOR_FN_P): Likewise.
6342
6343         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
6344         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
6345         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
6346         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
6347         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
6348
6349         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
6350
6351         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
6352         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
6353
6354         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
6355         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
6356         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
6357
6358 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
6359
6360         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
6361         * class.c (dfs_find_final_overrider): Set it appropriately.
6362         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
6363         avoid unneeded secondary vptrs.
6364
6365 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
6366
6367         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
6368         (check_bitfield_decl, check_field_decl): Likewise.
6369         (build_vtbl_or_vbase_field, build_base_field): Likewise.
6370         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
6371         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
6372         (xfer_tag, finish_enum): Likewise.
6373         * decl2.c (finish_builtin_type): Likewise.
6374         * init.c (init_init_processing): Likewise.
6375         * pt.c (instantiate_class_template): Likewise.
6376         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
6377         * cp-tree.h (struct lang_type): Add user_align member.
6378         (CLASSTYPE_USER_ALIGN): Define.
6379
6380 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
6381
6382         * Make-lang.in (c++.install-common): Install g++-cross in
6383         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
6384         $(target_alias)-g++ and $(target_alias)-c++.
6385
6386 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
6387
6388         * class.c (vcall_offset_data_s): Add last_init and fns.
6389         (overrides): Rename to same_signature_p.
6390         (dfs_find_final_overrider): Adjust accordingly.
6391         (mark_overriders): Likewise.
6392         (warn_hidden): Likewise.
6393         (build_vtbl_initializer): Reorganize machinery for building things
6394         at negative offsets.
6395         (build_vcall_and_vbase_vtbl_entries): Likewise.
6396         (build_vbase_offset_vtbl_entries): Likewise.
6397         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
6398         offset entries.  Do not create two entries for functions with the
6399         same signature.
6400         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
6401         (build_rtti_vtbl_entries): Reorganize machinery for building things
6402         at negative offsets.
6403
6404         * optimize.c (expand_call_inline): Don't recurse into the code
6405         used to initialize the parameters more than once.
6406
6407 2000-06-11  Mark Mitchell <mark@codesourcery.com>
6408
6409         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
6410         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
6411         (find_substitution): Only use the `Sa' substitution for
6412         std::allocator, not instantiations of it.
6413         (write_template_prefix): Move comment.  Only use a TREE_LIST to
6414         represent substitutions for a member template.
6415         (write_array_type): Mangle array dimensions correctly.
6416         * optimize.c (maybe_clone_body): Copy more information from the
6417         cloned function.
6418         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
6419         on the regenerated declaration.
6420
6421 2000-06-11  Chip Salzenberg  <chip@valinux.com>
6422             Mark Mitchell <mark@codesourcery.com>
6423
6424         * class.c (build_vtable): Clarify comment.
6425         (build_ctor_vtbl_group): Pass the most derived type to
6426         build_vtable.
6427
6428 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6429
6430         * decl2.c (compare_options): Don't needlessly cast away const-ness.
6431
6432 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
6433
6434         * decl.c (add_binding): Handle duplicate declarations of external
6435         variables.
6436
6437 2000-06-09  Chip Salzenberg  <chip@valinux.com>
6438             Mark Mitchell <mark@codesourcery.com>
6439
6440         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
6441         argument.
6442         (write_signed_number): New macro.
6443         (write_unsigned_number): Likewise.
6444         (write_source_name): Use them.
6445         (write_number): Handle signed and unsigned values.
6446         (write_integer_cst): Use tree_int_cst_sgn, and use
6447         write_unsigned_number or write_signed_number as appropriate.
6448         (write_discriminator): Use write_unsigned_number or
6449         write_signed_number as appropriate.
6450         (write_template_arg_literal): Likewise.
6451         (write_array_type): Use tree_low_cst.
6452         (write_template_parm):  Use write_unsigned_number or
6453         write_signed_number as appropriate.
6454         (write_substitution): Adjust call to write_number.
6455         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
6456         (write_expression): Handle non-type template arguments of
6457         reference type correctly.
6458         (mangle_thunk): Use write_signed_number.
6459
6460 2000-06-09  Chip Salzenberg  <chip@valinux.com>
6461
6462         * mangle.c (find_substition): Don't mangle objects with typename
6463         substitutions (e.g. "cin" as "Si").
6464
6465 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
6466
6467         * call.c (add_candidate): Use ggc_alloc_cleared.
6468         * decl.c (lookup_label): Likewise.
6469         * lex.c (retrofit_lang_decl): Likewise.
6470
6471 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
6472
6473         * semantics.c (expand_body): Push to TV_EXPAND.
6474         * optimize.c (optimize_function): Push to TV_INTEGRATION.
6475         * decl.c (start_function): Always call announce_function.
6476
6477         * tinfo2.cc: Just declare abort.
6478
6479 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
6480
6481         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
6482         whenever @ is a symbolic name.
6483
6484 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
6485
6486         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
6487
6488 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
6489
6490         * decl.c (pushdecl): Look up functions by DECL_NAME, not
6491         DECL_ASSEMBLER_NAME.
6492
6493 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
6494
6495         * decl2.c (c_language): Define.
6496
6497 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
6498
6499         * lex.c (lang_init_options): Tweak.
6500
6501         * decl2.c: Remove #inclusion of diagnostic.h
6502         (lang_decode_option): Move diagnostic formatting options to
6503         toplevel.
6504
6505         * lang-options.h: Remove documentation for diagnostic options.
6506
6507         * Makefile.in (lex.o): Depends upon diagnostic.h
6508
6509 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
6510
6511         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
6512         the same DECL_RESULT, it's not a redefinition.
6513         * pt.c (tsubst_decl): Remove code to handle illegal
6514         specializations.
6515
6516 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
6517
6518         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
6519
6520 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
6521
6522         * search.c (maybe_suppress_debug_info): Don't check
6523         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
6524
6525         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
6526         here if extern_p.
6527
6528         Remember instantiation context in deferred instantiations.
6529         * cp-tree.h (struct tinst_level): Remove.
6530         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
6531         * pt.c (current_tinst_level): Now a tree.
6532         (print_template_context, push_tinst_level, pop_tinst_level,
6533         tinst_for_decl): Adjust.
6534         (reopen_tinst_level): New fn.
6535         (init_pt): Register current_tinst_level as a root.
6536         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
6537         of the pending templates list.
6538         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
6539         * lex.c (extract_interface_info): Adjust.
6540         * decl2.c (warn_if_unknown_interface): Adjust.
6541
6542 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
6543
6544         * class.c (indirect_primary_base_p): New function.
6545         (determine_primary_base): Use it.
6546
6547 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6548
6549         Update new-abi dynamic cast algorithm.
6550         * tinfo.cc (__class_type_info::__dyncast_result): Add
6551         whole_details. Adjust constructor.
6552         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
6553         Avoid unnecessary searching.
6554         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
6555
6556 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6557
6558         * decl.c (init_decl_processing): Don't call record_component_aliases.
6559         * tree.c (build_cplus_array_type_1): Likewise.
6560
6561 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
6562
6563         * ir.texi: Correct typo.
6564         * mangle.c (write_expression): Handle non-type template arguments
6565         with reference type.
6566         * method.c (build_overload_value): Likewise.
6567         * pt.c (convert_nontype_argument): Explicitly represent conversion
6568         to a reference with an ADDR_EXPR.
6569         (unify): Always unify arguments in left-to-right order.
6570
6571 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
6572             Mark Mitchell  <mark@codesourcery.com>
6573
6574         * Make-lang.in (CXX_SRCS): Add mangle.c.
6575         * Makefile.in (CXX_OBJS): Add mangle.o.
6576         (mangle.o): New rule.
6577
6578         * class.c (local_classes): New variable.
6579         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
6580         (get_vtt_name): Use mangle_vtt_name for new ABI.
6581         (init_class_processing): Initialize local_classes.
6582         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
6583         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
6584         (std_identifier): New macro.
6585         (DECL_VOLATILE_MEMFUNC_P): New macro.
6586         (DECL_NAMESPACE_STD_P): Likewise.
6587         (local_classes): Declare.
6588         (get_mostly_instantiated_function_type): Declare.
6589         (init_mangle): Declare.
6590         (mangle_decl): Likewise.
6591         (mangle_type_string): Likewise.
6592         (mangle_type): Likewise.
6593         (mangle_typeinfo_for_type): Likewise.
6594         (mangle_typeinfo_string_for_type): Likewise.
6595         (mangle_vtbl_for_type): Likewise.
6596         (mangle_vtt_for_type): Likewise.
6597         (mangle_ctor_vtbl_for_type): Likewise.
6598         (mangle_thunk): Likewise.
6599         (mangle_conv_op_name_for_type): Likewise.
6600         (mangle_guard_variable): Likewise.
6601         * decl.c (pushtag): Keep track of local classes.
6602         (initialize_predefined_identifiers): Initialize std_identifier.
6603         (init_decl_processing): Use std_identifier.
6604         (start_decl): Don't treat instantiations as specializations.
6605         (grokdeclarator): Likewise.
6606         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
6607         name for fully-instantiated templates.
6608         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
6609         destructors with the new ABI.
6610         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
6611         (grokfield): Use mangle_type for new ABI.
6612         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
6613         (get_sentry): Use mangle_guard_variable for new ABI.
6614         (start_static_initialization_or_destruction): Likewise.
6615         * expr.c (extract_aggr_init): Remove.
6616         (extract_scalar_init): Likewise.
6617         (extract_init): Remove #if 0'd code.
6618         * mangle.c: New function.
6619         * method.c (build_mangled_name): Assert not flag_new_abi.
6620         (build_static_name): Likewise.
6621         (build_decl_overload_real): Likewise.
6622         (build_typename_overload): Likewise.
6623         (build_overload_with_type): Likewise.
6624         (build_overload_name): Likewise.
6625         (get_ctor_vtbl_name): Likewise.
6626         (start_squangling): Likewise.
6627         (get_id_2): Likewise.
6628         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
6629         (init_method): Call init_mangle for new ABI.
6630         (make_thunk): Call mangle_thunk for new ABI.
6631         * operators.def: Correct new ABI manglings for the `%' operator.
6632         Add `::' operator.
6633         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
6634         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
6635         (lookup_template_class): Call mangle_decl for new ABI.
6636         (get_mostly_instantiated_function_type): New function.
6637         (set_mangled_name_for_template_decl): Use it.
6638         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
6639         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
6640         conversion op names.
6641         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
6642         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
6643         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
6644         mangle_typeinfo_string_for_type.
6645
6646 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
6647
6648         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
6649         (INNERMOST_TEMPLATE_ARGS): New macro.
6650         (innermost_args): Remove.
6651         (get_innermost_template_args): New function.
6652         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
6653         * error.c (dump_function_decl): Be caution when using
6654         most_general_template.
6655         * method.c (build_template_parm_names):  Use
6656         INNERMOST_TEMPLATE_ARGS.
6657         * pt.c (add_to_template_args): Tidy comment
6658         (get_innermost_template_args): New function.
6659         (check_explicit_specialization): Clear DECL_INITIAL for a new
6660         specialization.
6661         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
6662         Tidy.
6663         (push_template_decl): Always register specializations of the most
6664         general template.
6665         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
6666         (coerce_template_parms): Likewise.
6667         (lookup_template_class): Likewise.
6668         (innermost_args): Remove.
6669         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
6670         (tsubst_decl): Handle tricky specializations.  Use
6671         get_innermost_template_args.
6672         (instantiate_template): Simplify handling of partial
6673         instantiations.
6674         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
6675         (most_general_template): Reimplement, in a more straightforward
6676         manner.
6677         (regenerate_decl_from_template): Tweak formatting.  Use
6678         TMPL_ARGS_DEPTH for clarity.
6679         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
6680
6681         * dump.c (dequeue_and_dump): Dump information about thunks.
6682
6683 2000-06-01  Richard Henderson  <rth@cygnus.com>
6684
6685         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
6686
6687 2000-06-01  Richard Henderson  <rth@cygnus.com>
6688
6689         * decl2.c (unsupported_options): Fix typo, make const.
6690         (lang_decode_option): Fix bsearch argument order.
6691
6692 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
6693
6694         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
6695         on FIELD_DECLs.
6696
6697 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6698
6699         * cp-tree.h (c_get_alias_set): Deleted.
6700         * Makefile.in (decl.o): Include ../expr.h.
6701         * decl.c (expr.h): Include.
6702         (init_decl_processing): Call record_component_aliases for arrays.
6703         (grokdeclarator): Likewise.
6704         Set TREE_ADDRESSABLE for fields that aren't bitfields.
6705         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
6706
6707 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
6708
6709         Remove guiding declaration support.
6710         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
6711         (flag_guiding_decls): Remove.
6712         * call.c (build_user_type_conversion_1): Remove support for
6713         guiding decls.
6714         (build_new_function_call): Likewise.
6715         (build_new_op): Likewise.
6716         (build_new_method_call): Likewise.
6717         * decl.c (start_function): Likewise.
6718         * friend.c (is_friend): Likewise.
6719         (do_friend): Likewise.
6720         * decl2.c ((flag_dump_translation_unit): Make it const.
6721         (flag_guiding_decls): Remove.
6722         (unsupported_options): New variable
6723         (compare_options): New function.
6724         (lang_decode_option): Use them.
6725
6726         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
6727
6728         * method.c (mangle_expression): Adjust test for legal expression
6729         operators.
6730
6731         * pt.c (instantiate_decl): Save and restore the local
6732         specializations list.
6733
6734 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
6735
6736         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
6737
6738 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
6739
6740         * call.c (add_template_candidate_real): Handle member template
6741         constructors for classes with virtual bases.
6742         (build_user_type_conversion_1): Use in_charge_arg_for_name.
6743         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
6744
6745         * ir.texi: Update thunk documentation.
6746
6747         * call.c (joust): Fix handling of overloaded builtin operators.
6748
6749 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
6750
6751         * cp-tree.h (DECL_ANTICIPATED): New macro.
6752         Document new use of DECL_LANG_FLAG_7.
6753         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
6754         in the user namespace.
6755         * lex.c (do_identifier): If the identifier's declaration has
6756         DECL_ANTICIPATED on, it has not yet been declared.  But do not
6757         replace it with an ordinary implicit declaration.
6758
6759         * tinfo2.cc: Include stdlib.h.
6760
6761 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
6762
6763         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
6764         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
6765         CLASSTYPE_ALIGN.
6766
6767 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
6768
6769         * decl2.c (lang_decode_option): Use skip_leading_substring instead
6770         of plain strncmp.
6771
6772 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
6773
6774         * operators.def (<?): Duplicated, should have been...
6775         (>?): this.  Fixed.
6776
6777 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
6778             Mark Mitchell  <mark@codesourcery.com>
6779
6780         * cp-tree.h (ansi_opname): Make it a macro.
6781         (ansi_assopname): Likewise.
6782         (struct lang_decl_flags): Add assignment_operator_p.
6783         (struct lang_decl): Add operator_code.
6784         (DECL_VTT_PARM): Adjust.
6785         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
6786         overloaded operator.
6787         (SET_OVERLOADED_OPERATOR_CODE): New macro.
6788         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
6789         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
6790         (opname_tab): Remove.
6791         (assignop_tab): Likewise.
6792         (operator_name_info_t): New type.
6793         (operator_name_info): New variable.
6794         (assignment_operator_name_info): Likewise.
6795         (build_cp_library_fn): Remove declaration.
6796         (push_cp_library_fn): Likewise.
6797         (operator_name_string): Likewise.
6798         (build_decl_overload): Likewise.
6799         * call.c (print_z_candidates): Simplify.
6800         (build_object_call): Adjust usage of ansi_opname.  Use
6801         DECL_OVERLOADED_OPERATOR_P.
6802         (op_error): Adjust operator name lookup.
6803         (build_conditional_expr): Adjust usage of ansi_opname.
6804         (build_new_op): Likewise.
6805         (build_op_delete_call): Likewise.
6806         (build_over_call): Likewise.
6807         (joust): Use DECL_OVERLOADED_OPERATOR_P.
6808         * decl.c (duplicate_decls): Copy operator_code.
6809         (init_decl_processing): Adjust parameters to push_cp_library_fn.
6810         (builtin_function): Adjust parameters to build_library_fn_1.
6811         (build_library_fn_1): Accept an overloaded operator code.
6812         (build_library_fn): Pass ERROR_MARK.
6813         (build_cp_library_fn): Accept an overloaded operator code.
6814         (push_cp_library_fn): Likewise.
6815         (grokfndecl): Tweak.
6816         (grokdeclarator): Simplify code to compute names of overloaded
6817         operators.  Adjust use of ansi_opname.
6818         (ambi_op_p): Work on tree_codes, not identifiers.
6819         (unary_op_p): Likewise.
6820         (grok_op_properties): Likewise.
6821         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
6822         (lang_mark_tree): Don't try to mark the operator_code.
6823         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
6824         * error.c (dump_decl): Remove special handling for operator
6825         names.
6826         (dump_function_name): Likewise.
6827         (dump_expr): Adjust name lookup of operators.
6828         (op_to_string): Simplify.
6829         (assop_to_string): Likewise.
6830         * init.c (build_new_1): Adjust use of ansi_opname.
6831         * lex.c (opname_tab): Remove.
6832         (assignop_tab): Likewise.
6833         (ansi_opname): Likewise.
6834         (ansi_assopname): Likewise.
6835         (operator_name_string): Likewise.
6836         (reinit_lang_specific): Likewise.
6837         (operator_name_info): New variable.
6838         (assignment_operator_name_info): Likewise.
6839         (init_operators): New function.
6840         (init_parse): Use it.
6841         (do_identifier): Adjust use of ansi_opname.
6842         * method.c (mangle_expression): Don't use ansi_opname for
6843         mangling.
6844         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
6845         (build_decl_overload): Remove.
6846         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
6847         (do_build_assign_ref): Adjust use of ansi_opname.
6848         (synthesize_method): Likewise.
6849         (implicitly_declare_fn): Likewise.
6850         * operators.def: New file.
6851         * parse.y (operator): Adjust use of ansi_opname.
6852         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
6853         (set_mangled_name_for_template_decl): Don't play games with
6854         current_namespace.
6855         (special_function_p): Adjust use of ansi_opname.
6856         * typeck.c (check_return_expr): Likewise.
6857         * Make-lang.in (cc1plus): Depend on operators.def.
6858         * Makefile.in (lex.o): Likewise.
6859         (decl.o): Likewise.
6860
6861 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
6862
6863         * Make-lang.in (cplib2.ready): Eradicate.
6864
6865 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6866
6867         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
6868         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
6869         (built_min, cp_tree_equal): Likewise.
6870
6871 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
6872
6873         * class.c (layout_nonempty_base_or_field): Replace
6874         `record_layout_info' with `record_layout_info_s'.
6875
6876 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
6877
6878         Fix goto checking.
6879         * cp-tree.h (struct language_function): x_named_labels is now
6880         a struct named_label_list*.
6881         * decl.c (struct named_label_use_list): Renamed from...
6882         (struct named_label_list): ...this.  New struct.
6883         (push_binding_level): Don't set eh_region.
6884         (note_level_for_eh): New fn.
6885         (pop_label): Take label and old value directly.
6886         (pop_labels): Adjust for new named_labels format.
6887         (lookup_label): Likewise.
6888         (poplevel): Note characteristics of a binding level containing a
6889         named label.  Mess with named label lists earlier.
6890         (mark_named_label_lists): New fn.
6891         (mark_lang_function): Call it.
6892         (use_label): New fn, split out from...
6893         (make_label_decl): ...here.  Don't call it.
6894         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
6895         check_previous_gotos): New fns, split out from...
6896         (define_label): ...here.
6897         (check_switch_goto): New fn.
6898         (define_case_label): Call it.
6899         (check_goto): New fn.
6900         * semantics.c (finish_goto_stmt): Call it and use_label.
6901         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
6902         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
6903
6904 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
6905
6906         * class.c (build_vtable_entry_ref): Correct usage of
6907         get_vtbl_decl_for_binfo.
6908
6909         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
6910         * method.c (implicitly_declare_fn): Not here.
6911
6912 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
6913
6914         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
6915         (CPTI_PTMD_DESC_TYPE): ... here.
6916         (ptmd_desc_type_node): Rename to ...
6917         (ptm_desc_type_node): ... here.
6918         * decl.c: Likewise.
6919         * rtti.c (ptmd_initializer): Rename to ...
6920         (ptm_initializer): ... here.
6921         (sythesize_tinfo_var): Adjust. Deal with pointer to member
6922         function.
6923         (create_tinfo_types): Adjust.
6924
6925 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
6926
6927         Finish implementation of VTTs.
6928         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
6929         CPTI_VTT_PARM_IDENTIFIER.
6930         (vtt_parm_identifier): New macro.
6931         (vtt_parm_type): Likewise.
6932         (BINFO_SUBVTT_INDEX): Likewise.
6933         (BINFO_VPTR_INDEX): Likewise.
6934         (struct lang_decl): Add vtt_parm.
6935         (DECL_VTT_PARM): New macro.
6936         (DECL_USE_VTT_PARM): Likewise.
6937         (DECL_NEEDS_VTT_PARM_P): Likewise.
6938         (get_vtt_name): Declare.
6939         (build_artificial_parm): Likewise.
6940         (fixup_all_virtual_upcast_offsets): Likewise.
6941         (expand_indirect_vtbls_init): Remove.
6942         * call.c (build_new_method_call): Pass the vtt to subobject
6943         constructors and destructors.
6944         * class.c (get_vtt_name): Give it external linkage.
6945         (build_clone): Handle the magic VTT parameters for clones.
6946         (clone_function_decl): Fix typo in comment.
6947         (build_vtt): Keep track of the indices in the VTTs where various
6948         entities are stored.
6949         (build_vtt_inits): Likewise.
6950         (dfs_build_vtt_inits): Likewise.
6951         (build_ctor_vtbl_group): Tweak type of construction vtables.
6952         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
6953         primary bases, when building construction vtables.
6954         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
6955         (initialize_predefined_identifiers): Add vtt_parm_identifier.
6956         (init_decl_processing): Initialize vtt_parm_type.
6957         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
6958         (lang_mark_tree): Make vtt_parm.
6959         * decl2.c (build_artificial_parm): New function.
6960         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
6961         (grokclassfn): Use build_artificial_parm.
6962         * init.c (initialize_vtbl_ptrs): Call
6963         fixup_all_virtual_upcast_offsets directly.
6964         (perform_member_init): Use the complete subobject destructor for
6965         member cleanups.
6966         (build_vtbl_address): New function.
6967         (expand_virtual_init): Handle VTTs.
6968         * optimize (maybe_clone_body): Likewise.
6969         * search.c (fixup_all_virtual_upcast_offsets): Give it external
6970         linkage.
6971         (expand_indirect_vtbls_init): Remove.
6972         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
6973         * tree.c (make_binfo): Make them bigger.
6974
6975 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
6976
6977         * inc/cxxabi.h (__pbase_type_info): Define, based on
6978         __pointer_type_info.
6979         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
6980         (__pointer_to_member_type_info): Likewise.
6981         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
6982         (__pointer_to_member_type_info::__is_pointer_p): Remove.
6983         (__pointer_type_info::__do_catch): Rename to ...
6984         (__pbase_type_info::__do_catch): ... here. Adjust.
6985         (__pbase_type_info::__pointer_catch): Implement.
6986         (__pointer_type_info::__pointer_catch): Adjust.
6987         (__pointer_to_member_type_info::__pointer_catch): Adjust.
6988
6989 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
6990
6991         * tinfo.h (__user_type_info::contained_virtual_p): New
6992         predicate.
6993         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
6994         shaped heirarchy.
6995         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
6996         diamond shaped heirarchy. Add early out for mixed diamond and
6997         duplicate shaped heirarchy.
6998
6999 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
7000
7001         * cp-tree.h (build_delete): Change prototype.
7002         (build_vec_delete): Likewise.
7003         * call.c (build_scoped_method_call): Use special_function_kind
7004         values to indicate the kind of destruction to be done.
7005         (build_method_call): Likewise.
7006         * decl.c (finish_destructor_body): Likewise.
7007         (maybe_build_cleanup_1): Likewise.  Rename to ...
7008         (maybe_build_cleanup): ... this.
7009         * decl2.c (delete_sanity): Use special_function_kind
7010         values to indicate the kind of destruction to be done.
7011         (build_cleanup): Likewise.
7012         * init.c (perform_member_init): Likewise.
7013         (build_vec_delete_1): Likewise.
7014         (build_dtor_call): Simplify.
7015         (build_delete): Use special_function_kind
7016         values to indicate the kind of destruction to be done.
7017         (build_vbase_delete): Likewise.
7018         (build_vec_delete): Likewise.
7019
7020         * init.c (sort_member_init): Fix typo in error message generation
7021         code.
7022
7023 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
7024
7025         * semantics.c (begin_class_definition): make the packed
7026         attribute be sensitive to the "-fpack-struct" command line flag
7027
7028 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
7029
7030         Update new-abi upcast algorithm.
7031         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
7032         prototype and meaning of return value.
7033         (__si_class_type_info::__do_upcast): Likewise.
7034         (__vmi_class_type_info::__do_upcast): Likewise.
7035         * tinfo.cc (__class_type_info::__upcast_result): Replace
7036         whole2dst with part2dst. Adjust ctor.
7037         (__class_type_info::__do_upcast): Adjust call of worker function.
7038         (__class_type_info::__do_upcast): Adjust.
7039         (__si_class_type_info::__do_upcast): Adjust. Use parent's
7040         __do_upcast.
7041         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
7042         virtual base in diamond heirarchy bug.
7043
7044 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
7045
7046         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
7047         and bitfield to tinfo_fn_p.
7048         (DECL_TINFO_FN_P): Adjust.
7049         (SET_DECL_TINFO_FN_P): Likewise.
7050         (DECL_MUTABLE_P): Likewise.
7051         (DECL_C_BIT_FIELD): Likewise.
7052         (SET_DECL_C_BIT_FIELD): Likewise.
7053         (CLEAR_DECL_C_BIT_FIELD): Likewise.
7054         (DECL_UNINLINABLE): Likewise.
7055         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
7056         (handle_using_decl): Remove assertion.
7057         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
7058         to build FIELD_DECLs.
7059         (build_base_field): Likewise.
7060         (layout_class_type): Likewise.
7061         * decl.c (init_decl_processing): Likewise.
7062         (build_ptrmemfunc_type): Likewise.
7063         (grokdeclarator): Likewise.
7064         * decl2.c (grok_x_components): Likewise.
7065         * except.c (call_eh_info): Likewise.
7066         * init.c (init_init_processing): Likewise.
7067         * rtti.c (expand_class_desc): Likewise.
7068         (create_pseudo_type_info): Likewise.
7069         (get_vmi_pseudo_type_info): Likewise.
7070         (create_tinfo_types): Likewise.
7071         * ptree.c (print_lang_decl): Adjust.
7072         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
7073         before checking DECL_MUTABLE_P.
7074
7075         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
7076         parameters for template functions.
7077         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
7078         destructors as well as constructors.
7079
7080 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
7081
7082         * class.c (build_ctor_vtbl_group): Set inits.
7083         * optimize.c (maybe_clone_body): Set DECL_INLINE and
7084         DECL_THIS_INLINE appropriately for clones.
7085
7086         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
7087         (DECL_CONV_FN_P): Simplify.
7088         (DECL_OPERATOR): Remove.
7089         (language_to_string): Declare.
7090         * decl.c (duplicate_decls): Fix typo in comment.
7091         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
7092         (grok_op_properties): Use DECL_CONV_FN_P instead of
7093         IDENTIFIER_TYPENAME_P.
7094         * dump.c (dequeue_and_dump): Dump the language linkage of
7095         declarations.
7096         * error.c (language_to_string): Give it external linkage.
7097         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
7098         (implicitly_declare_fn): Set DECL_LANGUAGE.
7099         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
7100         IDENTIFIER_TYPENAME_P.
7101         (tsubst_decl): Likewise.
7102         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
7103         * semantics.c (finish_member_declaration): Don't mark members of
7104         classes declared in an extern "C" region as extern "C".
7105
7106 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7107
7108         * decl2.c (qualified_lookup_using_namespace): Look through
7109         namespace aliases.
7110
7111         * decl.c (push_using_decl): Return the old decl on namespace level.
7112
7113 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
7114
7115         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
7116         (VTT_NAME_PREFIX): New macro.
7117         (CTOR_VTBL_NAME_PREFIX): Likewise.
7118         (get_ctor_vtbl_name): New function.
7119         * class.c (get_vtable_name): Simplify.
7120         (get_vtt_name): New function.
7121         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
7122         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
7123         when a virtual base becomes primary.
7124         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
7125         VTTs.
7126         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
7127         additional parameters.
7128         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
7129         (initialize_array): New function.
7130         (build_vtt): Likewise.
7131         (build_vtt_inits): Likewise.
7132         (dfs_build_vtt_inits): Likewise.
7133         (dfs_fixup_binfo_vtbls): Likewise.
7134         (build_ctor_vtbl_group): Likewise.
7135         (initialize_vtable): Use initialize_array.
7136         (accumulate_vtbl_inits): Reimplement to handle construction
7137         vtables.
7138         (dfs_accumulate_vtbl_inits): Likewise.
7139         (bulid_vtbl_initializer): Adjust parameter name.
7140         * method.c (build_typename_overload): Remove #if 0'd code.
7141         (get_ctor_vtbl_name): New function.
7142         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
7143         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
7144
7145         * cp-tree.h (struct lang_type): Remove search_slot.
7146         (CLASSTYPE_SEARCH_SLOT): Remove.
7147         (emit_base_init): Change prototype.
7148         (initialize_vtbl_ptrs): Likewise.
7149         (expand_indirect_vtbls_init): Likewise.
7150         (clear_search_slots): Remove.
7151         * decl.c (lang_mark_tree): Don't mark search_slot.
7152         * init.c (initialize_vtbl_ptrs): Simplify.
7153         (emit_base_init): Likewise.
7154         * search.c (struct vbase_info): Document decl_ptr.
7155         (convert_pointer_to_single_level): Remove.
7156         (dfs_find_vbases): Remove.
7157         (dfs_init_base_pointers): Simplify.
7158         (dfs_clear_vbase_slots): Remove.
7159         (dfs_vtable_path_unmark): New function.
7160         (init_vbase_pointers): Simplify.
7161         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
7162         (expand_indirect_vtbls_init): Simplify.  Don't call
7163         mark_all_temps_used.
7164         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
7165         initialize_vtbl_ptrs.
7166
7167 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
7168
7169         * except.c: Add static prototypes.
7170
7171 2000-05-20  H.J. Lu  <hjl@gnu.org>
7172
7173         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
7174
7175 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
7176
7177         Don't create a separate copy of virtual bases for the
7178         CLASSTYPE_VBASECLASSES list.
7179         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
7180         (BINFO_FOR_VBASE): Remove.
7181         (CANONICAL_BINFO): Adjust.
7182         (binfo_for_vbase): New function.
7183         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
7184         instead of BINFO_FOR_VBASE.
7185         (build_vbase_pointer): Likewise.
7186         (build_secondary_vtable): Likewise.
7187         (dfs_mark_primary_bases): Likewise.
7188         (mark_primary_bases): Likewise.
7189         (layout_nonempty_base_or_field): Likewise.
7190         (dfs_set_offset_for_shared_vbases): Likewise.
7191         (dfs_set_offset_for_unshared_vbases): Likewise.
7192         (layout_virtual_bases): Likewise.  Adjust for changes to the
7193         CLASSTYPE_VBASECLASSES list.
7194         (dump_class_hierarchy_r): Use binfo_for_vbase
7195         instead of BINFO_FOR_VBASE.
7196         (dump_class_hierarchy): Likewise.
7197         (finish_vtbls): Likewise.
7198         (build_vtbl_initializer): Adjust for changes to the
7199         CLASSTYPE_VBASECLASSES list.
7200         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
7201         * decl.c (finish_destructor_body): Adjust for changes to the
7202         CLASSTYPE_VBASECLASSES list.
7203         * init.c (sort_base_init): Use binfo_for_vbase.
7204         (construct_virtual_bases): Adjust for changes to the
7205         CLASSTYPE_VBASECLASSES list.
7206         (expand_member_init): Use binfo_for_vbase.
7207         (build_vbase_delete):  Adjust for changes to the
7208         CLASSTYPE_VBASECLASSES list.
7209         * method.c (do_build_copy_constructor): Likewise.
7210         * rtti.c (get_base_offset): Use binfo_for_vbase.
7211         (expand_class_desc): Remove #if 0'd code.
7212         * search.c (struct vbase_info): Remove vbase_types.
7213         (get_base_distance):  Use binfo_for_vbase.
7214         (lookup_field_queue_p): Use CANONICAL_BINFO.
7215         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
7216         (get_pure_virtuals): Adjust for changes to the
7217         CLASSTYPE_VBASECLASSES list.
7218         (dfs_find_vbases): Use binfo_for_vbase.
7219         (dfs_init_vbase_pointers): Likewise.
7220         (init_vbase_pointers): Don't initialize vi.vbase_types.
7221         (virtual_context): Use binfo_for_vbase.
7222         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
7223         CLASSTYPE_VBASECLASSES list.
7224         (expand_indirect_vtbls_init): Simplify.
7225         (dfs_get_vbase_types): Don't replicate virtual bases.
7226         (find_vbase_instance): Use binfo_for_vbase.
7227         (binfo_for_vbase): New function.
7228         * typeck.c (get_delta_difference): Use binfo_for_vbase.
7229
7230 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
7231
7232         * decl2.c (finish_anon_union): Generalize error messages to handle
7233         anonymous structures.
7234         * init.c (perform_member_init): Remove `name' parameter.
7235         (build_field_list): New function.
7236         (sort_member_init): Handle anonymous union initialization order
7237         correctly.  Check for multiple initializations of the same union.
7238         (emit_base_init): Don't look up fields by name here.
7239         (expand_member_init): Record the result of name lookup for future
7240         reference.
7241         * typeck.c (build_component_ref): Fix formatting.
7242
7243 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
7244
7245         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
7246         * typeck.c (build_x_compound_expr): Replace warn_unused with
7247         warn_unused_value.
7248
7249         * decl2.c (lang_decode_option): Update -Wall unused flags by
7250         calling set_Wunused.
7251
7252 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
7253
7254         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
7255         * init.c (dfs_vtable_path_unmark): Remove.
7256         * search.c (marked_new_vtable_p): Likewise.
7257         (unmarked_new_vtable_p): Likewise.
7258         (dfs_search_slot_nonempty_p): Likewise.
7259         (dfs_mark): Likewise.
7260         (dfs_vtable_path_unmark): Likewise.
7261         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
7262         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
7263         (dfs_init_vbase_pointers): Remove special-case new ABI code.
7264         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
7265         (init_vbase_pointers): Simplify.
7266         (expand_indirect_vtbls_init): Likewise.
7267
7268         * class.c (copy_virtuals): New function.
7269         (build_primary_table): Use it.
7270         (build_secondary_vtable): Likewise.
7271         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
7272         indicate that no vcall offset is required.
7273         (add_virtual_function): Likewise.
7274         (modify_all_vtables): Likewise.
7275         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7276         (dfs_accumulate_vtbl_inits): Likewise.
7277         (build_vtbl_initializer): Make changes to handle construction
7278         vtables.
7279         (dfs_build_vcall_offset_vtbl_entries): Likewise.
7280         (build_rtti_vtbl_entries): Likewise.
7281         (build_vtable_entries): Handle a NULL vcall_index.
7282
7283 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
7284
7285         * decl2.c (lang_decode_option): Fix thinko.
7286
7287 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
7288
7289         * except.c (check_handlers): New fn.
7290         * cp-tree.h: Declare it.
7291         * semantics.c (finish_handler_sequence): Call it.
7292         (finish_function_handler_sequence): Likewise.
7293         (finish_handler_parms): Set TREE_TYPE on the handler.
7294         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
7295         * search.c (get_base_distance_recursive): If protect>1, ignore
7296         special access.
7297         (get_base_distance): Don't reduce watch_access.
7298
7299 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
7300
7301         * lex.c: #include diagnostic.h.
7302         (lang_init_options): Set default prefixing rules.
7303
7304         * lang-options.h: Add -fdiagnostics-show-location=.
7305
7306         * decl2.c: #include diagnostic.h.
7307         (lang_decode_option): Handle -fdiagnostics-show-location=.
7308
7309 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
7310
7311         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
7312         * vec.cc: Revert my 2000-05-07 change.
7313
7314 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
7315
7316         * class.c (check_field_decls): Complain about non-static data
7317         members with same name as class in class with constructor.
7318
7319 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
7320
7321         * decl.c (grokdeclarator): Allow non-static data members with
7322         same name as class.
7323
7324 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
7325
7326         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
7327         and pending_inline.filename.  Update prototypes.
7328         * decl.c (define_label): Constify filename parameter.
7329         * decl2.c (warn_if_unknown_interface): Constify local char *.
7330         * input.c Constify input_source.filename. Don't declare
7331         input_filename or lineno.  Constify filename parameter to feed_input.
7332         * lex.c (init_parse): Constify parameter and return value.
7333         (cp_pragma_interface, cp_pragma_implementation): Constify
7334         filename argument.
7335         (reinit_parse_for_method, reinit_parse_for_block,
7336         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
7337         Constify local char *.
7338         * pt.c: Don't declare lineno or input_filename.
7339         (print_template_context, tsubst_friend_function, tsubst_decl,
7340         tsubst, instantiate_decl): Constify local char *.
7341         * semantics.c (expand_body): Constify local char *.
7342         * tree.c (build_srcloc): Constify filename parameter.
7343         * typeck.c (c_expand_asm_operands): Constify filename
7344         parameter.
7345
7346 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
7347
7348         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
7349         offsetof expansion.
7350
7351 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
7352
7353         * inc/cxxabi.h:  Fix typos in comment.
7354         (__base_class_info::__offset): Use a static_cast.
7355
7356 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
7357
7358         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
7359         of std::size_t and std::ptrdiff_t respectively.
7360         * tinfo.cc: Likewise.
7361         * vec.cc: Likewise.
7362
7363 2000-05-06  Richard Henderson  <rth@cygnus.com>
7364
7365         * typeck.c (build_c_cast): Don't warn integer->pointer size
7366         mismatch for constants.
7367
7368 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
7369
7370         * rtti.c (ptmd_initializer): Set non-public, if class is
7371         incomplete.
7372
7373         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
7374         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7375         __cxa_vec_delete): Likewise.
7376         * tinfo.cc (__dynamic_cast): Likewise.
7377         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7378         __cxa_vec_delete): Likewise.
7379
7380 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
7381
7382         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
7383         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
7384         (lang_decl_flags): Add vcall_offset.
7385         (THUNK_VCALL_OFFSET): Use it.
7386         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
7387         * method.c (make_thunk): Create the lang_decl here, not in
7388         emit_thunk.
7389         (emit_thunk): Make generic thunks into ordinary functions once
7390         they have been fed to expand_body.
7391         * semantics.c (expand_body): Set current_function_is_thunk here.
7392
7393 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7394
7395         * class.c (update_vtable_entry_for_fn): Prototype.
7396
7397         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
7398         and `tmpl'.
7399
7400         * search.c (dfs_build_inheritance_graph_order): Prototype.
7401
7402 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
7403
7404         * cp-tree.h (special_function_kind): Add various kinds of
7405         destructors.
7406         (special_function_p): New function.
7407         * class.c (overrides): Don't let one kind of destructor override
7408         another.
7409         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
7410         whether or not to instantiate a template.
7411         * tree.c (special_function_p): Define.
7412
7413 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
7414
7415         * cp-tree.def (THUNK_DECL): Remove.
7416         * cp-tree.h (DECL_THUNK_P): New macro.
7417         (DECL_NON_THUNK_FUNCTION_P): Likewise.
7418         (DECL_EXTERN_C_FUNCTION_P): Likewise.
7419         (SET_DECL_THUNK_P): Likewise.
7420         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
7421         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
7422         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
7423         * decl.c (decls_match): Use DECL_EXTERN_C_P.
7424         (duplicate_decls): Likewise.
7425         (pushdecl): Likewise.  Adjust thunk handling.
7426         (grokfndecl): Use DECL_EXTERN_C_P.
7427         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
7428         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
7429         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
7430         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
7431         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
7432         DECL_NO_STATIC_CHAIN.
7433         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
7434         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
7435         * search.c (covariant_return_p): Remove THUNK_DECL handling.
7436         * ir.texi: Update.
7437
7438 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
7439
7440         * tree.c (walk_tree): Set lineno.
7441
7442 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
7443
7444         * exception.cc: Update license notice.
7445         * new.cc: Likewise.
7446         * new1.cc: Likewise.
7447         * new2.cc: Likewise.
7448         * tinfo.cc: Likewise.
7449         * tinfo2.cc: Likewise.
7450         * vec.cc: Likewise.
7451         * inc/cxxabi.h: Likewise.
7452         * inc/exception: Likewise.
7453         * inc/new: Likewise.
7454         * inc/new.h: Likewise.
7455         * inc/typeinfo: Likewise.
7456
7457 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
7458
7459         * tree.c (build_target_expr_with_type): If we already have a
7460         TARGET_EXPR, just return it.
7461
7462         * optimize.c (initialize_inlined_parameters): Don't generate an
7463         EXPR_STMT if we can just use DECL_INITIAL.
7464         * decl.c (emit_local_var): Only make the initialization a
7465         full-expression if stmts_are_full_exprs_p.
7466
7467 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
7468
7469         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
7470         macro.
7471         * call.c (standard_conversion): Use it.
7472         (direct_reference_binding): Likewise.
7473         (build_over_call): Likewise.
7474         (is_properly_derived_from): Likewise.
7475         (compare_ics): Likewise.
7476         * class.c (resolves_to_fixed_type_p): Likewise.
7477         * optimize.c (declare_return_variable): Likewise.
7478         * pt.c (is_specialization_of): Likewise.
7479         (unify): Likewise.
7480         * typeck.c (comp_target_parms): Likeiwse.
7481         (build_static_cast): Likewise.
7482         (build_reinterpret_cast): Likewise.
7483         (build_const_cast): Likewise.
7484         (comp_ptr_ttypes_real): Likewise.
7485         (comp_ptr_ttypes_const): Likewise.
7486         * typeck2.c (process_init_constructor): Likewise.
7487
7488 2000-04-30  Scott Snyder <snyder@fnal.gov>
7489
7490         * decl.c (finish_destructor_body): Use the base destructor when
7491         destroying virtual bases.
7492
7493 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
7494
7495         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
7496         STMT_EXPRs.
7497         * optimize.c (struct inline_data): Add target_exprs field.
7498         (declare_return_variable): When a function returns an aggregate,
7499         use the variable declared in the TARGET_EXPR as the remapped
7500         DECL_RESULT.
7501         (expand_call_inline): Update the pending target_exprs stack.
7502         (optimize_function): Initialize the stack.
7503
7504         * decl2.c (finish_file): Fix typo in comment.
7505
7506         * method.c (emit_thunk): Don't try to return a `void' value.
7507
7508         * optimize.c (initialize_inlined_parameters): If the parameter is
7509         addressable, we need to make a new VAR_DECL, even if the
7510         initializer is constant.
7511
7512 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
7513
7514         * decl.c (grok_op_properties): Add an extra check of argtypes.
7515
7516 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
7517
7518         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
7519         variables.
7520         (initialize_inlined_parameters): Try to avoid creating new
7521         VAR_DECLs.
7522
7523 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
7524
7525         * lex.c (my_get_run_time): Remove.
7526         (init_filename_times): Use get_run_time instead of my_get_run_time.
7527         (check_newline): Likewise.
7528         (dump_time_statistics): Likewise.
7529         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
7530         of computing elapsed time explicitly.
7531
7532 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
7533
7534         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
7535         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
7536         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
7537         before calling decl_constant_value.
7538         * class.c (check_bitfield_decl): Likewise.
7539         * cvt.c (ocp_convert): Likewise.
7540         (convert): Likewise.
7541         * decl.c (compute_array_index_type): Likewise.
7542         (build_enumerator): Likewise.
7543         * decl2.c (check_cp_case_value): Likewise.
7544         * pt.c (convert_nontype_argument): Likewise.
7545         (tsubst): Likewise.
7546         * typeck.c (decay_conversion): Likewise.
7547         (build_compound_expr): Likewise.
7548         (build_reinterpret_cast): Likewise.
7549         (build_c_cast): Likewise.
7550         (convert_for_assignment): Likewise.
7551
7552 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
7553
7554         * decl.c (finish_function): Don't play games with DECL_INLINE.
7555
7556 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
7557
7558         * ir.texi: Correct typo.
7559
7560 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7561
7562         * decl.c (grokdeclarator): Reject VLAs as members.
7563
7564 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
7565
7566         * call.c (standard_conversion): Accept conversion between
7567         COMPLEX_TYPEs.
7568
7569         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
7570
7571 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
7572
7573         * decl2.c (finish_file): Remove double setup for accounting
7574         compile time.
7575
7576 2000-04-24  Robert Lipe <robertlipe@usa.net>
7577
7578         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
7579
7580 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
7581
7582         * new.cc (set_new_handler): Needs to be in std::.
7583
7584 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
7585
7586         * cp-tree.h (lang_decl): Remove pretty_function_p.
7587         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
7588         language-specific node.
7589         * decl.c (cp_make_fname_decl): Use build_decl, not
7590         build_lang_decl, to build the variables.
7591         (grokvardecl): Don't call build_lang_decl for local variables in
7592         templates.
7593         (grokdeclarator): Don't call build_lang_decl for local type
7594         declarations in templates.
7595         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
7596         zero'd memory, rather than calling memset.
7597         * pt.c: Include hashtab.h.
7598         (local_specializations): New variable.
7599         (retrieve_local_specialization): Use it.
7600         (register_local_specialization): Likewise.
7601         (tsubst_decl): Don't assume local variables have
7602         DECL_LANG_SPECIFIC.
7603         (instantiate_decl): Set up local_specializations.
7604         * Makefile.in (HTAB_H): New variable.
7605
7606 2000-04-23  Richard Henderson  <rth@cygnus.com>
7607
7608         * typeck.c (c_expand_asm_operands): Restore the original
7609         contents of the output list.
7610
7611 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
7612
7613         * ir.texi:  Document complex number representation.
7614
7615 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7616
7617         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
7618         (target_incomplete_p): New function.
7619         (tinfo_base_init): Create comdat NTBS name variable.
7620         (ptr_initializer): Add non_public parameter. Calculate it.
7621         (ptmd_initializer): Likewise.
7622         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
7623         (create_real_tinfo_var): Add non_public parameter. Use it.
7624         Push proxy into global namespace.
7625         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
7626         New enumeration.
7627         * inc/typeinfo (type_info::before, type_info::operator==):
7628         Compare __name addresses.
7629
7630         * tinfo2.cc: Remove new-abi builtins comment.
7631
7632 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
7633
7634         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
7635
7636         * call.c (joust): Exit early if we get the same function, too.
7637
7638         * decl2.c (key_method): Return NULL_TREE for template classes.
7639         (import_export_class): Don't need to check for template classes.
7640
7641 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
7642
7643         * lex.c: Remove references to cccp.c.
7644
7645 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
7646
7647         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
7648         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
7649         (DECL_DESTRUCTOR_P): Use destructor_attr.
7650         (DECL_CONST_MEMFUNC_P): Reimplement.
7651         (DECL_VOLATILE_MEMFUNC_P): Remove.
7652         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
7653         (overrides): Use DECL_DESTRUCTOR_P.
7654         (check_for_override): Likewise.
7655         * decl.c (start_function): Likewise.
7656         * decl2.c (grokfclassfn): Likewise.
7657         (check_classfn): Likewise.
7658         (grok_function_init): Likewise.
7659
7660 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
7661
7662         * decl2.c (grokfield): Issue error on illegal data member
7663         declaration.
7664
7665 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
7666
7667         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
7668
7669 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
7670
7671         * class.c (build_vtable_entry): Don't build thunks for type-info
7672         functions.
7673
7674 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
7675
7676         * decl.c (decls_match): Allow a redeclaration of a builtin to
7677         specify args while the builtin did not.
7678
7679 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
7680
7681         * cp-tree.def (THUNK_DECL): Add to documentation.
7682         * cp-tree.h (flag_huge_objects): Declare.
7683         * class.c (modify_vtable_entry): Tidy.
7684         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
7685         Calculate delta appropriately for the new ABI.
7686         (dfs_modify_vtables): Use it.
7687         (modify_all_vtables): Fix thinko in code to add overriding copies
7688         of functions to primary vtables.
7689         (build_clone): Fix typo in comment.
7690         (clone_function_decl): Correct order of destructors in vtable.
7691         (build_vbase_offset_vtbl_entries): Adjust comment.
7692         (dfs_vcall_offset_queue_p): Remove.
7693         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
7694         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
7695         (build_vtable_entry): Correct check for pure virtual functions.
7696         Don't declare flag_huge_objects.
7697         * decl.c (flag_huge_objects): Remove declaration.
7698         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
7699         Use int_size_in_bytes.
7700         (emit_thunk): Handle vcall offset thunks.
7701
7702 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7703
7704         * decl2.c (parse_time, varconst_time): Delete declarations.
7705         (finish_file): Delete LINENO declaration.
7706         START_TIME and THIS_TIME now long.
7707
7708 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
7709
7710         * class.c (build_base_field): Reformat comment.
7711
7712         * inc/cxxabi.h (stddef.h): Comment inclusion.
7713         (__base_class_info::__offset): Comment shift.
7714
7715 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
7716
7717         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
7718         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
7719         (cp_push_exception_identifier): New macro.
7720         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
7721         (DECL_BASE_DESTRUCTOR_P): Likewise.
7722         (DECL_DELETING_DESTRUCTOR_P): Likewise.
7723         (get_vtbl_decl_for_binfo): Fix formatting.
7724         (in_charge_arg_for_name): New macro.
7725         (maybe_build_cleanup_and_delete): Remove declaration.
7726         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
7727         (in_charge_arg_for_name): New function.
7728         (build_new_method_call): Use it.  Handle cloned destructors.
7729         (build_clone): Don't make the base constructor virtual.
7730         Automatically defer generated functions.
7731         (clone_function_decl): Handle destructors, too.
7732         (clone_constructors_and_destructors): Likewise.
7733         (create_vtable_ptr): Don't create a vtable entry for a cloned
7734         function.
7735         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
7736         (initialize_predefined_identifiers): Update appropriately.
7737         (finish_destructor_body): Simplify.
7738         (maybe_build_cleanup_and_delete): Remove.
7739         * except.c (expand_throw): Handle new-ABI destructors.
7740         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
7741         (build_dtor_call): New function.
7742         (build_delete): Use it.  Simplify.
7743         * optimize.c (maybe_clone_body): Handle destructors.
7744         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
7745
7746         * exception.cc (cleanup_fn): New typedef.
7747         (CALL_CLEANUP): New macro.
7748         (cp_eh_info): Use them.
7749         (__cp_push_exception): Likewise.
7750         (__cp_pop_exception): Likewise.
7751
7752 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
7753
7754         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
7755         (complete_dtor_identifier): New macro.
7756         (CLASSTYPE_FIRST_CONVERSION): Remove.
7757         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
7758         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
7759         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
7760         (CLASSTYPE_CONSTRUCTORS): Likewise.
7761         (CLASSTYPE_DESTRUCTORS): Likewise.
7762         (lang_decl): Add cloned_function.
7763         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
7764         (DECL_BASE_CONSTRUCTOR_P): Likewise.
7765         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
7766         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
7767         (DECL_CLONED_FUNCTION_P): Likewise.
7768         (DECL_CLONED_FUNCTION): Likewise.
7769         (clone_function_decl): Declare.
7770         (maybe_clone_body): Likewise.
7771         * call.c (build_user_type_conversion_1): Call complete object
7772         constructors in the new ABI.
7773         (build_new_method_call): Don't add in-charge parameters under the
7774         new ABI.
7775         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
7776         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
7777         CLASSTYPE_DESTRUCTOR_SLOT.
7778         (build_clone): New function.
7779         (clone_function_decl): Likewise.
7780         (clone_constructors_and_destructors): Likewise.
7781         (check_bases_and_members): Use it.
7782         * decl.c (iniitialize_predefined_identifiers): Initialize
7783         complete_dtor_identifier.
7784         (finish_function): Don't add extra code to a clone.
7785         (lang_mark_tree): Mark cloned_function.
7786         * decl2.c (mark_used): Don't bother trying to instantiate things
7787         we synthesized.
7788         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
7789         * method.c (set_mangled_name_for_decl): Don't treat clones as
7790         constructors.
7791         (synthesize_method): Sythesize cloned functions, not the clones.
7792         * optimize.c (inline_data): Update comment on ret_label.
7793         (remap_block): Don't assume DECL_INITIAL exists.
7794         (copy_body_r): Allow ret_label to be NULL.
7795         (maybe_clone_body): Define.
7796         * pt.c (tsubst_decl): Handle clones.
7797         (instantiate_clone): New function.
7798         (instantiate_template): Use it.
7799         (set_mangled_name_for_template_decl): Don't treat clones as
7800         constructors.
7801         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
7802         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
7803         * semantics.c (expand_body): Clone function bodies as necessary.
7804
7805         * optimize.c (remap_decl): Avoid sharing structure for arrays
7806         whose size is only known at run-time.
7807         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
7808
7809         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
7810         to has_in_charge_parm_p.
7811         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
7812         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
7813         (DECL_COPY_CONSTRUCTOR_P): New macro.
7814         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
7815         (build_user_type_conversion_1): Likewise.
7816         (convert_like_real): Likewise.
7817         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
7818         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
7819         (copy_args_p): Likewise.
7820         (grok_ctor_properties): Likewise.
7821         (start_function): Likewise.
7822         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
7823         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
7824         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
7825         * method.c (do_build_copy_constructor): Use
7826         DECL_HAS_IN_CHARGE_PARM_P.
7827         (synthesize_method): Likewise.
7828         * pt.c (instantiate_template): Remove goto.
7829         * tree.c (build_cplus_method_type): Remove mention of obstacks in
7830         comment.
7831
7832         * cp-tre.h (finish_function): Change prototype.
7833         * decl.c (end_cleanup_fn): Adjust caller.
7834         (finish_function): Take only one parameter.
7835         * decl2.c (finish_objects): Adjust caller.
7836         (finish_static_storage_duration_function): Likewise.
7837         * method.c (emit_thunk): Likewise.
7838         * parse.y: Likewise.
7839         * parse.c: Regenerated.
7840         * pt.c (instantiate_decl): Likewise.
7841         * rtti.c (synthesize_tinfo_fn): Likewise.
7842         * semantics.c (expand_body): Likewise.
7843
7844         * cp-tree.h (copy_decl): New function.
7845         * class.c (finish_struct_1): Use it.
7846         * lex.c (copy_decl): Define it.
7847         * pt.c (tsubst_decl): Likewise.
7848         * tree.c (copy_template_template_parm): Likewise.
7849
7850         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
7851         has_nonpublic_assign_ref.
7852         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
7853         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
7854         * class.c (finish_struct_methods): Don't set
7855         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
7856         (interface_only): Don't declare.
7857         (interface_unknown): Likewise.
7858
7859 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7860
7861         * tree.h (HAVE_TEMPLATES): Remove definition.
7862         * lang-options.h (-fthis-is-variable): Remove documentation.
7863
7864 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
7865
7866         * class.c (instantiate_type): Handle object-relative template-id.
7867
7868         * semantics.c (finish_expr_stmt): Call convert_to_void here.
7869         * decl.c (cplus_expand_expr_stmt): Not here.
7870
7871         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
7872         Initialize exprtype earlier.
7873
7874         * parse.y (fn.def1): Check for defining types in return types.
7875
7876         * decl.c (check_tag_decl): Notice extra fundamental types.
7877         Diagnose empty decls in classes, too.
7878
7879         * decl.c (grokdeclarator): Don't override an anonymous name if no
7880         declarator was given.
7881
7882         * cvt.c (convert_to_void): Call resolve_offset_ref.
7883
7884         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
7885
7886         * decl2.c (decl_namespace): Handle getting a type.
7887
7888         * typeck.c (build_c_cast): Re-enable warning for cast between
7889         pointer and integer of different size.
7890
7891 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
7892
7893         * inc/cxxabi.h (__pointer_type_info): Add restrict and
7894         incomplete flags.
7895         (__pointer_type_info::__pointer_catch): New virtual function.
7896         (__pointer_to_member_type_info): Derive from
7897         __pointer_type_info. Adjust.
7898         (__pointer_to_member_type_info::__do_catch): Remove.
7899         (__pointer_to_member_type_info::__is_pointer_p): Declare.
7900         (__pointer_to_member_type_info::__pointer_catch): Declare.
7901         * rtti.c (qualifier_flags): Add restrict flag.
7902         (ptmd_initializer): Reorder members.
7903         (create_tinfo_types): Expand comments. Reorder
7904         ptmd_desc_type_node members.
7905         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
7906         Implement.
7907         (__pointer_type_info::__do_catch): Move specific code into
7908         __pointer_catch. Call it.
7909         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
7910         specific catch checking. Fix void conversion check.
7911         (__pointer_to_member_type_info::__do_catch): Remove.
7912         (__pointer_to_member_type_info::__pointer_catch): Implement.
7913
7914 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7915
7916         * lex.c (init_parse): Remove traces of classof and headof.
7917         * decl2.c (flag_operator_names): Default to 1.
7918         (lang_decode_option): Do not set it for -ansi.
7919
7920 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
7921
7922         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
7923         (DECL_MAIN_VARIANT): Remove.
7924         * decl.c (duplicate_decls): Don't set it.
7925         (start_function): Likewise.
7926         (lang_mark_tree): Don't mark it.
7927         * decl2.c (defer_fn): Don't use it.
7928         * lex.c (retrofit_lang_decl): Don't set it.
7929         * pt.c (tsubst_decl): Likewise.
7930         * ptree.c (print_lang_decl): Don't print it.
7931         * typeck.c (mark_addressable): Don't use it.
7932
7933 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
7934
7935         * vec.cc: Include <new> and <exception>.
7936         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
7937         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
7938         terminate.
7939         (__cxa_vec_delete): Catch dtor exceptions.
7940
7941 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
7942
7943         Prepend __ to implementation defined names.
7944         * inc/typeinfo (type_info): Rename _name to __name.
7945         (type_info::type_info): Rename parameter.
7946         (type_info::operator==, type_info::operator!=,
7947         type_info::before): Likewise.
7948         (type_info::is_pointer_p, type_info::is_function_p,
7949         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
7950         parameters.
7951         * inc/cxxabi.h
7952         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
7953         (__pointer_type_info::__pointer_type_info): Likewise.
7954         (__pointer_type_info::is_pointer_p,
7955         __pointer_type_info::do_catch): Prepend __. Rename parameters.
7956         (__array_type_info::__array_type_info): Rename parameters.
7957         (__function_type_info::__function_type_info): Likewise.
7958         (__function_type_info::is_function_p): Prepend __.
7959         (__enum_type_info::__enum_type_info): Rename parameters.
7960         (__pointer_to_member_type_info::__pointer_to_member_type_info):
7961         Likewise.
7962         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
7963         parameters.
7964         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
7965         (__class_type_info::__class_type_info): Rename parameters.
7966         (__class_type_info::sub_kind): Prepend __. Adjust member names.
7967         (__class_type_info::upcast_result,
7968         __class_type_info::dyncast_result): Prepend __. Move definition
7969         into tinfo.cc.
7970         (__class_type_info::do_upcast, __class_type_info::do_catch,
7971         __class_type_info::find_public_src,
7972         __class_type_info::do_dyncast,
7973         __class_type_info::do_find_public_src): Prepend __. Rename
7974         parameters.
7975         (__si_class_type_info::__si_class_type_info): Rename parameters.
7976         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
7977         __si_class_type_info::do_find_public_src): Prepent __. Rename
7978         parameters.
7979         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
7980         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
7981         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
7982         parameters.
7983         (__dynamic_cast): Rename parameters.
7984         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
7985         type_info::do_catch, type_info::do_upcast): Prepend __.
7986         (contained_p, public_p, virtual_p, contained_public_p,
7987         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
7988         (__class_type_info::do_catch,
7989         __class_type_info::do_upcast): Prepend __. Adjust.
7990         (__class_type_info::__upcast_result,
7991         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
7992         Adjust.
7993         (__class_type_info::find_public_src): Prepend __. Adjust.
7994         (__class_type_info::do_find_public_src,
7995         __si_class_type_info::do_find_public_src,
7996         __vmi_class_type_info::do_find_public_src): Likewise.
7997         (__class_type_info::do_dyncast,
7998         __si_class_type_info::do_dyncast,
7999         __vmi_class_type_info::do_dyncast): Likewise.
8000         (__class_type_info::do_upcast,
8001         __si_class_type_info::do_upcast,
8002         __vmi_class_type_info::do_upcast): Likewise.
8003         (__dynamic_cast): Adjust.
8004         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
8005         (__function_type_info::is_function_p): Likewise.
8006         (__pointer_type_info::do_catch): Likewise. Adjust.
8007         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
8008         (__throw_type_match_rtti_2): Adjust.
8009         (__is_pointer): Adjust.
8010
8011 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
8012
8013         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
8014         (complete_ctor_identifier): New macro.
8015         (special_function_kind): Add sfk_copy_constructor and
8016         sfk_assignment_operator.
8017         (LOOKUP_HAS_IN_CHARGE): Remove.
8018         (cons_up_default_function): Rename to ...
8019         (implicitly_declare_fn): ... this.
8020         * call.c (build_new_method_call): Add in-charge parameters for
8021         constructors here.
8022         * class.c (add_implicitly_declared_members): Change parameter name
8023         from cant_have_assignment to cant_have_const_assignment.
8024         Replace calls to cons_up_default_function to implicitly_declare_fn.
8025         * cvt.c (ocp_convert): Use complete_ctor_identifier.
8026         * decl.c (initialize_predefined_identifiers): Initialize it.
8027         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
8028         complex expression.
8029         * init.c (expand_default_init): Don't calculate the in-charge
8030         parameter here.
8031         (build_new_1): Likewise.
8032         * lex.c (cons_up_default_function): Move to method.c.
8033         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
8034         (implicitly_declare_fn): New function.
8035         * typeck.c (build_static_cast): Use complete_ctor_identifier.
8036         (build_modify_expr): Likewise.
8037         * typeck2.c (build_functional_cast): Likewise.
8038
8039         Under the new ABI, constructors don't return `this'.
8040         * cp-tree.h (warn_reorder): Declare.
8041         (special_function_kind): New enum.
8042         (global_base_init_list): Remove declaration.
8043         (emit_base_init): Don't return a value.
8044         (check_base_init): Don't declare.
8045         (is_aggr_typedef): Likewise.
8046         * decl.c (check_special_function_return_type): New function.
8047         (return_types): Remove.
8048         (grokdeclarator): Use check_special_function_return_type.
8049         (start_function): Don't initialize ctor_label under the new ABI.
8050         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
8051         * init.c (begin_init_stmts): Move to top of file.
8052         (finish_init_stmts): Likewise.
8053         (warn_reorder): Don't declare.
8054         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
8055         value.
8056         (check_base_init): Remove.
8057         (is_aggr_typedef): Likewise.
8058         (build_new_1): Don't use the return value of a constructor.
8059         * semantics.c (setup_vtbl_ptr): Don't use the return value
8060         of emit_base_init.
8061         * typeck.c (check_return_expr): Don't magically convert return
8062         statements into `return this' in constructors under the new ABI.
8063
8064         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
8065         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
8066         (base_ctor_identifier): New macro.
8067         (base_dtor_identifier): Likewise.
8068         (deleting_dtor_identifier): Likewise.
8069         * decl.c: Don't include obstack.h.
8070         (obstack_chunk_alloc): Don't define.
8071         (obstack_chunk_free): Likewise.
8072         (struct predefined_identifier): New type.
8073         (initialize_predefined_identifiers): New function.
8074         (init_decl_processing): Use it.
8075         (debug_temp_inits): Remove.
8076         (start_method): Don't call preserve_data.
8077         (hack_incomplete_structures): Update comment.
8078         * init.c (init_init_processing): Don't initialize
8079         nelts_identifier.
8080         (build_offset_rf): Remove dead code.
8081         (build_delete): Use CLASSTYPE_N_BASECLASSES.
8082         * search.c (init_search_processing): Don't initialize
8083         vptr_identifier.
8084
8085 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8086
8087         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
8088         some sign_compare warnings.
8089
8090 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
8091
8092         Rename abi::__vmi_class_type_info members.
8093         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
8094         base_list, detail_masks members to vmi_flags, vmi_base_count,
8095         vmi_bases and vmi_flags_masks respectively.
8096         (__vmi_class_type_info::vmi_flags_masks): Rename
8097         details_unknown_mask to flags_unknown_mask.
8098         * tinfo.cc (__class_type_info::do_upcast): Adjust.
8099         (__vmi_class_type_info::do_find_public_src): Adjust.
8100         (__vmi_class_type_info::do_dyncast): Adjust.
8101         (__vmi_class_type_info::do_upcast): Adjust.
8102
8103 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
8104
8105         * tinfo.cc (convert_to_base): New function.
8106         (get_vbase_offset): Remove. Move into convert_to_base.
8107         (__vmi_class_type_info::do_find_public_src): Adjust.
8108         (__vmi_class_type_info::do_dyncast): Adjust.
8109         (__vmi_class_type_info::do_upcast): Adjust.
8110
8111 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
8112
8113         * tinfo.cc (operator=): Use __builtin_strcmp.
8114         * tinfo2.cc (before): Likewise.
8115
8116 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
8117
8118         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
8119         (DECL_SAVED_INLINE): Rename to ...
8120         (DECL_DEFERRED_FN): ... this.
8121         (in_function_p): Remove declaration.
8122         (mark_inline_for_output): Rename to ...
8123         (defer_fn): ... this.
8124         * decl.c (finish_function): Adjust call to mark_inline_for_output.
8125         (in_function_p): Remove definition.
8126         * decl2.c (saved_inlines): Rename to ...
8127         (deferred_fns): ... this.
8128         (saved_inlines_used): Rename to ...
8129         (deferred_fns_used): ... this.
8130         (mark_inline_for_output): Rename to ...
8131         (defer_fn): ... this.
8132         (finish_file): Adjust accordingly.
8133         (init_decl2): Likewise.
8134         * lex.c (cons_up_default_function): Likewise.
8135         * pt.c (mark_decl_instantiated): Likewise.
8136         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
8137         circumstances.
8138         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
8139         * semantics.c (expand_body): Defer more functions.
8140
8141 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
8142
8143         * vec.cc: New file.
8144         * Make-lang.in (CXX_LIB2FUNCS): Add it.
8145         (vec.o): Build it.
8146         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8147         __cxa_vec_delete): Declare.
8148
8149 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
8150
8151         * rtti.c (dfs_class_hint_mark): New static function.
8152         (dfs_class_hint_unmark): New static function.
8153         (class_hint_flags): Use them.
8154
8155 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
8156
8157         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
8158
8159 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
8160
8161         * cp-tree.h (instantiate_decl): Change prototype.
8162         * decl2.c (mark_used): Adjust call.
8163         * optimize.c (inlinable_function_p): Adjust handling of templates.
8164         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
8165         (do_type_instantiation): Likewise.
8166         (instantiate_decl): Defer more templates.
8167         (instantiate_pending_templates): Adjust logic to handle inline
8168         friend functions.
8169
8170         * Makefile.in (GGC_H): New variable.  Use it throughout in place
8171         of ggc.h.
8172
8173         * call.c: Don't include obstack.h.  Include ggc.h.
8174         (obstack_chunk_alloc): Don't define.
8175         (obstack_chunk_free): Likewise.
8176         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
8177         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
8178         (pop_switch): Free it.
8179
8180         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
8181
8182         * dump.c (dequeue_and_dump): Don't try to print the bit_position
8183         if we don't have a DECL_FIELD_OFFSET.
8184
8185 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
8186
8187         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
8188         special_function_p.
8189
8190 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8191
8192         * cfns.gperf (hash, libc_name_p): Prototype.
8193
8194         * rtti.c (build_dynamic_cast_1): Constification.
8195
8196         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
8197
8198         * semantics.c (deferred_type_access_control): Prototype.
8199
8200 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
8201
8202         Correct many new ABI issues regarding vbase and vcall offset
8203         layout.
8204         * cp-tree.h (BINFO_VTABLE): Document.
8205         (struct lang_type): Tweak formatting.
8206         (BINFO_PRIMARY_BINFO): Add to documentation.
8207         (CLASSTYPE_VSIZE): Fix typo in comment.
8208         (CLASSTYPE_VBASECLASSES): Update documentation.
8209         (BINFO_VBASE_MARKED): Remove.
8210         (SET_BINFO_VBASE_MARKED): Likewise.
8211         (CLEAR_BINFO_VBASE_MARKED): Likewise.
8212         (BINFO_FIELDS_MARKED): Remove.
8213         (SET_BINFO_FIELDS_MARKED): Likewise.
8214         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
8215         (enum access_kind): New enumeration.
8216         (num_extra_vtbl_entries): Remove declaration.
8217         (size_extra_vtbl_entries): Likewise.
8218         (get_vtbl_decl_for_binfo): New function.
8219         (dfs_vbase_unmark): Remove declaration.
8220         (mark_primary_bases): Likewise.
8221         * class.c (SAME_FN): Remove.
8222         (struct vcall_offset_data_s): Move definition.
8223         (build_vbase_pointer): Use `build', not `build_binary_op', to
8224         access the vbase pointer under the new ABI.
8225         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
8226         (build_primary_vtable): Likewise.
8227         (dfs_mark_primary_bases): Move here from search.c.
8228         (mark_primary_bases): Likewise.
8229         (determine_primary_bases): Under the new ABI, don't make a base
8230         class a primary base just because we don't yet have any virtual
8231         functions.
8232         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
8233         (num_vfun_entries): Remove.
8234         (dfs_count_virtuals): Likewise.
8235         (num_extra_vtbl_entries): Likewise.
8236         (size_extra_vtbl_entries): Likewise.
8237         (layout_virtual_bases): Iterate in inheritance graph order under
8238         the new ABI.
8239         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
8240         indicate that a vfield is present.
8241         (init_class_processing): Initialize access_public_node, etc., from
8242         ak_public, etc.
8243         (get_vtbl_decl_for_binfo): New function.
8244         (dump_class_hierarchy_r): Likewise.
8245         (dump_class_hierarchy): Use it.
8246         (finish_vtbls): Build the vtbls in inheritance graph order.
8247         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
8248         (initialize_vtable): Use get_vtbl_decl_for_binfo.
8249         (accumulate_vtbl_inits): Add comments explaining why a pre-order
8250         walk is required.
8251         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
8252         where the vptr points, even for primary vtables.
8253         (build_vtbl_initializer): Adjust handling of vbase and vcall
8254         offsets.
8255         (build_vcall_and_vbase_vtable_entries): New function.
8256         (dfs_build_vbase_offset_vtbl_entries): Remove.
8257         (build_vbase_offset_vtbl_entries): Reimplement.
8258         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
8259         were already handled in a primary base class vtable.
8260         (build_vcall_offset_vtbl_entries): Adjust.
8261         (build_rtti_vtbl_entries): Adjust.
8262         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
8263         * init.c (expand_virtual_init): Simplify.
8264         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
8265         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
8266         * search.c (BINFO_ACCESS): New macro.
8267         (SET_BINFO_ACCESS): Likewise.
8268         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
8269         (access_in_type): Likewise.
8270         (dfs_accessible_p): Likewise.
8271         (protected_accessible_p): Likewise.
8272         (lookup_fnfields_1): Adjust documentation.
8273         (dfs_mark_primary_bases): Move to class.c
8274         (mark_primary_bases): Likewise.
8275         (dfs_vbase_unmark): Remove.
8276         (virtual_context): Use BINFO_FOR_VBASE.
8277         (dfs_get_vbase_types): Simplify.
8278         (dfs_build_inheritance_graph_order): New function.
8279         (get_vbase_types): Use it.
8280         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
8281
8282         * tinfo.cc (get_vbase_offset): New function.
8283         (__vmi_class_type_info::do_find_public_src): Use it.
8284         (__vmi_class_type_info::do_dyncast): Likewise.
8285         (__vmi_class_type_info::do_upcast): Likewise.
8286
8287 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
8288
8289         * lang-specs.h: Pass -fno-show-column to the preprocessor.
8290
8291 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
8292
8293         * rtti.c (class_hint_flags): Rename flags.
8294         (class_initializer): Remove flags.
8295         (synthesize_tinfo_var): Combine offset and flags. Add flags
8296         for __vmi_class_type_info.
8297         (create_tinfo_types): Remove flags from __class_type_info and
8298         __si_class_type_info. Merge flags and offset from
8299         base_class_type_info.
8300         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
8301         (__base_class_info::is_virtual_p): Adjust.
8302         (__base_class_info::is_public_p): Adjust.
8303         (__base_class_info::offset): New accessor.
8304         (__class_type_info::details): Remove member.
8305         (__class_type_info::__class_type_info): Lose details.
8306         (__class_type_info::detail_masks): Remove.
8307         (__si_class_type_info::__si_class_type_info): Lose details.
8308         (__vmi_class_type_info::details): New member.
8309         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
8310         (__vmi_class_type_info::detail_masks): New member.
8311         * tinfo.cc (__class_type_info::do_upcast): Initialize result
8312         with unknown_details_mask.
8313         (__vmi_class_type_info::do_find_public_src): Adjust
8314         (__vmi_class_type_info::do_dyncast): Adjust.
8315         (__vmi_class_type_info::do_upcast): Set result details, if
8316         needed. Adjust.
8317         (__dynamic_cast): Temporarily #if out optimization.
8318
8319 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
8320
8321         * rtti.c (get_tinfo_decl): Mark used.
8322         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
8323         mark as dealt with, if we output it.
8324
8325 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
8326
8327         * class.c: Reorganize to put virtual function table initialization
8328         machinery at the end of the file.
8329
8330 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
8331
8332         * class.c (finish_struct): Use bitsize_zero_node.
8333         * pt.c (instantiate_class_template): Likewise.
8334
8335 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
8336
8337         Put RTTI entries at negative offsets in new ABI.
8338         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
8339         vbase offset at index -3, not -1.
8340         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
8341         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
8342         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
8343         (build_rtti_vtbl_entries): New function.
8344         (set_rtti_entry): Remove.
8345         (build_primary_vtable): Don't use it.
8346         (build_secondary_vtable): Likewise.
8347         (start_vtable): Remove.
8348         (first_vfun_index): New function.
8349         (set_vindex): Likewise.
8350         (add_virtual_function): Don't call start_vtable.  Do call
8351         set_vindex.
8352         (set_primary_base): Rename parameter.
8353         (determine_primary_base): Likewise.
8354         (num_vfun_entries): Don't use skip_rtti_stuff.
8355         (num_extra_vtbl_entries): Include RTTI information.
8356         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
8357         (skip_rtti_stuff): Remove.
8358         (dfs_modify_vtables): Don't use it.
8359         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
8360         (layout_nonempty_base_or_field): Update size handling.
8361         (create_vtable_ptr): Tweak.
8362         (layout_class_type): Adjust parameter names.
8363         (finish_struct_1): Simplify.
8364         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
8365         (skip_rtti_stuff): Remove.
8366         (first_vfun_index): New function.
8367         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
8368         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
8369         (marked_vtable_pathp): Declare.
8370         (unmarked_vtable_pathp): Likewise.
8371         * error.c (dump_expr): Use first_vfun_index to calculate vtable
8372         offsets.
8373         * rtti.c (build_headof): Look for RTTI at negative offsets.
8374         (get_tinfo_decl_dynamic): Likewise.
8375         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
8376         here.
8377         (create_pseudo_type_info): Do it here instead.  Adjust so that
8378         vptr points at first virtual function.
8379         * search.c (marked_vtable_pathp): Make it global.
8380         (unmarked_vtable_pathp): Likewise.
8381         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
8382         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
8383         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
8384         (get_pure_virtuals): Likewise.
8385         (expand_upcast_fixups): Likewise.
8386         * tree.c (debug_binfo): Likewise.
8387         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
8388         negative offset.
8389
8390 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8391
8392         * class.c (check_field_decl): Fix typo.
8393         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
8394         (check_methods): Likewise.
8395         (check_field_decls): Likewise.
8396         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
8397         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
8398         Use DECL_RESULT_FLD, not DECL_RESULT.
8399         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
8400         * lex.c (identifier_type): Likewise.
8401         * pt.c (determine_specialization, lookup_template_class): Likewise.
8402         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
8403         (resolve_overloaded_unification, more_specialized): Likewise.
8404         * semantics.c (finish_member_declaration): Likewise.
8405         * typeck.c (build_x_function_call): Likewise.
8406
8407 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
8408
8409         * class.c (layout_empty_base): Handle empty bases with non-byte
8410         alignment.
8411         (build_base_field): Likewise.
8412         (layout_virtual_bases): Likewise.
8413
8414         * class.c (finish_struct_1): Fix typo in this change:
8415
8416         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8417
8418 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
8419
8420         * decl.c (grokdeclarator): Count partial specializations when
8421         keeping track of how many template classes have been seen.
8422
8423         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
8424
8425 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8426
8427         * class.c (build_vbase_pointer_fields): layout_field now place_field.
8428         (get_vfield_offset): Use byte_position.
8429         (set_rtti_entry): Set OFFSET to ssizetype zero.
8430         (get_binfo_offset_as_int): Deleted.
8431         (dfs_record_base_offsets): Use tree_low_cst.
8432         (dfs_search_base_offsets): Likewise.
8433         (layout_nonempty_base_or_field): Reflect changes in RLI format
8434         and call byte_position.
8435         (layout_empty_base): Convert offset to ssizetype.
8436         (build_base_field): use rli_size_unit_so_far.
8437         (dfs_propagate_binfo_offsets): Do computation in proper type.
8438         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
8439         (layout_class_type): Reflect changes in RLI names and fields.
8440         (finish_struct_1): Set DECL_FIELD_OFFSET.
8441         * dump.c (dequeue_and_dump): Call bit_position.
8442         * expr.c (cplus_expand_constant): Use byte_position.
8443         * rtti.c (expand_class_desc): Use bitsize_one_node.
8444         * typeck.c (build_component_addr): Use byte_position and don't
8445         special case for zero offset.
8446
8447 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
8448
8449         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
8450
8451         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
8452         tinfo object.
8453         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
8454         vtable.
8455
8456 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8457
8458         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
8459         DECL_P macros.
8460         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
8461         make_typename_type, check_initializer, cp_finish_decl,
8462         xref_tag): Likewise.
8463         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
8464         decl_namespace, arg_assoc_template_arg, arg_assoc,
8465         validate_nonmember_using_decl, do_class_using_decl): Likewise.
8466         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
8467         args_to_string): Likewise.
8468         * friend.c (is_friend): Likewise.
8469         * lex.c (note_got_semicolon, note_list_got_semicolon,
8470         is_global): Likewise.
8471         * method.c (build_overload_nested_name, build_overload_value,
8472         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
8473         * parse.y (typename_sub, typename_sub1): Likewise.
8474         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
8475         process_partial_specialization, convert_template_argument,
8476         template_args_equal, add_pending_template, lookup_template_class,
8477         for_each_template_parm_r, maybe_fold_nontype_arg,
8478         tsubst, instantiate_template, type_unification_real, unify,
8479         instantiate_pending_templates, set_mangled_name_for_template_decl):
8480         Likewise.
8481         * repo.c (repo_get_id, repo_template_used): Likewise.
8482         * search.c (lookup_field_1): Likewise.
8483         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
8484         * xref.c (classname): Likewise.
8485
8486 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
8487
8488         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
8489         (CANONICAL_BINFO): New macro.
8490         (BINFO_NEW_VTABLE_MARKED): Use it.
8491         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
8492         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
8493         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
8494         not TREE_TYPE.
8495         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8496         (build_secondary_vtable): Likewise.
8497         (dfs_finish_vtbls): Likewise.
8498         (dfs_accumulate_vtbl_inits): Likewise.
8499         (accumulate_vtbl_inits): New function.
8500         (finish_vtbls): Make sure that virtual bases come after
8501         non-virtual bases in the vtable group.
8502         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
8503         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8504         * search.c (struct vbase_info): Move definition.
8505         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8506         (unmarked_new_vtable_p): Likewise.
8507         (dfs_mark_vtable_path): Remove.
8508         (dfs_mark_new_vtable): Remove.
8509         (dfs_unmark_new_vtable): Likewise.
8510         (dfs_clear_search_slot): Likewise.
8511         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
8512         (dfs_clear_vbase_slots): Likewise.
8513         (init_vbase_pointers): LIkewise.
8514
8515 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
8516
8517         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
8518         SIZETYPE to a non-SIZETYPE.
8519
8520 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
8521
8522         * class.c (layout_virtual_bases): Adjust names in conditionally
8523         compiled code.
8524
8525         * class.c (record_base_offsets): New function.
8526         (layout_conflict_p): Likewise.
8527         (layout_nonempty_base_or_field): Use it.
8528         (layout_empty_base): New function.
8529         (build_base_field): Use it.
8530         (build_base_fields): Update comment.
8531         (layout_virtual_bases): Fold in a little code form
8532         layout_basetypes.  Use layout_empty_base.
8533         (layout_basetypes): Remove.
8534         (end_of_class): New function.
8535         (layout_class_type): Use it.  Adjust.
8536
8537         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
8538         (fntype_p): Remove.
8539         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
8540         comment.
8541         (dfs_skip_nonprimary_vbases_markedp): Likewise.
8542         * typeck.c (fntype_p): Remove.
8543
8544         * cp-tree.h (TI_SPEC_INFO): Remove.
8545         (CLASSTYPE_TI_SPEC_INFO): Likewise.
8546         * pt.c (process_partial_specialization): Likewise.
8547
8548         * class.c (build_base_field): Fix thinko in computation of binfo
8549         offsets.
8550
8551         * tree.c (mark_local_for_remap_p): Mark variables declared in
8552         TARGET_EXPRs as well.
8553
8554 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
8555
8556         * typeck.c (require_complete_type, complete_type,
8557         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
8558         build_array_ref, convert_arguments, pointer_diff,
8559         build_x_unary_op, build_unary_op, build_c_cast,
8560         build_modify_expr): Use COMPLETE_TYPE_P etc.
8561         * call.c (is_complete, convert_like_real,
8562         build_new_method_call): Likewise.
8563         * class.c (build_vbase_pointer_fields, check_bases,
8564         build_base_field, finish_struct_1, pushclass): Likewise.
8565         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
8566         * decl.c (maybe_process_template_type_declaration, pushtag,
8567         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
8568         layout_var_decl, check_initializer, cp_finish_decl,
8569         grokdeclarator, require_complete_types_for_parms,
8570         grok_op_properties, xref_tag, xref_basetypes,
8571         check_function_type): Likewise.
8572         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
8573         * friend.c (do_friend): Likewise.
8574         * init.c (build_offset_ref): Likewise.
8575         * parse.y (structsp): Likewise.
8576         * pt.c (maybe_process_partial_specialization,
8577         tsubst_friend_function, instantiate_class_template, tsubst,
8578         do_type_instantiation, instantiate_pending_templates): Likewise.
8579         * repo.c (repo_get_id): Likewise.
8580         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
8581         synthesize_tinfo_var, emit_support_tinfos): Likewise.
8582         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
8583         * semantics.c (begin_class_definition): Likewise.
8584         * tree.c (build_cplus_method_type): Likewise.
8585         * typeck2.c (digest_init, build_functional_cast,
8586         add_exception_specifier): Likewise.
8587         * parse.h, parse.c: Regenerated.
8588
8589 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
8590
8591         * inc/cxxabi.h: New header file. Define new-abi entry points.
8592         (__pointer_type_info::target): Rename member to ...
8593         (__pointer_type_info::type): ... here.
8594         (__base_class_info::type): Rename member to ...
8595         (__base_class_info::base): ... here.
8596         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
8597         * cp-tree.h (CPTI_ABI): New global tree enumeration.
8598         (abi_node): New global tree node.
8599         * decl.c (abi_node): Document.
8600         (init_decl_processing): Initialize abi_node.
8601         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
8602         (get_vmi_pseudo_type_info): Likewise.
8603         (create_tinfo_types): Likewise.
8604         (emit_support_tinfos): Likewise.
8605         * tinfo.h (cxxabi.h): Include for new-abi.
8606         Move rtti class definitions to new header file.
8607         * tinfo.cc (abi): Use the namespace.
8608         (std): Move new abi rtti classes from here ...
8609         (__cxxabiv1): ... to here.
8610         * tinfo2.cc (cxxabi.h): Include for new-abi.
8611         Move rtti class definitions to new header file.
8612         (std): Move new abi rtti classes from here ...
8613         (__cxxabiv1): ... to here.
8614         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
8615         namespace.
8616
8617 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
8618             Jason Merrill  <jason@casey.cygnus.com>
8619
8620         * method.c (build_overload_int): Use host_integerp.
8621
8622 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8623
8624         * init.c (build_offset_ref): Handle the case of a templated member
8625         function.
8626
8627 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8628
8629         * except.c (expand_exception_blocks): Clear catch_clauses_last.
8630
8631 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
8632
8633         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
8634         * class.c (check_bitfield_decl): Turn illegal bitfields into
8635         non-bitfields.
8636         (dfs_propagate_binfo_offsets): Adjust for new size_binop
8637         semantics.
8638         (dfs_offset_for_unshared_vbases): Likewise.
8639         * cvt.c (cp_convert_to_pointer): Convert NULL to a
8640         pointer-to-member correctly under the new ABI.
8641         * expr.c (cplus_expand_constant): Don't use cp_convert when
8642         turning an offset into a pointer-to-member.
8643         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
8644         when dereferencing them under the new ABI.
8645         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
8646         of pointers-to-members under the new ABI.
8647
8648         * class.c (check_bitfield_decl): Remove restriction on really long
8649         bitfields.
8650         (layout_class_type): Implement new ABI handling of bitfields
8651         longer than their types.
8652
8653 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8654
8655         * parse.y (extdefs): Call ggc_collect.
8656         * parse.c: Regenerated.
8657
8658 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
8659
8660         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
8661         (note_name_declared_in_class): Use OVL_CURRENT to get at a
8662         potential overload.
8663
8664 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8665
8666         * class.c (build_vbase_path): Use integer_zerop.
8667         (build_vtable_entry): Use tree_low_cst.
8668         (get_vfield_offset): Use bit_position.
8669         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
8670         Use tree_low_cst.
8671         (check_bitfield_decl): Set DECL_SIZE using convert.
8672         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
8673         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
8674         Use tree_low_cst.
8675         (finish_struct_1): Use bit_position.
8676         (dump_class_hierarchy): Use tree_low_cst.
8677         * cp-tree.h (min_precision): Add declaration.
8678         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
8679         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
8680         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
8681         * expr.c (cplus_expand_constant): Use bit_position.
8682         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
8683         * rtti.c (get_base_offset): Use bit_position.
8684         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
8685         host_integerp, and tree_low_cst.
8686         (pointer_int_sum): Use integer_zerop.
8687         (build_component_addr): Use bit_position.
8688
8689 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
8690
8691         * typeck.c (require_complete_type): Don't assume size_zero_node.
8692         (complete_type_or_else): Likewise.
8693
8694 2000-03-16  Steven Grady <grady@digitaldeck.com>
8695             Jason Merrill  <jason@casey.cygnus.com>
8696
8697         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
8698
8699 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
8700
8701         * decl2.c (grokfield): Bail out if type is error_mark_node.
8702
8703 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
8704
8705         * tinfo2.cc (__ptr_to_member_data): Rename to ...
8706         (__pointer_to_member_data): ... here. Adjust.
8707         * rtti.c (create_tinfo_types): Adjust.
8708
8709 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
8710
8711         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
8712         * decl.c (ref_desc_type_node): Undocument.
8713         * rtti.c (ptr_ref_initializer): Rename to ...
8714         (ptr_initializer): ... here. Adjust comments.
8715         (ptmd_initializer): Fix comment thinko.
8716         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
8717         (create_tinfo_types): Remove ref_desc_type_node init.
8718         * tinfo2.cc (__reference_type_info): Remove.
8719
8720 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
8721
8722         * decl.c (cp_finish_decl): Remove obsolete comment.
8723
8724         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
8725
8726 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
8727
8728         * cp-tree.h: Tweak documentation.
8729         * class.c (build_vbase_pointer_fields): Layout the fields, too.
8730         (avoid_overlap): Remove.
8731         (get_binfo_offset_as_int): New function.
8732         (dfs_serach_base_offsets): Likewise.
8733         (layout_nonempty_base_or_field): Likewise.
8734         (build_base_field): Layout fields here.  Avoid placing two objects
8735         of the same type at the same address, under the new ABI.
8736         (build_base_fields): Adjust accordingly.
8737         (create_vtable_ptr): Return the new field, but don't attach it to
8738         TYPE_FIELDS.
8739         (remove_base_field): Remove.
8740         (remove_base_fields): Remove.
8741         (layout_basetypes): Adjust accordingly.
8742         (layout_class_type): Call layout_field for each field, rather than
8743         just making a wholesale call to layout_type.
8744
8745 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
8746
8747         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
8748
8749 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
8750
8751         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
8752
8753         * except.c (dtor_nothrow): New fn.
8754         (do_pop_exception): Use it.  Take type parm.
8755         (push_eh_cleanup): Take type parm.
8756         (expand_start_catch_block): Pass it.
8757         (build_eh_type_type_ref): Accept null type.
8758
8759 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
8760
8761         * cp-tree.h (revert_static_member_fn): Change prototype.
8762         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
8763         (grok_op_properties): Likewise.
8764         (start_function): Likewise.
8765         (revert_static_member_fn): Simplify.
8766         * pt.c (check_explicit_specialization): Adjust call to
8767         revert_static_member_fn.
8768
8769 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
8770
8771         * cp-tree.h (scope_kind): New type.
8772         (tmpl_spec_kind): Likewise.
8773         (declare_pseudo_global_level): Remove.
8774         (pseudo_global_level_p): Rename to template_parm_scope_p.
8775         (pushlevel): Remove declaration.
8776         (begin_scope): New function.
8777         (finish_scope): Likewise.
8778         (current_tmpl_spec_kind): Likewise.
8779         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
8780         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
8781         Add template_spec_p.
8782         (toplevel_bindings_p): Adjust.
8783         (declare_pseudo_global_level): Remove.
8784         (pseudo_global_level_p): Rename to template_parm_scope_p.
8785         (current_tmpl_spec_kind): New function.
8786         (begin_scope): Likewise.
8787         (finish_scope): Likewise.
8788         (maybe_push_to_top_level): Adjust.
8789         (maybe_process_template_type_declaration): Likewise.
8790         (pushtag): Likewise.
8791         (pushdecl_nonclass_level): Likewise.
8792         (lookup_tag): Likewise.
8793         (grokfndecl): Handle member template specializations.  Share
8794         constructor and non-constructor code.
8795         * decl2.c (check_classfn): Handle member template specializations.
8796         * pt.c (begin_template_parm_list): Use begin_scope.
8797         (begin_specialization): Likewise.
8798         (end_specialization): Likewise.
8799         (check_explicit_specialization): Use current_tmpl_spec_kind.
8800         Handle member template specializations.
8801         (end_template_decl): Use finish_scope.  Remove call to
8802         get_pending_sizes.
8803         (push_template_decl_real): Remove bogus error message.
8804         (tsubst_decl): Fix typo in code contained in comment.
8805         (instantiate_template): Handle member template specializations.
8806         (most_general_template): Likewise.
8807
8808 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
8809
8810         * lex.c (whitespace_cr): Compress consecutive calls to warning().
8811         (do_identifier): Ditto for error().
8812
8813         * pt.c (convert_nontype_argument): Ditto for cp_error().
8814         (convert_template_argument): Ditto for cp_pedwarn().
8815
8816 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
8817
8818         * exception.cc (__check_null_eh_spec): New fn.
8819         * except.c (expand_end_eh_spec): Call it if the spec is throw().
8820
8821 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
8822
8823         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
8824         * except.c (expand_end_eh_spec): Add the return type.
8825         * rtti.c (throw_bad_cast): Add the parmtypes.
8826         (throw_bad_typeid): Likewise.
8827
8828         * semantics.c (expand_stmt): Only leave out rtl for unused
8829         artificials, and set DECL_IGNORED_P on them as well.
8830         * decl.c (wrapup_globals_for_namespace): Likewise.
8831
8832 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
8833
8834         * decl.c (maybe_commonize_var): Skip all artificial decls.
8835         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
8836
8837 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
8838
8839         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
8840         * cp-tree.h: Declare flag_enforce_eh_specs.
8841         * decl.c (store_parm_decls, finish_function): Check it.
8842
8843         C library functions don't throw.
8844         * Makefile.in (cfns.h): New target.
8845         (except.o): Depend on it.
8846         * Make-lang.in (cc1plus): Depend on cfns.gperf.
8847         * cfns.gperf: New file.
8848         * cfns.h: Generated.
8849         * except.c: Include it.
8850         (nothrow_libfn_p): New fn.
8851         * decl.c (grokfndecl): Use it.
8852         * cp-tree.h: Declare it.
8853
8854         * decl.c (push_overloaded_decl_1, auto_function,
8855         define_function): Lose.
8856         (build_library_fn_1): New static fn.
8857         (builtin_function): Use it.
8858         (get_atexit_node): Use build_library_fn_ptr.
8859         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
8860         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
8861         push_void_library_fn, push_throw_library_fn): New fns.
8862         * cp-tree.h: Declare them.
8863         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
8864         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
8865         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
8866         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
8867         * rtti.c (build_runtime_decl): Lose.
8868         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
8869         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
8870         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
8871
8872         * call.c (build_call): Remove result_type parm.
8873         Call mark_used on unused artificial fns.
8874         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
8875
8876 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
8877
8878         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
8879         appropriate.
8880         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
8881         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
8882         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
8883         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
8884         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8885         expand_generic_desc): Likewise.
8886
8887 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
8888
8889         * exception.cc (__cp_pop_exception): Cleanup the original object.
8890
8891 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
8892
8893         * decl.c (grok_op_properties): Merge conversion to void warning
8894         with other silly op warnings.
8895
8896 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
8897
8898         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
8899         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
8900
8901 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
8902
8903         * decl.c (cp_make_fname_decl): New function.
8904         (wrapup_globals_for_namespace): Don't emit unused static vars.
8905         (init_decl_processing): Remove comment about use of
8906         array_domain_type. Set make_fname_decl.
8907         (cp_finish_decl): Remove __FUNCTION__ nadgering.
8908         * semantics.c (begin_compound_stmt): Remove
8909         current_function_name_declared flagging.
8910         (expand_stmt): Don't emit unused local statics.
8911         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
8912         specially.
8913
8914 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
8915
8916         * typeck.c (convert_for_assignment): Don't look at array
8917         initializer.
8918         * call.c (convert_like_real): Likewise.
8919
8920 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
8921
8922         Add initial support for '\uNNNN' specifier.
8923         * lex.c (read_ucs): New fn.
8924         (readescape, skip_white_space): Call it.
8925         (is_extended_char, is_extended_char_1): New fns.
8926         (utf8_extend_token): New fn, #if 0'd out.
8927         (real_yylex): Treat extended chars like letters.
8928
8929         * search.c (note_debug_info_needed): Walk the bases even if we
8930         weren't deferring the type itself.
8931
8932 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8933
8934         * decl2.c (finish_objects): Constify a char*.
8935
8936         * method.c (emit_thunk): Likewise.
8937
8938 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
8939
8940         * typeck.c (dubious_conversion_warnings): Look through
8941         REFERENCE_TYPE.
8942
8943 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8944
8945         * class.c (dfs_modify_vtables): I is now unsigned.
8946         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
8947         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
8948         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
8949         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8950         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
8951         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
8952         Call integer_all_onesp.
8953         * typeck2.c (process_init_constructor): Use compare_tree_int.
8954
8955         * lang-specs.h (as): Don't call if -syntax-only.
8956
8957 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
8958
8959         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
8960         RTL_EXPR_HAS_NO_SCOPE after all.
8961
8962 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
8963
8964         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
8965         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
8966         RTL_EXPR_HAS_NO_SCOPE.
8967
8968         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
8969         later.
8970
8971         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
8972
8973 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
8974
8975         * call.c (convert_like): Macrofy.
8976         (convert_like_with_context): New macro.
8977         (convert_like_real): Renamed from convert_like.  Add calling
8978         context parameters, for diagnostics. Add recursive flag.  Call
8979         dubious_conversion_warnings for outer conversion.
8980         (build_user_type_conversion): Use convert_like_with_context.
8981         (build_over_call): Likewise. Don't warn about dubious
8982         conversions here. Adjust convert_default_arg calls.
8983         (convert_default_arg): Add context parameters for diagnostics.
8984         Pass through to convert_like_with_context.
8985         * cp-tree.h (convert_default_arg): Add context parameters.
8986         (dubious_conversion_warnings): Prototype new function.
8987         * typeck.c (convert_arguments): Adjust convert_default_arg call.
8988         (dubious_conversion_warnings): New function, broken
8989         out of convert_for_assignment.
8990         (convert_for_assignment): Adjust.
8991
8992 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
8993
8994         * decl2.c (key_method): Break out from...
8995         (import_export_vtable, import_export_class): ...here.
8996
8997         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
8998         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
8999
9000         * search.c (note_debug_info_needed, dfs_debug_mark,
9001         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
9002         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
9003
9004 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
9005
9006         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
9007         typos.
9008
9009 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
9010
9011         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
9012         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
9013         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
9014         (lang_type): Split gets_new into has_new and has_array_new.
9015         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9016         (TYPE_GETS_NEW): Split into ...
9017         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
9018         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
9019         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
9020         (build_op_new_call): Don't declare.
9021         (build_new_1): Likewise.
9022         * call.c (build_op_new_call): Remove.
9023         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
9024         instead of TYPE_NEEDS_DESTRUCTOR.
9025         (finish_struct_bits): Likewise.
9026         (add_implicitly_declared_members): Likewise.
9027         (check_field_decl): Likewise.
9028         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
9029         correctly under the new ABI.
9030         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
9031         instead of TYPE_NEEDS_DESTRUCTOR.
9032         (initialize_local_var): Likewise.
9033         (destroy_local_var): Likewise.
9034         (cp_finish_decl): Likewise.
9035         (register_dtor_fn): Likewise.
9036         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
9037         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
9038         TYPE_VEC_DELETE_TAKES_SIZE here.
9039         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
9040         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
9041         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9042         (finish_destructor_body): Likewise.
9043         (maybe_build_cleanup_1): Likewise.
9044         * decl2.c (do_static_destruction): Likewise.
9045         * init.c (build_new_1): Make it static.
9046         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9047         (expand_cleanup_for_base): Likewise.
9048         (get_cookie_size): New function.
9049         (build_new_1): Handle array-new cookies correctly under the new
9050         ABI.
9051         (build_vec_delete_1): Likewise.
9052         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9053         (build_delete): Likewise.
9054         (build_vec_delete): Handle array-new cookies correctly under the new
9055         ABI.
9056         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9057         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
9058         TYPE_HAS_ARRAY_NEW_OPERATOR.
9059         * ptree.c (print_lang_type): Check them.
9060         * search.c (context_for_name_lookup): Fix typo in comment.
9061         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9062         * tree.c (break_out_cleanups): Likewise.
9063         (build_cplus_array_test_1): Likewise.
9064         (cp_build_qualified_type_real): Likewise.
9065         * typeck.c (complete_type): Likewise.
9066
9067         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
9068         the command-line, not the end.
9069
9070 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
9071
9072         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
9073
9074 2000-03-02  Tom Tromey  <tromey@cygnus.com>
9075
9076         * cp-tree.h (build_java_class_ref): Declare.
9077         * init.c (build_java_class_ref): No longer static.
9078         * except.c (expand_throw): Generate a Java-style `throw' if the
9079         thrown object is a "Java" object.
9080         (initialize_handler_parm): Generate a Java-style lookup of
9081         exception info if the caught object is a "Java" object.
9082         (catch_language, catch_language_init): New globals.
9083         (decl_is_java_type): New function.
9084         (expand_start_catch_block): Don't call push_eh_info() or
9085         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
9086         class reference to build_catch_block.
9087
9088 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9089
9090         * typeck.c (comptypes): Treat sizetype like its language equivalent.
9091
9092 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
9093
9094         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
9095         to merge reference/pointer code and fix incorrect warnings.
9096
9097 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
9098
9099         * search.c (protected_accessible_p): Use context_for_name_lookup.
9100
9101         * init.c (construct_virtual_bases): Fix thinko.
9102         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
9103
9104 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9105
9106         * decl.c (current_function_decl): Move to toplev.c.
9107
9108 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
9109
9110         * pt.c (fn_type_unification): Unify return type, whenever
9111         provided.
9112         (get_bindings_real): Only pass return type when necessary.
9113         Remove explicit return type check.
9114         * class.c (resolve_address_of_overloaded_function): Pass desired
9115         return type to fn_type_unification.
9116
9117 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9118
9119         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
9120         DECL_FIELD_SIZE.
9121         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
9122         DECL_FIELD_SIZE.
9123         * rtti.c (expand_class_desc): Likewise.
9124         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
9125         (THUNK_VCALL_OFFSET): Likewise.
9126         (THUNK_DELTA): Reflect changes in ../tree.h.
9127
9128 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
9129
9130         * search.c (protected_accessible_p): Also allow the access if
9131         the member is public in DERIVED.  Lose TYPE parm.
9132         (friend_accessible_p): Lose TYPE parm.
9133         (accessible_p): Adjust.
9134
9135 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9136
9137         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
9138         on things that are not sizes; ssize_binop deleted.
9139         Call size_diffop when appropriate.
9140         (dfs_build_vcall_offset_vtbl_entries): Likewise.
9141         (build_primary_vtable, build_secondary_vtable): Likewise.
9142         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
9143         Variable I is HOST_WIDE_INT.
9144         (get_vfield_offset): Pass proper types to size_binop.
9145         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
9146         (finish_struct_1): Likewise.
9147         (skip_rtti_stuff): Arg N is now pointer to signed.
9148         (layout_class_type): Use size_zero_node.
9149         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
9150         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
9151         * decl.c (complete_arry_type): Pass proper types to size_binop.
9152         (xref_basetypes): BINFO_OFFSET is sizetype.
9153         * error.c (dump_expr): Don't use size_binop non-sizes.
9154         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
9155         * init.c (construct_virtual_bases): Fix type error.
9156         (build_vec_delete_1): Pass proper type to size_binop and don't
9157         fold result.
9158         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
9159         * rtti.c (get_base_offset): Pass proper type to size_binop.
9160         * search.c (dfs_find_vbases): Fix type error.
9161         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
9162         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
9163         * tree.c (debug_binfo): Variable N is signed.
9164         Use HOST_WIDE_INT_PRINT_DEC.
9165         * typeck.c (comptypes): sizetype is same as equivalent integer type.
9166         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
9167         size_one_node and size_zero_node.
9168         (c_alignof): Use size_one_node.
9169         (build_component_addr): Pass proper types to size_binop.
9170         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
9171
9172 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
9173
9174         Implement class scope using-declarations for functions.
9175         * class.c (handle_using_decl): Call add_method for used functions.
9176         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
9177         (add_method): Used functions are hidden by local functions.
9178         (check_bases_and_members): Handle using-decls before finalizing
9179         CLASSTYPE_METHOD_VEC.
9180         * call.c (add_function_candidate): Add ctype parm; if non-zero,
9181         override the type of 'this' accordingly.
9182         (add_template_candidate, add_template_candidate_real): Add ctype parm.
9183         (convert_class_to_reference, build_user_type_conversion_1,
9184         build_new_function_call, build_object_call, build_new_op,
9185         build_new_method_call): Pass ctype parm.
9186
9187         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
9188         the baselink.
9189         * call.c (convert_class_to_reference, build_user_type_conversion_1,
9190         build_new_function_call, build_object_call, build_new_op,
9191         build_new_method_call, build_op_delete_call): Don't get basetype_path
9192         from a baselink.
9193         * typeck.c (build_component_ref): Likewise.
9194         * init.c (build_offset_ref): Likewise.
9195         (resolve_offset_ref): Don't call enforce_access.
9196         Call build_scoped_ref.
9197         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
9198         would cause an error or if -pedantic.
9199         * class.c (alter_access): Lose binfo parm.
9200
9201 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
9202
9203         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
9204         types.
9205
9206 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
9207
9208         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
9209         pseudo_type_info creation into the std namespace
9210
9211 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
9212
9213         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
9214         (import_export_class): Remove declaration.
9215         * decl2.c (import_export_class): Make it static.
9216         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
9217         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
9218         EXPR_WITH_FILE_LOCATION.
9219         * lex.c (check_newline): Tweak filename/lineno setting.
9220         * semantics.c (begin_while_stmt): Fix typo in comment.
9221
9222 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9223
9224         * lang-options.h (-fmessage-length=): Add missing option.
9225
9226         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
9227
9228 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
9229
9230         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
9231
9232 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
9233
9234         * optimize.c (expand_call_inline): Emit the return label before
9235         evaluating the return value.
9236
9237 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
9238
9239         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
9240         than duplicating functionality here.
9241         * optimize.c: Include input.h.
9242         (expand_call_inline): Use push_srcloc and pop_srcloc.
9243         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
9244         * parse.c: Regenerated.
9245         * Makefile.in (lex.o): Depend on input.h.
9246         (optimize.o): Likewise.
9247
9248 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
9249
9250         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
9251         function type, rather than ICE.
9252
9253 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
9254
9255         * decl.c (grokdeclarator): Call decl_type_access_control.
9256         * parse.y (parse_end_decl): Don't call decl_type_access_control if
9257         decl is null.
9258
9259 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
9260
9261         * decl.c (decls_match): Remove obsolete static member nadgering.
9262
9263 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9264
9265         * decl.c (grokdeclarator): Change ANSI to ISO.
9266         * lex.c (consume_string, readescape, do_identifier): Likewise.
9267         (parse_float, real_yylex): Likewise.
9268         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
9269         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
9270         new_type_id, maybe_label_decls, simple_stmt,
9271         for.init.statement): Likewise.
9272         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
9273         * semantics.c (finish_named_return_value): Likewise.
9274         * parse.c: Regenerate.
9275
9276 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
9277
9278         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
9279         (CPTI_CLASS_STAR_TYPE): Remove.
9280         (vtable_index_type): Likewise.
9281         (class_star_type_node): Remove.
9282         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
9283         (build_binary_op_nodefault): Remove.
9284         * call.c (build_new_op): Use build_binary_op instead of
9285         build_binary_op_nodefault.
9286         * decl.c (init_decl_processing): Remove class_star_type_node
9287         initialization.  Make delta_type_node ptrdiff_type_node under the
9288         new ABI.  Initialize vtable_index_type.
9289         (build_ptrmemfunc_type): Build different structures for the new
9290         ABI.
9291         (build_enumerator): Use build_binary_op instead of
9292         build_binary_op_nodefault.
9293         * method.c (build_overload_value): Mangle pointers-to-members
9294         appropriately under the new ABI.
9295         * typeck.c (build_array_ref): Use build_binary_op instead of
9296         build_binary_op_nodefault.
9297         (get_member_function_from_ptrfunc): Adjust for the new ABI.
9298         (build_binary_op_nodefault): Rename to ...
9299         (build_binary_op): ... this.  Remove old version.  Adjust for
9300         pointer-to-member comparisons under the new ABI.
9301         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
9302         (build_ptrmemfunc): Adjust for the new ABI.
9303         (expand_ptrmemfunc_cst): Likewise.
9304         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
9305         (pfn_from_ptrmemfunc): Adjust for the new ABI.
9306
9307 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
9308
9309         * call.c (build_object_call): Compress consecutive calls to
9310         cp_error.
9311         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
9312         (build_op_delete_call): Adjust message formatting.
9313
9314         * class.c (check_bases): Compress consecutive calls to
9315         cp_pedwarn.
9316         (finish_struct_anon): Say 'ISO C++'.
9317
9318         * decl.c (start_decl): Same here.
9319         (grok_reference_init): Likewise.
9320         (grokfndecl): Correct message formatting.
9321         (grokfndecl): Improve diagnostic.
9322         (check_static_variable_definition): Likewise. Say 'ISO C++'
9323         (compute_array_index_type): Say 'ISO C++'
9324         (create_array_type_for_decl): Compress consecutive calls to
9325         cp_error.
9326         (grokdeclarator): Say 'ISO C++'
9327         (grok_op_properties): Likewise.
9328
9329         * decl2.c (delete_sanity): Clairify diagnostic.
9330         (check_member_template): Same here.
9331         (grok_function_init): Use consistent terminology.
9332
9333         * expr.c (do_case): Say 'ISO C++'
9334
9335         * friend.c (do_friend): Compress consecutive calls to warning.
9336
9337 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
9338
9339         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
9340         * class.c (build_secondary_vtable): Reorganize.  Don't create a
9341         new vtable under the new ABI.
9342         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
9343         computing the size.
9344         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
9345         the initializing elements.
9346         (initialize_vtable): New function.
9347         (dfs_finish_vtbls): Use it.
9348         (dfs_accumulate_vtbl_inits): New function.
9349         (finish_vtbls): Merge primary and secondary vtables under the new
9350         ABI.
9351         (finish_struct_1): Remove redundant call to layout_vtable_decl.
9352         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
9353         aren't VAR_DECLs.
9354
9355         * class.c (build_vtable): New function, split out from ...
9356         (get_vtable_decl): ... here, and ...
9357         (build_secondary_vtable): ... here.
9358
9359         * pt.c (tsubst_decl): Fix formatting.
9360
9361 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9362
9363         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
9364         (avoid_overlap, build_base_field): Likewise.
9365         (build_base_field, build_base_fields, is_empty_class):
9366         Test DECL_SIZE with integer_zero.
9367         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
9368         * cp-tree.h (struct lang_type): New field size_unit.
9369         (CLASSTYPE_SIZE_UNIT): New macro.
9370         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
9371         (cp_finish_decl): Delete -Wlarger-than processing.
9372         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
9373         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
9374         * tree.c (make_binfo): binfo vector is one entry longer.
9375         (walk_tree): Walk DECL_SIZE_UNIT.
9376
9377 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
9378
9379         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
9380         comment.
9381         (build_vtable_entry): Don't assume all vtable entries are
9382         functions.
9383         (build_vtbl_initializer): Adjust accordingly.
9384         (get_vtable_decl): Fix formatting.
9385
9386 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
9387
9388         * semantics.c (deferred_type_access_control): Walk the entire
9389         type_lookups list.
9390         (save_type_access_control): Rename from
9391         initial_deferred_type_access_control.  Just remember the value.
9392         (decl_type_access_control): New fn.
9393         (begin_function_definition): Use deferred_type_access_control, after
9394         we've started the function.  Set type_lookups to error_mark_node.
9395         * parse.y (frob_specs, fn.def1): Adjust.
9396         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
9397         (parse_end_decl, parse_bitfield0, parse_method): New fns.
9398         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
9399         (after_type_component_declarator0): Likewise.
9400         (after_type_component_declarator): Likewise.
9401         (notype_component_declarator): Likewise.
9402         * cp-tree.h: Adjust.
9403
9404         * decl.c (redeclaration_error_message): Allow redeclaration of
9405         namespace-scope decls.
9406
9407 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9408
9409         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
9410
9411 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
9412
9413         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
9414         * decl2.c (grokclassfn): Likewise.
9415
9416         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
9417
9418         * decl2.c (lang_decode_option): Don't set default message length
9419         here.
9420         * lex.c (lang_init_options): Set it here.
9421
9422 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
9423
9424         Make DECL_CONTEXT mean the class in which a member function was
9425         declared, even for a virtual function.
9426         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
9427         (DECL_FRIEND_CONTEXT): New macro.
9428         (DECL_REAL_CONTEXT): Remove.
9429         (SET_DECL_FRIEND_CONTEXT): Likewise.
9430         (DECL_VIRTUAL_CONTEXT): Adjust.
9431         (DECL_CLASS_SCOPE_P): Use TYPE_P.
9432         (add_friends): Remove.
9433         (hack_decl_function_context): Likewise.
9434         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
9435         CP_DECL_CONTEXT.
9436         (build_over_call): Fix indentation.  Use DECL_CONTEXT
9437         instead of DECL_CLASS_CONTEXT.
9438         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
9439         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
9440         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9441         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
9442         (build_base_field): Likewise.
9443         (finish_struct_1): Likewise.
9444         (build_self_reference): Likewise.
9445         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
9446         DECL_REAL_CONTEXT.
9447         (pushtag): Use decl_function_context, not
9448         hack_decl_function_context.
9449         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9450         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
9451         (pushdecl): Remove bogus code.
9452         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
9453         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9454         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9455         Use decl_function_context, nothack_decl_function_context.
9456         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
9457         (grokdeclarator): Likewise.  Use decl_function_context, not
9458         hack_decl_function_context.
9459         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
9460         (start_function): Use DECL_FRIEND_CONTEXT, not
9461         DECL_CLASS_CONTEXT.  Use decl_function_context, not
9462         hack_decl_function_context.
9463         (finish_function): Use decl_function_context, not
9464         hack_decl_function_context.
9465         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
9466         DECL_CLASS_CONTEXT.
9467         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
9468         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
9469         (grokfield): Likewise.
9470         (finish_builtin_type): Likewise.
9471         (finish_vtable_vardec): Use decl_function_context, not
9472         hack_decl_function_context.
9473         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9474         (start_static_initialization_or_destruction): Likewise.
9475         (finish_static_initialization_or_destruction): Likewise.
9476         (mark_used): Adjust logic for deciding when to synthesize methods.
9477         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
9478         DECL_REAL_CONTEXT.
9479         * error.c (dump_function_decl): Use DECL_CONTEXT, not
9480         DECL_CLASS_CONTEXT.
9481         * friend.c (is_friend): Likewise.
9482         (add_friends): Remove.
9483         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
9484         * lex.c (begin_definition_of_inclass_inline): Use
9485         decl_function_context, not hack_decl_function_context.
9486         (process_next_inline): Likewise.
9487         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9488         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
9489         DECL_CLASSS_CONTEXT.
9490         (hack_identifier): Likewise.
9491         (synthesize_method):  Use decl_function_context, not
9492         hack_decl_function_context.
9493         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
9494         DECL_REAL_CONTEXT.
9495         (is_member_template): Use decl_function_context, not
9496         hack_decl_function_context.  Use DECL_CONTEXT, not
9497         DECL_CLASS_CONTEXT.
9498         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
9499         DECL_CLASS_CONTEXT.
9500         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
9501         DECL_REAL_CONTEXT.
9502         (push_template_decl_real): Likewise.
9503         (instantiate_class_template): Don't call add_friends.
9504         (tsubst_default_argument): Use DECL_CONTEXT, not
9505         DECL_REAL_CONTEXT.
9506         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
9507         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9508         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
9509         DECL_CLASS_CONTEXT.
9510         * repo.c (repo_inline_used): Likewise.
9511         * search.c (current_scope): Adjust for new _CONTEXT macros.
9512         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
9513         DECL_REAL_CONTEXT.
9514         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9515         (lookup_fnfields_here):Likewise.
9516         (check_final_overrider): Likewise.
9517         (init_vbase_pointers): Likewise.
9518         (virtual_context): Likewise.
9519         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
9520         (expand_body): Use decl_function_context, not
9521         hack_decl_function_context.
9522         * tree.c (hack_decl_function_context): Remove.
9523         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
9524         DECL_CLASS_CONTEXT.
9525         * typeck2.c (error_not_base_type): Likewise.
9526
9527 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
9528
9529         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
9530
9531 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9532
9533         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
9534
9535 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
9536
9537         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
9538
9539 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9540
9541         * decl2.c (lang_decode_option): Enable automatic line wrapping.
9542
9543 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
9544
9545         * parse.y (frob_specs): Split out...
9546         (parse_decl): From here.
9547         (fn.def2): Call initial_deferred_type_access_control.
9548         (after_type_component_declarator0): Call frob_specs.
9549         (notype_component_declarator0): Likewise.
9550         * search.c (friend_accessible_p): Nested classes are friends of their
9551         enclosing classes.
9552
9553 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
9554
9555         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
9556         used to create an implicit temporary.
9557
9558         * class.c (dfs_modify_vtables): Tweak calculation of functions to
9559         override.
9560
9561 2000-02-08  Nathan Sidwell  <nathan@acm.org>
9562
9563         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
9564         strip array element qualifiers too.
9565
9566 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
9567
9568         * decl.c (store_parm_decls): Don't build cleanups for parameters
9569         while processing_template_decl.
9570
9571 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
9572
9573         * cp-tree.h (struct saved_scope): Add incomplete field.
9574         (namespace_scope_incomplete): New macro.
9575         * decl.c (pushdecl): Use it.
9576         (hack_incomplete_structures): Use it.  See through artificial
9577         binding levels.
9578         (mark_saved_scope): Mark it.
9579
9580         Implement access control for nested types.
9581         * search.c (type_access_control): New fn.
9582         (accessible_p): Now we do perform access control for types.
9583         * semantics.c (deferred_type_access_control): New fn.
9584         (initial_deferred_type_access_control): New fn.
9585         (begin_function_definition): Call it.  Add lookups parm.
9586         * decl.c (struct binding_level): Add this_class field.
9587         (pushlevel_class): Set it.
9588         (mark_binding_level): Mark it.
9589         (lookup_name_real): Use it.  Call type_access_control.
9590         (mark_saved_scope): Mark lookups field.
9591         * cp-tree.h (flagged_type_tree): Add lookups field.
9592         (struct saved_scope): Add lookups field.
9593         (type_lookups): New macro.
9594         * parse.y (declmods): Now <ftype>.
9595         (parse_decl): Add lookups parm.  Call
9596         initial_deferred_type_access_control.
9597         (lang_extdef): Clear type_lookups.
9598         (typed_declspecs, declmods, typespec): Set lookups field.
9599         (initdcl): Call deferred_type_access_control.
9600         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
9601         component_decl_1, named_parm): Adjust.
9602         * friend.c (is_friend): Nested classes are friends of their
9603         enclosing classes.
9604
9605         * class.c (currently_open_derived_class): New fn.
9606         * method.c (hack_identifier): Use it.
9607
9608         * lex.c (do_identifier): Remove obsolete code.
9609
9610         * parse.y (typed_typespecs): Propagate new_type_flag properly.
9611
9612 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
9613
9614         * tinfo.h: Remove apostrophes from C++ comment (xgettext
9615         thinks this file is plain C).
9616
9617 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9618
9619         * Makefile.in (call.o): Depend on $(EXPR_H).
9620
9621         * call.c: Include "expr.h".
9622
9623         * class.c (dump_class_hierarchy): Add prototype.
9624
9625         * search.c (dfs_get_pure_virtuals): Likewise.
9626
9627 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
9628
9629         * parse.y (simple_stmt): Allow :: token in asm parameter list.
9630         * parse.c: Rebuilt.
9631
9632 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
9633
9634         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
9635         Store it in DECL_FCONTEXT.
9636         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
9637
9638 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
9639
9640         * tinfo.h (old abi): #include "tconfig.h".
9641         * tinfo.cc (convert_to_base): Move into old abi section.
9642
9643 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
9644
9645         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
9646         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
9647         (BINFO_PRIMARY_BINFO): New macro.
9648         (BF_DELTA): Rename to ...
9649         (BV_DELTA): ... this.
9650         (BF_VCALL_INDEX): Rename to ...
9651         (BV_VCALL_INDEX): ... this.
9652         (BF_FN): Rename to ...
9653         (BV_FN): ... this.
9654         * class.c (build_vbase_path): Adjust for changes to reverse_path.
9655         (set_rtti_entry): Rename BF_ macros to BV_ variants.
9656         (modify_vtable_entry): Simplify.
9657         (add_virtual_function): Rename BF_ macros to BV_ variants.
9658         (build_vtable_initializer): Likewise.
9659         (get_class_offset_1): Remove.
9660         (dfs_get_class_offset): Likewise.
9661         (get_class_offset): Likewise.
9662         (dfs_find_final_overrider): New function.
9663         (find_final_overrider): Likewise.
9664         (modify_one_vtable): Remove.
9665         (dfs_find_base): New function.
9666         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
9667         find_final_overrider.
9668         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
9669         virtuals.
9670         (dfs_fixup_vtable_deltas): Remove.
9671         (override_one_vtable): Remove.
9672         (merge_overrides): Likewise.
9673         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
9674         unreal chilren of virtual bases.
9675         (finish_struct_1): Don't use merge_overrides.  Don't use
9676         dfs_fixup_vtable_deltas.
9677         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
9678         BINFOs.
9679
9680 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9681             Jason Merrill  <jason@yorick.cygnus.com>
9682
9683         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
9684
9685 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
9686
9687         * exception.cc (__throw_bad_typeid): Add missing std::.
9688
9689 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9690
9691         * cp-tree.h (make_thunk): PROTO -> PARAMS.
9692
9693 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
9694
9695         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
9696
9697         Runtime support for new-abi rtti.
9698         * inc/typeinfo (type_info::operator!=): Define in class.
9699         (type_info::before, type_info::name, type_info::operator==,
9700         type_info::operator!=): Define new ABI implementations.
9701         (type_info::is_pointer_p, type_info::is_function_p): Declare
9702         new virtual functions.
9703         (type_info::do_catch, type_info::do_upcast): Likewise.
9704
9705         * tinfo.h (__base_class_info): Define new class.
9706         (__class_type_info): Likewise.
9707         (__si_class_type_info): Likewise.
9708         (__vmi_class_type_info): Likewise.
9709         (__dynamic_cast): Prototype.
9710
9711         * tinfo.cc: Conditionalize old and new rtti mechanisms.
9712         (type_info::is_pointer_p): Define new function.
9713         (type_info::is_function_p): Likewise.
9714         (type_info::do_catch): Likewise.
9715         (type_info::do_upcast): Likewise.
9716         (vtable_prefix): New structure for vtable access.
9717         (adjust_pointer): Define new template function.
9718         (contained_p, public_p, virtual_p, contained_public_p,
9719         contained_nonpublic_p, contained_nonvirtual_p): Define new
9720         functions.
9721         (nonvirtual_base_type): New local variable.
9722         (__class_type_info::~__class_type_info): Define.
9723         (__si_class_type_info::~__si_class_type_info): Likewise.
9724         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
9725         (__class_type_info::do_catch): Define new function.
9726         (__class_type_info::do_upcast): Likewise.
9727         (__class_type_info::find_public_src): Likewise.
9728         (__class_type_info::do_find_public_src): Likewise.
9729         (__si_class_type_info::do_find_public_src): Likewise.
9730         (__vmi_class_type_info::do_find_public_src): Likewise.
9731         (__class_type_info::do_dyncast): Likewise.
9732         (__si_class_type_info::do_dyncast): Likewise.
9733         (__vmi_class_type_info::do_dyncast): Likewise.
9734         (__class_type_info::do_upcast): Likewise.
9735         (__si_class_type_info::do_upcast): Likewise.
9736         (__vmi_class_type_info::do_upcast): Likewise.
9737         (__dynamic_cast): Likewise.
9738
9739         * tinfo2.cc (__fundamental_type_info): Define new class.
9740         (__pointer_type_info): Likewise.
9741         (__reference_type_info): Likewise.
9742         (__array_type_info): Likewise.
9743         (__function_type_info): Likewise.
9744         (__enum_type_info): Likewise.
9745         (__ptr_to_member_type_info): Likewise.
9746         (__fundamental_type_info::~__fundamental_type_info): Define.
9747         (__pointer_type_info::~__pointer_type_info): Likewise.
9748         (__reference_type_info::~__reference_type_info): Likewise.
9749         (__array_type_info::~__array_type_info): Likewise.
9750         (__function_type_info::~__function_type_info): Likewise.
9751         (__enum_type_info::~__enum_type_info): Likewise.
9752         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
9753         (__pointer_type_info::do_catch): Define new function.
9754         (__ptr_to_member_type_info::do_catch): Define new function.
9755
9756         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
9757         (__is_pointer): Likewise.
9758
9759         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
9760
9761 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
9762
9763         * cp/class.c (build_vtable): Rename to build_primary_vtable.
9764         (prepare_fresh_vtable): Rename to build_secondary_vtable.
9765         (make_new_vtable): New function.
9766         (modify_vtable_entry): Handle generation of new vtables correctly.
9767         (modify_one_vtable): Remove unused parameter.
9768         (dfs_fixup_vtable_deltas): Likewise.
9769         (override_one_vtable): Use build_secondary_vtable.
9770         (finish_struct_1): Use build_primary_vtable and
9771         build_secondary_vtable.
9772
9773 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
9774
9775         * cp/decl.c: Adjust variable names, comments, help strings.
9776
9777 2000-01-29  Nathan Sidwell  <nathan@acm.org>
9778
9779         * new2.cc (operator delete[]): Use operator delete, don't assume
9780         implementation.
9781
9782 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
9783
9784         * class.c (build_vtbl_initializer): Add argument to
9785         build_vtable_entry call.
9786
9787 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
9788
9789         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
9790         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
9791         (BF_DELTA): New macro.
9792         (BF_VCALL_INDEX): Likewise.
9793         (BF_FN): Likewise.
9794         (THUNK_VCALL_OFFSET): Likewise.
9795         (make_thunk): Change prototype.
9796         * class.c (build_vtable_entry): Integrate
9797         build_vtable_entry_for_fn.  Handle vcall indices.
9798         (build_vtable_entry_for_fn): Remove.
9799         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
9800         BF_VCALL_INDEX, BF_FN.
9801         (modify_vtable_entry): Integrate common code from
9802         modify_one_vtable and dfs_fixup_vtable_deltas.
9803         (add_virtual_function): Set BF_VCALL_INDEX.
9804         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
9805         and BF_FN.
9806         (modify_one_vtable): Simplify.
9807         (dfs_fixup_vtable_deltas): Likewise.
9808         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
9809         * method.c (make_thunk): Handle vcall indices.
9810
9811 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
9812
9813         Compiler side new abi rtti (not enabled).
9814         * cp-tree.h (new_abi_rtti_p): New macro.
9815         (emit_support_tinfos): Prototype new function.
9816         (tinfo_decl_p): Likewise.
9817         (emit_tinfo_decl): Likwise.
9818         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
9819         macros.
9820         (doing_runtime): New local static.
9821         (init_rtti_processing): Add new-abi initializer.
9822         (get_tinfo_decl): Add new-abi logic.
9823         (tinfo_from_decl): Likewise.
9824         (build_dynamic_cast_1): Likewise.
9825         (qualifier_flags): New static function.
9826         (tinfo_base_init): Likewise.
9827         (generic_initializer): Likewise.
9828         (ptr_ref_initializer): Likewise.
9829         (ptmd_initializer): Likewise.
9830         (class_hint_flags): Likewise.
9831         (class_initializer): Likewise.
9832         (synthesize_tinfo_var): Likewise.
9833         (create_real_tinfo_var): Likewise.
9834         (create_pseudo_type_info): Likewise.
9835         (get_vmi_pseudo_type_info): Likewise.
9836         (create_tinfo_types): Likewise.
9837         (emit_support_tinfos): New global function.
9838         (tinfo_decl_p): New global predicate.
9839         (emit_tinfo_decl): New global function.
9840         * class.c (set_rtti_entry): Generalize for old and new rtti.
9841         (build_vtbl_initializer): Likewise.
9842         * decl2.c (finish_file): Likewise.
9843
9844 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
9845
9846         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
9847         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
9848
9849 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
9850
9851         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
9852         for scopes.
9853
9854 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
9855
9856         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
9857
9858 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
9859
9860         * optimize.c (calls_setjmp_r): Supply new argument
9861         to special_function_p.
9862
9863 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9864
9865         * call.c: PROTO -> PARAMS.
9866         * class.c: Likewise.
9867         * cp-tree.h: Likewise.
9868         * cvt.c: Likewise.
9869         * decl.c: Likewise.
9870         * decl.h: Likewise.
9871         * decl2.c: Likewise.
9872         * dump.c: Likewise.
9873         * errfn.c: Likewise.
9874         * error.c: Likewise.
9875         * except.c: Likewise.
9876         * expr.c: Likewise.
9877         * init.c: Likewise.
9878         * input.c: Likewise.
9879         * lex.c: Likewise.
9880         * lex.h: Likewise.
9881         * method.c: Likewise.
9882         * optimize.c: Likewise.
9883         * parse.y: Likewise.
9884         * pt.c: Likewise.
9885         * repo.c: Likewise.
9886         * rtti.c: Likewise.
9887         * search.c: Likewise.
9888         * semantics.c: Likewise.
9889         * spew.c: Likewise.
9890         * tree.c: Likewise.
9891         * typeck.c: Likewise.
9892         * typeck2.c: Likewise.
9893         * xref.c: Likewise.
9894
9895 2000-01-25  Richard Henderson  <rth@cygnus.com>
9896
9897         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
9898
9899 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
9900
9901         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
9902         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
9903         (struct vcall_offset_data_s): New type.
9904         (dfs_vcall_offset_queue_p): New function.
9905         (dfs_build_vcall_offset_vtbl_entries): Likewise.
9906         (build_vcall_offset_vtbl_entries): Likewise.
9907         (layout_vtable_decl): Likewise.
9908         (num_vfun_entries): Likewise.
9909         (num_extra_vtbl_entries): Add the entries for vcall offsets.
9910         (build_vtbl_initializer): Likewise.
9911         (dfs_finish_vtabls): Use layout_vtable_decl.
9912         (modify_one_vtables): Always duplicate vtables under the new ABI.
9913         (finish_struct_1): Use layout_vtable_decl.
9914
9915 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9916
9917         * decl.c (member_function_or_else): Change third arg from a format
9918         specifier to an `enum overload_flags'.  Callers changed.
9919
9920 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
9921
9922         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
9923         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
9924         build_const_cast, get_delta_difference, check_return_expr): Avoid
9925         ANSI string concatenation usage.
9926
9927 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
9928
9929         * class.c (layout_class_type): Put the fields required to make a
9930         class non-empty at the end, not the beginning, of the TYPE_FIELDs
9931         list.
9932
9933 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
9934
9935         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
9936         template.
9937
9938         * decl2.c (mark_used): Do instantiate inlines that have been
9939         explicitly instantiated.
9940
9941 2000-01-24  Richard Henderson  <rth@cygnus.com>
9942
9943         * call.c (build_over_call): Use expand_tree_builtin.
9944         * typeck.c (build_function_call_real): Likewise.
9945         (build_binary_op_nodefault): Handle unordered compares.
9946
9947 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
9948
9949         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
9950         cp_tree_index values.
9951         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
9952         New global node #defines for them.
9953         * rtti.c (call_void_fn): Replace with ...
9954         (build_runtime_decl): ... new static function.
9955         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
9956         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
9957         (build_dynamic_cast_1): Always produce correctly typed result.
9958         Explicitly produce type_info addresses. Use dynamic_cast_node.
9959         * exception.cc (__throw_bad_cast): Return `void *'.
9960         (__throw_bad_typeid): Return `const type_info &'.
9961
9962 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
9963
9964         * cp-tree.h (get_vtable_decl): Prototype new function.
9965         * class.c (get_vtable_decl): New function. Broken out from ...
9966         (build_vtable): ... here. Use it.
9967         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
9968         by get_vtable_decl.
9969
9970 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
9971
9972         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
9973         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
9974         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
9975         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
9976         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
9977         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
9978         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
9979         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
9980         (CPTI_TINFO_VAR_ID): New enumeration.
9981         (__tp_desc_type_node, __access_mode_type_node,
9982         __bltn_desc_type_node, __user_desc_type_node,
9983         __class_desc_type_node, __ptr_desc_type_node,
9984         __attr_desc_type_node, __func_desc_type_node,
9985         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
9986         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
9987         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
9988         enum_desc_type_node, class_desc_type_node,
9989         si_class_desc_type_node, vmi_class_desc_type_node,
9990         ptmd_desc_type_node, base_desc_type_node): New #defines.
9991         (tinfo_fn_id, tinfo_fn_type): Rename to ...
9992         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
9993         (tinfo_var_id): New enumeration.
9994         (DECL_TINFO_FN_P): Augment comment.
9995         * decl.c (cp_global_trees): Adjust documentation.
9996         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
9997         tinfo_decl_type and tinfo_var_id.
9998         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
9999         (build_typeid): Remove unused variable.
10000         (get_tinfo_var): Use tinfo_var_id.
10001         (tinfo_name): New static function.
10002         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
10003         (tinfo_from_decl): Likewise.
10004         (get_base_offset): New static function, broken out of
10005         expand_class_desc.
10006         (expand_si_desc): Use tinfo_name.
10007         (expand_class_desc): Likewise. Lose local static variable.
10008         Use base_desc_type_node. Use get_base_offset.
10009         (expand_ptr_desc): Use tinfo_name.
10010         (expand_attr_desc): Likewise.
10011         (expand_generic_desc): Likewise.
10012
10013         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
10014         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
10015
10016 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
10017
10018         * cp-tree.h (__eprintf): Remove declaration.
10019         * tree.c (__eprintf): Remove definition.
10020
10021 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
10022             Mark Mitchell  <mark@codesourcery.com>
10023
10024         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
10025         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
10026
10027 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
10028
10029         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
10030
10031 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
10032
10033         * cp-tree.h (register_dtor_fn): New function.
10034         * decl.c (destroy_local_static): Rename to ...
10035         (register_dtor_fn): ... this.  Give it external linkage.
10036         (expand_static_init): Use it.
10037         * decl2.c (do_static_initialization): Likewise, if using
10038         __cxa_atexit.
10039         (do_static_destruction): Check that __cxa_atexit is not in use.
10040         (finish_file): Don't call do_static_destruction if using
10041         __cxa_atexit.
10042
10043         * typeck.c (convert_arguments): Restore two-message error
10044         reporting.
10045
10046 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
10047
10048         Remap dynamic cast hint values to be consistent across ABIs.
10049         * search.c (dynamic_cast_base_recurse): Remap generated value.
10050         (get_dynamic_cast_base_type): Adjust documentation.
10051         * tinfo.h (__user_type_info::dyncast): Likewise.
10052         (__user_type_info::find_public_subobj): Remap BOFF meaning.
10053         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
10054         (__class_type_info::do_dyncast): Likewise.
10055         (__class_type_info::do_find_public_subobj): Likewise.
10056         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
10057
10058 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
10059
10060         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
10061
10062         * typeck2.c (incomplete_type_error): Restore previous
10063         cp_error and cp_error_at call sequence.
10064
10065 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
10066
10067         * class.c (dump_class_hierarchy): Make format agree with argument;
10068         cast pointer to unsigned long and print with %lx.
10069
10070 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
10071
10072         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
10073
10074         * typeck.c (composite_pointer_type, common_type,
10075         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
10076         build_function_call_real, convert_arguments,
10077         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
10078         build_unary_op, mark_addressable, build_compound_expr,
10079         build_static_cast, build_reinterpret_cast, build_const_cast,
10080         build_c_cast, build_modify_expr, get_delta_difference,
10081         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
10082         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
10083         into a single one.
10084         * typeck2.c (readonly_error, abstract_virtuals_error,
10085         process_init_constructor, check_for_new_type): Likewise.
10086
10087 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
10088
10089         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
10090         VAR_DECLs.
10091
10092 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
10093
10094         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
10095         (build_x_typeid): Likewise.
10096         (get_tinfo_fn): Likewise.
10097         (get_tinfo_fn_unused): Rename to ...
10098         (get_tinfo_decl): ... here.
10099         * rtti.c (build_headof): Replace logic error with assertion.
10100         (get_tinfo_fn_dynamic): Rename to ...
10101         (get_tinfo_decl_dynamic): ... here. Make static. Use
10102         complete_type_or_else.
10103         (build_x_typeid): Move into ...
10104         (build_typeid): ... here. Adjust call to
10105         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
10106         throw_bad_typeid expression.
10107         (get_tinfo_fn_unused): Rename to ...
10108         (get_tinfo_decl): ... here. Adjust comment.
10109         (get_tinfo_fn): Delete.
10110         (tinfo_from_decl): New static function.
10111         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
10112         (get_typeid): Use complete_type_or_else.
10113         (build_dynamic_cast_1): Adjust calls to
10114         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
10115         * parse.y (primary): Adjust call to build_typeid.
10116         * except.c (build_eh_type_type_ref): Adjust call to
10117         get_tinfo_decl. Mark as used.
10118         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
10119         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
10120         * parse.c: Regenerated.
10121
10122 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
10123
10124         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
10125         calling convention.
10126         (resolves_to_fixed_type_p): Document calling convention.
10127         * rtti.c (build_x_typeid): Initialize NONNULL.
10128
10129         * cp-tree.h (build_shared_int_cst): New function.
10130         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
10131         * class.c (modify_vtable_entry): Likewise.
10132         (add_virtual_function): Split out code to generated shared
10133         INTEGER_CSTs to build_share_int_cst.
10134         (modify_all_vtables): Handle all the overridden functions here.
10135         Add overridden functions from non-primary virtual bases to the
10136         primary vtable.
10137         (finish_struct_1): Adjust call to modify_all_vtables.  Add
10138         overridden functions from non-primary bases to the vtable.
10139         * tree.c (build_shared_int_cst): New function.
10140
10141         * cp-tree.h (scratchalloc): Remove.
10142         (build_scratch_list): Likewise.
10143         * call.c (convert_class_to_reference): Replace build_scratch_list
10144         and build_expr_list with build_tree_list.
10145         (add_candidate): Replace scratchalloc with expralloc.  Note memory
10146         leak.
10147         (build_user_type_conversion_1):  Replace build_scratch_list
10148         and build_expr_list with build_tree_list.
10149         (build_new_op): Likewise.
10150         (build_op_delete_call): Likewise.
10151         (convert_like): Likewise.
10152         * cvt.c (ocp_convert): Likewise.
10153         * decl.c (start_decl): Likewise.
10154         (start_function): Likewise.
10155         (finish_destructor_body): Likewise.
10156         (maybe_build_cleanup_1): Likewise.
10157         * decl2.c (reparse_decl_as_expr): Likewise.
10158         * init.c (perform_member_init): Likewise.
10159         (expand_cleanup_for_base): Likewise.
10160         (build_builtin_delete_call): Likewise.
10161         (build_new_1): Likewise.
10162         (build_delete): Likewise.
10163         * method.c (do_build_assign_ref): Likewise.
10164         * parse.y (already_scoped_stmt): Likewise.
10165         (nontrivial_exprlist): Likewise.
10166         (net_initializer): Likewise.
10167         (initlist): Likewise.
10168         * parse.c: Regenerated.
10169         * rtti.c (build_x_typeid): Likewise.
10170         (build_dynamic_cast_1): Likewise.
10171         * typeck.c (build_x_compound_expr): Likewise.
10172         (build_static_cast): Likewise.
10173         (build_modify_expr): Likewise.
10174
10175         * cp-tree.h (DECL_VINDEX): Add documentation.
10176         * class.c (build_vtable_entry): Likewise.
10177         (start_vtable): Add comment.
10178         (add_virtual_function): Replace pending_hard_virtuals with
10179         overridden_virtuals and pending_virtuals with new_virtuals.
10180         Replace redundant assignments with assertions.
10181         (check_for_override): Add comment.
10182         (check_bases_and_members): Replace pending_hard_virtuals with
10183         overridden_virtuals and pending_virtuals with new_virtuals.
10184         (create_vtbl_ptr): Likewise.
10185         (layout_class_type): Likewise.
10186         (finish_struct_1): Likewise.  Add comments.
10187
10188 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
10189
10190         * class.c (finish_struct_1): Replace redundant code with
10191         assertions.
10192
10193         * cp-tree.h (flag_new_abi): Move.
10194         (flag_use_cxa_atexit): Likewise.
10195         (flag_honor_std): Likewise.
10196         (flag_rtti): Likewise.
10197         (vbase_offsets_in_vtable_p): Define.
10198         (vptrs_present_everywhere_p): Likewise.
10199         (TYPE_CONTAINS_VPTR_P): Likewise.
10200         (dfs_walk_real): Declare.
10201         * class.c (build_vbase_pointer_fields): Check
10202         vbase_offsets_in_vtable_p.
10203         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
10204         BINFO_VPTR_FIELD.
10205         (build_vbase_offset_vtbl_entries): Simplify.
10206         (build_vbase_offset_vtbl_entries): Adjust.
10207         (build_vbase_pointer): Add ability to look up vbase offsets in
10208         vtable.
10209         (start_vtable): New function.
10210         (add_virtual_function): Use it.
10211         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
10212         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
10213         (build_vtbl_initializer): Take the type of the complete object as
10214         input.  Use it to correctly calculate vbase offsets.
10215         (dfs_finish_vtbls): Pass the complete type to
10216         build_vtbl_initializer.
10217         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
10218         (create_vtable_ptr): Create a vtable even if there are no
10219         new virtual functions, under the new ABI.
10220         (finish_struct_1): Likewise.
10221         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
10222         * decl.c (exapnd_static_init): Remove call to
10223         preserve_initializer.
10224         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
10225         vtables.
10226         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
10227         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
10228         (construct_virtual_bases): Don't initialize virtual base pointers
10229         under the new ABI.
10230         (build_aggr_init): Clean up comment.
10231         (expand_aggr_init_1): Likewise.
10232         * rtti.c (expand_class_desc): Store the virtual function table
10233         index where the vbase offset lives in the offset field.
10234         * search.c (dfs_walk_real): Make it global.
10235         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
10236         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
10237
10238         * tinfo.h (USItype): Make it signed under the new ABI.
10239         * tinfo.cc (convert_to_base): New function.  Encapsulate base
10240         conversion logic here.
10241         (__class_type_info::do_upcast): Use it.
10242         (__class_type_info::do_dyncast): Likewise.
10243         (__class_type_info::do_find_public_subobj): Likewise.
10244
10245         * init.c (construct_virtual_bases): Don't look up the addresses of
10246         virtual bases at run-time.
10247
10248         * class.c (build_vbase_pointer): Relocate.
10249         (build_vbase_pointer_fields): Likewise.
10250         (dfs_build_vbase_offset_vtbl_entries): Likewise.
10251         (build_vbase_offset_vtbl_entries): Likewise.
10252
10253         * decl.c (init_decl_processing): Complain if -fnew-abi
10254         -fno-vtable-thunks is used.
10255
10256         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
10257         flag_new_abi.
10258
10259 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
10260
10261         * cp-tree.h (num_extra_vtbl_entries): New function.
10262         (size_extra_vtbl_entries): Likewise.
10263         (dfs_vtable_path_unmark): Likewise.
10264         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
10265         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
10266         * class.c (num_extra_vtbl_entries): New function.
10267         (size_extra_vtbl_entries): Likewise.
10268         (dfs_build_vbase_offset_vtbl_entries): New function.
10269         (build_vbase_offset_vtbl_entries): Likewise.
10270         (build_vtbl_initializer): Use it.
10271         (finish_struct_1): Adjust vtable sizes (using
10272         num_extra_vtbl_entries).
10273         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
10274         THUNK_DECL is non-NULL before expanding it.
10275         * init.c (expand_virtual_init): Adjust the vtable pointer by
10276         size_extra_vtbl_entries before storing it.
10277         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
10278         Handle TREE_LIST parameters here, not in the dfs_* functions.
10279         (dfs_unmarked_real_bases_queue_p): Adjust.
10280         (dfs_marked_real_bases_queue_p): Likewise.
10281         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
10282         (dfs_vtable_path_marked_real_bases_queue_p): New function.
10283         (dfs_vtable_path_unmark): Likewise.
10284
10285 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
10286
10287         * optimize.c (copy_body_r): Clear the operand three of a
10288         TARGET_EXPR when copying it.
10289
10290 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10291
10292         * method.c (build_decl_overload_real): Check whether we are in ::
10293         before returning __builtin_new/delete.
10294
10295 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
10296
10297         * pt.c (tsubst_friend_function): Improve comment.
10298         (instantiate_decl): Avoid crashing when a "nested" function is
10299         instantiated from the top level.
10300
10301         * dump.c (dqeueue_and_dump): Dump
10302         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
10303
10304 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10305
10306         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
10307
10308 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
10309
10310         * g++spec.c (lang_specific_driver): Add -fnew-abi if
10311         ENABLE_NEW_GXX_ABI defined.
10312         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
10313         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
10314         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
10315
10316 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
10317
10318         * decl.c (start_cleanup_fn): Call pushdecl.
10319
10320         * call.c (convert_class_to_reference): Fix typos.
10321         (build_conditional_expr): Handle errors gracefully.
10322         * class.c (push_nested_class): Likewise.
10323         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
10324         (DECL_THIS_EXTERN): Use it.
10325         (DECL_THIS_STATIC): Likewise.
10326         * cvt.c (convert_to_void): Handle errors gracefully.
10327         (build_expr_type_conversion): Likewise.
10328         * decl.c (maybe_push_decl): Likewise.
10329         (start_decl_1): Likewise.
10330         (require_complete_types_for_parms): Likewise.
10331         * parse.y (structsp): Likewise.
10332         (base_class): Likewise.
10333         * parse.c: Regenerated.
10334         * pt.c (finish_member_template_decl): Likewise.
10335         * typeck.c (decay_conversion): Likewise.
10336
10337         * cp-tree.h (dfs_skip_vbases): New function.
10338         (find_vbase_instance): Likewise.
10339         * class.c (determine_primary_base): Allow a nearly empty base to
10340         serve as a primary base class under the new ABI.
10341         (get_class_offset_1): Rename to ...
10342         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
10343         messages here.
10344         (get_class_offset): Use it.  Issue error messages here.
10345         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
10346         find the right copies of virtual bases.
10347         (fixup_vtable_deltas1): Rename to ...
10348         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
10349         bases as primary bases.
10350         (fixup_vtable_deltas): Remove.
10351         (override_one_vtable): Handle virtual bases as primary bases.
10352         (merge_overrides): Likewise.
10353         (finish_struct_1): Likewise.
10354         (dump_class_hierarchy): Dump primary-ness of bases as well.
10355         * search.c (mark_primary_bases): Use a pre-order traversal to
10356         handle primary virtual bases.
10357         (dfs_skip_vbases): New fiunction.
10358         (expand_upcast_fixups): Adjust to handle primary virtual bases.
10359         (fixup_virtual_upcast_offsets): Likewise.
10360         (fixup_all_virtual_upcast_offsets): Likewise.
10361         (dfs_find_vbase_instances): New function.
10362         (find_vbase_instance): Likewise.
10363
10364 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
10365
10366         * lex.c (DIR_SEPARATOR): Delete macro.
10367
10368 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
10369
10370        * decl2.c (lang_decode_option): Handle automatic line wrapping
10371        option.
10372
10373 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
10374
10375         * friend.c (do_friend): Don't resolve scopes when processing
10376         template declarations, even if the qualifying scope doesn't
10377         involve template parameters.
10378
10379 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
10380
10381         * class.c (dfs_modify_vtables_queue_p): Remove.
10382         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
10383         and dfs_marked_real_bases_queue_p instead of
10384         dfs_modify_vtables_queue_p.
10385
10386         * class.c (build_vbase_path): Simplify.
10387         (dfs_propagate_binfo_offsets): New function.
10388         (propagate_binfo_offsets): Use it.
10389         (remove_base_field): Simplify.
10390         (dfs_set_offset_for_vbases): Remove.
10391         (dfs_set_offset_for_shared_vbases): New function.
10392         (dfs_set_offset_for_unshared_vbases): Likewise.
10393         (layout_virtual_bases): Use them.
10394         (layout_basetypes): Don't call propagate_binfo_offsets.
10395         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
10396         for the vbases.
10397
10398         * class.c (build_base_field): New function, split out from ...
10399         (build_base_fields): ... here.  Use it.  Allocate primary bases
10400         first, under the new ABI.
10401         (get_vtable_entry): Remove.
10402         (remove_base_field): New function, split out from ...
10403         (remove_base_fields): ... here.  Adjust since primary bases come
10404         first under the new ABI.
10405
10406         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
10407         (initialize_vtbl_ptrs): New function.
10408         (expand_indirect_vtbls_init): Change prototype.
10409         (convert_pointer_to_vbase): Declare.
10410         * init.c (expand_direct_vtbls_init): Remove.
10411         (dfs_initialize_vtbl_ptrs): New function.
10412         (initialize_vtbl_ptrs): Likewise.
10413         (emit_base_init): Use initialize_vtbl_ptrs.
10414         * search.c (convert_pointer_to_vbase): Make it global.
10415         (expand_indirect_vtbls_init): Remove vtable initialization code.
10416         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
10417
10418         * class.c (dfs_finish_vtbls): New function.
10419         (finish_vtbls): Use it.
10420         (dump_class_hierarchy): New function.
10421
10422         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
10423         (BINFO_VBASE_PRIMARY_P): New macro.
10424         (BINFO_VIRTUALS): Add to documentation.
10425         (SET_BINFO_PRIMARY_MARKED_P): Remove.
10426         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10427         (dfs_mark_primary_bases_queue_p): Likewise.
10428         (dfs_unmarked_real_bases_queue_p): New function.
10429         (dfs_marked_real_bases_queue_p): Likewise.
10430         * search.c (dfs_mark_primary_bases): Adjust.
10431         (mark_primary_bases): Likewise.
10432         (get_shared_vbase_if_not_primary): New function.
10433         (dfs_unmarked_real_bases_queue_p): Likewise.
10434         (dfs_marked_real_bases_queue_p): Likewise.
10435         (dfs_get_pure_virtuals): Simplify.
10436         (get_pure_virtuals): Likewise.
10437
10438 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10439
10440         * lex.c: Include tm_p.h.
10441
10442 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
10443
10444         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
10445
10446 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
10447
10448         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
10449         * pt.c (instantiate_decl): Defer comdat templates that might not be
10450         needed.
10451
10452         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
10453         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
10454         (finish_file): Likewise.
10455
10456         * decl2.c (import_export_class): Undo 12/14 change.
10457
10458         * error.c (dump_decl): operator new, not operatornew.
10459
10460         * class.c (field_decl_cmp): A nontype is "greater" than a type.
10461         * search.c (lookup_field_1): Look for the last field with the
10462         desired name.
10463
10464 2000-01-05  Nathan Sidwell  <nathan@acm.org>
10465
10466         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
10467         FUNCTION_DECL.
10468
10469 2000-01-05  Nathan Sidwell  <nathan@acm.org>
10470
10471         * typeck.c (build_static_cast): Don't strip target qualifiers
10472         when casting from a class.
10473
10474 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10475
10476         * class.c (warn_hidden): Initialize variable `fndecl'.
10477
10478 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
10479
10480         * decl.c (flag_isoc9x): New variable to be able to use code in
10481         c-common.c.  For now always zero.
10482
10483 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
10484
10485         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
10486         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
10487         or unshare_base_binfos for virtual bases here.
10488         * search.c (dfs_get_vbase_types): Do it here.
10489         (get_vbase_types): Adjust.
10490
10491 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
10492
10493         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
10494         (BINFO_PRIMARY_MARKED_P): Use flag 5.
10495         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
10496         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10497         (unmark_primary_bases): Remove declaration.
10498         (unmarkedp): Declare.
10499         (dfs_vbase_unmark): Likewise.
10500         * class.c (determine_primary_base): Return immediately if there
10501         are no base classes.  Call mark_primary_bases here.
10502         (modify_all_direct_vtables): Remove.
10503         (modify_all_indirect_vtables): Remove.
10504         (dfs_modify_vtables_queue_p): New function.
10505         (dfs_modify_vtables): New function.
10506         (modify_all_vtables): Use them.
10507         (build_base_fields): Build FIELD_DECLs for primary virtual base
10508         classes.
10509         (create_vtable_ptr): Don't call determine_primary_base here.
10510         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
10511         (dfs_set_offset_for_vbases): ... this.
10512         (layout_virtual_bases): Use it.
10513         (layout_class_type): Call determine_primary_base here.
10514         * search.c (unmarkedp): Make it global.
10515         (shared_marked_p): Simplify.
10516         (shared_unmarked_p): Likewise.
10517         (dfs_primary_bases_queue_p): Remove.
10518         (dfs_unmark_primary_bases): Likewise.
10519         (unmark_primary_bases): Likewise.
10520         (mark_primary_bases): Simplify.
10521         (get_pure_virtuals): Don't call mark_primary_bases here.
10522         (dfs_vbase_unmark): New function.
10523         (get_vbase_types): Simplify.
10524
10525         * class.c (struct base_info): Remove.
10526         (determine_primary_base): Take has_virtual_p rather than a
10527         base_info as input.  Don't calculate max_has_virtual.
10528         (finish_struct_bits): Remove max_has_virtual argument.
10529         (create_vtable_ptr): Remove max_has_virtual_p argument.
10530         (layout_virtual_bases): Remove max argument.
10531         (layout_basetypes): Likewise.
10532         (layout_class_type): Remove max_has_virtual_p argument.
10533         (finish_struct_1): Remove max_has_virtual.
10534
10535         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
10536         (layout_basetypes): Remove.
10537         * class.c (propagate_binfo_offsets): Moved here from tree.c.
10538         Update to handle primary virtual bases.
10539         (remove_base_fields): New function, split out from
10540         layout_basetypes.
10541         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
10542         (layout_virtual_bases): New function, split out from
10543         layout_basetypes.  Update to handle primary virtual bases.
10544         (layout_basetypes): Moved here from tree.c.  Use
10545         remove_base_fields and layout_virtual_bases.
10546         * search.c (dfs_mark_primary_bases_queue_p): New function.
10547         (mark_primary_bases): Use it.
10548         * tree.c (CEIL): Remove.
10549         (propagate_binfo_offsets): Remove.
10550         (layout_basetypes): Remove.
10551
10552 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
10553
10554         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
10555         (BINFO_PRIMARY_MARKED_P): New macro.
10556         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
10557         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10558         (mark_primary_bases): New function.
10559         (unmark_primary_bases): Likewise.
10560         * search.c (get_abstract_virtuals_1): Remove.
10561         (dfs_mark_primary_bases): New function.
10562         (mark_primary_bases): Likewise.
10563         (dfs_unmark_primary_bases): Likewise.
10564         (unmark_primary_bases): Likewise.
10565         (dfs_get_pure_virtuals): Likewise.
10566
10567 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
10568
10569         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
10570         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
10571         (modify_one_vtable): Adjust.
10572         (fixup_vtable_deltas1): Likewise.
10573         (override_one_vtable): Likewise.
10574         * search.c (get_abstract_virtuals_1): Likewise.
10575         (get_pure_virtuals): Likewise.
10576         (expand_upcast_fixups): Likewise.
10577         * tree.c (debug_binfo): Likewise.
10578
10579         * class.c (build_vtable): Don't return a value.  Don't rebuild
10580         vtables for bases that have already been handled.
10581         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
10582         already been handled.
10583         (modify_one_vtable): Adjust accordingly.
10584         (fixup_vtable_deltas1): Likewise.
10585         (finish_struct_1): Likewise.
10586
10587 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10588
10589         * call.c (build_new_method_call): Also check destructors.