OSDN Git Service

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