OSDN Git Service

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