OSDN Git Service

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