OSDN Git Service

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