OSDN Git Service

* c-common.c (flag_ms_extensions): Move from c++ front end.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2002-06-16  Richard Henderson  <rth@redhat.com>
2
3         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4
5 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
6
7         * cp-tree.h (compiler_error): Remove declaration.
8         * lex.c (compiler_error): Remove definition.
9
10 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
11
12         * g++spec.c (LIBUNWIND): New.
13         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
14
15 2002-06-13  Jessica Han  <jessica@cup.hp.com>
16
17         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
18         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
19         (build_vbase_offset_vtbl_entries): Likewise.
20         * rtti.c (build_headof): Likewise.
21         (get_tinfo_decl_dynamic): Likewise.
22         (create_pseudo_type_info): Likewise.
23
24 2002-06-12  Stan Shebs  <shebs@apple.com>
25
26         * mpw-config.in: Remove file, no longer used.
27         * mpw-make.sed: Ditto.
28
29 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
30
31         * decl2.c: Update call to cpp_handle_option.
32
33 2002-06-07  H.J. Lu  (hjl@gnu.org)
34
35         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
36
37 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
38
39         * error.c (cp_error_at): Fix typo.
40
41 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
42
43         * error.c (cp_diagnostic_starter): Adjust call.
44         (maybe_print_instantiation_context): Change prototype to take a
45         'diagnostic_info *'.
46         (print_instantiation_full_context): Likewise.
47         (print_instantiation_partial_context): Likewise.
48         (cp_diagnostic_starter): Likewise.
49         (cp_diagnostic_finalizer): Likewise.
50         (cp_print_error_function): Likewise.
51         (cp_printer): Take a secondary parameter as a 'text_info *'.
52         Remove output_state savings.  Adjust calls.
53
54 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
55
56         * pt.c (inline_parm_levels): Mark for GC.
57
58         * mangle.c (start_mangling): Allocate G.substitutions here...
59         (init_mangle): ... rather than here.
60         (finish_mangling): Clear the varray pointer when done with it.
61         * spew.c (yylexstring): Don't use VARRAY_FREE. 
62         * search.c (bfs_walk): Don't use VARRAY_FREE. 
63         * decl2.c (pending_statics): Use gengtype to mark.
64         (deferred_fns): Likewise.
65         (ssdf_decls): Likewise.
66         (init_decl2): Delete.
67         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
68         (cxx_init_decl_processing): Don't call init_decl2.
69         (cxx_pop_function_context): Don't use VARRAY_FREE.
70         * cp-tree.h (struct saved_scope): No need for special marking
71         of varrays.
72         (struct language_function): Likewise.
73         (local_classes): Use gengtype to mark.
74         (init_decl2): Delete prototype.
75         * class.c (init_class_processing): Don't use
76         ggc_add_tree_varray_root.
77         (build_vtbl_initializer): Don't use VARRAY_FREE.
78
79         * decl.c (typename_compare): Don't use same_type_p.
80
81         * decl.c: Include hashtab.h instead of hash.h.
82         (typename_hash): Update to use htab_h.
83         (typename_compare): Likewise.
84         (typename_htab): Use gengtype to mark.
85         (build_typename_type): Update to use htab_h.
86         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
87
88         * Make-lang.in (gt-cp-tree.h): New rule.
89         (cp/tree.o): Depend on gt-cp-tree.h.
90         * config-lang.in (gtfiles): Add cp/tree.c.
91         * tree.c: Include gt-cp-tree.h.
92         (list_hash_table): Use gengtype to mark.
93         (init_tree): Use gengtype to mark trees.
94
95         * Make-lang.in (cp/decl.o): Add debug.h dependency.
96         * call.c (struct z_candidate): Use gengtype.
97         (USER_CONV_CAND): Use WRAPPER_ZC.
98         (convert_class_to_reference): Use build_zc_wrapper.
99         (build_type_conversion_1): Likewise.
100         (build_over_call): Use WRAPPER_ZC.
101         (add_warning): Use build_zc_wrapper.
102         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
103         * cp-tree.h (struct lang_identifier): Use gengtype.
104         (struct template_parm_index_s): Likewise.
105         (struct ptrmem_cst): Likewise.
106         (struct tree_binding): Likewise.
107         (struct tree_overload): Likewise.
108         (struct tree_srcloc): Likewise.
109         (struct tree_wrapper): Likewise.  Also modify to have a pointer
110         to struct z_candidate rather than void.
111         (enum cp_tree_node_structure_enum): New.
112         (union lang_tree_node): New.
113         (cxx_mark_tree): Delete prototype.
114         (cp_tree_node_structure): New prototype.
115         (build_ptr_wrapper): Delete prototype.
116         (build_int_wrapper): Delete prototype.
117         (build_zc_wrapper): New prototype.
118         * decl.c: Include debug.h
119         (cxx_mark_tree): Delete.
120         (cp_tree_node_structure): New.
121         * tree.c (build_ptr_wrapper): Delete.
122         (build_int_wrapper): Delete.
123         (build_zc_wrapper): New.
124
125         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
126         Correct typo.  Patch from k_fukui@highway.ne.jp.
127
128         * semantics.c (current_stmt_tree): Update for change to
129         struct language_function.
130         (finish_mem_initializers): Likewise.
131         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
132         * cp-tree.h (struct language_function): Rename from
133         cp_language_function.  Change all uses.
134         (cp_function_chain): Don't need to cast.
135
136         * class.c (duplicate_tag_error): Reset discriminator.
137         (check_bases_and_members): Update for data structure changes.
138         * cp-tree.h (struct lang_id2): Use gengtype.
139         (flagged_type_tree): Likewise.
140         (SET_LANG_ID): Use GGC on struct lang_id2.
141         (struct cp_language_function): Use gengtype.  Remove field
142         'x_vcalls_possible_p'.
143         (current_vcalls_possible_p): Delete.
144         (struct lang_type_header): New.
145         (struct lang_type_class): Rename from struct lang_type.  Include
146         struct lang_type_header.
147         (struct lang_type_ptrmem): New.
148         (struct lang_type): New.
149         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
150         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
151         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
152         (struct lang_decl_flags): Use gengtype.  Add discriminators.
153         (struct lang_decl): Use gengtype.  Add and use discriminators.
154         Update the macros that reference moved fields.
155         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
156         (SET_DECL_THUNK_P): Set discriminator too.
157         (clear_inline_text_obstack): Delete prototype.
158         (finish_inline_definitions): Delete prototype.
159         (mark_pending_inlines): Delete prototype.
160         (lang_check_failed): New prototype.
161         * decl.c (struct named_label_use_list): Use gengtype.
162         (struct named_label_list): Likewise.
163         (mark_binding_level): Delete.
164         (mark_named_label_lists): Delete.
165         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
166         (cxx_init_decl_processing): Use generated marker routine.
167         (begin_destructor_body): Delete dead set to
168         current_vcalls_possible_p.
169         (mark_lang_function): Delete.
170         (mark_cp_function_context): Delete.
171         (lang_mark_tree): Use generated marker routines.
172         * decl2.c (start_objects): Set discriminator when setting
173         GLOBAL_INIT_PRIORITY.
174         * lex.c (retrofit_lang_decl): Set discriminators.
175         (copy_lang_type): Update for changes to lang_type structure.
176         (cp_make_lang_type): Set discriminator.
177         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
178         * search.c: Include ggc.h.
179         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
180         (finish_inline_definitions): Delete.
181         * spew.c (struct token): Use gengtype.
182         (struct token_chunk): New.
183         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
184         (struct feed): Use gengtype.
185         (feed_obstack): Delete.
186         (feed): Mark as GC root.
187         (pending_inlines): Mark as GC root.
188         (pending_inlines_tail): Likewise.
189         (processing_these_inlines): Likewise.
190         (token_obstack): Make static.
191         (first_token): Likewise.
192         (init_spew): Don't initialise deleted things; use gengtype for roots.
193         (clear_inline_text_obstack): Delete.
194         (feed_input): Use GC for struct feed.  Update for changes to
195         struct unparsed_text.
196         (mark_pending_inlines): Delete.
197         (next_token): Rename from add_token.  Change all callers.  Update
198         for changes to struct unparsed_text.
199         (space_for_token): New.
200         (remove_last_token): New.
201         (alloc_unparsed_text): New.
202         (snarf_block): Take an unparsed_text.  Update for changes to struct
203         unparsed_text.
204         (snarf_method): Update for changes to struct unparsed_text.
205         (snarf_defarg): Update for changes to struct unparsed_text.
206         * tree.c (lang_check_failed): New.
207
208         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
209         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
210         (cp/spew.o): Add dependency on gt-<filename>.h.
211         (cp/decl2.o): Add dependency on gt-<filename>.h.
212         (cp/call.o): Add dependency on gt-<filename>.h.
213         (cp/pt.o): Add dependency on gt-<filename>.h.
214         (cp/repo.o): Add dependency on gt-<filename>.h.
215         (cp/parse.o): Add dependency on gt-<filename>.h.
216         * call.c: Use gengtype for roots.
217         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
218         decl2.c parse.y pt.c repo.c spew.c.
219         * cp-tree.h: Use gengtype for roots.
220         (struct saved_scope): Use GGC, gengtype.
221         (cp_parse_init): Delete prototype.
222         (init_pt): Delete prototype.
223         * decl.c: Use gengtype for roots.
224         (mark_saved_scope): Delete.
225         (cxx_init_decl_processing): Don't call deleted initilisation
226         routines.
227         (signed_size_zero_node): Delete, unused.
228         * decl.h: Use gengtype for roots.
229         * decl2.c: Use gengtype for roots.
230         * lex.h: Use gengtype for roots.
231         * parse.y: Use gengtype for roots.
232         (cp_parse_init): Delete.
233         * pt.c: Use gengtype for roots.
234         (init_pt): Delete.
235         * repo.c: Use gengtype for roots.
236         * spew.c: Use gengtype for roots.
237
238         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
239         (cp/decl.o): Add dependency on gtype-cp.h.
240         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
241         Include gtype-cp.h.  Allow for filename changes.
242
243         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
244         (cp/decl.o): Add cp/gt-decl.h dependency.
245         * config-lang.in (gtfiles): New.
246         * tree.h: Rename struct binding_level to struct cp_binding_level.
247         * decl.c: Rename struct binding_level to struct cp_binding_level.
248         Include cp/gt-decl.h.
249         (struct cp_binding_level): Use gengtype.
250         (make_binding_level): Use GGC on struct cp_binding_level.
251         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
252         (cxx_init_decl_processing): Mark free_binding_level as
253         deletable.
254
255         * decl.c (mark_cp_function_context): Update calling sequence.
256
257         * decl.c (start_function): Don't free 'struct
258         cp_language_function'.
259         (pop_cp_function_context): Likewise.
260         (save_function_data): Allocate it using GC.
261         * semantics.c (genrtl_start_function): Don't free 'struct
262         cp_language_function'.
263
264 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
265
266         * lang-specs.h: Use cpp_debug_options.
267
268 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
269
270         * mangle.c, tree.c: Include real.h.
271         * Make-lang.in: Update dependency lists.
272
273 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
274
275         * lex.c: Don't include c-lex.h.
276         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
277
278 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
279
280         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
281
282 2002-05-22  Richard Henderson  <rth@redhat.com>
283
284         * decl.c (obscure_complex_init): Check for VAR_DECL
285         before using DECL_THREAD_LOCAL.
286
287 2002-05-22  Richard Henderson  <rth@redhat.com>
288
289         * decl.c (check_tag_decl): Handle RID_THREAD.
290         (obscure_complex_init): Reject run-time init of tls.
291         (grokvardecl, grokdeclarator): Handle RID_THREAD.
292         * lex.c (reswords): Add __thread.
293         (rid_to_yy): Map RID_THREAD to SCSPEC.
294
295 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
296
297         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
298         * cp-tree.h (cxx_post_options): Kill.
299         * cp-lex.c (cxx_post_options): Kill.
300
301 2002-05-21  Richard Henderson  <rth@redhat.com>
302
303         * lex.c (rid_to_yy): Add RID_THREAD.
304
305 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
306
307         * init.c (build_vec_init): Test for trivial copy-assignment when
308         copy-assigning arrays.
309
310 2002-05-20  Andreas Jaeger  <aj@suse.de>
311
312         * init.c (build_default_init): Remove unused variable.
313
314 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
315
316         * call.c (any_strictly_viable): New.
317         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
318
319 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
320
321         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
322
323 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
324
325         PR c++/186, DR 259
326         * pt.c (do_decl_instantiation): Don't complain explicit
327         instantiation after explicit specialization.
328         (do_type_instantiation): Likewise.
329
330 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
331
332         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
333         renamed from...
334         (complete_type_or_else): ... this.  Redefined as macro.
335         (cxx_incomplete_type_diagnostic): Declare.
336         (cxx_incomplete_type_error): Define as macro.
337         * init.c (build_delete): Warn about incomplete types other than
338         void, and use the built-in operator delete for them.
339         * typeck.c (complete_type_or_diagnostic): Renamed from
340         complete_type_or_else.  Added warn_only argument, passed to...
341         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
342         warnings or errors depending on new warn_only argument.  Renamed
343         from...
344         (cxx_incomplete_type_error): ... this.  New implementation in
345         terms of cxx_incomplete_type_diagnostic.
346
347 2002-05-18  Jason Merrill  <jason@redhat.com>
348
349         * decl2.c (import_export_decl): If we clear
350         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
351
352 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
353
354         PR c++/6620
355         * pt.c (verify_class_unification): Don't check if PARM is template
356         parameter dependent.  Simplify.
357         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
358         parameter dependent expression.
359
360 2002-05-14  Jason Merrill  <jason@redhat.com>
361
362         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
363         Do set DECL_COMDAT.
364         (synthesize_tinfo_var): Take the public decl.
365         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
366         (emit_tinfo_decl): Adjust.  Call import_export_decl.
367         * decl2.c (import_export_decl): Simplify tinfo decl handling.
368
369 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
370
371         * cp-tree.h (struct lang_type): Added non_zero_init.
372         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
373         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
374         * class.c (check_field_decls): Test non_zero_init.
375         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
376         zero-to-NULL conversions.
377         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
378         type that needs zero-initialization without zeros.
379         (check_initializer_decl): Compute zero-initializer for types
380         that require a non-trivial one.
381         * init.c (build_forced_zero_init): New function.
382         (build_default_init): Use it.
383         * tree.c (zero_init_p): New function.
384         * typeck2.c (force_store_init_value): New function.
385         (process_init_constructor): Create non-trivial zero-initializers
386         for array members and class fields.
387
388 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
389
390         * lang-specs.h: Remove redundant -lang-c++.
391
392 2002-05-13  Jason Merrill  <jason@redhat.com>
393
394         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
395         (fixed_type_or_null): See through reference vars.
396         (build_base_path): Vtable contents are constant.
397         * typeck.c (get_member_function_from_ptrfunc): Likewise.
398
399 2002-05-12  Jason Merrill  <jason@redhat.com>
400
401         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
402         structs are safe.
403
404 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
405
406         * cp-tree.h (flag_ansi): Remove.
407         * decl2.c (flag_ansi): Remove.
408         (cxx_decode_option): Set flag_iso and flag_undef.
409
410 2002-05-09  Jason Merrill  <jason@redhat.com>
411
412         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
413         Use subtraction rather than a bitmask to get the index.
414         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
415
416         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
417
418 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
419
420         * Make-lang.in (decl2.o): Update.
421         * cp-tree.h (warn_multichar): Remove.
422         * decl2.c: Include c-common.h.
423         (warn_multichar): Remove.
424
425 2002-05-03  Jason Merrill  <jason@redhat.com>
426
427         * tree.c (build_cplus_array_type): Only const and volatile get
428         special handling.
429
430         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
431
432 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
433
434         ABI change, returning simple classes from functions.
435         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
436         TYPE_HAS_TRIVIAL_INIT_REF is false or
437         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
438
439 2002-04-30  Jason Merrill  <jason@redhat.com>
440
441         PR debug/6436
442         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
443         anonymous class with a typedef if there are attributes.
444
445 2002-04-29  Paul Eggert  <eggert@twinsun.com>
446
447         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
448
449 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
450
451         PR c++/6477
452         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
453         non-NULL first.
454
455 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
456
457         PR c++/6492
458         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
459         enter that scope before name lookup.
460
461         PR c++/6486
462         * method.c (do_build_copy_constructor): Avoid building
463         cv-qualified reference types.
464
465 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
466
467         PR c++/5719
468         * decl.c (grok_op_properties): Assignment ops don't have to return
469         by value. operator% should.
470
471 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
472
473         PR c/6343
474         * decl.c (duplicate_decls): Call merge_weak.
475
476 2002-04-26  Richard Henderson  <rth@redhat.com>
477
478         * parse.y (malloced_yyss, malloced_yyvs): New.
479         (yyoverflow): Re-add.  Set them.
480         (free_parser_stacks): New.
481
482 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
483
484         PR c++/6497
485         * method.c (do_build_assign_ref): Pass a derivation to
486         build_method_call when calling base class assignment operators.
487
488 2002-04-26  Richard Henderson  <rth@redhat.com>
489
490         * parse.y (yyoverflow): Revert.
491
492 2002-04-26  Richard Henderson  <rth@redhat.com>
493
494         PR c/3581
495         * parse.y (string): Remove.  Update all uses to use STRING
496         instead, and not call combine_strings.
497         * rtti.c (tinfo_name): Use fix_string_type.
498         * semantics.c (finish_asm_stmt): Don't call combine_strings.
499         * spew.c (yylexstring): New.
500         (read_token): Use it.
501
502 2002-04-25  Richard Henderson  <rth@redhat.com>
503
504         PR c/2161
505         * parse.y (yyoverflow): New.
506
507 2002-04-25  Jason Merrill  <jason@redhat.com>
508
509         PR c++/5607
510         * search.c (check_final_overrider): No longer static.
511         * class.c (update_vtable_entry_for_fn): Call it.
512         * cp-tree.h: Adjust.
513
514 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
515
516         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
517         * cp-tree.h (cxx_set_yydebug): Die.
518         * lex.c (YYDEBUG): Get from c-lex.h.
519         (cxx_set_yydebug): Remove.
520         * parse.y: Include c-lex.h.
521         (YYDEBUG): Get from c-lex.h.
522
523 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
524
525         PR c++/6438.
526         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
527         void.
528
529 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
530
531         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
532         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
533         Redefine.
534         * cp-tree.h (cp_attribute_table): Rename.
535         * decl.c (lang_attribute_table): Remove declaration.
536         (cxx_init_decl_processing): Don't set it.
537         * tree.c (cp_attribute_table): Rename.
538
539 2002-04-24  Jason Merrill  <jason@redhat.com>
540
541         PR c++/6331
542         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
543         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
544         The pedwarn for array assignment is now unconditional.
545         * tree.c (build_cplus_array_type_1): Still process simple array types
546         normally in templates.
547
548         PR c++/6395
549         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
550         stuff for comdats.
551
552 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
553
554         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
555         node with attributes.
556
557 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
558
559         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
560         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
561
562 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
563
564         PR c++/6256:
565         * pt.c (tsubst_friend_class): Handle templates with explicit
566         nested names.
567
568         PR c++/6331:
569         * typeck.c (merge_types): Remember the cv-qualification of pointer
570         types when merging them.
571
572 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
573
574         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
575         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
576         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
577         cxx_mark_function_context): New.
578         * decl.c (push_cp_function_context, pop_cp_function_context,
579         mark_cp_function_context): Rename for consistency.
580         (cxx_init_decl_processing): Don't set old hooks.
581
582 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
583
584         * call.c (convert_type_from_ellipsis): Rename, update.
585         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
586         * cp-tree.h (convert_type_from_ellipsis): Rename.
587         * decl.c (cxx_init_decl_processing): Don't set hook.
588
589 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
590
591         * call.c (build_new_method_call): Update.
592         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
593         * cp-tree.h (cxx_incomplete_type_error): New.
594         * decl.c (grokdeclarator, grokparms): Update.
595         * decl2.c (check_classfn): Update.
596         * pt.c (tsubst): Update.
597         * typeck.c (complete_type_or_else, expr_sizeof,
598         decay_conversion): Update.
599         * typeck2.c (incomplete_type_error): Rename.
600         (add_exception_specifier): Update.
601
602 2002-04-18  Jason Merrill  <jason@redhat.com>
603
604         PR c++/5658
605         * search.c (setup_class_bindings): A class template qualifies as a
606         type binding.
607
608 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
609
610         PR c++/6316
611         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
612         before expanding.
613
614 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
615
616         * init.c (begin_init_stmts): Remove commented out code.
617         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
618         * semantics.c (begin_gobal_stmt_expr): Adjust call to
619         expand_start_stmt_expr.
620
621 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
622
623         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
624         dso_handle itself, to __cxa_atexit.
625
626 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
627
628         * error.c (cxx_print_error_function): Adjust call to macros.
629
630 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
631
632         * class.c (layout_virtual_bases): Do all dsize computation on trees.
633
634 2002-04-14  Jason Merrill  <jason@redhat.com>
635
636         * typeck.c (get_member_function_from_ptrfunc): Don't do
637         gratuitious division and multiplication on
638         ptrmemfunc_vbit_in_delta targets.
639
640 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
641
642         PR c++/5373.
643         * semantics.c (finish_expr_stmt): Remember the type of the
644         expression before any conversions are performed.
645
646 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
647
648         PR c++/5189.
649         * call.c (add_template_candidate_real): Do not treat member
650         templates as copy constructors.
651
652 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
653
654         * decl.c (duplicate_decls): Do not copy the RTL for a variable
655         declaration if the old variable had an incomplete type and the new
656         variable does not.
657         (complete_vars): Do not call layout_decl for completed variables.
658
659 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
660
661         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
662         with an explicit one.
663         (follow_tag_typedef): New.
664         (lookup_tag): Use it to extract the tag of an explicit typedef.
665         (xref_tag): Likewise.
666
667 2002-04-11  Andrew Haley  <aph@redhat.com>
668
669         * typeck.c (type_after_usual_arithmetic_conversions):
670         If two types have the same variant, return immediately.
671         When two floating-point operands are the same precision:
672           convert to float if one of the operands is float;
673           if neither operand is one of the standard types, return the type
674           of the first operand.
675
676 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
677
678         PR c++/5507
679         * decl.c (make_typename_type): Remove implicit typenameness.
680
681 2002-04-09  Jason Merrill  <jason@redhat.com>
682
683         PR optimization/6189
684         * semantics.c (genrtl_start_function): Don't free
685         DECL_SAVED_FUNCTION_DATA for inline functions.
686
687         * init.c (build_member_call): For now, don't convert to
688         intermediate base if it would cause an error.
689
690 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
691
692         * parse.y (namespace_qualifier, maybe_identifier,
693         begin_explicit_instantiation, end_explicit_instantiation,
694         apparent_template_type, .finish_template_type,
695         do_id, maybe_init, defarg_again, component_decl_1):
696         Add ending ';', in accordance with POSIX.
697
698 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
699
700         PR c++/5571
701         * class.c (layout_class_type): Remember incomplete static
702         variables.
703         (finish_struct_1): Call complete_vars, not
704         hack_incomplete_structures.
705         * cp-tree.h (hack_incomplete_structures): Rename to ...
706         (complete_vars): ... this.
707         (struct saved_scope): Remove incomplete.
708         (namespace_scope_incomplete): Remove.
709         * decl.c (struct binding_level): Remove incomplete.
710         (incomplete_vars): New variable.
711         (mark_binding_level): Don't mark incomplete.
712         (print_binding_level): Don't print it.
713         (mark_saved_scope): Don't mark incomplete.
714         (pushdecl): Use maybe_register_incopmlete_var.
715         (cxx_init_decl_processing): Register incomplete_vars for GC.
716         (start_decl_1): Clarify error message.
717         (hack_incomplete_vars): Remove.
718         (maybe_register_incomplete_var): New function.
719         (complete_vars): Likewise.
720
721 2002-04-06  Jason Merrill  <jason@redhat.com>
722
723         PR c++/4934
724         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
725         set before checking it.
726
727         PR c++/525
728         * init.c (build_member_call): Use build_scoped_ref.
729         (resolve_offset_ref): Likewise.
730         * call.c (build_scoped_method_call): Likewise.
731         * tree.c (maybe_dummy_object): Kludge around current_class_type being
732         wrong.
733         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
734         * cp-tree.h: Adjust.
735
736         * init.c (push_base_cleanups): Just use build_scoped_method_call.
737
738         PR c++/6179
739         * method.c (implicitly_declare_fn): Pass unqualified type to
740         synthesize_exception_spec.
741
742 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
743
744         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
745         * cvt.c: Update comment.
746         * init.c (expand_cleanup_for_base): Update.
747         * semantics.c (finish_parenthesized_expr): Update.
748         * typeck.c (cp_truthvalue_conversion): Update.
749
750 2002-04-04  Jason Merrill  <jason@redhat.com>
751
752         * semantics.c (finish_eh_cleanup): New fn.
753         * cp-tree.h: Add prototype.
754         * init.c (perform_member_init, expand_cleanup_for_base): Use
755         finish_eh_cleanup.
756         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
757         * cp-tree.h: Remove references.
758         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
759         * dump.c (cp_dump_tree): Likewise.
760         * pt.c (tsubst_expr): Likewise.
761         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
762         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
763         * tree.c (cp_statement_code_p): Likewise.
764
765         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
766
767         PR c++/5636
768         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
769         cleanup for nrv.
770
771         PR c++/5104
772         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
773         specifiers.
774         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
775
776 2002-04-03  Richard Henderson  <rth@redhat.com>
777
778         * cp-lang.c (cxx_warn_unused_global_decl): New.
779         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
780
781 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
782
783         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
784         * tree.c (init_tree): Don't set hook.
785
786 2002-04-03  Roger Sayle  <roger@eyesopen.com>
787
788         PR c++/5998:
789         * decl.c (duplicate_decls): Don't mess with assembler names when
790         redeclaring builtin functions as static.
791
792 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
793
794         * call.c (build_addr_func): Update.
795         * class.c (resolve_address_of_overloaded_function): Update.
796         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
797         * cp-tree.h (cxx_mark_addressable): New.
798         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
799         * decl2.c (build_cleanup): Update.
800         * except.c (build_throw): Update.
801         * init.c (resolve_offset_ref): Update.
802         * pt.c (convert_nontype_argument): Update.
803         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
804         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
805         unary_complex_lvalue): Update.
806         (mark_addressable): Rename.
807
808 2002-04-01  Roger Sayle  <roger@eyesopen.com>
809
810         PR c++/5998:
811         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
812         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
813         but follow the SET_DECL_RTL idiom used elsewhere in the function.
814
815 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
816
817         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
818         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
819         * decl.c (grokdeclarator): Update.
820         * mangle.c (write_integer_cst): Update.
821         * typeck.c (build_binary_op): Update.
822
823 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
824
825         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
826         * lex.c (cxx_init): Don't set hook.
827
828 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
829
830         * Make-lang.in (error.o): Update.
831         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
832         * cp-tree.h (struct diagnostic_context): Predeclare.
833         (cxx_print_error_function): New.
834         * error.c: Include langhooks-def.h.
835         (lang_print_error_function): Rename.  Update.
836         (init_error): Don't set hook.
837
838 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
839
840         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
841         Redefine.
842         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
843         * decl.c (finish_enum): Similarly.
844         * error.c (dump_type): Similarly.
845         * lex.c (cxx_init): Similarly.
846         * mangle.c (write_builtin_type): Similarly.
847         * typeck.c (comptypes): Similarly.
848
849 2002-03-28  Roger Sayle  <roger@eyesopen.com>
850
851         PR c++/5998:
852         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
853         in the g++ front-end.
854         (duplicate_decl): Allow redefinition of anticipated built-ins.
855         Fix inlining problem by over-writing the old DECL_RTL.
856         (lookup_namespace_name): Fail to find an identifier in the
857         specified namespace if its still anticipated.
858         (builtin_function_1): New function split out from builtin_function
859         to create a builtin in the current namespace with given context.
860         (builtin_function): Call builtin_function_1 to define the
861         appropriate builtins in both the std and global namespaces.
862         (select_decl): Don't test for anticipated decls here.
863         (unqualified_namespace_lookup): Instead ignore them whilst
864         searching through scopes and namespaces.
865         * decl2.c (do_nonmember_using_decl): If a using declaration
866         specifies an anticipated built-in function, mark it as no longer
867         anticipated in that scope.
868         (ambiguous_decl):  Avoid resolving to an anticipated decl.
869         * lex.c (do_scoped_id): Fail to find an identifier in the global
870         namespace if its still anticipated.
871
872 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
873
874         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
875         * cp-tree.h (cp_make_lang_type): Rename.
876         * lex.c (cp_make_lang_type): Rename.
877         (make_aggr_type): Update.
878         * tree.c (init_tree): Don't set make_lang_type_fn.
879
880 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
881
882         PR c++/6073
883         * class.c (finish_struct_1): Update static field's DECL_MODE even
884         if its type is a variant of t.
885
886 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
887
888         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
889         * cp-tree.h (cxx_insert_default_attributes): New.
890         * decl.c (insert_default_attributes): Rename.
891
892 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
893
894         PR c++/4884
895         * call.c (build_op_delete_call): Allow for the fact the placement
896         may be a COMPOUND_EXPR.
897
898 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
899
900         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
901         * cp-tree.h (init_cplus_expand): Remove.
902         (cxx_expand_expr): New.
903         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
904         fix prototype.
905         (init_cplus_expand): Remove.
906         * lex.c (cxx_init): Don't call init_cplus_expand.
907
908 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
909
910         PR c++/4884.
911         * init.c (build_new_1): Allow for the fact the result of
912         build_function_call may be a COMPOUND_EXPR.
913
914 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
915
916         PR c++/5682
917         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
918         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
919         (dfs_skip_nonprimary_vbases_markedp): Remove.
920         * search.c (get_shared_vbase_if_not_primary): Remove.
921         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
922         (dfs_skip_nonprimary_vbases_markedp): Remove.
923         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
924         (dfs_marked_real_bases_queue_p): Likewise.
925
926 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
927
928         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
929         * cp-tree.h (cxx_mark_tree): New.
930         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
931
932 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
933
934         * cp-tree.h (cxx_maybe_build_cleanup): New.
935         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
936         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
937         * tree.c (build_target_expr): Update.
938         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
939
940 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
941
942         * decl2.c (cxx_decode_option): Handle -E.
943         * lang-specs.h (default_compilers): Preprocess with cc1plus.
944         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
945
946 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
947
948         PR c++/6037
949         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
950
951 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
952
953         * error.c (dump_type): Be careful about implicit typenames.
954
955 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
956
957         PR C++/3656
958         * semantics.c (finish_base_specifier): Handle erronous base
959         classes.
960
961 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
962
963         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
964         REAL_IS_NOT_DOUBLE.
965
966 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
967
968         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
969         an index into the vtable_entry array regardless of
970         TARGET_PTRMEMFUNC_VBIT_LOCATION.
971
972 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
973
974         * tree.c (cp_cannot_inline_tree_fn): Same.
975
976 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
977
978         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
979         insert_block, getdecls, global_bindings_p): New.
980
981 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
982
983         PR c++/4361
984         * mangle.c (struct globals) Add internal_mangling_p member.
985         (write_template_param): Do internal mangling, if needed.
986         (mangle_conv_op_name_for_type): Request internal mangling.
987
988 2002-03-20  Jason Merrill  <jason@redhat.com>
989
990         PR c++/2136
991         * init.c (build_delete): Check access for a member op delete here.
992         * decl2.c (delete_sanity): Not here.
993
994 2002-03-19  Jason Merrill  <jason@redhat.com>
995
996         PR c++/5118
997         * class.c (get_vfield_name): Use the constructor_name.
998
999 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
1000
1001         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
1002         * cp-tree.h (lang_printable_name): Rename.
1003         * error.c (lang_decl_name): Use new hook.
1004         * lex.c (cxx_init): Remove old hook.
1005         * pt.c (tsubst_decl): Use new hook.
1006         * tree.c (lang_printable_name): Rename.
1007
1008 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
1009
1010         PR c++/3882
1011         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
1012         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
1013         only after recording the declaration.
1014
1015 2002-03-18  Jason Merrill  <jason@redhat.com>
1016
1017         PR c++/2039
1018         * init.c (resolve_offset_ref): Hand off to build_component_ref.
1019
1020         PR c++/4222, c++/5995
1021         * call.c (build_over_call): Fix empty class logic.
1022
1023         PR c++/3870
1024         * cp-tree.h (struct saved_scope): Add last_parms field.
1025         * decl.c (maybe_push_to_top_level): Save last_function_parms.
1026         (pop_from_top_level): Restore it.
1027
1028         PR c++/4377
1029         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
1030         NON_LVALUE_EXPRs.
1031
1032         PR c++/4003
1033         * pt.c (tsubst_friend_function): Use decl_namespace_context.
1034
1035         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
1036         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
1037         type with a nontrivial destructor.
1038
1039 2002-03-17  Jason Merrill  <jason@redhat.com>
1040
1041         PR c++/4460
1042         * class.c (build_base_path): Virtual base layout is fixed in
1043         in-charge [cd]tors.
1044
1045 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
1046
1047         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
1048         * parse.y (yyparse): Remove macro.
1049
1050 2002-03-17  Jason Merrill  <jason@redhat.com>
1051
1052         PR c++/5757
1053         * init.c (build_new_1): Pass the right pointer to op delete.
1054
1055 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
1056
1057         PR c++/4361
1058         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
1059         conversion operators go.
1060         (struct lang_decl_flags): Add template_conv_p and unused
1061         bitfields.
1062         (DECL_TEMPLATE_CONV_FN_P): New macro.
1063         * call.c (build_user_type_conversion_1): Don't check second type
1064         conversion of overload set first.
1065         * class.c (add_method): Make sure templated conversion operators
1066         all end up on slot 2.
1067         * lex.c (do_identifier): A conversion operator token might be
1068         satisfied by a templated conversion operator.
1069         * pt.c (check_explicit_specialization): Use
1070         CLASSTYPE_FIRST_CONVERSION_SLOT.
1071         (template_parm_this_level_p): New function.
1072         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
1073         * search.c (lookup_fnfields_1): Template conversions will be on
1074         the first slot.
1075         * typeck.c (build_component_ref): Preserve the type of an
1076         conversion operator name on the overload type.
1077         (build_x_function_call): Retrieve the conversion operator name.
1078
1079 2002-03-15  Richard Henderson  <rth@redhat.com>
1080
1081         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
1082
1083 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
1084
1085         * cp-tree.h (CLEANUP_DECL): Remove.
1086         (CLEANUP_EXPR): Likewise.
1087         * decl.c (destroy_local_var): Simplify.
1088         (maybe_build_cleanup): Tidy.
1089         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
1090         * semantics.c (cp_expand_stmt): Likewise.
1091         * cp/tree.c (cp_statement_code_p): Likewise.
1092
1093 2002-03-15  Jason Merrill  <jason@redhat.com>
1094
1095         PR c++/5857
1096         * decl.c (duplicate_decls): Use merge_types instead of common_type.
1097         * typeck.c (common_type): Just hand off to
1098         type_after_usual_arithmetic_conversions and
1099         composite_pointer_type.
1100         (merge_types): New fn.
1101         (commonparms): Use it instead of common_type.
1102         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
1103         (composite_pointer_type): Also handle attributes.
1104         * cp-tree.h: Declare merge_types.
1105
1106         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
1107         variables.
1108         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
1109
1110 2002-03-14  Richard Henderson  <rth@redhat.com>
1111
1112         * decl.c: Include c-pragma.h.
1113         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
1114         * Make-lang.in: Update dependencies.
1115
1116 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
1117
1118         PR c++/5908
1119         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
1120         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
1121
1122 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
1123
1124         * mangle.c (write_builtin_type): Handle 128-bit integers even if
1125         they are not a standard integer type.
1126
1127 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
1128
1129         * cp-tree.h (init_init_processing): Remove declaration.
1130         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
1131         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
1132
1133 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1134
1135         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
1136         Define.
1137         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
1138         tree_code_length.
1139         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
1140         cplus_tree_code_name): Delete.
1141         (cxx_init): Don't call add_c_tree_codes, instead set
1142         lang_unsafe_for_reeval.  Don't try to copy into the various
1143         tree_code arrays.
1144
1145 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
1146
1147         PR c++/5659
1148         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
1149         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
1150         definitions.
1151
1152 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
1153
1154         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
1155         DR209 is now not a defect.
1156         * cp-tree.h (skip_type_access_control): Remove.
1157         * decl.c (grokdeclarator): Do type access control for friend
1158         declarations.
1159         * semantics.c (decl_type_access_control): Don't reset
1160         current_type_lookups.
1161         (save_type_access_control): Always save the lookups.
1162         (skip_type_access_control): Remove.
1163         (finish_class_definition): Don't change type_lookups.
1164
1165 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
1166
1167         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
1168         It is incorrect.
1169         * typeck.c (build_static_cast): Compare non-qualified types
1170         with pointer to member conversions.
1171
1172 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
1173             Daniel Berlin  <dan@dberlin.org>
1174
1175         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
1176         (cxx_get_alias_set): Use it.
1177
1178 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1179
1180         * cp-tree.h (stabilize_expr): Prototype.
1181
1182 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1183
1184         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
1185         conditional return void.
1186
1187 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
1188
1189         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
1190         * cp-tree.h (cxx_unsave): New.
1191         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
1192         (init_tree): Update.
1193
1194 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1195
1196         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
1197         explicit sizeof/sizeof.
1198         * decl2.c (cxx_decode_option): Likewise.
1199         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
1200
1201 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
1202
1203         PR c++/775
1204         * decl.c (lookup_tag): Only reject enum/class mismatch, not
1205         class/union mismatch.
1206         * parse.y (check_class_key): New function.
1207         (structsp): Call it.
1208
1209 2002-03-01  Michael Matz  <matz@suse.de>
1210
1211         * typeck.c (cp_pointer_int_sum): Complete inner type which is
1212         used later by size_in_bytes().
1213
1214 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
1215
1216         * cp-tree.h:  Require __GNUC__ to be #defined.
1217         (build_init):  Add missing prototype.
1218
1219 2002-03-01  Jason Merrill  <jason@redhat.com>
1220
1221         * except.c: Don't include decl.h or obstack.h.  Do include
1222         tree-inline.h.
1223         (build_throw): Destroy temporaries from the thrown
1224         expression before calling __cxa_throw.  Construct a thrown
1225         temporary directly into the exception object.
1226         (stabilize_throw_expr): New function.
1227         (wrap_cleanups_r): New function.
1228         * tree.c (stabilize_expr): New function.
1229         * init.c (build_init): New function.
1230         * Make-lang.in (cp/except.o): Adjust .h deps.
1231
1232 2002-02-28  Jason Merrill  <jason@redhat.com>
1233
1234         * search.c (lookup_base_r): Don't clear is_non_public just because
1235         we found a friendly scope.
1236
1237         * decl.c (finish_function): Only warn about missing return
1238         statement with -Wreturn-type.
1239
1240 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
1241
1242         * class.c (build_clone): Update.
1243         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
1244         * cp-tree.h (cxx_dup_lang_specific_decl): New.
1245         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
1246         (copy_decl): Update.
1247         * method.c (make_thunk): Update.
1248
1249 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
1250
1251         * decl2.c: Delete traditional-mode-related code copied from
1252         the C front end but not used, or used only to permit the
1253         compiler to link.
1254
1255 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
1256
1257         PR c++/4093
1258         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
1259         to void.
1260
1261 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
1262
1263         PR other/5746
1264         * semantics.c (finish_switch_cond): Don't call get_unwidened
1265         if error_mark_node.
1266
1267 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
1268
1269         PR c++/2645, DR 295
1270         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
1271         tf_keep_type_decl.
1272         (make_typename_type): Use tsubst_flags_t.
1273         * decl.c (make_typename_type): Adjust. Return non-artificial
1274         TYPE_DECLs, if required.
1275         (grokdeclarator): Simplify CVR qualification handling. Allow bad
1276         qualifiers on typedef types.
1277         * decl2.c (handle_class_head): Adjust make_typename_type call.
1278         * parse.y (nested_name_specifier): Likewise.
1279         (typename_sub0): Likewise.
1280         (typename_sub1): Likewise.
1281         * pt.c (convert_template_argument): Adjust make_typename_type
1282         return value.
1283         (tsubst): Adjust cp_build_qualified_type_real calls.
1284         (check_cv_quals_for_unify): Cope with alowing bad qualifications
1285         on template type parms.
1286         (instantiate_decl): Recheck substitutions to give warnings on bad
1287         qualifications.
1288         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
1289
1290 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
1291
1292         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
1293
1294         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
1295         unless DECL_ALWAYS_INLINE.
1296
1297 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
1298
1299         * typeck.c (cp_pointer_int_sum): Renamed from
1300         pointer_int_sum, call pointer_int_sum.
1301
1302 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
1303
1304         * decl.c (duplicate_decls): Return 0 if issued error about
1305         redeclaration.
1306
1307 2002-02-19  Jason Merrill  <jason@redhat.com>
1308
1309         ABI change: Mangle `void (A::*)() const' as
1310         M1AKFvvE, not MK1AFvvE.
1311         * mangle.c (write_function_type): Write cv-quals for member
1312         function type here.
1313         (write_pointer_to_member_type): Not here.
1314
1315 2002-02-18  Jason Merrill  <jason@redhat.com>
1316
1317         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
1318         (do_decl_instantiation): Likewise.
1319
1320 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1321
1322         PR c++/5685
1323         * decl.c (duplicate_decls): Make warning unconditional
1324         if duplicate default argument declarations are present.
1325
1326 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
1327
1328         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
1329         shortening.
1330
1331 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
1332
1333         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
1334         remove incorrect comment. Move #if 0'd code to common path. Use
1335         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
1336
1337 2002-02-13  Jason Merrill  <jason@redhat.com>
1338
1339         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
1340         (finish_function): Don't warn if current_function_returns_null.
1341
1342         * typeck2.c (digest_init): Do handle values of vector type.
1343
1344         * typeck2.c (digest_init, process_init_constructor): Treat vectors
1345         like arrays.
1346
1347 2002-02-11  Jason Merrill  <jason@redhat.com>
1348
1349         * parse.y (reserved_declspecs): Don't handle attributes.
1350         (reserved_typespecquals): Handle them here.
1351         * Make-lang.in (parse.c): Adjust expected conflicts.
1352
1353 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
1354
1355         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
1356         instead of compstmt.
1357         (compstmt_or_stmtexpr): Renamed from compstmt.
1358         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
1359
1360 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
1361
1362         Rename instantiate_type_flags to tsubst_flags_t & expand use.
1363         * cp-tree.h (instantiate_type_flags): Rename to ...
1364         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
1365         add tf_warning flag.
1366         (instantiate_type): Adjust prototype.
1367         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
1368         do_type_instantiation, cp_build_qualified_type_real): Likewise.
1369         cp_build_qualified_type: Adjust.
1370         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
1371         tf_*.
1372         * call.c (standard_conversion): Rename itf_* to tf_*.
1373         (reference_binding): Likewise.
1374         (convert_like_real): Likewise.
1375         * cvt.c (cp_convert_to_pointer): Likewise.
1376         (convert_to_reference): Likewise.
1377         * decl.c (lookup_namespace_name): Use tf_* flags.
1378         (make_typename_type): Likewise.
1379         (grokdeclarator): Likewise.
1380         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
1381         (coerce_template_template_parms, convert_template_argument,
1382         coerce_template_parms, maybe_get_template_decl_from_type_decl,
1383         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
1384         instantiate_class_template, tsubst_template_arg_vector,
1385         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
1386         tsubst_decl, tsubst_arg_types, tsubst_function_type,
1387         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
1388         instantiate_template, fn_type_unification,
1389         resolve_overloaded_unification, verify_class_unification,
1390         unify, get_bindings_real, do_type_instantiation,
1391         regenerate_decl_from_template, instantiate_decl,
1392         tsubst_initializer_list, tsubst_enum,
1393         get_mostly_instantiated_function_type,
1394         invalid_nontype_parm_type_p): Likewise.
1395         * tree.c (cp_build_qualified_type_real): Likewise.
1396         * typeck.c (build_binary_op): Rename itf_* to tf_*.
1397         (build_ptrmemfunc): Likewise.
1398         (convert_for_assignment): Likewise.
1399
1400 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
1401
1402         PR c++/109
1403         * decl.c (grokdeclarator): Allow friend declarations from
1404         dependent types.
1405         * decl2.c (handle_class_head): Don't push into template parm contexts.
1406         * pt.c (push_template_decl_real): Template parm contexts are never
1407         being defined.
1408
1409 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
1410
1411         * class.c: Include target.h.
1412         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
1413         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
1414         bit-field layout.
1415         * Make-lang.in: Adjust deps.
1416
1417 2002-02-05  Jason Merrill  <jason@redhat.com>
1418
1419         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
1420
1421 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
1422
1423         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
1424         (finish_switch_cond): Set SWITCH_TYPE.
1425
1426 2002-02-04  Richard Henderson  <rth@redhat.com>
1427
1428         * method.c (use_thunk): Always initialize the block tree.  Reindent.
1429         * semantics.c (expand_body): Emit thunks after function, not before.
1430
1431 2002-02-04  Jason Merrill  <jason@redhat.com>
1432
1433         * decl.c (start_function): Call cplus_decl_attributes immediately
1434         after grokdeclarator.
1435
1436         * decl.c (start_function): Combine DECL_RESULT handling code.
1437
1438 2002-02-03  Jason Merrill  <jason@redhat.com>
1439
1440         * xref.c: Remove.
1441         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
1442         (cp/xref.o): Remove dependencies.
1443         * class.c (finish_struct_1, check_methods): Don't call xref fns.
1444         (finish_struct_1): Likewise.
1445         * friend.c (make_friend_class): Likewise.
1446         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
1447         * spew.c (read_process_identifier): Likewise.
1448
1449 2002-02-01  Jason Merrill  <jason@redhat.com>
1450
1451         PR c++/4872
1452         * decl.c (finish_function): Warn about a non-void function with
1453         no return statement and no abnormal exit.
1454         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
1455         (current_function_returns_abnormally): New macro.
1456         * call.c (build_call): Set it.
1457
1458         * typeck.c (build_component_ref): Always complain about offsetof
1459         constructs on non-PODs.  Only make it an error for members of
1460         virtual bases.
1461
1462         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
1463         (dump_function_decl): Always dump parms.
1464
1465         * decl2.c (finish_static_data_member_decl): Complain about a local
1466         class with a static data member.
1467
1468         PR c++/4286
1469         * search.c (lookup_field_1): Don't xref a static data member
1470         just because we looked it up.
1471
1472 2002-01-31  Jason Merrill  <jason@redhat.com>
1473
1474         * Make-lang.in (parse.c): Handle .output file.
1475
1476         PR c++/3395
1477         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
1478         not TREE_TYPE.
1479         * semantics.c (finish_class_definition): Adjust.
1480
1481         Allow attributes in parms and casts.
1482         * parse.y (named_parm): Don't strip attrs.
1483         (declmods): Remove 'attributes' production.
1484         (nonempty_cv_qualifiers): Accept attributes.
1485         (ATTRIBUTE): Give precedence.
1486         * decl.c (groktypename): Handle attributes.
1487         (grokparms): Likewise.
1488
1489 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
1490
1491         * decl2.c (cxx_decode_option): Pass 0 as last argument to
1492         cpp_handle_option.
1493         * lang-specs.h: Use cpp_unique_options instead of cpp_options
1494         when used together with cc1_options.
1495
1496 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
1497
1498         PR c++/5132
1499         * typeck2.c (digest_init): Make sure non-array core type is
1500         instantiated.
1501         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
1502         constructor, rather than build a new one.
1503         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
1504         PURPOSE of constructor elts.
1505
1506 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
1507
1508         * Make-lang.in (parse.c): Adjust expected number of
1509         shift-reduce conflicts.
1510         (decl.o): Depend on diagnostic.h.
1511         * decl.c: Include diagnostic.h.
1512         (grokdeclarator): Check for null pointer.
1513         (finish_function): Don't abort when
1514         current_binding_level->parm_flag != 1, if errors have
1515         occurred; throw away the statement tree and extra binding
1516         levels, and continue.
1517         * lex.c (note_list_got_semicolon): Check for null pointer.
1518         * method.c (hack_identifier): Just return error_mark_node if
1519         value is error_mark_node.
1520         * parse.y (primary: TYPEID(type_id)): No need to use
1521         TYPE_MAIN_VARIANT here.
1522         (handler_seq): Accept an empty list of catch clauses and
1523         generate a fake handler block to avoid later crashes.
1524         (ansi_raise_identifier): Accept the error token too.
1525         * semantics.c (begin_class_definition,
1526         finish_class_definition): Check for error_mark_node.
1527
1528 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
1529
1530         * typeck2.c (friendly_abort): Delete definition.
1531         * cp-tree.h (friendly_abort): Don't prototype.
1532         (my_friendly_assert): Use fancy_abort.
1533
1534 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1535
1536         * cp-tree.h (my_friendly_abort): Remove.
1537
1538 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
1539
1540         * spew.c (pending_inlines, pending_inlines_tail,
1541         processing_these_inlines): Make static.
1542         (mark_pending_inlines): Remove static.
1543         (begin_parsing_inclass_inline): If in function, save pi
1544         for GC to cp_function_chain->unparsed_inlines instead.
1545         (process_next_inline): Likewise.
1546         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
1547         (mark_pending_inlines): Add prototype.
1548         * decl.c (spew_debug): Remove unused extern.
1549         (mark_lang_function): Call mark_pending_inlines.
1550
1551 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1552
1553         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
1554         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
1555         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
1556         Change my_fancy_abort() to abort().
1557
1558 2002-01-23  Jason Merrill  <jason@redhat.com>
1559
1560         PR c++/5453
1561         * class.c (fixed_type_or_null): Fix thinko.
1562
1563         PR c++/3331
1564         * init.c (resolve_offset_ref): Use build_indirect_ref.
1565
1566         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
1567
1568 2002-01-22  Jason Merrill  <jason@redhat.com>
1569
1570         * parse.y (function_body): Suppress the block for the outermost
1571         curly braces.
1572         * decl.c (pushdecl): Don't try to skip it.
1573         (begin_function_body): Keep the block we create, not the next one.
1574         * init.c (emit_base_init): Don't mess with keep_next_level.
1575
1576         * class.c (build_base_path): Tweak formatting.
1577
1578 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
1579
1580         Fix regression introduced with patch for c++/775
1581         * parse.y (class_head_defn): Check for template specializations
1582         with a different class-key.
1583
1584 2002-01-17  Jason Merrill  <jason@redhat.com>
1585
1586         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
1587         (begin_function_body): Call them and keep_next_level.
1588         * init.c (emit_base_init): Call keep_next_level.
1589         * semantics.c (setup_vtbl_ptr): Lose.
1590         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
1591         (vtbls_set_up_p): Lose.
1592         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
1593         * method.c (do_build_copy_constructor): Likewise.
1594         (synthesize_method): Call finish_mem_initializers.
1595         * parse.y (nodecls): Likewise.
1596
1597         * error.c (dump_type_suffix): Print the exception specs before
1598         recursing.
1599         (dump_function_decl): Here, too.
1600
1601         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
1602
1603 2002-01-10  Ira Ruben   <ira@apple.com>
1604
1605         PR c++/907
1606         * decl.c (start_method): Handle attrlist.
1607
1608 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
1609
1610         * decl2.c (max_tinst_depth): Increase default limit to 500.
1611
1612 2002-01-10  Graham Stott  <grahams@redhat.com>
1613
1614         * spew.c (YYCHAR): Uppercase macro parameter and add
1615         parenthesis.
1616         (YYCODE): Likewise.
1617         (NAME): Uppercase macro parameter.
1618
1619 2002-01-09  Graham Stott  <grahams@redhat.com>
1620
1621         * decl.h (grokdeclarator): Wrap long line.
1622
1623         * semantics.c (FINISH_COND): Uppercase macro paramaters and
1624         add parenthesis.
1625
1626 2002-01-08  Graham Stott  <grahams@redhat.com>
1627
1628         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
1629         (PALLOC): Uppercase macro parameter and whitespace.
1630         (SALLOC): Uppercase macro parameter.
1631         (SFREE): Uppercase macros parameter, add parenthese and
1632         whitespace.
1633         (STREQL): Uppercase macro parameter and whitespace.
1634         (STRNEQ): Likewise.
1635         (STRLSS): Likewise.
1636         (STRLEQ): Likewise.
1637         (STRGTR): Likewise.
1638         (STRGEQ): Likewise.
1639
1640         * call.c (convert_like): Add parenthesis and wrap.
1641         (convert_like_with_context): Likewise.
1642         (ICS_RANK): Whitespace.
1643         (NEED_TEMPORARY_P): Remove parenthesis.
1644
1645         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
1646         whitespace.
1647         (VTT_MARKED_BINFO_P): Likewise.
1648
1649         * decl.c (BINDING_LEVEL): Add parenthesis.
1650         (DEF_OPERATOR): Likewise.
1651
1652         * mangle.c (MANGLE_TRACE): Add parenthesis.
1653         (MANGLE_TRACE_TREE): Likewise.
1654         (write_signed_number): Likewise.
1655         (write_unsigned_number): Likewise.
1656
1657         * pt.c (ccat): Uppercase macro parameter.
1658         (cat): Likewise
1659
1660         * search.c (SET_BINFO_ACCESS): Add parenthesis.
1661
1662 2002-01-07  Jason Merrill  <jason@redhat.com>
1663
1664         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
1665         to pedwarn.
1666
1667         PR c++/3536
1668         * method.c (make_thunk): If !flag_weak, give the thunk the
1669         function's linkage.
1670         (use_thunk): Here, too.
1671
1672 2002-01-07  Graham Stott  <grahams@redhat.com>
1673
1674         * error.c: Update copyright date.
1675         (print_scope_operator): Add parenthesis.
1676         (print_left_paren): Likewise.
1677         (print_right_paren): Likewise.
1678         (print_left_bracket): Likewise.
1679         (print_right_bracket): Likewise.
1680         (print_template_argument_list_start): Likewise.
1681         (print_template_argument_list_end): Likewise.
1682         (print_non_consecutive_character): Likewise.
1683         (print_tree_identifier): Likewise.
1684         (print_identifier): Likewise.
1685         (NEXT_CODE): Uppercase macro parameter.
1686         (ident_fndecl): Delete unused.
1687         (GLOBAL_THING): Likewise.
1688
1689 2002-01-06  Graham Stott  <grahams@redhat.com>
1690
1691         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
1692         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
1693         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
1694         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
1695         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
1696         (C_IS_RESERVED_WORD): Uppercase macro parameter.
1697         (C_RID_YYCODE) Likewise.
1698         (ptrmem_cst): Use rtx.
1699         (LOCAL_BINDING_P): Add whitespace.
1700         (INHERITED_VALUE_BINDING_P): Likewise.
1701         (BINDING_SCOPE): Wrap long line.
1702         (BINDING_HAS_LEVEL_P): Remove parenthesis.
1703         (BINDING_VALUE): Wrap long line.
1704         (BINDING_TYPE): Whitespace.
1705         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
1706         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
1707         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
1708         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
1709         (same_type_p): Uppercase macro parameters.
1710         (same_type_ignoring_top_level_qualifiers_p): Likewise.
1711         (OVL_FUNCTION): Wrap long line.
1712         (OVL_CHAIN): Whitespace.
1713         (OVL_CURRENT): Add parenthesis and whitespace.
1714         (OVL_NEXT): Whitespace.
1715         (OVL_USED): Likewise.
1716         (IDENTIFIER_TYPE_VALUE): Likewise.
1717         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
1718         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
1719         (LANG_ID_FIELD): Whitespace.
1720         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
1721         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
1722         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
1723         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
1724         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
1725         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
1726         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
1727         (IDENTIFIER_VIRTUAL_P): Likewise.
1728         (IDENTIFIER_OPNAME_P): Likewise.
1729         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
1730         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
1731         (C_SET_EXP_ORIGINAL_CODE): Likewise.
1732         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
1733         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1734         (IS_AGGR_TYPE): Uppercase macro parameter.
1735         (CLASS_TYPE_P): Likewise.
1736         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
1737         (IS_AGGR_TYPE_2): Whitespace.
1738         (TAGGED_TYPE_P): Uppercase macro parameter.
1739         (TYPE_BUILT_IN): Whitespace.
1740         (TYPE_FOR_JAVA): Likewise.
1741         (FUNCTION_ARG_CHAIN): Remove parenthesis.
1742         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
1743         (FUNCTION_FIRST_USER_PARAM): Likewise.
1744         (PROMOTES_TO_AGGR_TYPE): Whitespace.
1745         (DERIVED_FROM_P): Add parenthesis and wrap.
1746         (UNIQUELY_DERIVED_FROM_P): Likewise.
1747         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
1748         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1749         (CLASSTYPE_USE_TEMPLATE): Whitespace.
1750         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
1751         (TYPE_GETS_DELETE): Add parenthesis.
1752         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
1753         (TYPE_HAS_ASSIGN_REF): Likewise,
1754         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
1755         (TYPE_HAS_INIT_REF): Likewise.
1756         (TYPE_HAS_CONST_INIT_REF): Likewise.
1757         (TYPE_BEING_DEFINED): Likewise.
1758         (TYPE_LANG_SPECIFIC): Likewise.
1759         (CLASSTYPE_RTTI): Likewise.
1760         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
1761         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1762         (TYPE_OVERLOADS_ARROW): Likewise.
1763         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
1764         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
1765         (CLASSTYPE_METHOD_VEC): Likewise.
1766         (CLASSTYPE_MARKED_N): Likewise.
1767         (CLASSTYPE_MARKED): Likewise.
1768         (CLASSTYPE_MARKED2): Likewise.
1769         (CLASSTYPE_MARKED3): Likewise.
1770         (CLASSTYPE_MARKED4): Likewise.
1771         (CLASSTYPE_MARKED5): Likewise.
1772         (CLASSTYPE_MARKED6): Likewise.
1773         (SET_CLASSTYPE_MARKED): Whitespace.
1774         (CLEAR_CLASSTYPE_MARKED): Likewise.
1775         (SET_CLASSTYPE_MARKED2): Likewise.
1776         (CLEAR_CLASSTYPE_MARKED2): Likewise.
1777         (SET_CLASSTYPE_MARKED3): Likewise.
1778         (CLEAR_CLASSTYPE_MARKED3): Likewise.
1779         (SET_CLASSTYPE_MARKED4): Likewise.
1780         (CLEAR_CLASSTYPE_MARKED4): Likewise.
1781         (SET_CLASSTYPE_MARKED5): Likewise.
1782         (CLEAR_CLASSTYPE_MARKED5): Likewise.
1783         (SET_CLASSTYPE_MARKED6): Likewise.
1784         (CLEAR_CLASSTYPE_MARKED6): Likewise.
1785         (CLASSTYPE_TAGS): Likewise.
1786         (CLASSTYPE_VSIZE): Likewise.
1787         (CLASSTYPE_VBASECLASSES): Likewise.
1788         (CANONICAL_BINFO): Add parenthesis.
1789         (CLASSTYPE_SIZE(NODE): Likewise.
1790         (CLASSTYPE_SIZE_UNIT): Likewise.
1791         (CLASSTYPE_ALIGN(NODE): Likewise.
1792         (CLASSTYPE_USER_ALIGN): Likewise.
1793         (TYPE_JAVA_INTERFACE): Likewise.
1794         (CLASSTYPE_PURE_VIRTUALS): Likewise.
1795         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
1796         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
1797         (CLASSTYPE_HAS_MUTABLE): Likewise.
1798         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
1799         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
1800         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
1801         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
1802         (CLASSTYPE_INTERFACE_ONLY): Likewise.
1803         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
1804         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1805         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
1806         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1807         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
1808         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
1809         (BINFO_UNSHARED_MARKED): Whitespace.
1810         (BINFO_MARKED): Whitespace and wrap.
1811         (SET_BINFO_MARKED): Likewise.
1812         (CLEAR_BINFO_MARKED): Likewise.
1813         (BINFO_VTABLE_PATH_MARKED): Likewise.
1814         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
1815         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
1816         (BINFO_SUBVTT_INDEX): Remove parenthesis.
1817         (BINFO_VPTR_INDEX): Likewise.
1818         (BINFO_PRIMARY_BASE_OF): Likewise,
1819         (CLASSTYPE_VFIELDS): Whitespace.
1820         (VF_DERIVED_VALUE): Wrap long line.
1821         (NAMESPACE_LEVEL): Whitespace.
1822         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
1823         (DEFARG_POINTER): Whitespace.
1824         (DECL_NEEDED_P): Remove parenthesis.
1825         (DECL_LANGUAGE): Whitespace.
1826         (SET_DECL_LANGUAGE): Add parenthesis.
1827         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
1828         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
1829         (DECL_IN_AGGR_P): Whitespace.
1830         (DECL_FRIEND_P): Likewise.
1831         (DECL_BEFRIENDING_CLASSES): Likewise.
1832         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
1833         (DECL_NONCONVERTING_P): Whitespace.
1834         (DECL_PURE_VIRTUAL_P): Likewise.
1835         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
1836         (DECL_PENDING_INLINE_INFO): Whitespace.
1837         (DECL_SORTED_FIELDS): Likewise.
1838         (DECL_DEFERRED_FN): Likewise.
1839         (DECL_TEMPLATE_INFO): Likewise.
1840         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
1841         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
1842         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
1843         (TMPL_ARGS_LEVEL): Likewise.
1844         (SET_TMPL_ARGS_LEVEL): Likewise.
1845         (INNERMOST_TEMPLATE_PARMS): Whitespace.
1846         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
1847         (INTEGRAL_CODE_P(CODE): Add parenthesis.
1848         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
1849         (TYPE_HAS_CONSTRUCTOR): Whitespace.
1850         (TREE_HAS_CONSTRUCTOR): Likewise.
1851         (TYPE_HAS_DESTRUCTOR): Likewise.
1852         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
1853         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
1854         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1855         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
1856         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
1857         (TYPE_PTRMEMFUNC_P): Likewise.
1858         (TYPE_PTRMEMFUNC_FLAG): Likewise.
1859         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
1860         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1861         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
1862         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1863         (DECL_ACCESS): Whitespace.
1864         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
1865         (DECL_GLOBAL_DTOR_P): Likewise.
1866         (GLOBAL_INIT_PRIORITY): Likewise.
1867         (DECL_TEMPLATE_PARMS): Likewise.
1868         (DECL_TEMPLATE_RESULT): Likewise.
1869         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
1870         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
1871         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
1872         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1873         (PRIMARY_TEMPLATE_P): Add parenthesis.
1874         (DECL_USE_TEMPLATE): Whitespace.
1875         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1876         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1877         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1878         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1879         (CALL_DECLARATOR_PARMS): Remove parenthesis.
1880         (CALL_DECLARATOR_QUALS): Likewise.
1881         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1882         (TEMP_NAME_P): Wrap.
1883         (VFIELD_NAME_P): Likewise.
1884         (B_SET): Uppercase macro parameters and add parenthesis.
1885         (B_CLR): Likewise.
1886         (B_TST): Likewise.
1887         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
1888         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
1889         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
1890         (same_or_base_type_p): Likewise.
1891         (cp_deprecated): Likewise.
1892
1893 2002-01-05  Richard Henderson  <rth@redhat.com>
1894
1895         * semantics.c (expand_body): Revert last change.
1896
1897 2002-01-04  Jason Merrill  <jason@redhat.com>
1898
1899         PR c++/4122
1900         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
1901         lost primary.
1902
1903         * class.c (build_vtbl_initializer): Check for a lost primary
1904         before calculating the vtable entry to throw away.
1905
1906 2002-01-02  Jason Merrill  <jason@redhat.com>
1907
1908         * semantics.c (expand_body): Call outlining_inline_function when
1909         emitting an inline function out of line.
1910
1911 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1912
1913         PR c++/5116, c++/764 reversion
1914         * call.c (build_new_op): Revert the instantiations. They are
1915         incorrect.
1916
1917 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1918
1919         PR c++/5089
1920         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
1921
1922 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1923
1924         PR c++/3716
1925         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
1926         (tsubst, case POINTER_TYPE): Handle pmfs here.
1927         (tsubst, case OFFSET_TYPE): Check it is not an offset to
1928         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
1929
1930 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1931
1932         PR c++/35
1933         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
1934         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
1935         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
1936         PARM_DECL.
1937         (tsubst_template_parms): Break up loop statements.
1938         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
1939         parm PARM_DECLs don't get promoted.
1940
1941 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1942
1943         PR c++/5123
1944         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
1945         (build_x_function_call): Cope with a COMPONENT_REF containing a
1946         TEMPLATE_ID_EXPR.
1947
1948 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1949
1950         PR c++/5213
1951         * pt.c (convert_template_argument): Be more careful determining
1952         when RECORD_TYPE templates are or are not templates.
1953
1954 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1955
1956         PR c++/775
1957         * cp-tree.h (handle_class_head): Adjust prototype.
1958         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
1959         parameters. Use for all class heads.
1960         * parse.y (named_class_head_sans_basetype, named_class_head,
1961         named_complex_class_head_sans_basetype,
1962         named_class_head_sans_basetype_defn,
1963         unnamed_class_head): Remove.
1964         (class_head, class_head_apparent_template): Recognize class heads
1965         (class_head_decl, class_head_defn): New reductions. Process class
1966         heads.
1967         (structsp): Adjust class definition and class declaration
1968         reductions.
1969         (maybe_base_class_list): Give diagnostic on empty list.
1970
1971 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1972
1973         PR c++/4379
1974         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
1975         single non-static member.
1976         (unary_complex_lvalue): If it cannot be a pointer to member, don't
1977         make it so. Check it is not pointer to reference.
1978
1979 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1980
1981         PR c++/5132
1982         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
1983         are processing a template decl.
1984
1985 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1986
1987         PR c++/5116, c++/764
1988         * call.c (build_new_op): Make sure template class operands are
1989         instantiated. Simplify arglist construction.
1990
1991 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1992
1993         * call.c (build_user_type_conversion_1): Use my_friendly_assert
1994         rather than if ... abort.
1995         * cvt.c (convert_to_reference): Likewise.
1996         * semantics.c (setup_vtbl_ptr): Likewise.
1997         * pt.c (lookup_template_class): Comment typo.
1998
1999 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
2000
2001         PR c++/5125
2002         * pt.c (push_template_decl_real): Make sure DECL has
2003         DECL_LANG_SPECIFIC.
2004
2005 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
2006
2007         PR c++/335
2008         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
2009         for non-reference fields.
2010         * typeck.c (require_complete_type): Use resolve_offset_ref).
2011
2012 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2013
2014         PR c++/196
2015         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
2016
2017 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2018
2019         PR c++/160
2020         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
2021         up. Don't stabilize_references when initializing a reference.
2022
2023 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2024
2025         * decl2.c (lang_f_options): Const-ify.
2026
2027 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
2028
2029         * config-lang.in (diff_excludes): Remove.
2030
2031 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
2032
2033         PR c++/90
2034         * typeck.c (build_function_call_real): Use original function
2035         expression for errors.
2036
2037 2001-12-18  Jason Merrill  <jason@redhat.com>
2038
2039         PR c++/3242
2040         * class.c (add_method): Do compare 'this' quals when trying to match a
2041         used function.  Don't defer to another used function.
2042
2043 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
2044
2045         * pt.c (instantiate_clone): Remove, fold into ...
2046         (instantiate_template): ... here. Simplify by removing mutual
2047         recursion.
2048         * typeck2.c (build_m_component_ref): Don't cv qualify the function
2049         pointed to by a pointer to function.
2050         * class.c (delete_duplicate_fields_1): Typo.
2051
2052 2001-12-18  Jason Merrill  <jason@redhat.com>
2053
2054         C++ ABI change: destroy value arguments in caller.
2055         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
2056         create an extra binding level for the parameters.
2057         * decl.c (store_parm_decls): Don't do parameter cleanups.
2058
2059 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
2060
2061         * call.c (build_new_method_call): Use '%#V'.
2062         * error.c (cv_to_string): Use V parameter to determine padding.
2063
2064 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
2065
2066         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
2067         spellings in messages.
2068
2069 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
2070
2071         * cp-tree.h: Delete #defines for cp_error, cp_warning,
2072         cp_pedwarn, and cp_compiler_error.
2073         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
2074         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
2075         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2076         typeck2.c: Change calls to the above macros to use their
2077         language-independent equivalents: error, warning, pedwarn, and
2078         internal_error respectively.
2079
2080 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
2081
2082         * decl2.c (finish_file): Remove back_end_hook.
2083
2084 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
2085
2086         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
2087         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
2088         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
2089
2090 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
2091
2092         * lang-options.h: Use American spelling in messages.
2093
2094 2001-12-13  Jason Merrill  <jason@redhat.com>
2095
2096         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
2097
2098         Use cleanups to run base and member destructors.
2099         * init.c (push_base_cleanups): New function, split out from...
2100         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
2101         * decl.c (finish_destructor_body): Move vbase destruction code to
2102         push_base_cleanups.
2103         (begin_function_body, finish_function_body): New fns.
2104         (finish_function): Move [cd]tor handling and call_poplevel to
2105         finish_function_body.
2106         (pushdecl): Skip the new level.
2107         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
2108         (setup_vtbl_ptr): Call push_base_cleanups.
2109         * method.c (synthesize_method): Call {begin,end}_function_body.
2110         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
2111         * cp-tree.h: Declare new fns.
2112         * parse.y (function_body, .begin_function_body): New nonterminals.
2113         (fndef, pending_inline, function_try_block): Use function_body.
2114         (ctor_initializer_opt, function_try_block): No longer has a value.
2115         (base_init): Remove .set_base_init token.
2116         (.set_base_init, compstmt_or_error): Remove.
2117         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
2118
2119         * optimize.c (maybe_clone_body): Fix parameter updating.
2120
2121 2001-12-12  Jason Merrill  <jason@redhat.com>
2122
2123         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
2124         * semantics.c (genrtl_start_function): Don't pass
2125         parms_have_cleanups or push an extra binding level.
2126         (genrtl_finish_function): Lose cleanup_label cruft.
2127
2128         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
2129         (ctor_label): Remove.
2130         * semantics.c (finish_return_stmt): Lose ctor_label support.
2131         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
2132         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
2133         dtor_label.
2134
2135         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
2136         check for [cd]tors.
2137         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
2138
2139         * decl.c (finish_function): Check VMS_TARGET, not VMS.
2140
2141         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
2142         (end_cleanup_fn): And poplevel.
2143
2144         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
2145         if we're in a template.
2146
2147 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
2148
2149         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
2150         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
2151         THIS_NAME_P): Delete.
2152         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
2153         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
2154         with internal naming scheme.
2155         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
2156
2157 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
2158
2159         * decl.c (grokdeclarator): Deprecated implicit typename use.
2160
2161 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
2162
2163         PR g++/51
2164         * parse.y (frob_specs): Indicate it is a language linkage which
2165         contained the extern.
2166         * decl.c (grokdeclarator): Allow extern language linkage with
2167         other specifiers.
2168
2169 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
2170
2171         PR g++/72
2172         * decl.c (add_binding): Don't reject duplicate typedefs involving
2173         template parameters.
2174
2175 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
2176
2177         * parse.y, semantics.c: Similarly.
2178
2179 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
2180
2181         PR g++/87
2182         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
2183         (copy_args_p): Rename to ...
2184         (copy_fn_p): ... here.
2185         (grok_special_member_properties): New function.
2186         (grok_op_properties): Lose VIRTUALP parameter.
2187         (copy_assignment_arg_p): Remove.
2188         * call.c (build_over_call): Use copy_fn_p.
2189         * decl.c (grokfndecl): Reformat. Adjust call to
2190         grok_op_properties.
2191         (copy_args_p): Rename to ...
2192         (copy_fn_p): ... here. Reject template functions. Check for pass
2193         by value.
2194         (grok_special_member_properties): Remember special functions.
2195         (grok_ctor_properties): Don't remember them here, just check.
2196         (grok_op_properties): Likewise.
2197         (start_method): Call grok_special_member_properties.
2198         * decl2.c (grokfield): Likewise.
2199         (copy_assignment_arg_p): Remove.
2200         (grok_function_init): Don't remember abstract assignment here.
2201         * pt.c (instantiate_class_template): Call
2202         grok_special_member_properties.
2203         (tsubst_decl): Adjust grok_op_properties call.
2204
2205 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
2206
2207         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
2208         RID_TYPES_COMPATIBLE_P.
2209
2210 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2211
2212         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
2213         call to build_aggr_init.
2214         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
2215
2216 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
2217
2218         * parse.y: Replace uses of the string non-terminal with STRING.
2219         Don't perform string concatentaion here.
2220         (string): Remove non-terminal.
2221         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
2222
2223 2001-12-05  Jason Merrill  <jason@redhat.com>
2224
2225         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
2226         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
2227         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
2228         * pt.c (push_tinst_level): No longer static.
2229         * cp-tree.h: Declare them.
2230
2231         * init.c (resolve_offset_ref): Don't check access for the base
2232         conversion to access a FIELD_DECL.
2233
2234         * cp-tree.h (TYPE_REFFN_P): New macro.
2235         * decl.c (bad_specifiers): Check it, too.
2236
2237         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
2238         on the __*_type_info type if we haven't seen a definition.
2239
2240 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
2241
2242         * decl.c: Include c-common.h.
2243         (shadow_warning): Move to c-common.c.
2244
2245 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2246
2247         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
2248
2249 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
2250
2251         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
2252
2253 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
2254
2255         PR g++/164
2256         * init.c (sort_base_init): Allow binfos to be directly specified.
2257         * method.c (do_build_copy_constructor): Explicitly convert to the
2258         base instance.
2259         (do_build_assign_ref): Likewise.
2260
2261 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
2262
2263         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
2264         declaration and initialization.
2265
2266 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
2267
2268         * typeck2.c: Remove leading capital from diagnostic messages, as
2269         per GNU coding standards.
2270
2271 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
2272
2273         PR c++/3394
2274         * decl.c (xref_basetypes): Handle attributes between
2275         'class' and name.
2276
2277 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2278
2279         PR g++/3381
2280         * parse.y (named_complex_class_head_sans_basetype): Add new
2281         reduction.
2282         * Make-lang.in (parse.c): Adjust expected conflict count.
2283
2284 2001-12-03  Jason Merrill  <jason@redhat.com>
2285
2286         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
2287         immediate binfos for our virtual bases.
2288
2289 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
2290
2291         * call.c (build_java_interface_fn_ref): Similarly.
2292         * except.c (is_admissible_throw_operand): Similarly.
2293         * init.c (build_java_class_ref): Similarly.
2294         * xref.c (open_xref_file): Similarly.
2295
2296 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2297
2298         * class.c (finish_struct): Remove trailing periods from messages.
2299         * decl.c (check_tag_decl): Similarly.
2300         * lex.c (cxx_set_yydebug): Similarly.
2301         * typeck2.c (friendly_abort): Similarly.
2302
2303 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
2304
2305         PR c++/3048
2306         * cp-tree.h (ovl_member): Remove.
2307         * decl2.c (merge_functions): Handle extern "C" functions
2308         specially.
2309         * tree.c (ovl_member): Remove.
2310
2311 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
2312
2313         PR c++/4842
2314         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
2315         FUNCTION_DECL, as input.
2316         (mark_overriders): Remove.
2317         (warn_hidden): Rework for the new ABI.
2318
2319 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
2320
2321         PR c++/3471
2322         * call.c (convert_like_real): Do not build additional temporaries
2323         for rvalues of class type.
2324
2325 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
2326
2327         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
2328         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
2329         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
2330         (DERIVED_FROM_P): Likewise.
2331         (enum base_access): Renumber, add ba_quiet bit mask.
2332         (get_binfo): Remove.
2333         (get_base_distance): Remove.
2334         (binfo_value): Remove.
2335         (ACCESSIBLY_DERIVED_FROM_P): Remove.
2336         * call.c (standard_conversion): Use lookup_base.
2337         * class.c (strictly_overrides): Likewise.
2338         (layout_virtual_bases): Likewise.
2339         (warn_about_ambiguous_direct_bases): Likewise.
2340         (is_base_of_enclosing_class): Likewise.
2341         (add_vcall_offset_vtbl_entries_1): Likewise.
2342         * cvt.c (build_up_reference): Adjust comment.
2343         * init.c (build_member_call): Reformat.
2344         * search.c (get_binfo): Remove.
2345         (get_base_distance_recursive): Remove.
2346         (get_base_distance): Remove.
2347         (lookup_base_r): Tweak.
2348         (lookup_base): Add ba_quiet control. Complete the types here.
2349         (covariant_return_p): Use lookup_base.
2350         * tree.c (binfo_value): Remove.
2351         (maybe_dummy_object): Use lookup_base.
2352         * typeck.c (build_static_cast): Use lookup_base.
2353         (get_delta_difference): Likewise.
2354         * typeck2.c (binfo_or_else): Use lookup_base.
2355         (build_scoped_ref): Add back error_mark_check.
2356         (build_m_component_ref): Use lookup_base.
2357
2358 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2359
2360         * Make-lang.in (c++.generated-manpages): New dummy target.
2361
2362 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2363
2364         * Make-lang.in (cp-lang.o): Depends on c-common.h.
2365         * cp-lang.c (c-common.h): Include.
2366         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
2367         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
2368         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
2369
2370 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
2371
2372         * decl2.c (c_language): Move to c-common.c.
2373         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
2374         functions.
2375         (cxx_init): Update.
2376
2377 2001-11-26  Jason Merrill  <jason@redhat.com>
2378
2379         * call.c (joust): Remove COND_EXPR hack.
2380
2381 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
2382
2383         * search.c (lookup_base_r): Declare bk in variable declaration
2384         space.
2385
2386 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
2387
2388         PR g++/3145
2389         * class.c (build_vbase_pointer): Remove.
2390         (build_vbase_path): Remove.
2391         (build_base_path): New function.
2392         * cp-tree.h (base_access, base_kind): New enumerations.
2393         (build_base_path): Declare.
2394         (convert_pointer_to_real): Remove.
2395         (convert_pointer_to): Remove.
2396         (lookup_base): Declare.
2397         (convert_pointer_to_vbase): Remove.
2398         * call.c (build_scoped_method_call): Use lookup_base &
2399         build_base_path instead of convert_pointer_to_real,
2400         get_base_distance & get_binfo.
2401         (build_over_call): Likewise.
2402         * cvt.c (cp_convert_to_pointer): Likewise.
2403         (convert_to_pointer_force): Likewise.
2404         (build_up_reference): Likewise.
2405         (convert_pointer_to_real): Remove.
2406         (convert_pointer_to): Remove.
2407         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
2408         instead of convert_pointer_to_vbase & build_vbase_path.
2409         (emit_base_init): Use build_base_path instead of
2410         convert_pointer_to_real.
2411         (expand_virtual_init): Lose unrequired conversions.
2412         (resolve_offset_ref): Use lookup_base and build_base_path
2413         instead of convert_pointer_to.
2414         * rtti.c (build_dynamic_cast_1): Use lookup_base &
2415         build_base_path instead of get_base_distance & build_vbase_path.
2416         * search.c (get_vbase_1): Remove.
2417         (get_vbase): Remove.
2418         (convert_pointer_to_vbase): Remove.
2419         (lookup_base_r): New function.
2420         (lookup_base): New function.
2421         * typeck.c (require_complete_type): Use lookup_base &
2422         build_base_path instead of convert_pointer_to.
2423         (build_component_ref): Likewise.
2424         (build_x_function_call): Likewise.
2425         (get_member_function_from_ptrfunc): Likewise.
2426         (build_component_addr): Likewise.
2427         * typeck2.c (build_scoped_ref): Likewise.
2428
2429 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2430
2431         * cp-tree.h (CP_TYPE_QUALS): Removed.
2432         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
2433         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
2434         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
2435         * dump.c (cp_dump_tree): Use void* dump_info argument to match
2436         lang-hooks prototype.
2437         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
2438         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
2439         CP_TYPE_QUALS changed to cp_type_quals.
2440         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
2441         (CXX_C_OBJS): Remove c-dump.o.
2442
2443 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
2444
2445         PR c++/3637
2446         * pt.c (lookup_template_class): Ensure that all specializations
2447         are registered on the list corresponding to the most general
2448         template.
2449
2450 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
2451
2452         * call.c (non_reference): Add documentation.
2453         (convert_class_to_reference): Do not strip reference types
2454         from conversion operators.
2455         (maybe_handle_ref_bind): Simplify.
2456         (compare_ics): Correct handling of references.
2457
2458 2001-11-19  John Wilkinson <johnw@research.att.com>
2459
2460         * dump.c (dump_op): New function.
2461         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
2462         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
2463         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
2464
2465 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
2466
2467         PR4629
2468         * semantics.c (finish_sizeof): Make sure that expression created
2469         while processing a template do not have a type.
2470         (finish_alignof): Likewise.
2471         * typeck.c (c_sizeof): Likewise.
2472         (expr_sizeof): Likewise.
2473
2474 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2475
2476         * lex.c (cxx_finish): Call c_common_finish.
2477         (finish_parse): Remove.
2478
2479 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2480
2481         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
2482         when displaying error message about missing array bounds.
2483
2484 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2485
2486         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
2487         CONST_CAST_EXPR.
2488         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
2489
2490 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
2491
2492         * cp-tree.h (print_class_statistics): Restore.
2493
2494 2001-11-15  Jason Merrill  <jason@redhat.com>
2495
2496         * method.c (use_thunk): Don't emit debugging information for thunks.
2497
2498         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
2499         * decl.c (make_typename_type): Handle getting a class template.
2500         * search.c (lookup_field_r): A class template is good enough for
2501         want_type.
2502
2503         * call.c (convert_like_real): Only use cp_convert for the bad part.
2504         (standard_conversion): Also allow bad int->enum.
2505         * typeck.c (ptr_reasonably_similar): Also allow functions to
2506         interconvert.  Pointers to same-size integers are reasonably
2507         similar.
2508
2509         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
2510         give it void type.
2511
2512 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
2513
2514         PR g++/3154
2515         * init.c (sort_base_init): Remove unreachable code.
2516         (expand_member_init): Adjust comment to reflect reality. Simplify
2517         and remove unreachable code.
2518
2519 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
2520
2521         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
2522         (cxx_init): Update prototype.
2523         * decl.c (init_decl_processing): Rename.  Move null node init
2524         to its creation time.
2525         * lex.c (cxx_init_options): Update.
2526         (cxx_init): Combine with old init_parse; also call
2527         cxx_init_decl_processing.
2528
2529 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
2530
2531         * decl.c (check_initializer): Try to complete the type of an
2532         array element before checking whether it's complete.  Don't
2533         complain about arrays with complete element types but an
2534         unknown size.
2535         (cp_finish_decl): Build the hierarchical constructor before
2536         calling maybe_deduce_size_from_array_init.
2537
2538 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
2539
2540         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
2541
2542 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
2543
2544         PR g++/4206
2545         * parse.y (already_scoped_stmt): Remove.
2546         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
2547
2548 2001-11-12  H.J. Lu <hjl@gnu.org>
2549
2550         * cvt.c (ocp_convert): Don't warn the address of a weak
2551         function is always `true'.
2552
2553 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2554
2555         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2556         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2557         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
2558         * cp-tree.h (print_class_statistics): Remove.
2559         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
2560         cxx_print_identifier, cxx_set_yydebug): New.
2561         * lex.c (set_yydebug): Rename c_set_yydebug.
2562         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
2563         lang_print_xnode): Rename.
2564         * tree.c (print_lang_statistics): Rename.
2565
2566 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2567
2568         * class.c (dump_array): Fix format specifier warning.
2569
2570 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2571
2572         * cp-lang.c (LANG_HOOKS_NAME): Override.
2573         (struct lang_hooks): Constify.
2574         * lex.c (cxx_init_options): Update.
2575         (lang_identify): Remove.
2576         * parse.y (language_string): Remove.
2577
2578 2001-11-08  Andreas Franck  <afranck@gmx.de>
2579
2580         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
2581         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
2582         suggested by autoconf.
2583         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
2584         (c++.install-common): Use the transformed target alias names.
2585
2586 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2587
2588         * Make-lang.in: Update.
2589         * cp-lang.c: Include langhooks-def.h.
2590
2591 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2592
2593         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
2594
2595 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2596
2597         * lex.c (copy_lang_type): Add static prototype.
2598
2599 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2600
2601         * pt.c (unify): Handle SCOPE_REF.
2602
2603 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
2604
2605         * tree.c (cp_copy_res_decl_for_inlining): Adjust
2606         DECL_ABSTRACT_ORIGIN for the return variable.
2607
2608 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
2609
2610         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2611
2612 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
2613
2614         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
2615         semantics.c, spew.c: Fix spelling errors.
2616
2617 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2618
2619         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
2620
2621 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
2622
2623         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
2624         pop_everything.
2625
2626 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2627
2628         * cp-lang.c (cxx_get_alias_set): New function.
2629         Point LANG_HOOKS_GET_ALIAS_SET to it.
2630
2631 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2632
2633         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
2634         * cp-tree.h (make_unbound_class_template): Prototype new function.
2635         * decl.c (make_unbound_class_template): New function.
2636         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
2637         * error.c (dump_type): Likewise.
2638         * mangle.c (write_type): Likewise.
2639         * parse.y (template_parm): Likewise.
2640         (template_argument): Use make_unbound_class_template.
2641         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
2642         (tsubst): Likewise.
2643         (tsubst_copy): Likewise.
2644         (unify): Likewise.
2645         * tree.c (walk_tree): Likewise.
2646         * typeck.c (comptypes): Likewise.
2647
2648 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2649
2650         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
2651         extra calls into fewer ones.
2652
2653 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
2654
2655         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
2656         Warn when merging inline with attribute noinline.
2657         (start_decl, start_function): Warn if inline and attribute
2658         noinline appear in the same declaration.
2659
2660 2001-10-16  H.J. Lu <hjl@gnu.org>
2661
2662         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
2663         for tree checking disabled.
2664
2665 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
2666
2667         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
2668         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
2669
2670 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2671
2672         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
2673         (unify): Only handle MINUS_EXPR specially if the above flag is set
2674         and the subtracted constant is 1.  Clear the flag on recursive calls.
2675         Set it when unifying the maximum value in an INTEGER_TYPE's range.
2676
2677 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2678
2679         * decl.c (bad_specifiers): Don't allow exception specifications
2680         on any typedefs.
2681
2682 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
2683
2684         * cp/lex.c (init_cp_pragma): Similarly.
2685
2686 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2687
2688         * pt.c (lookup_template_class): Build complete template arguments
2689         for BOUND_TEMPLATE_TEMPLATE_PARM.
2690
2691 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2692
2693         * cp-tree.h (TYPE_BINFO): Update comment.
2694         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
2695         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
2696         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
2697         (copy_type): Prototype new function.
2698         * lex.c (copy_lang_decl): Gather tree node statistics.
2699         (copy_lang_type): New function.
2700         (copy_type): Likewise.
2701         (cp_make_lang_type): Create lang_type for
2702         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
2703         and BOUND_TEMPLATE_TEMPLATE_PARM.
2704         * pt.c (tsubst): Use copy_type instead of copy_node.
2705         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
2706
2707 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2708
2709         * pt.c (determine_specialization): Ignore functions without
2710         DECL_TEMPLATE_INFO.
2711
2712 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2713
2714         PR g++/4476
2715         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
2716
2717 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
2718
2719         * typeck2.c (store_init_value): Don't re-digest a bracketed
2720         initializer.
2721
2722         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
2723         ANON_AGGR_TYPE_P.
2724
2725 2001-10-11  Richard Henderson  <rth@redhat.com>
2726
2727         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
2728         of an asm statement.
2729         (build_vtbl_ref_1): Split out from build_vtbl_ref.
2730         (build_vfn_ref): Use it to handle vtable descriptors before
2731         calling build_vtable_entry_ref.
2732         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
2733
2734 2001-10-10  Richard Henderson  <rth@redhat.com>
2735
2736         * parse.y (asm_operand): Allow named operands.
2737         * semantics.c (finish_asm_stmt): Tweek for changed location
2738         of the operand constrant.
2739
2740 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
2741
2742         * call.c (standard_conversion): Add bad conversion between
2743         integers and pointers.
2744         (convert_like_real): Don't use convert_for_initialization for bad
2745         conversions; complain here and use cp_convert.
2746         (build_over_call): Don't handle bad conversions specially.
2747         (perform_implicit_conversion): Allow bad conversions.
2748         (can_convert_arg_bad): New fn.
2749         * cp-tree.h: Declare it.
2750         * typeck.c (convert_for_assignment): Use it.
2751         (ptr_reasonably_similar): Any target type is similar to void.
2752
2753 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
2754
2755         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
2756         (cp/cp-lang.o): New rule.
2757         * cp-tree.h: Declare hooks.
2758         * tree.c: Make hooks non-static.
2759         (init_tree): Don't initialize hooks here.
2760         * lex.c: Likewise.  Move definition of lang_hooks to...
2761         * cp-lang.c: ... new file.
2762
2763 2001-10-08  Richard Henderson  <rth@redhat.com>
2764
2765         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
2766         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
2767
2768 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2769
2770         * class.c (build_vtable_entry_ref): Const-ify.
2771         * decl.c (predefined_identifier,
2772         initialize_predefined_identifiers): Likewise.
2773         * init.c (build_new_1): Likewise.
2774         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
2775         Likewise.
2776
2777 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
2778
2779         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
2780         (INSNS_PER_STMT): Likewise.
2781         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
2782         (copy_body, initialize_inlined_parameters): Likewise.
2783         (declare_return_variable, inlinable_function_p): Likewise.
2784         (expand_call_inline, expand_calls_inline): Likewise.
2785         (optimize_inline_calls, clone_body): Likewise.
2786         * tree.c (walk_tree): Moved to ../tree-inline.c.
2787         (walk_tree_without_duplicates): Likewise.
2788         (copy_tree_r, remap_save_expr): Likewise.
2789
2790 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
2791
2792         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
2793         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
2794         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
2795         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
2796         (flag_inline_trees): Moved declaration to ../tree-inline.h.
2797         (walk_tree): Moved declaration to ../tree-inline.h.
2798         (walk_tree_without_duplicates, copy_tree_r): Likewise.
2799         (remap_save_expr): Likewise.
2800         * decl.c: Include tree-inline.h.
2801         (lang_mark_tree): Don't mark inlined_fns.
2802         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
2803         * optimize.c: Include tree-inline.h.
2804         (optimize_inline_calls): Move declaration to ../tree.h, as
2805         non-static.
2806         (remap_decl): Use language-independent constructs and hooks.
2807         (remap_block, copy_body_r, declare_return_variable): Likewise.
2808         (inlinable_function_p): Likewise.  Don't test for
2809         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
2810         no longer language-specific.
2811         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
2812         call of dump_function to...
2813         (optimize_function): Here...
2814         (clone_body): New function, extracted from...
2815         (maybe_clone_body): ... here.  Build decl_map locally and pass
2816         it on to clone_body.
2817         * pt.c, semantics.c: Include tree-inline.h.
2818         * tree.c: Likewise.
2819         (cp_walk_subtrees): New language-specific hook for tree inlining.
2820         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
2821         cp_is_overload_p, cp_auto_var_in_fn_p,
2822         cp_copy_res_decl_for_inlining): Likewise.
2823         (walk_tree): Move language-specific constructs into...
2824         (cp_walk_subtrees): this new function.
2825         (copy_tree_r): Use language-independent constructs and hooks.
2826         (init_tree): Initialize tree inlining hooks.
2827         (remap_save_expr): Adjust prototype so that the declaration
2828         does not require the definition of splay_tree.
2829
2830 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2831
2832         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
2833         to build the declaration instead of the declaration itself.
2834
2835 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
2836
2837         * decl2.c (cxx_decode_option): Add 'else'.
2838
2839         * spew.c (end_input): No longer static.
2840         * cp-tree.h: Declare it.
2841         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
2842
2843 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2844
2845         * call.c (build_over_call), typeck.c (build_function_call_real):
2846         Pass type attributes to check_function_format rather than name or
2847         assembler name.  Don't require there to be a name or assembler
2848         name to check formats.
2849
2850 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2851
2852         * decl.c (init_decl_processing): Don't call
2853         init_function_format_info.  Initialize lang_attribute_table
2854         earlier.
2855         (builtin_function): Call decl_attributes.
2856         (insert_default_attributes): New.
2857
2858 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
2859
2860         * decl.c (grokdeclarator): Copy array typedef handling from C
2861         frontend.
2862
2863         * decl.c (grokdeclarator): Copy too-large array handling from C
2864         frontend.
2865
2866 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
2867
2868         * config-lang.in (target_libs): Added target-gperf, so that we
2869         don't try to build it if C++ is disabled.
2870
2871 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
2872
2873         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
2874         (cp/errfn.o): Delete rule.
2875         (cp/error.o): Depend on flags.h.
2876         * errfn.c: Delete file.
2877         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
2878         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
2879         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
2880         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
2881         internal_error respectively.  Make cp_deprecated into a macro.
2882         Don't define cp_printer typedef or declare cp_printers.
2883         * error.c: Include flags.h.
2884         Delete: struct tree_formatting_info, print_function_argument_list,
2885         print_declaration, print_expression, print_function_declaration,
2886         print_function_parameter, print_type_id, print_cv_qualifier_seq,
2887         print_type_specifier_seq, print_simple_type_specifier,
2888         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
2889         print_parameter_declaration_clause, print_exception_specification,
2890         print_nested_name_specifier, and definition of cp_printers.
2891         (locate_error): New function.
2892         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
2893         rewritten in terms of locate_error and diagnostic.c.
2894         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
2895         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
2896         (init_error): Adjust to match.
2897
2898 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2899
2900         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
2901
2902 2001-09-21  Richard Henderson  <rth@redhat.com>
2903
2904         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
2905         (build_vtbl_initializer): Likewise.
2906         (build_vfn_ref): New.
2907         * cp-tree.h: Declare it.
2908         * call.c (build_over_call): Use it.
2909         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
2910         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
2911
2912 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
2913
2914         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
2915
2916 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
2917
2918         Table-driven attributes.
2919         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
2920         * decl2.c (cplus_decl_attributes): Only take one attributes
2921         parameter.
2922         * cp-tree.c (cplus_decl_attributes): Update prototype.
2923         * class.c (finish_struct), decl.c (start_decl, start_function),
2924         decl2.c (grokfield), friend.c (do_friend), parse.y
2925         (parse_bitfield): Update calls to cplus_decl_attributes.
2926         * decl.c (grokdeclarator): Take a pointer to a single ordinary
2927         attribute list.
2928         * decl.h (grokdeclarator): Update prototype.
2929         * decl2.c (grokfield): Take a single ordinary attribute list.
2930         * friend.c (do_friend): Likewise.
2931         * decl.c (shadow_tag, groktypename, start_decl,
2932         start_handler_parms, grokdeclarator, grokparms, start_function,
2933         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
2934         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
2935         (process_template_parm, do_decl_instantiation): Pass single
2936         ordinary attribute lists around.
2937         * decl.c (grokdeclarator): Correct handling of nested attributes.
2938         Revert the patch
2939         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
2940                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
2941                 not the left.
2942         .
2943         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
2944         (cp_attribute_table): Declare.
2945         * decl.c (valid_lang_attribute): Don't define.
2946         (lang_attribute_table): Define.
2947         (init_decl_processing): Initialize lang_attribute_table instead of
2948         valid_lang_attribute.
2949         * tree.c (cp_valid_lang_attribute): Remove.
2950         (handle_java_interface_attribute, handle_com_interface_attribute,
2951         handle_init_priority_attribute): New functions.
2952         (cp_attribute_table): New array.
2953         * decl2.c (import_export_class): Don't use
2954         targetm.valid_type_attribute.
2955
2956 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2957
2958         * Make-lang.in (cp/error.o): Depend on real.h
2959         * error.c: #include "real.h"
2960
2961 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2962
2963         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
2964         xmalloc/strcpy/strcat.
2965
2966 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2967
2968         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
2969         Const-ification.
2970         * pt.c (tsubst_decl): Likewise.
2971
2972 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2973
2974         * decl2.c (lang_f_options): Const-ification.
2975         * lex.c (cplus_tree_code_name): Likewise.
2976         * spew.c (yyerror): Likewise.
2977
2978 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2979
2980         PR c++/3986
2981         * class.c (force_canonical_binfo_r): Check & move an indirect
2982         primary base first.
2983         (force_canonical_binfo): Check that it's not already
2984         canonical.
2985         (mark_primary_virtual_base): Remove BINFO parameter.
2986         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
2987
2988 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2989
2990         Remove TYPE_NONCOPIED_PARTS.
2991         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
2992         CLASSTYPE_PURE_VIRTUALS.
2993         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
2994         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
2995         (layout_class_type): Don't call fixup_inline_methods here ...
2996         (finish_struct_1): ... call it here.
2997
2998 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
2999
3000         * decl.c (duplicate_decls): Remove code deadling with
3001         DECL_SAVED_INSNS.
3002         * decl2.c (finish_file): Likewise.
3003         * pt.c (instantiate_decl): Likewise.
3004         * semantics.c (expand_body): Don't defer local functions if
3005         they wouldn't be deferred for some other reason.  Don't
3006         generate RTL for functions that will not be emitted.
3007         (genrtl_start_function): Remove code deadling with
3008         DECL_SAVED_INSNS.
3009         (genrtl_finish_function): Likewise.
3010
3011 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
3012
3013         PR c++/4203
3014         * call.c (build_over_call): Do not optimize any empty base
3015         construction.
3016
3017 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3018
3019         * error.c (dump_template_decl): Output template parameters
3020         together with their specifiers.
3021         Output `class' prefix for template template parameter.
3022         (dump_decl): Fix formatting.
3023
3024 2001-08-30  Kurt Garloff  <garloff@suse.de>
3025
3026         * optimize.c (inlinable_function_p): Allow only smaller single
3027         functions. Halve inline limit after reaching recursive limit.
3028
3029 2001-08-30  Joern Rennecke <amylaar@redhat.com>
3030             Jason Merrill  <jason_merrill@redhat.com>
3031
3032         * class.c (build_vtable_entry_ref): Subtract in char*, not
3033         ptrdiff_t.
3034
3035 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
3036
3037         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
3038         (build_cplus_array_type): Use cp_build_qualified_type, not
3039         TYPE_MAIN_VARIANT, to get an unqualified version.
3040
3041         * decl2.c (grok_alignof): Lose.
3042         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
3043         * typeck.c (c_alignof): Lose.
3044         * semantics.c (finish_sizeof, finish_alignof): New.
3045         * parse.y: Use them.
3046         * cp-tree.h: Declare them.
3047
3048 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
3049
3050         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
3051         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
3052         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
3053
3054 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
3055
3056         * typeck2.c (add_exception_specifier): Only require complete type if
3057         not in processing template declaration.
3058
3059 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3060
3061         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
3062         GNU_xref_start_scope and GNU_xref_end_scope.
3063
3064         * tree.c (TYPE_HASH): Moved to ../tree.h.
3065
3066 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
3067
3068         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
3069         on COMPOUND_EXPRs.
3070
3071 2001-08-14  Richard Henderson  <rth@redhat.com>
3072
3073         * class.c, cp-tree.h (build_vfn_ref): Remove.
3074         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
3075
3076 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
3077
3078         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
3079         empty class assignment as having side-effects to avoid
3080         spurious warnings.
3081
3082 2001-08-13  Zack Weinberg  <zackw@panix.com>
3083
3084         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
3085         * except.c: Include libfuncs.h.
3086
3087 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3088
3089         * decl.c (grokdeclarator): Clarify diagnostic message.
3090
3091 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3092
3093         * decl2.c (do_nonmember_using_decl): Replace using directive
3094         with using declaration in the error message.
3095
3096 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3097
3098         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
3099         criterion to avoid rebuilding expression tree instead of
3100         processing_template_decl.
3101
3102 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
3103
3104         Support named return value optimization for inlines, too.
3105         * decl.c (finish_function): Nullify returns here.
3106         * semantics.c (genrtl_start_function): Not here.
3107         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
3108         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
3109         Also nullify the CLEANUP_STMT for the nrv.
3110         * cp-tree.h: Declare it.
3111         * optimize.c (declare_return_variable): Replace the nrv with the
3112         return variable.
3113         * typeck.c (check_return_expr): Be more flexible on alignment check.
3114         Ignore cv-quals when checking for a matching type.
3115
3116 2001-08-09  Richard Henderson  <rth@redhat.com>
3117
3118         * decl2.c (finish_objects): Use target hooks instead of
3119         assemble_constructor and assemble_destructor.
3120
3121 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3122
3123         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
3124
3125 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
3126
3127         PR c++/3820
3128         Stop using TYPE_NONCOPIED_PARTS.
3129         * call.c (build_over_call): Be careful when copy constructing
3130         or assigning to an empty class.
3131         * class.c (check_bases_and_members): It has a
3132         COMPLEX_ASSIGN_REF if it has a vptr.
3133         (layout_class_type): Don't add empty class padding to
3134         TYPE_NONCOPIED_PARTS.
3135         (finish_struct_1): Don't add the VFIELD either.
3136         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
3137         initialization.
3138
3139 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
3140
3141         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
3142
3143 2001-08-06  Richard Henderson  <rth@redhat.com>
3144
3145         * decl2.c (finish_objects): Pass a symbol_ref and priority to
3146         assemble_{constructor,destructor}.  Remove priority handling.
3147
3148 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3149
3150         Don't allow template-id in using-declaration.
3151         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
3152         (do_class_using_decl): Likewise.
3153
3154 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3155
3156         * cp/spew.c (read_token): No need to pop buffers.
3157
3158 2001-08-02  Stan Shebs  <shebs@apple.com>
3159
3160         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
3161         (fnaddr_from_vtable_entry): Remove decl.
3162         * method.c (use_thunk): Update comment.
3163
3164 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
3165
3166         * repo.c (get_base_filename): Change return value to const char
3167         pointer.
3168
3169 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
3170
3171         Kill -fhonor-std.
3172         * NEWS: Document.
3173         * cp-tree.h (flag_honor_std): Remove.
3174         (CPTI_FAKE_STD): Remove.
3175         (std_node): Remove comment about it being NULL.
3176         (fake_std_node): Remove.
3177         * decl.c (in_fake_std): Remove.
3178         (walk_namespaces_r): Remove fake_std_node check.
3179         (push_namespace): Remove in_fake_std code.
3180         (pop_namespace): Likewise.
3181         (lookup_name_real): Remove fake_std_node check.
3182         (init_decl_processing): Always create std_node. Always add
3183         std:: things there.
3184         (builtin_function): Always put non '_' fns in std.
3185         * decl2.c (flag_honor_std): Remove.
3186         (lang_f_options): Remove honor-std.
3187         (unsupported_options): Add honor-std.
3188         (set_decl_namespace): Remove fake_std_node check.
3189         (validate_nonmember_using_decl): Likewise.
3190         (do_using_directive): Likewise.
3191         (handle_class_head): Likewise.
3192         * dump.c (cp_dump_tree): Likewise.
3193         * except.c (init_exception_processing): Adjust.
3194         * init.c (build_member_call): Remove fake_std_node check.
3195         (build_offset_ref): Likewise.
3196         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
3197         * rtti.c (init_rtti_processing): Adjust.
3198
3199 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
3200
3201         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
3202         operand while calling cp_tree_equal.
3203
3204 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
3205
3206         The 3.0 ABI no longer has vbase pointer fields.
3207         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
3208         FORMAT_VBASE_NAME): Remove.
3209         * method.c (do_build_copy_constructor): Adjust.
3210         (do_build_assign_ref): Adjust.
3211         * search.c (lookup_field_r): Adjust.
3212         * typeck.c (build_component_ref): Adjust.
3213
3214         The 3.0 ABI always has a vtable pointer at the start of every
3215         polymorphic class.
3216         * rtti.c (build_headof_sub): Remove.
3217         (build_headof): Adjust.
3218         (get_tinfo_decl_dynamic): No need to check flag_rtti
3219         here. Adjust.
3220         (create_real_tinfo_var): Explain why we need a hidden name.
3221
3222 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
3223
3224         PR c++/3631
3225         * class.c (update_vtable_entry_for_fn): The fixed adjustment
3226         of a virtual thunk should be from declaring base.
3227
3228 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
3229
3230         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
3231         the shared virtual base, so preserving inheritance graph order.
3232
3233 2001-07-30  Andreas Jaeger  <aj@suse.de>
3234
3235         * decl2.c: Remove unused var global_temp_name_counter.
3236
3237 2001-07-28  Richard Henderson  <rth@redhat.com>
3238
3239         * method.c (pending_inlines): Remove.
3240
3241 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
3242
3243         * class.c (mark_primary_virtual_base): Don't adjust base
3244         offsets here.
3245         (dfs_unshared_virtual_bases): Adjust them here.
3246         (mark_primary_bases): Explain why we adjust at the end.
3247
3248 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
3249
3250         * class.c (finish_struct_1): When copying the primary base's
3251         VFIELD, make sure we find it is at offset zero.
3252
3253 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3254
3255         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
3256         tsubst_expr for default template arguments.
3257
3258 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
3259
3260         PR c++/3621
3261         * spew.c (yylex): Only copy the token's lineno, if it is
3262         non-zero.
3263
3264 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
3265
3266         PR c++/3624
3267         * call.c (resolve_args): Simplify, call
3268         convert_from_reference.
3269         (build_new_op): Resolve and convert from reference ARG1
3270         earlier. Adjust ARG2 & ARG3 resolve and conversion.
3271
3272 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
3273
3274         * decl.c (last_function_parm_tags): Remove.
3275         (current_function_parm_tags): Remove.
3276         (init_decl_processing): Adjust.
3277         (start_function): Adjust.
3278         (store_parm_decls): Adjust.
3279
3280         PR c++/3152
3281         * decl.c (grokdeclarator): Detect when a function typedef is
3282         declaring a function, and create last_function_parms correctly.
3283
3284 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
3285
3286         * call.c (joust): Only prefer a non-builtin candidate to a builtin
3287         one if they have the same signature.
3288
3289         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
3290         it rather than toplevel_bindings_p.  Give it a mangled name if static.
3291         (convert_to_reference): Adjust.
3292         * decl2.c (get_temp_name): Lose.
3293         * mangle.c (mangle_ref_init_variable): New fn.
3294         (mangle_guard_variable): Strip the ref-init header.
3295         * cp-tree.h: Adjust.
3296         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
3297         initializer.
3298         (grok_reference_init): Always use DECL_INITIAL.
3299
3300 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3301
3302         PR c++/3416
3303         * call.c (build_conditional_expr): Recheck args after
3304         conversions.
3305         * cp-tree.h (build_conditional_expr): Move to correct file.
3306         * typeck.c (decay_conversion): Diagnose any unknown types
3307         reaching here.
3308         (build_binary_op): Don't do initial decay or default
3309         conversions on overloaded functions.
3310         (build_static_cast): Don't do a decay conversion here.
3311
3312 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3313
3314         PR c++/3543
3315         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
3316         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
3317
3318 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3319
3320         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
3321         (create_vtbl_ptr): ... here.
3322
3323 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3324
3325         * class.c (build_vbase_offset_vbtl_entries): Look for
3326         non-primary base of which we are a sub vtable.
3327
3328 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
3329
3330         * semantics.c (finish_this_expr):  Remove unused code.
3331
3332 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
3333
3334         Simplify rtti, now we've only one ABI.
3335         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
3336         CPTI_TINFO_VAR_ID.
3337         (tinfo_decl_id, tinfo_var_id): Remove.
3338         (get_typeid_1): Remove.
3339         * rtti.c
3340         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
3341         (typeid_ok_p): New function.
3342         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
3343         (get_tinfo_decl): Remove old abi documentation.
3344         (tinfo_from_decl): Remove.
3345         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
3346         (get_typeid_1): Remove.
3347         (get_base_offset): Remove.
3348         (synthesize_tinfo_var): Absorb get_base_offset.
3349         (create_real_tinfo_var): Don't use tinfo_decl_id.
3350
3351 2001-07-23  Graham Stott  <grahams@redhat.com>
3352
3353         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
3354         variable has_two_argument_delete_p.
3355
3356 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
3357
3358         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
3359         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
3360         (CPTI_INDEX_IDENTIFIER): Remove.
3361         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
3362         (delta2_identifier): Remove.
3363         (index_identifier): Remove.
3364         (pfn_or_delta2_identifier): Remove.
3365         (flag_vtable_thunks): Remove.
3366         (VTABLE_DELTA2_NAME): Remove.
3367         (VTABLE_INDEX_NAME): Remove.
3368         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
3369         (vfunc_ptr_type_node): Adjust.
3370         (VTABLE_NAME_PREFIX): Adjust.
3371         (build_vfn_ref): Lose first parameter.
3372         (fixup_all_virtual_upcast_offsets): Remove.
3373         * decl.c (initialize_predefined_identifiers): Remove
3374         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
3375         (init_decl_processing): Remove no-vtable-thunk code.
3376         * decl2.c (flag_vtable_thunks): Remove.
3377         (mark_vtable_entries): Remove no-vtable-thunk code.
3378         * error.c (dump_decl): Remove no-vtable-thunk code.
3379         (dump_expr): Adjust ptr to member function code.
3380         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
3381         code.
3382         * rtti.c (build_headof): Remove no-vtable-thunk code.
3383         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
3384         * search.c (get_base_distance): Remove expand_upcast_fixups case.
3385         (virtual_context) Remove.
3386         (expand_upcast_fixups): Remove.
3387         (fixup_virtual_upcast_offsets): Remove.
3388         (fixup_all_virtual_upcast_offsets): Remove.
3389         * typeck.c (get_member_function_from_ptrfunc): Remove
3390         no-vtable-thunk code.
3391         * call.c (build_over_call): Adjust call to build_vfn_ref.
3392         * class.c (build_vfn_ref): Lose first parameter. Remove
3393         no-vtable-thunk code.
3394         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
3395         (build_vtable_entry): Remove no-vtable-thunk code.
3396
3397 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3398
3399         Remove old-abi remnants. Remove comments about old abi
3400         behaviour. Remove references to 'new-abi' in comments.
3401         * cp-tree.h: Adjust comments.
3402         (vbase_offsets_in_vtable_p): Delete.
3403         (vcall_offsets_in_vtable_p): Delete.
3404         (vptrs_present_everywhere_p): Delete.
3405         (all_overridden_vfuns_in_vtables_p): Delete.
3406         (merge_primary_and_secondary_vtables_p): Delete.
3407         (TYPE_CONTAINS_VPTR_P): Adjust.
3408         (VTT_NAME_PREFIX): Remove.
3409         (CTOR_VTBL_NAME_PREFIX): Remove.
3410         (init_vbase_pointers): Remove.
3411         * class.c: Adjust coments.
3412         (build_vbase_pointer_fields): Delete.
3413         (build_vbase_pointer): Remove old-abi code.
3414         (build_secondary_vtable): Likewise.
3415         (modify_all_vtables): Likewise.
3416         (create_vtable_ptr): Likewise.
3417         (layout_class_type): Likewise.
3418         (finish_struct_1): Likewise.
3419         (finish_vtbls): Likewise.
3420         (dfs_finish_vtbls): Delete.
3421         (build_vbase_offset_vtbl_entries): Remove old-abi code.
3422         * cvt.c: Adjust comments.
3423         * decl.c: Adjust comments.
3424         * decl2.c: Adjust comments.
3425         * init.c: Adjust comments.
3426         (construct_virtual_bases): Remove old-abi code.
3427         * lang-specs.h: Remove -fno-new-abi.
3428         * mangle.c: Adjust comments.
3429         * rtti.c: Adjust comments.
3430         (get_base_offset): Remove old-abi-code.
3431         * search.c: Adjust comments.
3432         (dfs_init_vbase_pointers): Remove.
3433         (dfs_vtable_path_unmark): Remove.
3434         (init_vbase_pointers): Remove.
3435         * semantics.c: Adjust comments.
3436         (emit_associated_thunks): Remove old-abi code.
3437         * typeck.c: Adjust comments.
3438
3439 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
3440
3441         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
3442         params.h.
3443
3444 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
3445
3446         * class.c (finish_struct_anon): Forbid nested classes.
3447
3448 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3449
3450         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
3451         * optimize.c: Include debug.h.
3452         (maybe_clone_body): Use debug hook.
3453         * semantics.c: Include debug.h.
3454         (expand_body): Use debug hook.
3455
3456 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3457
3458         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
3459
3460 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
3461
3462         * class.c (type_requires_array_cookie): New function.
3463         (check_methods): Don't try to figure out whether the type needs a
3464         cookie here.
3465         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
3466         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
3467         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
3468         * pt.c (instantiate_class_template): Don't set
3469         TYPE_VEC_DELETE_TAKES_SIZE.
3470         * NEWS: Document ABI changes from GCC 3.0.
3471
3472 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
3473             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
3474
3475         * NEWS (Changes in GCC 3.0): Fix typo.
3476
3477 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3478
3479         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
3480         which attributes are to be attached, and a flags argument.  Update
3481         call to decl_attributes.
3482         (grokfield): Update call to decl_attributes.
3483         * class.c (finish_struct): Update call to cplus_decl_attributes.
3484         * cp-tree.h (cplus_decl_attributes): Update prototype.
3485         * decl.c (start_decl, grokdeclarator, start_function): Update
3486         calls to decl_attributes and cplus_decl_attributes.
3487         * friend.c (do_friend): Update call to cplus_decl_attributes.
3488         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
3489
3490 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
3491
3492         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
3493         for `register' variables with an asm-specification.
3494
3495 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
3496
3497         * semantics.c (finish_asm_stmt): Mark the output operands
3498         to an asm addressable, if necessary.
3499
3500 2001-07-11  Ben Elliston  <bje@redhat.com>
3501
3502         * Revert this change -- there is a subtle bug.
3503
3504         PR c++/80
3505         * decl.c (finish_enum): New "attributes" argument; pass it to
3506         cplus_decl_attributes.  Use a narrower type if the enum is packed.
3507         * cp-tree.h (finish_enum): Adjust prototype.
3508         * parse.y (enum_head): New non-terminal.
3509         (structsp): Use it. Enums now may be preceded or followed by
3510         optional attributes -- pass their chained tree to finish_enum().
3511         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
3512
3513 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
3514
3515         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
3516         variables.
3517
3518 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
3519
3520         * semantics.c (cp_expand_stmt): Fix for null
3521         current_function_return_value.
3522
3523 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
3524
3525         * call.c (build_op_delete_call): Initialize fn.
3526         (convert_like_real): Delete conditional.
3527         (joust): Initialize *w and *l.
3528         * class.c: Add prototype for binfo_ctor_vtable.
3529         (get_primary_binfo): Initialize result.
3530         * init.c (build_java_class_ref): Initialize name.
3531
3532 2001-07-09  Erik Rozendaal  <dlr@acm.org>
3533
3534         * typeck.c (unary_complex_lvalue): Do not duplicate the
3535         argument to modify, pre-, or post-increment when used as an
3536         lvalue and when the argument has side-effects.
3537
3538 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3539
3540         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
3541         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
3542         cplus_decl_attributes even if attrs is NULL.
3543         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
3544
3545 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3546
3547         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
3548         calls to decl_attributes.
3549
3550 2001-07-06  Ira Ruben   <ira@apple.com>
3551
3552         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
3553         be DECL_TEMPLATE_RESULT.
3554
3555 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3556
3557         * cp-tree.h (copy_template_template_parm): Rename to ...
3558         (bind_template_template_parm): ... here.
3559         * tree.c (copy_template_template_parm): Rename to ...
3560         (bind_template_template_parm): ... here.  Remove the case when
3561         NEWARGS is NULL_TREE.
3562         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
3563         BOUND_TEMPLATE_TEMPLATE_PARM.
3564         * pt.c (lookup_template_class): Adjust.
3565
3566 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
3567
3568         * cvt.c (convert_lvalue): New fn.
3569         * cp-tree.h: Declare it.
3570         * method.c (do_build_assign_ref): Use it.
3571         (do_build_copy_constructor): Convert parm to base types
3572         before calling base constructors.
3573
3574         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
3575         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
3576         optimize.
3577         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
3578
3579 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3580
3581         * optimize.c (optimize_inline_calls): New function, broken out
3582         of ...
3583         (optimize_function): ... here. Call it. Don't inline if it is
3584         a thunk.
3585         (dump_function): Print name of dump flag causing this dump.
3586         * semantics.c (expand_body): Move thunk inline check to
3587         optimize_function.
3588
3589 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3590
3591         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
3592         (comptypes): Use target.comp_type_attributes.
3593
3594 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
3595
3596         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
3597
3598 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3599
3600         * error.c (lang_print_error_function): Add a `diagnostic_context *'
3601         parameter. Tweak.
3602
3603 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3604
3605         * decl2.c (import_export_class): Update.
3606
3607 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3608
3609         * error.c (init_error): Adjust settings.
3610
3611 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3612
3613         * error.c (init_error): Adjust settings.
3614
3615 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
3616
3617         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
3618         return pointers to data members by reference rather than by value.
3619
3620 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
3621
3622         Implement the Named Return Value optimization.
3623         * cp-tree.h (struct cp_language_function): Add x_return_value.
3624         (current_function_return_value): Now a macro.
3625         * decl.c: Don't define it.
3626         (define_label, finish_case_label): Don't clear it.
3627         (init_decl_processing): Don't register it with GC.
3628         * semantics.c (genrtl_finish_function): Don't check it for
3629         no_return_label.  Copy the RTL from the return value to
3630         current_function_return_value and walk, calling...
3631         (nullify_returns_r): ...this new fn.
3632         * typeck.c (check_return_expr): Set current_function_return_value.
3633
3634 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
3635
3636         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
3637         sharing a ctor vtable with.  Merge code for cases 1 and 2.
3638         (binfo_ctor_vtable): New fn.
3639         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
3640
3641 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
3642
3643         * class.c (dfs_find_final_overrider): Fix logic.
3644
3645         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
3646         virtual thunk instead of non-virtual.
3647         (get_matching_virtual): Uncomment.
3648
3649         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
3650         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
3651         PARM, not ARG.
3652
3653 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3654
3655         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
3656         we've not emerged from the hierarchy of RTTI_BINFO on reaching
3657         a non-virtual base.
3658
3659 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
3660
3661         * NEWS: Update release number.
3662
3663 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3664
3665         PR c++/3130, c++/3131, c++/3132
3666         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
3667         * class.c (force_canonical_binfo_r): Move
3668         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
3669         virtual bases unless they're primary and what they're primary
3670         too has been moved.
3671         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
3672         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
3673         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
3674         derived binfo.
3675         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
3676         (layout_nonempty_base_or_field): Add most derived type
3677         parameter. Adjust.
3678         (layout_empty_base): Likewise.
3679         (build_base_field): Likewise.
3680         (build_base_fields): Likewise.
3681         (propagate_binfo_offsets): Add most derived type
3682         parameter. Skip non canonical virtual bases too.
3683         (dfs_set_offset_for_unshared_vbases): Don't skip primary
3684         bases. Do skip canonical bases.
3685         (layout_virtual_bases): Adjust.
3686         (layout_class_type): Adjust.
3687         (dfs_get_primary_binfo): Build list of virtual primary base
3688         candidates.
3689         (get_primary_binfo): Check that the shared virtual primary
3690         base candidate was found first.
3691         (accumulate_vtbl_inits): Don't do anything for non-vptr
3692         containing binfos. For case 1 primary virtual bases, keep
3693         checking that we've not emerged from the hierarchy of RTTI_BINFO.
3694
3695 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3696
3697         PR c++/3089
3698         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
3699         hierarchy looking for primary bases for a ctor
3700         vtable. Recursively call oneself, if we meet our primary via
3701         this route and haven't met it yet via inheritance graph order.
3702
3703 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
3704
3705         * lang-options.h: Emit documentation for -fno-honor-std, not
3706         -fhonor-std.
3707
3708 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
3709
3710         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
3711         Don't clobber delta.
3712         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
3713
3714 2001-06-10  Mark Mitchell <mark@codesourcery.com>
3715             Gabriel Dos Reis  <gdr@codesourcery.com>
3716
3717         * Make-lang.in (cp/call.o): Depend on diagnostic.h
3718         (cp/typeck.o): Depend on diagnostic.h
3719         (cp/typeck2.o): Depend on diagnostic.h
3720         (cp/repo.o): Depend on dignostic.h
3721         * typeck.c: #include diagnostic.h
3722         (convert_for_initialization): Remove extern declaration for
3723         warningcount and errorcount.
3724
3725         * call.c: #include diagnostic.h
3726         (convert_like_real): Remove extern declaration for warnincount and
3727         errorcount.
3728
3729         * repo.c: #include diagnostic.h
3730         * typeck2.c: #include diagnostic.h
3731
3732 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3733
3734         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
3735         in previous change.
3736
3737 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3738
3739         PR c++/2929
3740         * friend.c (do_friend): Use push_decl_namespace for classes at
3741         namespace scope.
3742
3743 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3744             Jason Merrill <jason_merrill@redhat.com>
3745
3746         PR c++/3061
3747         * class.c (build_secondary_vtable): Use assert, rather than an error
3748         message.
3749         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
3750         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
3751         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
3752         Don't set BINFO_VTABLE for a primary virtual base.
3753
3754 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
3755
3756         * decl.c (duplicate_decls): Update source position information
3757         when a template function is defined.
3758
3759 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
3760
3761         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
3762
3763 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
3764
3765         PR c++/2914
3766         * decl.c (pushtag): Don't push into a complete type's scope.
3767
3768 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
3769
3770         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
3771         (struct lang_decl_flags): Lose generate_with_vtable_p.
3772         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
3773         * class.c (copy_virtuals): Adjust.
3774         * decl2.c (mark_vtable_entries): Adjust.
3775         * method.c (make_thunk, build_vtable_entry): Adjust.
3776         * class.c (update_vtable_entry_for_fn): Only look as far as the
3777         first defining class.
3778         (build_vtbl_initializer): Put nothing in the slot for a function only
3779         defined in a lost primary virtual base.
3780         (add_vcall_offset_vtbl_entries_1): Use the same code for
3781         the lost primary case and the normal case.
3782         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
3783         (get_vfield_offset, get_derived_offset): Lose.
3784         (dfs_find_final_overrider): Use look_for_overrides_here.
3785         (get_matching_virtual): New fn.
3786         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
3787         not BV_VCALL_INDEX.
3788         * search.c (look_for_overrides_here): Split out from...
3789         (look_for_overrides_r): Here.
3790
3791         * class.c (find_final_overrider): Return error_mark_node on error.
3792
3793         * decl2.c (key_method): #if 0 accidental change.
3794
3795 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3796
3797         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
3798         (build_over_call): Likewise.
3799         * decl.c (grokparms): Likewise.
3800         * pt.c (tsubst_decl): Likewise.
3801         * typeck.c (convert_arguments): Likewise.
3802
3803 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
3804
3805         * semantics.c (begin_class_definition): Robustify.
3806
3807         * pt.c (instantiate_decl): Tell the repository code about the
3808         clones, not the cloned functions.
3809         * repo.c (repo_template_used): Explicitly instantiate the cloned
3810         function, not the clones.
3811
3812 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3813
3814         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
3815         ICS_BAD_FLAG on created conversion.
3816         (compare_ics): Break out rank.
3817
3818 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3819
3820         * decl.c (xref_tag): Remove extraneous %s on dependent name
3821         lookup warning.
3822
3823 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3824
3825         * class.c (layout_vtable_decl): Fix off by one error on
3826         build_index_type.
3827         (build_vtt): Likewise.
3828         (build_ctor_vtbl_group): Likewise.
3829
3830 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3831
3832         * class.c (maybe_indent_hierarchy): New function.
3833         (dump_class_hierarchy_r): Add flags. Dump extra binfo
3834         information, if enabled. Use maybe_indent_hierarchy. Adjust
3835         output format.
3836         (dump_class_hierarchy): Adjust prototype. Adjust output format.
3837         (dump_array, dump_vtable, dump_vtt): New functions.
3838         (finish_struct_1): Adjust hierarchy dumping.
3839         (initialize_vtable): Call dump_vtable.
3840         (build_vtt): Call dump_vtt.
3841         (build_ctor_vtbl_group): Call dump_vtable.
3842         * decl2.c (flag_dump_class_layout): Remove.
3843         (cxx_decode_option): Remove dump translation unit
3844         and dump class hierarchy check. Call dump_switch_p.
3845         (finish_file): Adjust dumping.
3846         (dump.c): Only dump base classes if not TDF_SLIM.
3847         Only dump namespace members if not TDF_SLIM.
3848         * optimize.c (dump_function): New function.
3849         (optimize_function): Call dump_function.
3850         * semantics.c (expand_body): Use dump_enabled_p.
3851
3852 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
3853
3854         PR g++/2936
3855         Part missed from first commit
3856         * decl2.c (finish_anon_union): Copy context.
3857
3858 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
3859
3860         PR g++/2936
3861         * optimize.c (remap_decl): Remap anonymous aggregate members too.
3862
3863 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
3864
3865         PR g++/2823
3866         * semantics.c (expand_body): Don't optimize thunks.
3867
3868 2001-05-25  Sam TH  <sam@uchicago.edu>
3869
3870         * cp-tree.h lex.h: Fix header include guards.
3871
3872 2001-05-25  Mark Mitchell <mark@codesourcery.com>
3873
3874         * decl.c (init_decl_processing): Tweak.
3875
3876 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
3877
3878         * decl.c (duplicate_decls): Tidy.
3879         (init_decl_processing): Always set flag_no_builtin.
3880
3881 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
3882
3883         PR c++/2184
3884         * decl2.c (do_local_using_decl): Push the decls, even in a
3885         template.
3886
3887 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
3888
3889         * optimize.c (initialize_inlined_parameters): Don't set
3890         TREE_READONLY for a VAR_DECL taking the place of an inlined
3891         PARM_DECL.
3892
3893 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
3894
3895         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
3896         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
3897         attribute.
3898
3899 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
3900
3901         * parse.y: Refer to compound literals as such, not as
3902         constructor-expressions.
3903
3904 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
3905
3906         * call.c (build_op_delete_call): Ignore exception-specifications
3907         when looking for matching delete operators.
3908         * init.c (build_new_1): Compute whether or not the allocation
3909         function used is a placement allocation function or not, and
3910         communicate this information to build_op_delete_call.
3911
3912 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
3913
3914         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
3915         (build_vtbl_ref): Adjust.
3916         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
3917         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
3918         Re-add vtable-gc.
3919         (unsupported_options): Correspondingly.
3920
3921         * decl2.c (maybe_make_one_only): Check flag_weak, not
3922         supports_one_only().
3923
3924         * cp-tree.def (START_CATCH_STMT): Lose.
3925         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
3926         * tree.c (cp_statement_code_p): Don't case it.
3927         * semantics.c (cp_expand_stmt): Likewise.
3928         * cp-tree.h (START_CATCH_TYPE): Lose.
3929         (HANDLER_TYPE): New.
3930         * except.c (expand_start_catch_block): Don't start any blocks.
3931         Return the type.
3932         (expand_end_catch_block): Don't end any blocks.
3933         * parse.y (handler): Don't pass anything from finish_handler_parms
3934         to finish_handler.
3935         * pt.c (tsubst_expr): Likewise.
3936         * semantics.c (begin_handler): Call note_level_for_catch here.
3937         (finish_handler_parms): Don't return anything.
3938         (genrtl_catch_block, begin_catch_block): Lose.
3939         (genrtl_handler): Call expand_start_catch here.
3940
3941 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
3942
3943         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
3944         (get_vtable_decl, build_vtt): Not here.
3945
3946 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
3947
3948         PR c++/2781
3949         * optimize.c (update_cloned_parm): Copy addressability and other
3950         flags.
3951
3952 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3953
3954         * pt.c (determine_specialization): Ignore artificial functions.
3955
3956 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3957
3958         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
3959         (C_RID_CODE): Remove.
3960         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
3961         (init_parse): Don't do it here.
3962
3963 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
3964
3965         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
3966         function declaration to avoid stripping the symbol's attributes.
3967
3968 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
3969
3970         * decl.c (pushdecl): Adjust error string.
3971         (xref_tag): Adjust friend class injection warning. Remove the
3972         inherited name from the class shadowed scope.
3973
3974 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
3975
3976         * except.c (cp_protect_cleanup_actions): New function.
3977         (init_exception_processing): Don't set protect_cleanup_actions
3978         here.  Do set lang_protect_cleanup_actions.
3979
3980 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3981
3982         * spew.c (read_token): Call yyerror on all unexpected tokens.
3983
3984 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3985
3986         * init.c (member_init_ok_or_else): Take a tree rather than
3987         string for name.
3988         (expand_member_init): Adjust.
3989
3990 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
3991
3992         * decl.c (duplicate_decls): Suppress warning about duplicate
3993         decls if the first decl is a friend.
3994
3995 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
3996
3997         * except.c (choose_personality_routine): Export.  Add
3998         explanatory comment.  Take an enum languages, not a boolean.
3999         (initialize_handler_parm): Adjust to match.
4000         * cp-tree.h: Prototype choose_personality_routine.
4001         * lex.c (handle_pragma_java_exceptions): New function.
4002         (init_cp_pragma): Register #pragma GCC java_exceptions.
4003
4004 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4005
4006         * method.c (build_mangled_C99_name): Remove unused prototype.
4007
4008 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
4009
4010         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
4011         * typeck.c (get_member_function_from_ptrfunc,
4012         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
4013         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
4014
4015         Reverted Geoff Keating's 2001-05-03's patch.
4016
4017 2001-05-11  Ira Ruben   <ira@apple.com>
4018
4019         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
4020
4021 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
4022
4023         * cp-tree.h (finish_label_expr, lookup_label): Delete.
4024         * parse.y: Update for '&&'; don't issue warning here.
4025         * semantics.c (finish_label_expr): Delete.
4026
4027 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
4028
4029         * splay-tree.h (splay_tree_max): New function.
4030         (splay_tree_min): Likewise.
4031
4032 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
4033
4034         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
4035         (pfn_vflag_identifier): Define.
4036         Update comment about layout of pointer functions.
4037         (build_ptrmemfunc1): Update prototype.
4038         (expand_ptrmemfunc_cst): Update prototype.
4039         * decl.c (initialize_predefined_identifiers): Initialize
4040         pfn_vflag_identifier.
4041         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
4042         an extra field to the type.
4043         * expr.c (cplus_expand_constant): Pass 'flag' between
4044         expand_ptrmemfunc_cst and build_ptrmemfunc1.
4045         * typeck.c (get_member_function_from_ptrfunc): When
4046         FUNCTION_BOUNDARY < 16, look at additional field to determine
4047         if a pointer-to-member is a real pointer or a vtable offset.
4048         (build_ptrmemfunc1): Add new parameter to contain extra field.
4049         (build_ptrmemfunc): Pass the extra field around.
4050         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
4051         (pfn_from_ptrmemfunc): Ignore the extra field.
4052
4053 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
4054
4055         * cp-tree.h (flag_inline_trees): Update documentation.
4056         * decl.c (init_decl_processing): Adjust handling of
4057         flag_inline_functions and flag_inline_trees to support -O3.
4058         (grokfndecl): Set DECL_INLINE on all functions if that's what
4059         the user requested.
4060         (save_function_data): Clear DECL_INLINE in
4061         current_function_cannot_inline is non-NULL.
4062         * decl2.c (flag_inline_trees): Update documentation.
4063
4064 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
4065
4066         * dump.c (cp_dump_tree, USING_STMT case): New case.
4067         * tree.c (cp_statement_code_p): Add USING_STMT.
4068         * decl2.c (do_using_directive): Add the using directive statement.
4069
4070         * tree.c (walk_tree): Reformat an if block.
4071
4072 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
4073
4074         * decl.c (compute_array_index_type): Don't try to do anything with
4075         the indices when processing a template.
4076
4077 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4078
4079         * call.c: NULL_PTR -> NULL.
4080         * class.c: Likewise.
4081         * cvt.c: Likewise.
4082         * decl.c: Likewise.
4083         * decl2.c: Likewise.
4084         * except.c: Likewise.
4085         * init.c: Likewise.
4086         * rtti.c: Likewise.
4087         * search.c: Likewise.
4088         * tree.c: Likewise.
4089         * typeck.c: Likewise.
4090         * typeck2.c: Likewise.
4091
4092 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
4093
4094         * decl2.c (do_using_directive): Revert previous patch.
4095
4096 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4097
4098         * cp-tree.def (USING_STMT): New statement node.
4099         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
4100         * decl2.c (do_using_directive): Add USING_STMT to statement
4101         tree. Don't emit errors when processing template decl.
4102         * pt.c (tsubst_expr, USING_STMT case): New case.
4103         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
4104
4105 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4106
4107         * call.c (build_new_op): Convert args from reference here.
4108         (build_conditional_expr): Don't convert here.
4109
4110 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4111
4112         * spew.c (last_token_id): New static variable.
4113         (read_token): Set it here.
4114         (yyerror): Use it here.
4115
4116 2001-04-30  Richard Henderson  <rth@redhat.com>
4117
4118         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
4119         * decl.c: Likewise.
4120
4121 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
4122
4123         * gxxint.texi: Remove.
4124         * Make-lang.in: Remove all traces of gxxint.texi.
4125
4126 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
4127
4128         * decl2.c (start_static_initialization_or_destruction): Correct
4129         logic to handle the -fno-use-cxa-atexit case.
4130
4131 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
4132
4133         * optimize.c (update_cloned_parm): New function.
4134         (maybe_clone_body): Use it.  Update the `this' parameter too.
4135
4136 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4137
4138         * decl2.c (unsupported_options): Add new-abi.
4139         * lang-options.h: Remove no longer supported options.
4140
4141 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
4142
4143         * except.c (can_convert_eh): Don't check template parms,
4144         typename types etc.
4145
4146 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
4147
4148         * optimize.c (maybe_clone_body): Copy parameter names and locations.
4149
4150 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
4151
4152         * cp-tree.h (adjust_clone_args): Prototype new function.
4153         * class.c (adjust_clone_args): New function.
4154         * decl.c (start_function): Call it for in charge ctors.
4155
4156 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
4157
4158         * method.c (use_thunk): Make sure that thunks really are emitted
4159         when requested.
4160
4161 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
4162
4163         * mangle.c (write_chars): New macro.
4164         (hwint_to_ascii): New function
4165         (write_number): Use it.
4166         (write_integer_cst): Deal with really big numbers.
4167
4168 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
4169
4170         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
4171         the clone.
4172
4173 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
4174
4175         * decl.c (grokdeclarator): Set context of namespace scope
4176         TYPE_DECLS.
4177
4178 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
4179
4180         * cp/optimize.c: Include hashtab.h.
4181         (struct inline_data): Add tree_pruner.
4182         (expand_call_inline, expand_calls_inline): Use it when calling
4183         walk_tree.
4184         (optimize_function): Initialize and free tree_pruner.
4185
4186 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
4187
4188         Lazy __FUNCTION__ generation.
4189         * cp-tree.def (FUNCTION_NAME): Remove.
4190         * cp-tree.h (function_name_declared_p): Remove.
4191         (cp_fname_init): Prototype.
4192         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
4193         don't call declare_function_name. Call start_fname_decls.
4194         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
4195         clobber the line number.
4196         (cp_fname_init): New function.
4197         (start_function): Call start_fname_decls.
4198         (finish_function): Call finish_fname_decls.
4199         * lex.c (reswords): Add slots for __FUNCTION__ et al.
4200         (rid_to_yy): Add mappings for __FUNCTION__ et al.
4201         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
4202         * parse.y (VAR_FUNC_NAME): New token.
4203         (primary): Add VAR_FUNC_NAME.
4204         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
4205         generation.
4206         (tsubst, FUNCTION_NAME case): Remove.
4207         (tsubst_copy, FUNCTION_NAME case): Remove.
4208         (tsubst_expr, DECL_STMT case): Be careful with a
4209         DECL_PRETTY_FUNCTION_P.
4210         (instantiate_decl): Remove function_name_declared_p.
4211         * semantics.c (begin_compound_statement): Don't call
4212         declare_function_name here.
4213         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
4214         (finish_translation_unit): Call finish_fname_decls.
4215         (expand_body): Remove function_name_declared_p.
4216         * typeck2.c (digest_init): Allow any ERROR_MARK.
4217
4218 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
4219
4220         * pt.c (tsubst_decl): Use VOID_TYPE_P.
4221         * semantics.c: Fix some typos.
4222
4223 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
4224
4225         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
4226
4227 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4228
4229         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
4230
4231 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
4232
4233         * except.c (build_throw): Wrap the initialization of the exception
4234         object in a MUST_NOT_THROW_EXPR.
4235         (do_free_exception): #if 0.
4236
4237 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
4238
4239         * cp-tree.h (finish_enum): Change prototype.
4240         * decl.c (finish_enum): Reorganize.
4241         * parse.y (structsp): Adjust calls to finish_enum.
4242
4243 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4244
4245         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
4246         't' case.
4247
4248 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4249
4250         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
4251         (layout_empty_base): Return at end flag.
4252         (build_base_field): Likewise.
4253         (build_base_fields): Likewise.
4254         (layout_virtual_bases): Don't add 1 to eoc value.
4255         (end_of_class): Use full size for empty bases.
4256         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
4257         empty bases. Don't add 1 to eoc value. Only add trailing padding
4258         if we're an empty class with no empty bases.
4259         (dump_class_hierarchy): Dump size and alignment.
4260
4261 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
4262
4263         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
4264         ICS_BAD_FLAG.
4265
4266 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
4267
4268         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
4269         is found, look first if name does not match the structure name.
4270
4271 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
4272
4273         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
4274         set.
4275         (SET_DECL_LANGUAGE): New macro.
4276         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
4277         (pushdecl): Likewise.
4278         (build_library_fn_1): Likewise.
4279         (build_cp_library_fn): Likewise.
4280         (grokfndecl): Likewise.
4281         (grokvardecl): Mark `extern "C"' variables as having C linkage.
4282         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
4283         * lex.c (retrofit_lang_decl): Likewise.
4284         * mangle.c (mangle_decl_string): Don't mangle the names of
4285         variables declared with C language linkage.
4286         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
4287
4288 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4289
4290         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
4291         flag_access_control from uninitialized storage.
4292
4293 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
4294
4295         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
4296         * mangle.c (write_pointer_to_member_type): Fix mangling of
4297         pointers to cv-qualified member function types.
4298
4299         * init.c (build_delete): Create a SAVE_EXPR for the address if
4300         we're going to use it more than once.
4301
4302 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
4303
4304         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
4305         (expand_ptremfunc_cst): Change prototype.
4306         (delta2_from_ptrmemfunc): Remove.
4307         * expr.c (cplus_expand_constant): Adjust call to
4308         expand_ptrmemfunc_cst.
4309         * typeck.c (build_ptrmemfunc1): Simplify.
4310         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
4311         results in a constant.
4312         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
4313         (delta2_from_ptrmemfunc): Remove.
4314         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
4315
4316 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
4317
4318         * cp-tree.h (decl_namespace_list): New macro.
4319         (struct saved_scope): Add decl_ns_list.
4320         * decl.c (mark_saved_scope): Mark it.
4321         * decl2.c: Lose static decl_namespace_list.
4322         (init_decl2): Don't save it.
4323
4324 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4325
4326         * cp-tree.h (warn_return_type, yylex): Delete redundant
4327         declarations.
4328
4329         * decl.c (current_class_depth, global_namespace): Likewise.
4330
4331         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
4332
4333         * repo.c (flag_use_repository): Likewise.
4334
4335 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4336
4337         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
4338         set_block, pushdecl, getdecls, gettags, init_decl_processing,
4339         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
4340         lvalue_or_else, print_lang_statistics, comp_target_types,
4341         unsigned_type, signed_type, signed_or_unsigned_type,
4342         build_function_call, mark_addressable, incomplete_type_error):
4343         Delete redundant declarations.
4344
4345 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
4346
4347         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
4348         (TYPE_ANONYMOUS_P): New macro.
4349         (TAGGED_TYPE_P): New macro.
4350         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
4351         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
4352         * tree.c (no_linkage_helper): Likewise.
4353         * semantics.c (begin_class_definition): Likewise.
4354         * pt.c (convert_template_argument): Likewise.
4355         * lex.c (check_for_missing_semicolon): Likewise.
4356
4357 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
4358
4359         * class.c (dfs_unshared_virtual_bases): New function.
4360         (mark_primary_bases): Call it.
4361         (check_bases): Ignore virtual bases when determining
4362         nearly-emptiness.
4363
4364 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
4365
4366         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
4367
4368 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
4369
4370         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
4371         cloned function to the clone.
4372
4373 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4374
4375         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
4376
4377         * semantics.c: Include expr.h.
4378
4379 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
4380
4381         * method.c (implicitly_declare_fn): Commonize code for copy ctor
4382         and assignment op. Set TREE_USED for parameter.
4383
4384 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
4385
4386         * class.c (find_final_overrider_data): Add `candidates'.
4387         (dfs_find_final_overrider): Don't issue error messages
4388         prematurely.
4389         (find_final_overrider): Issue error messages here.
4390         (build_base_field): Don't warn about amgibuous direct bases here.
4391         (warn_about_ambiguous_direct_bases): New function.
4392         (layout_class_type): Use it.
4393
4394 2001-04-10  Richard Henderson  <rth@redhat.com>
4395
4396         * typeck.c (build_array_ref): Push the array reference inside
4397         COMPOUND_EXPR and COND_EXPR.
4398
4399 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
4400
4401         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
4402         * decl.c (duplicate_decls): Adjust accordingly.
4403         (maybe_commonize_var): Likewise.
4404         (grokfndecl): Likewise.
4405         (start_function): Likewise.
4406         (start_method): Likewise.
4407         * decl2.c (key_method): Likewise.
4408         (import_export_decl): Likewise.
4409         * method.c (implicitly_declare_fn): Likewise.
4410         * optimize.c (maybe_clone_body): Likewise.
4411
4412 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
4413
4414         * lang-specs.h: Add __DEPRECATED.
4415
4416 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
4417
4418         * search.c (get_dynamic_cast_base_type): When building a new
4419         constant, set its type to ssizetype.
4420
4421 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
4422
4423         * optimize.c (expand_call_inline): Only add newly inlined statements
4424         into inlined_stmts.
4425
4426 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
4427
4428         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
4429         (OPERATOR_FORMAT): Likewise.
4430         (OPERATOR_TYPENAME_FORMAT): Likewise.
4431         * operators.def: Remove old name-mangling information.
4432         * decl.c (grok_op_properties): Adjust accordingly.
4433         * lex.c (init_operators): Likewise.
4434         * rtti.c (get_tinfo_decl): Issue error messages about types that
4435         have variable size.
4436
4437 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
4438
4439         * decl2.c (import_export_decl): Don't call import_export_class
4440         when processing an inline member function.
4441         * semantics.c (expand_body): Call import_export_decl before
4442         emitting inline functions.
4443
4444 2001-03-28  Richard Henderson  <rth@redhat.com>
4445
4446         IA-64 ABI Exception Handling:
4447         * cp-tree.def (EH_SPEC_BLOCK): New.
4448         (MUST_NOT_THROW_EXPR): New.
4449         * cp-tree.h: Update changed function declarations.
4450         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
4451         (CPTI_CALL_UNEXPECTED): New.
4452         (struct cp_language_function): Rename x_eh_spec_try_block
4453         to x_eh_spec_block.
4454         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
4455         * decl.c (current_binding_level): If no current function
4456         bindings, revert to scope_chain.
4457         (initialize_predefined_identifiers): Remove __cp_push_exception.
4458         (store_parm_decls): Use begin_eh_spec_block.
4459         (finish_function): Use finish_eh_spec_block.
4460         (mark_lang_function): Update for name changes.
4461         * decl2.c (finish_file): No mark_all_runtime_matches.
4462         * dump.c (cp_dump_tree): Handle new tree codes.
4463         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
4464         * except.c (catch_language_init, catch_language): Remove.
4465         (init_exception_processing): Don't set language code.
4466         Initialize call_unexpected_node, protect_cleanup_actions,
4467         eh_personality_libfunc, lang_eh_runtime_type.
4468         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
4469         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
4470         (prepare_eh_type): Split out type canonicalizations ...
4471         (build_eh_type_type): ... from here.
4472         (build_eh_type_type_ref): Remove.
4473         (mark_all_runtime_matches): Remove.
4474         (build_exc_ptr): New.
4475         (do_begin_catch, do_end_catch): New.
4476         (do_pop_exception): Remove.
4477         (build_terminate_handler): Remove.
4478         (choose_personality_routine): Split out language choice from ...
4479         (initialize_handler_parm): ... here.
4480         Use MUST_NOT_THROW_EXPR.
4481         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
4482         exception object handling.
4483         (expand_start_eh_spec, expand_end_eh_spec): Remove.
4484         (expand_exception_blocks, alloc_eh_object): Remove.
4485         (begin_eh_spec_block, finish_eh_spec_block): New.
4486         (do_allocate_exception, do_free_exception): New.
4487         (expand_throw): Merge into ...
4488         (build_throw): ... here.  Update for abi.
4489         * expr.c (cplus_expand_expr): No expand_internal_throw.
4490         Handle MUST_NOT_THROW_EXPR.
4491         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
4492         * semantics.c (*) Update for except.h name changes.
4493         (genrtl_try_block): No protect_with_terminate.
4494         (genrtl_eh_spec_block): New.
4495         (genrtl_handler): Don't emit the goto here.
4496         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
4497         (genrtl_finish_function): Don't expand_exception_blocks.
4498         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
4499
4500 2001-03-28  Richard Henderson  <rth@redhat.com>
4501
4502         * decl.c (struct named_label_list): Rename eh_region to
4503         in_try_scope, add in_catch_scope.
4504         (struct binding_level): Rename eh_region to is_try_scope,
4505         add is_catch_scope.
4506         (note_level_for_try): Rename from note_level_for_eh.
4507         (note_level_for_catch): New.
4508         (poplevel): Copy both is_try_scope and is_catch_scope to
4509         the named_label_list struct.
4510         (check_previous_goto_1): Don't check for catch block via
4511         DECL_ARTIFICIAL; use in_try_scope instead.
4512         (check_goto): Likewise.
4513         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
4514         * except.c (expand_start_catch_block): Call note_level_for_catch.
4515         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
4516
4517 2001-03-27  Richard Henderson  <rth@redhat.com>
4518
4519         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
4520         exceptions_via_longjmp.
4521
4522 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
4523
4524         * pt.c (check_default_tmpl_args):  Make error messages clearer.
4525
4526 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
4527
4528         * error.c:  Also undefine 'A' macro used for cp_printers definition.
4529
4530 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4531
4532         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
4533
4534 2001-03-26  Mike Yang <yang@research.att.com>
4535             Mark Mitchell  <mark@codesourcery.com>
4536
4537         * dump.c (dump_access): New function.
4538         (cp_dump_tree): Use it.  Dump basetype information for class
4539         types.
4540
4541 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
4542
4543         * Makefile.in (optimize.o): Depend on params.h.
4544         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
4545         (init_decl_processing): Set flag_no_inline when doing
4546         inlining-on-trees.
4547         * optimize.c: Include params.h.
4548         (struct inline_data): Improve documentation of FNS.  Add
4549         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
4550         (INSNS_PER_STMT): New macro.
4551         (remap_block): Use CLONING_P.
4552         (inlinable_function_p): Don't inline big functions.
4553         (expand_call_inline): Keep track of how much inlining we've done.
4554         (optimize_function): Set FIRST_INLINED_FN.
4555         (maybe_clone_body): Set CLONING_P.
4556         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
4557         tree nodes.
4558         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
4559         rest_of_compilation.  Clear DECL_RTL for local variables
4560         afterwards.
4561         (clear_decl_rtl): New function.
4562
4563 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4564
4565         Implement DR 209
4566         * cp-tree.h (skip_type_access_control,
4567         reset_type_access_control): Prototype.
4568         * decl.c (grokdeclarator): Access of friends is not checked.
4569         * parse.y (component_decl_list): Reset type access control.
4570         * semantics.c (decl_type_access_control): Clear
4571         current_type_lookups.
4572         (save_type_access_control): Don't save if not deferring.
4573         (skip_type_access_control, reset_type_access_control): New
4574         functions.
4575         (begin_class_definition): Do type access control for basetypes.
4576         Start deferred access control.
4577         (finish_class_definition): Resume immediate access control if
4578         this is a local class.
4579
4580 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4581
4582         * class.c (add_method): Use memcpy/memmove, not bcopy.
4583
4584         * decl.c (duplicate_decls): Likewise.
4585
4586 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
4587
4588         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
4589         not `_'.
4590
4591 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
4592
4593         * decl.c (local_names): Define.
4594         (push_local_name): New.
4595         (grok_reference_init): Return init if initializing static reference
4596         variable with non-constant instead of emitting it.
4597         Move expand_static_init call to cp_finish_decl.
4598         (layout_var_decl): Call push_local_name.
4599         (maybe_commonize_var): Allow inlining functions even if they have
4600         static local variables, use comdat_linkage for them if flag_weak.
4601         (check_initializer): Call obscure_complex_init if
4602         grok_reference_init returned non-zero.
4603         (save_function_data): Clear x_local_names.
4604         (pop_cp_function_context): Free x_local_names.
4605         (mark_inlined_fns): Remove.
4606         (mark_lang_function): Mark x_local_names.
4607         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
4608         Mark inlined_fns as tree, remove call to mark_inlined_fns.
4609         * class.c (alter_access): Ensure DECL_ACCESS is never set if
4610         DECL_DISCRIMINATOR_P.
4611         * cp-tree.h (cp_language_function): Add x_local_names.
4612         (lang_decl_flags): Add discriminator into u2.
4613         (lang_decl_inlined_fns): Remove.
4614         (lang_decl): inlined_fns is now a TREE_VEC.
4615         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
4616         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
4617         TREE_VEC, not a custom structure.
4618         (optimize_function): Likewise.
4619         * mangle.c (discriminator_for_local_entity): Discriminate among
4620         VAR_DECL local entities.
4621         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
4622         is not valid.
4623
4624 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
4625
4626         Add support for Java interface method calls.
4627         * cp-tree.h (struct lang_type): Add java_interface flag.
4628         (TYPE_JAVA_INTERFACE): New macro.
4629         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
4630         by setting TYPE_JAVA_INTERFACE.
4631         * call.c (java_iface_lookup_fn): New static.
4632         (build_over_call): If calling a method declared in a
4633         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
4634         expression which resolves the function address.
4635         (build_java_interface_fn_ref): New function.
4636
4637 2001-03-22  Richard Henderson  <rth@redhat.com>
4638
4639         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
4640         * except.c: Don't include it.
4641
4642 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
4643             based on an idea from Joe Buck <jbuck@synopsys.com>
4644
4645         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
4646         New nonterminals.
4647         (data_def, component_decl): Add reductions to bad_decl.
4648
4649 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
4650
4651         * method.c (do_build_assign_ref): Don't use build_modify_expr for
4652         anonymous aggregates, since they don't have assignment operator
4653         method.
4654         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
4655         assignment operators for anonymous structure fields.
4656
4657 2001-03-21  Jason Merrill  <jason@redhat.com>
4658
4659         * pt.c (instantiate_decl): Abort if we see a member constant
4660         instantiation that doesn't already have its initializer.
4661         Downgrade explicit instantiation without definition to pedwarn.
4662
4663         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
4664         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
4665         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
4666
4667         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
4668         (pending_vtables): Remove.
4669         * decl2.c (pending_vtables): Remove.
4670         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
4671         CLASSTYPE_VTABLE_NEEDS_WRITING.
4672         (import_export_class): Likewise.
4673         (init_decl2): Don't mark pending_vtables.
4674         * lex.c (handle_pragma_vtable): Just sorry.
4675         * pt.c (instantiate_class_template): Don't mess with
4676         CLASSTYPE_VTABLE_NEEDS_WRITING.
4677         (mark_class_instantiated): Likewise.
4678         * ptree.c (print_lang_type): Don't print it.
4679         * semantics.c (begin_class_definition): Don't set it.
4680
4681         * pt.c (template_tail): Replace with last_pending_template.
4682         (maybe_templates, maybe_template_tail): Remove.
4683         (add_pending_template): Adjust.
4684         (instantiate_pending_templates): Adjust.
4685
4686         * cp-tree.h (struct saved_scope): Remove lang_stack field.
4687         (current_lang_stack): Remove.
4688         * decl.c (maybe_push_to_top_level): Don't initialize it.
4689         (duplicate_decls): Use current_lang_depth.
4690         (xref_basetypes): Likewise.
4691         * class.c (current_lang_depth): New fn.
4692         (push_lang_context): Use more varray functionality.
4693         (pop_lang_context): Likewise.
4694
4695         * error.c (GLOBAL_THING): Always use '__'.
4696
4697 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
4698
4699         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
4700
4701         * mangle.c (mangle_decl_string): Mangle the names of overloaded
4702         operators, even when they have `extern "C"' linkage.
4703
4704 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
4705
4706         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
4707         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4708         where it's not necessary.
4709         (add_method): Remove optimization involving comparison of
4710         DECL_ASSEMBLER_NAME.
4711         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
4712         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4713         where it's not necessary.
4714         (check_methods): Likewise.
4715         (build_clone): Likewise.
4716         (built_vtt): Likewise.
4717         * cp-tree.h (DECL_NEEDED_P): Likewise.
4718         * decl.c (pushtag): Likewise.
4719         (duplicate_decls): Likewise.
4720         (pushdecl): Likewise.
4721         (builtin_function): Likewise.
4722         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
4723         (build_cp_library_fn): Likewise.
4724         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
4725         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4726         where it's not necessary.
4727         (make_rtl_for_nonlocal_decl): Likewise.
4728         (cp_finish_decl): Likewise.
4729         (grokfndecl): Likewise.
4730         (grokvardecl): Likewise.
4731         (grokdeclarator): Likewise.
4732         (start_function): Likewise.
4733         (cp_missing_return_ok_p): Likewise.
4734         * decl2.c (grokclassfn): Likewise.
4735         (check_classfn): Likewise.
4736         (finish_static_data_member_decl): Likewise.
4737         (grokfield): Likewise.
4738         * error.c (GLOBAL_IORD_P): Remove.
4739         (dump_global_iord): Improve output.
4740         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
4741         * except.c (nothrow_libfn_p): Summarily reject any function not in
4742         namespace-scope.
4743         * init.c (build_java_class_ref): Don't explicitly set
4744         DECL_ASSEMBLER_NAME after calling mangle_decl.
4745         * mangle.c (mangle_decl_string): Handle extern "C" functions.
4746         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
4747         * method.c (set_mangled_name_for_decl): Don't explicitly set
4748         DECL_ASSEMBLER_NAME after calling mangle_decl.
4749         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
4750         IDENTIFIER_GLOBAL_VALUE for the thunk.
4751         * pt.c (set_mangled_name_for_template_decl): Remove.
4752         (check_explicit_specialization): Don't use it.
4753         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
4754         (tsubst_friend_function): Likewise.
4755         (tsubst_decl): Likewise.
4756         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
4757         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
4758         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4759         where it's not necessary.
4760         (tinfo_base_init): Likewise.
4761         (create_real_tinfo_var): Likewise.
4762         * search.c (looup_field_1): Likewise.
4763         * semantics.c (finish_named_return_value): Likewise.
4764         * tree.c (init_tree): Set lang_set_decl_assembler_name.
4765
4766 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4767
4768         Correct semantics restrictions checking in throw-expression.
4769         * except.c (is_admissible_throw_operand): New function.
4770         (build_throw): Use it.
4771
4772 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4773
4774         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
4775         and its ilk.
4776
4777 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4778
4779         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4780         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
4781         * decl.c (duplicate_decls): Likewise.
4782         (builtin_function): Likewise.
4783         (build_library_fn): Likewise.
4784         (build_cp_library_fn): Likewise.
4785         (check_initializer): Likewise.
4786         (cp_finish_decl): Likewise.
4787         * decl2.c (grokfield): Likewise.
4788         (grok_function_init): Remove #if 0'd code.
4789         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4790         * friend.c (do_friend): Likewise.
4791         * init.c (get_temp_regvar): Likewise.
4792         * method.c (make_thunk): Likewise.
4793         * pt.c (tsubst_friend_function): Likewise.
4794         (tsubst_decl): Likewise.
4795         (regenerate_decl_from_template): Likewise.
4796         * semantics.c (genrtl_named_return_value): Likewise.
4797         (expand_body): Likewise.
4798         (genrtl_finish_function): Likewise.
4799         * tree.c (cp_tree_equal): Likewise.
4800
4801 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4802
4803         * call.c (convert_like_real): Add extra semantics to INNER
4804         parameter. Don't convert to temporary if a user conversion
4805         gives us an lvalue that we're about to bind to a reference.
4806         Set INNER to indicate pending reference binding on recursive
4807         calls.
4808
4809 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4810
4811         * cp/lex.c: Delete duplicate pending_lang_change.
4812
4813 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4814
4815         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
4816         Similarly.
4817         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
4818         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
4819
4820 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
4821
4822         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
4823
4824 2001-03-08  Stan Shebs  <shebs@apple.com>
4825
4826         * cp-tree.h (set_identifier_local_value): Remove unused decl.
4827
4828 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
4829
4830         * spew.c: Remove references to CPP_OSTRING.
4831
4832 2001-03-06  Andrew Haley  <aph@redhat.com>
4833
4834         * typeck.c (convert_arguments): Check that we have an fndecl.
4835
4836 2001-03-05  Andrew Haley  <aph@redhat.com>
4837
4838         * typeck.c (convert_arguments): Don't do ellipsis conversion for
4839         __built_in_constant_p.
4840
4841 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4842
4843         * typeck.c (build_static_cast): Allow enum to enum conversions
4844         as per DR 128.
4845
4846 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4847
4848         * class.c (check_field_decls): Pointers to member do not a
4849         non-pod struct make, as per DR 148.
4850
4851 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4852
4853         * call.c (joust): cp_pedwarn when using gnu extension concerning
4854         worst conversion sequences.
4855
4856 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4857
4858         * decl.c: Replace all uses of 'boolean' with 'bool'.
4859
4860 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4861
4862         * lang-specs.h: Add zero initializer for cpp_spec field to
4863         all array elements that need one.  Don't put an #ifdef inside
4864         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
4865         use it.
4866
4867 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4868
4869         Implement using decls inside template functions.
4870         * decl2.c (validate_nonmember_using_decl): Don't special case
4871         fake_std_node in the global namespace. Don't reject early when
4872         processing a template.
4873         (do_local_using_decl): Add to statement tree. Don't do further
4874         processing when building a template.
4875         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
4876
4877 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4878
4879         * decl2.c (do_nonmember_using_decl): Don't complain if we find
4880         same function. Do complain about ambiguating extern "C"
4881         declarations.
4882
4883 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
4884
4885         Remove floating point and complex type template constant parms.
4886         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
4887         COMPLEX_TYPE extensions.
4888         (invalid_nontype_parm_type_p): Likewise.
4889
4890 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
4891
4892         * except.c (call_eh_info): Revert "match_function"'s type.
4893
4894 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
4895
4896         Fix ctor vtable vcall offsets.
4897         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
4898         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
4899         (get_matching_base): Remove.
4900         (get_original_base): New function.
4901         (build_vtbl_initializer): Initialize vid.rtti_binfo.
4902         Use a virtual thunk for a ctor vtable with an index
4903         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
4904         primary base within a constructor vtable. Only set
4905         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
4906         when primary base has been lost.
4907         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
4908
4909 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
4910
4911         * call.c (joust): Ensure more_specialized()'s argument length
4912         parameter has correct value for constructors.
4913
4914 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
4915
4916         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
4917
4918         * decl.c (mark_inlined_fns): Prototype.
4919
4920 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4921
4922         * spew.c (yylex): Correct handling of friends.
4923
4924 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4925
4926         * mangle.c (write_encoding): Pass write_function_type the
4927         FUNCTION_DECL for the function being encoded.
4928         (write_function_type): Pass it along to write_bare_function_type.
4929         (write_bare_function_type): Pass it along to write_method_parms.
4930         (write_method_parms): Don't mangle the compiler-generated
4931         parameters to a constructor or destructor.
4932
4933 2001-02-22  Andreas Jaeger  <aj@suse.de>
4934
4935         * optimize.c: Include toplev.h for
4936         note_deferral_of_defined_inline_function prototype.
4937
4938 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
4939
4940         * cp-tree.h (struct lang_decl_inlined_fns): New.
4941         (struct lang_decls): Add inlined_fns.
4942         (DECL_INLINED_FNS): New macro.
4943         * optimize.c (struct inline_data): Add inlined_fns.
4944         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
4945         (inlinable_function_p): Likewise, fix typo in comment,
4946         function is not inlinable if it already inlined function currently
4947         being optimized.
4948         (expand_call_inline): Add fn to inlined_fns if necessary.
4949         (optimize_function): Initialize inlined_fns.
4950         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
4951         * decl.c (mark_inlined_fns): New function.
4952         (lang_mark_tree): Call it.
4953
4954 2001-02-21  Jason Merrill  <jason@redhat.com>
4955
4956         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
4957         (DECL_UNINLINABLE): Move to middle-end.
4958
4959         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
4960         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
4961         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
4962         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
4963         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
4964
4965         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
4966         second parm of op=.
4967
4968 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
4969
4970         * decl2.c (set_decl_namespace): Allow explicit instantiations in
4971         any namespace.
4972
4973 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4974
4975         * optimize.c (expand_call_inline): Don't walk subtrees of type
4976         nodes.
4977
4978 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
4979
4980         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
4981         for a destructor.
4982
4983 2001-02-18  Jason Merrill  <jason@redhat.com>
4984
4985         Do put the VTT parameter in DECL_ARGUMENTS.
4986         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
4987         (current_vtt_parm): New macro.
4988         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
4989         (DECL_HAS_VTT_PARM_P): New macro.
4990         (DECL_VTT_PARM): Remove.
4991         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
4992         * decl.c (duplicate_decls): Only copy the operator code if
4993         appropriate.
4994         (start_function): Set current_vtt_parm.
4995         (lang_mark_tree): Don't mark vtt_parm.
4996         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
4997         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
4998         * class.c (build_clone): Maybe remove the VTT parm.
4999         * optimize.c (maybe_clone_body): Set up the VTT parm.
5000         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
5001         * call.c (build_over_call): Just allow the VTT arg.
5002         * method.c (make_thunk): Don't set DECL_VTT_PARM.
5003         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
5004         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
5005         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
5006         * error.c (dump_function_decl): Likewise.
5007         * call.c (build_user_type_conversion_1, convert_like_real): Abort
5008         if we try to call a constructor with in-charge or VTT parms.
5009         * method.c (skip_artificial_parms_for): New fn.
5010         * call.c (add_function_candidate, build_over_call): Call it.
5011         * call.c (build_new_method_call): Use current_vtt_parm.
5012         * init.c (expand_virtual_init): Likewise.
5013         * class.c (same_signature_p): No longer static.
5014         * cp-tree.h: Declare it.
5015         * search.c (look_for_overrides_r): Use it.
5016
5017 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
5018
5019         * cp-tree.h (new_abi_rtti_p): Remove.
5020         (name_mangling_version): Likewise.
5021         (flag_do_squangling): Likewise.
5022         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
5023         * decl.c (grokfndecl): Likewise.
5024         * decl2.c (name_mangling_version): Remove.
5025         (flag_do_squangling): Likewise.
5026         (lang_f_options): Remove `squangle'.
5027         (unsupported_options): Add `squangle'.
5028         (cxx_decode_option): Issue a warning about uses of
5029         -fname-mangling-version.
5030         (finish_file): Remove old ABI support.
5031         * pt.c (check_explicit_specialization): Likewise.
5032         (tsubst_decl): Likewise.
5033         * rtti.c (init_rtti_processing): Likewise.
5034         (build_headof): Likewise.
5035         (get_tinfo_decl_dynamic): Likewise.
5036         (tinfo_from_decl): Likewise.
5037         (build_dynamic_cast_1): Likewise.
5038         (synthesize_tinfo_var): Likewise.
5039         * init.c (build_new): Allow enumeration types for the array-bounds
5040         in a direct-new-declarator.
5041
5042         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
5043
5044         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
5045         TREE_PROTECTED from the template being specialized.
5046
5047 2001-02-17  Jason Merrill  <jason@redhat.com>
5048
5049         * decl2.c (build_artificial_parm): Set TREE_READONLY.
5050
5051         * decl.c (bad_specifiers): Allow throw specs on things with
5052         pointer-to-function or -member-function type.
5053         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
5054         a pmf.
5055
5056 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
5057
5058         * call.c (check_dtor_name): Handle template names correctly.
5059
5060 2001-02-16  Jason Merrill  <jason@redhat.com>
5061
5062         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
5063         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
5064         * optimize.c (maybe_clone_body): Don't substitute it.
5065         * call.c (build_new_method_call): Check in_chrg instead.
5066         * init.c (expand_virtual_init): Likewise.
5067
5068 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
5069
5070         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
5071         class-type introduces at least a type-name.
5072
5073 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
5074
5075         * call.c (convert_like_real): Create a temporary for non-lvalue.
5076
5077 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
5078
5079         * cp-tree.h: Fix typos in comments.
5080
5081 2001-02-16  Jason Merrill  <jason@redhat.com>
5082
5083         * optimize.c (remap_block): If we're compiling a clone, pass the
5084         new block to insert_block.
5085
5086 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
5087
5088         * semantics.c (finish_asm_stmt): Robustify.
5089
5090 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
5091
5092         * pt.c (push_template_decl_real): Don't remangle the name of a
5093         class template.
5094
5095 2001-02-15  Jim Meyering  <meyering@lucent.com>
5096
5097         * Make-lang.in (c++.install-common): Depend on installdirs.
5098         (c++.install-info): Likewise.
5099         (c++.install-man): Likewise.
5100
5101 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
5102
5103         * typeck2.c (build_m_component_ref): Robustify.
5104
5105 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
5106
5107         * friend.c (do_friend): Don't take the nested [template] class
5108         into account when deciding whether to warn about the friend
5109         function not referring to a template function.
5110
5111 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
5112
5113         * typeck.c (build_unary_op): Clarify error message.
5114
5115 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
5116
5117         * parse.y (component_constructor_declarator): allow optional
5118         parentheses around constructor class name.
5119
5120 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5121
5122         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
5123         section.
5124         * init.c (emit_base_init): Remove incorrect comment about
5125         virtual bases.
5126         * method.c (make_thunk): Fix comment alignment.
5127
5128 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5129
5130         Kill remnants of this is variable.
5131         * cp-tree.h (flag_this_is_variable): Remove.
5132         * decl2.c (flag_this_is_variable): Remove.
5133         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
5134         (build_vbase_path): The path is non-static, even in a cdtor.
5135         (resolves_to_fixed_type_p): Add additional return value.
5136         * search.c (init_vbase_pointers): Adjust.
5137         * tree.c (lvalue_p_1): Adjust.
5138         * typeck.c (mark_addressable): Adjust.
5139
5140 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5141
5142         * pt.c (unify): Don't check cv quals of array types.
5143
5144 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5145
5146         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
5147         check whether we already have the type.
5148
5149 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
5150
5151         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
5152         * call.c (build_op_delete_call): Simplify to remove duplicate
5153         code.
5154         * class.c (clone_function_decl): Don't build the deleting variant
5155         of a non-virtual destructor.
5156         * decl.c (finish_destructor_body): Don't call delete if this is a
5157         non-virtual destructor.
5158         * init.c (build_delete): Explicitly call `operator delete' when
5159         deleting an object with a non-virtual destructor.
5160
5161 2001-02-13  Jason Merrill  <jason@redhat.com>
5162
5163         * lang-specs.h: Add more __EXCEPTIONS.
5164
5165 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
5166
5167         * typeck2.c (process_init_constructor): Check
5168         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
5169
5170 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
5171
5172         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
5173         Remove spurious information in comment. Allow further
5174         adjustments of REFERENCE_TYPE args.
5175
5176 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
5177
5178         * errfn.c (cp_deprecated): Tweak diagnostic text.
5179         * parse.y (new_initializer): Deprecate initializer lists
5180         extension.
5181
5182 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
5183
5184         Remove old ABI support.
5185
5186 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
5187
5188         * decl2.c (flag_vtable_thunks): Always set it to 1.
5189         (flag_new_abi): Likewise.
5190         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
5191
5192         * Makefile.in (g++spec.o): Fix typo.
5193
5194 2001-02-09  Jason Merrill  <jason@redhat.com>
5195
5196         * lang-specs.h: Restore definition of __EXCEPTIONS.
5197
5198 2001-02-08  Jason Merrill  <jason@redhat.com>
5199
5200         * search.c (shared_member_p): New function.
5201         (lookup_field_r): Use it.
5202         * cp-tree.h (SHARED_MEMBER_P): Remove.
5203
5204         * method.c (process_overload_item): Handle template-dependent array
5205         bounds.
5206         * pt.c (type_unification_real): If we end up with undeduced nontype
5207         parms, try again.
5208
5209         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
5210         types.
5211
5212         * typeck2.c (friendly_abort): Don't say anything if we have
5213         earlier errors or sorries.
5214
5215         * decl.c (check_tag_decl): Notice attempts to redefine bool and
5216         wchar_t.  Ignore if in_system_header.
5217
5218         * decl.c (maybe_push_cleanup_level): New fn...
5219         (start_decl_1): ...split out from here.
5220         * cvt.c (build_up_reference): Use it.
5221         * cp-tree.h: Declare it.
5222
5223 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
5224
5225         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
5226         spec.
5227
5228 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
5229
5230         * pt.c (lookup_template_class): Make sure it's a primary
5231         template or template_template_parm when called from the parser.
5232         (instantiate_template_class): Add assertion.
5233
5234 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
5235
5236         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
5237         from error_mark_node.
5238
5239 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
5240
5241         Fix specification and implementation bugs in V3 ABI
5242         construction vtables.
5243         * cp-tree.h (flag_dump_class_layout): New flag.
5244         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
5245         (BINFO_LOST_PRIMARY_P): New flag.
5246         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
5247         (BINFO_PRIMARY_MARKED_P): Rename to ...
5248         (BINFO_PRIMARY_P): ... here.
5249         (binfo_via_virtual): New prototype.
5250         * decl2.c (flag_dump_class_layout): New flag.
5251         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
5252         use `=' as a file name separator.
5253         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
5254         bases.
5255         (build_vtbl_address): If this is a virtual primary base, then
5256         get the vtbl of what it is ultimately primary for.
5257         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
5258         for BINFO_PRIMARY_P.
5259         (dfs_skip_nonprimary_vbases_markedp): Likewise.
5260         (get_shared_vbase_if_not_primary): Likewise.
5261         (dfs_get_pure_virtuals): Likewise.
5262         (expand_upcast_fixups): Likewise.
5263         (fixup_virtual_upcast_offsets): Likewise.
5264         (dfs_find_vbase_instance): Likewise.
5265         (find_vbase_instance): Likewise.
5266         (binfo_from_vbase): Adjust comment to reflect reality.
5267         (binfo_via_virtual): New function.
5268         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
5269         for binfo walking during VTT construction.
5270         (dfs_mark_primary_bases): Remove.
5271         (force_canonical_binfo_r): New function.
5272         (force_canonical_binfo): New function.
5273         (mark_primary_virtual_base): New function.
5274         (mark_primary_bases): Walk in inheritance graph order, use
5275         mark_primary_virtual_base.
5276         (determine_primary_base): Use some more intermediate variables.
5277         (dfs_find_final_overrider): Don't check for overriding along a
5278         virtual path.
5279         (dfs_modify_vtables): Walk into primary virtual bases too.
5280         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
5281         (build_base_fields): Likewise.
5282         (dfs_set_offset_for_unshared_vbases): Likewise.
5283         (layout_virtual_bases): Likewise.
5284         (end_of_class): Likewise.
5285         (finish_struct_1): Call dump_class_hierarchy, if requested.
5286         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
5287         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
5288         (dump_class_hierarchy): Add file parameter. Append to file, if
5289         required.
5290         (finish_vtbls): Adjust accumulate_vtbl_inits call.
5291         Use canonical base for virtual bases.
5292         (build_vtt): Add more comments. Adjust build_vtt_inits call.
5293         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
5294         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
5295         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
5296         virtual VTTs.
5297         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
5298         from DATA.  We want virtual primary bases and all bases via virtual.
5299         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
5300         virtual base when not a construction vtable.
5301         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
5302         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
5303         Use canonical bases when processing virtual bases.
5304         (accumulate_vtbl_inits): We're interested in any base via a
5305         virtual path.
5306         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
5307         within a construction vtable, determine what is being overridden.
5308         (build_vtbl_initializer): Add more comments
5309         (add_vcall_offset_vtbl_entries_1): Adjust comment.
5310         (build_rtti_vtbl_entries): Check if the base has lost its
5311         primary.
5312
5313 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
5314
5315         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
5316
5317 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5318
5319         * decl.c (pushdecl): Call abort instead of fatal.
5320         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
5321         * init.c (build_new_1): Likewise.
5322         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
5323         * decl.c (build_typename_type): hash_table_init now returns void.
5324         decl.c (init_decl_processing): Make an error non-fatal.
5325
5326 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
5327
5328         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
5329         Document.
5330         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5331         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5332         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5333         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5334         * decl.c (maybe_commonize_var): Use the new name-mangling where
5335         appropriate.
5336         * decl2.c (comdat_linkage): Enhance comments.  Make all
5337         compiler-generated things static, if COMDAT is not available.
5338         (get_tinfo_decl): Do not make typeinfo objects that belong in the
5339         library COMDAT.
5340         (tinfo_base_init): Use the correct mangled name for typeinfo
5341         strings, and push them into the global scope.
5342         (typeinfo_in_lib_p): New function.
5343         (synthesize_tinfo_var): Use it.
5344         (create_real_tinfo_var): Likewise.
5345
5346 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
5347
5348         * decl.c (push_class_binding): Use context_for_name_lookup instead
5349         of CP_DECL_CONTEXT.
5350         * search.c (context_for_name_lookup): Remove static.  Check for NULL
5351         context in the loop.
5352         * cp-tree.h (context_for_name_lookup): Add prototype.
5353
5354 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
5355
5356         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
5357         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
5358         Remove.
5359         * call.c (convert_class_to_reference, build_user_type_conversion_1,
5360         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
5361
5362 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
5363
5364         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
5365         of macros used when compiling g++spec.c.
5366         * g++spec.c (lang_specific_driver): Link with the shared
5367         libgcc by default.
5368
5369 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5370
5371         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
5372         make_reference_declarator, make_call_declarator), method.c
5373         (implicitly_declare_fn), parse.y (namespace_using_decl,
5374         notype_unqualified_id, expr_or_declarator, new_type_id,
5375         after_type_declarator, direct_after_type_declarator,
5376         notype_declarator, complex_notype_declarator,
5377         complex_direct_notype_declarator, qualified_id,
5378         notype_qualified_id, overqualified_id, direct_new_declarator,
5379         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
5380         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
5381         instead of build_parse_node.
5382
5383 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5384
5385         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
5386         (minus_one_node): Moved to top level gcc directory.  Renamed
5387         to integer_minus_one_node.
5388
5389         * init.c (init_init_processing): Don't set minus_one_node.
5390         (build_vec_init): Use integer_minus_one_node.
5391
5392         * rtti.c (get_tinfo_decl_dynamic): Likewise.
5393
5394 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
5395
5396         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
5397         identical and they would be replaced with constant, remove
5398         MODIFY_EXPR from the tree.
5399
5400 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5401
5402         * Make-lang.in: Remove all dependencies on defaults.h.
5403         * call.c: Don't include defaults.h.
5404         * decl.c: Likewise.
5405         * decl2.c: Likewise.
5406         * except.c: Likewise.
5407         * pt.c: Likewise.
5408         * rtti.c: Likewise.
5409         * tree.c: Likewise.
5410         * typeck.c: Likewise.
5411
5412 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
5413
5414         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
5415         operators even in "C" linkage.
5416         * method.c (set_mangled_name_for_decl): Likewise.
5417         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
5418         overloaded operators in "C" linkage.
5419
5420 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
5421
5422         * pt.c (tsubst_decl): Remove IN_DECL parameter.
5423         (tsubst_arg_types): Check parameter is not void.
5424         (tsubst): Adjust tsubst_decl call.
5425
5426 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
5427
5428         * call.c (add_builtin_candidate): Quote std properly, from
5429         previous change.
5430
5431 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5432
5433         * pt.c (check_explicit_specialization): Clone constructors and
5434         destructors.
5435
5436 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
5437
5438         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
5439         indicates anything special about template depth. Make sure we
5440         only count the user visible template classes.
5441
5442 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
5443
5444         * call.c (build_conv): Typo in comment.
5445         (add_builtin_candidate): Add more explanation.
5446         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
5447         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
5448         when we have enumeral types.
5449         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
5450         candidates for relops and eqops.
5451         (joust): Simplify control flow. Allow a non-template user
5452         function to hide a builtin.
5453
5454 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
5455
5456         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
5457         (more_specialized): Add deduction parameter.
5458         * call.c (joust): Adjust more_specialized call.
5459         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
5460         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
5461         (get_bindings_order): Remove.
5462         (get_bindings_real): Add DEDUCE parameter.
5463         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
5464         REFERENCE_TYPE jig for DEDUCE_ORDER.
5465         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
5466         maybe_adjust_types_for_deduction.
5467         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
5468         directly.
5469         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
5470         (check_cv_quals_for_unify): Use new unify qualifier flags.
5471         (unify): Clear new unify qualifier flags.
5472         (get_bindings_real): Add DEDUCE parameter.
5473         (get_bindings): Adjust call to get_bindings_real.
5474         (get_bindings_overload): Likewise.
5475         (most_specialized_instantiation): Adjust call to
5476         more_specialized.
5477
5478 2001-01-19  Jason Merrill  <jason@redhat.com>
5479
5480         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
5481
5482         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
5483         -fnew-abi.
5484
5485 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
5486
5487         * decl2.c (arg_assoc_class): Fix double iteration logic.
5488
5489 2001-01-19  Jason Merrill  <jason@redhat.com>
5490
5491         * init.c (build_delete): Always call convert_force to strip cv-quals.
5492
5493         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
5494         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
5495         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
5496
5497 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5498
5499         * search.c (get_vbase_1): Count only virtual bases.
5500
5501 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5502
5503         * class.c (duplicate_tag_error): Robustify flag clearing.
5504
5505 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5506
5507         * cp-tree.h (lookup_template_class): Add complain parm.
5508         * decl.c (lookup_namespace_name): Adjust call to
5509         lookup_template_class.
5510         (make_typename_type): Likewise.
5511         * semantics.c (finish_template_type): Likewise.
5512         * pt.c (lookup_template_class): Add complain parm. Adjust.
5513         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
5514         (tsubst): Likewise.
5515
5516 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5517
5518         * pt.c (copy_default_args_to_explicit_spec): Preserve
5519         object's CV quals. Reorganize.
5520
5521 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5522
5523         * typeck.c (build_modify_expr): Say `initialization' for
5524         INIT_EXPRs.
5525         * init.c (build_default_init): Convert to enumeral type, if
5526         needed.
5527
5528 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
5529
5530         * parse.y (nomods_initdcl0): Properly set things up for
5531         initdcl0_innards.
5532
5533 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5534
5535         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
5536         (type_unification_real): Set it.
5537         (unify): Use it.
5538
5539 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5540
5541         * decl.c (finish_destructor_body): Convert to vbase pointer here.
5542
5543 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5544
5545         * semantics.c (begin_class_definition): Check we're not inside a
5546         template parm list.
5547
5548 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5549
5550         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
5551         BASELINK_P.
5552
5553 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5554
5555         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
5556         * call.c (build_over_call): Add comment.
5557
5558 2001-01-16 Daniel Berlin <dberlin@redhat.com>
5559
5560         * cvt.c (ocp_convert): Handle vector type conversion
5561         * typeck2.c (digest_init): Handle vector type initializations
5562
5563 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
5564
5565         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
5566           was given.
5567
5568 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
5569
5570         * pt.c (check_nontype_parm): Rename to ...
5571         (invalid_nontype_parm_type_p): ... here.
5572         (process_template_parm): Adjust.
5573         (convert_template_argument): Adjust.
5574
5575 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
5576
5577         * pt.c (check_nontype_parm): New function.
5578         (process_template_parm): Use it.
5579         (convert_template_argument): Use it.
5580         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
5581         member.
5582
5583 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
5584
5585         * tree.c: Add defaults.h
5586         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
5587         * Make-lang.in (cp/tree.o): Add defaults.h.
5588
5589 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5590
5591         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
5592
5593 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5594
5595         * g++.1: Change to be ".so man1/gcc.1".
5596
5597 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5598
5599         * Make-lang.in (c++.info, c++.install-info): Build and install g++
5600         internals info.
5601         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
5602         ($(srcdir)/cp/g++int.info): New target.
5603         * gxxint.texi: Add info directory entry.  Use @@ in email address.
5604         * .cvsignore: Update.
5605
5606 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
5607
5608         * typeck.c (build_c_cast): Do template processing earlier.
5609         Always pedwarn on array casts.
5610
5611 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
5612
5613         * friend.c (make_friend_class): Make sure a templated class is
5614         actually a template.
5615
5616 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5617
5618         * decl2.c (get_guard): Set linkage from guarded decl.
5619
5620 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5621
5622         * call.c (convert_default_arg): Check for unprocessed
5623         DEFAULT_ARG.
5624         * cp-tree.h (replace_defarg): Move to spew.c.
5625         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
5626         spew.c, which is where they really are.
5627         (done_pending_defargs): Declare.
5628         (unprocessed_defarg_fn): Declare.
5629         * decl.c (replace_defarg): Move to spew.c
5630         * parse.y (structsp): Call done_pending_defargs.
5631         * spew.c (defarg_fns): Rearrange list structure.
5632         (defarg_fnsdone): New static variable.
5633         (defarg_depfns): New static variable.
5634         (init_spew): Adjust.
5635         (add_defarg_fn): Store the type in TREE_TYPE.
5636         (do_pending_defargs): Detect and deal with ordering constraints
5637         and circularity.
5638         (done_pending_defargs): New function.
5639         (unprocessed_defarg_fn): New function.
5640         (replace_defarg): Moved from decl.c. Robustify. Don't save
5641         if circularity detected.
5642
5643 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5644
5645         * pt.c (unify): Check array has a domain, before checking
5646         whether it is variable sized.
5647
5648 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5649
5650         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
5651         parameters with pointers to arrays of unknown bound.
5652
5653 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5654
5655         * parse.y (template_parm_header, template_spec_header): New
5656         reductions. Split out from ...
5657         (template_header): ... here. Use them.
5658         (template_template_parm): Use template_parm_header.
5659         * semantics.c (finish_template_template_parm): Add assert.
5660
5661 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5662
5663         * mangle.c (write_builtin_type): Fix thinko.
5664
5665         * pt.c (copy_default_args_to_explicit_spec_1): New function.
5666         (copy_default_args_to_explicit_spec): Likewise.
5667         (check_explicit_specialization): Use it.
5668
5669         * class.c (finish_struct_1):  Remove last argument in call to
5670         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
5671         * decl.c (builtin_function): Likewise.
5672         (build_cp_library_fn): Likewise.
5673         (check_initializer): Likewise.
5674         (make_rtl_for_nonlocal_decl): Likewise.
5675         (cp_finish_decl): Likewise.
5676         (start_function): Likewise.
5677         * decl2.c (finish_anon_union): Likewise.
5678         * friend.c (do_friend): Likewise.
5679         * init.c (build_java_class_ref): Likewise.
5680         * method.c (make_thunk): Likewise.
5681         * pt.c (tsubst_friend_function): Likewise.
5682         * semantics.c (expand_body): Likewise.
5683
5684 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5685
5686         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
5687         looking at DECL_CLONED_FUNCTION for non-functions.
5688
5689 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5690
5691         * error.c (dump_template_parameter): Use parm to determine how
5692         to print default value.
5693
5694 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5695
5696         * class.c (duplicate_tag_error): Clear more flags.
5697
5698 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5699
5700         * call.c (build_new_method_call): Use binfo_for_vbase.
5701
5702 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
5703
5704         * cp-tree.h (flag_cond_mismatch): Don't declare.
5705         * decl2.c (flag_cond_mismatch): Don't define.
5706         (lang_f_options): Remove cond-mismatch.
5707         (unsupported_options): Add cond-mismatch.
5708
5709 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
5710
5711         * class.c (handle_using_decl): Reject using of constructor name
5712         of sourcing class. Allow injecting of a method with same name as
5713         nested class. Fixup error messages.
5714
5715 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
5716
5717         * decl2.c (lang_decode_option): Handle -Wformat=2.
5718
5719 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5720
5721         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
5722         initialized_in_class.
5723         (DECL_DEFINED_IN_CLASS_P): Rename to ...
5724         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
5725         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
5726         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
5727         * pt.c (check_default_tmpl_args): Adjust for
5728         DECL_INITIALIZED_IN_CLASS_P.
5729         (instantiate_class_template): Likewise.
5730         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
5731
5732         * class.c (finish_struct): Constify saved_filename.
5733
5734 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5735
5736         * class.c (duplicate_tag_error): Adjust diagnostic.
5737         (finish_struct): Locally set location to start of struct.
5738         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
5739
5740 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5741
5742         * decl.c (struct binding_level): Adjust class_shadowed comments
5743         to reflect reality.
5744         (push_class_level_binding): Adjust comments to reflect reality.
5745         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
5746         Don't set TREE_VALUE on the class_shadowed list.
5747
5748 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5749
5750         * decl2.c (acceptable_java_type): Allow references too.
5751         * init.c (build_java_class_ref): When using the new ABI, search
5752         `class$' and have it mangled with `mangle_decl.'
5753         * mangle.c (write_java_integer_type_codes): New function.
5754         (write_builtin_type): Detect and mangle Java integer and real
5755         types.
5756
5757 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
5758
5759         * decl2.c (grokfield): Don't accept `asm' specifiers for
5760         non-static data members.
5761
5762 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5763
5764         * expr.c (cplus_expand_expr): Don't reset `target'.
5765
5766 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5767
5768         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
5769
5770 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5771
5772         * parse.y (template_datadef): Check for error_mark_node.
5773
5774 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5775
5776         * cp-tree.def (DEFAULT_ARG): Make `x' class.
5777
5778 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5779
5780         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
5781         (record_builtin_type): Make non-static.
5782         (flag_short_double): Don't declare.
5783         (init_decl_processing): Remove the creation of many tree nodes now
5784         in c_common_nodes_and_builtins.
5785         (build_void_list_node): New function.
5786         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
5787         * cp-tree.h (flag_short_wchar): Don't declare.
5788
5789 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
5790
5791         * call.c (build_conv): Don't use build1 for USER_CONV.
5792         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
5793
5794 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
5795
5796         * lex.c (lang_init): Call c_common_lang_init.
5797
5798 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5799
5800         * search.c (lookup_fnfields_here): Remove.
5801         (look_for_overrides_r): Use lookup_fnfields_1.
5802         Ignore functions from using declarations.
5803
5804 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5805
5806         Implement exceptions specifiers for implicit member functions.
5807         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
5808         * method.c (synthesize_exception_spec): New function.
5809         (locate_dtor, locate_ctor, locate_copy): New functions.
5810         (implicitly_declare_fn): Generate the exception spec too.
5811         * search.c (check_final_overrider): Check artificial functions
5812         too.
5813         * typeck2.c (merge_exception_specifiers): New function.
5814
5815 2001-01-03  Jason Merrill  <jason@redhat.com>
5816
5817         * init.c (build_default_init): New fn.
5818         (perform_member_init): Split out from here.
5819         (build_new_1): Use it.  Simplify initialization logic.
5820         (build_vec_init): Take an array, rather than a pointer and maxindex.
5821         Speed up simple initializations.  Don't clean up if we're assigning.
5822         * cp-tree.h: Adjust.
5823         * decl2.c (do_static_initialization): Remove TREE_VEC case.
5824         * parse.y (new_initializer): Return void_zero_node for ().
5825         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
5826         * typeck2.c (digest_init): Only complain about user-written
5827         CONSTRUCTORs.
5828
5829 2000-12-22  Mike Stump  <mrs@wrs.com>
5830
5831         * decl2.c: (max_tinst_depth): Increase to 50.
5832
5833 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
5834
5835         * class.c (invalidate_class_lookup_cache): Zero the
5836         previous_class_values.
5837         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
5838         TREE_INT_CST_HIGH.
5839         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
5840         * decl.c (free_bindings): New variable.
5841         (push_binding): Don't create a new binding if we have one on the
5842         free list.
5843         (pop_binding): Put old bindings on the free list.
5844         (init_decl_processing): Use size_int, not build_int_2.
5845         Register free_bindings as a GC root.
5846         (cp_make_fname_decl): Use size_int, not build_int_2.
5847         (push_inline_template_parms_recursive): Likewise.
5848         (end_template_parm_list): Likewise.
5849         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
5850         (tsubst_template_parms): Use size_int, not build_int_2.
5851         (tsubst): Likewise.
5852         * rtti.c (get_vmi_pseudo_type_info): Likewise.
5853
5854 2001-01-02  Richard Henderson  <rth@redhat.com>
5855
5856         * parse.y (asm): Set ASM_INPUT_P.
5857
5858 2001-01-02  Jason Merrill  <jason@redhat.com>
5859
5860         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
5861         for v3 ABI.
5862
5863         * typeck.c (cp_truthvalue_conversion): New fn.
5864         * cvt.c (ocp_convert): Use it.
5865
5866         * cp-tree.h: Lose c-common.c decls.
5867
5868         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
5869         * cvt.c (convert_to_void): Use type_unknown_p.
5870
5871         * typeck.c (strip_all_pointer_quals): Also strip quals from
5872         pointer-to-member types.
5873
5874         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
5875         parse.y as C.
5876
5877         * call.c (build_new_method_call): Do evaluate the object parameter
5878         when accessing a static member.
5879         * typeck.c (build_component_ref): Likewise.
5880
5881 2001-01-02  Andreas Jaeger  <aj@suse.de>
5882
5883         * decl.c (cp_missing_noreturn_ok_p): New.
5884         (init_decl_processing): Set lang_missing_noreturn_ok_p.
5885
5886 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
5887
5888         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
5889
5890 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
5891
5892         * class.c (pushclass): Remove #if 0'd code.
5893         * cp-tree.h (overload_template_name): Remove.
5894         * decl.c (store_bindings): Simplify.
5895         (pop_from_top_level): Likewise.
5896         * pt.c (overload_template_name): Remove.
5897         (instantiate_decl): Don't call push_to_top_level if it's not
5898         needed.
5899
5900 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
5901
5902         * pt.c (register_local_specialization): Don't return a value.
5903         (lookup_template_class): Use move-to-front heuristic when looking
5904         up template instantiations.
5905         (instantiate_decl): Only push_to_top_level when we're actually
5906         going to instantiate the template.
5907
5908 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
5909
5910         * search.c (binfo_for_vtable): Return least derived class, not
5911         most.  Handle secondary vtables.
5912
5913 2000-12-22  Jason Merrill  <jason@redhat.com>
5914
5915         * pt.c (more_specialized): Don't optimize len==0.
5916         (fn_type_unification): If we're adding the return type, increase len.
5917
5918         * typeck.c (build_binary_op): Fix pmf comparison logic.
5919
5920         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
5921         DECL_STATIC_FUNCTION_P.
5922
5923         * semantics.c (genrtl_finish_function): Don't try to jump to
5924         return_label unless it exists.
5925
5926         In partial ordering for a call, ignore parms for which we don't have
5927         a real argument.
5928         * call.c (joust): Pass len to more_specialized.
5929         (add_template_candidate_real): Strip 'this', pass len.
5930         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
5931         (get_bindings_order): New fn.  Pass len down.
5932         (get_bindings_real): Strip 'this', pass len.
5933         (fn_type_unification): Likewise.
5934         (type_unification_real): Succeed after checking 'len' args.
5935         (most_specialized_instantiation): Lose explicit_args parm.
5936         * class.c (resolve_address_of_overloaded_function): Strip 'this',
5937         pass len.
5938
5939 2000-12-21  Jason Merrill  <jason@redhat.com>
5940
5941         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
5942         DECL_TEMPLATE_RESULT.
5943
5944         * search.c (lookup_field_r): Call lookup_fnfields_1, not
5945         lookup_fnfields_here.
5946
5947         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
5948
5949         * call.c (build_object_call): Also allow conversions that return
5950         reference to pointer to function.
5951         (add_conv_candidate): Handle totype being ref to ptr to fn.
5952         (build_field_call): Also allow members of type reference to function.
5953         Lose support for calling pointer to METHOD_TYPE fields.
5954
5955         * error.c (dump_expr): Handle *_CAST_EXPR.
5956
5957         * typeck2.c (build_scoped_ref): Always convert to the naming class.
5958
5959         * tree.c (break_out_cleanups): Lose.
5960         * cp-tree.h: Remove prototype.
5961         * typeck.c (build_component_ref): Don't break_out_cleanups.
5962         (build_compound_expr): Likewise.
5963         * semantics.c (finish_expr_stmt): Likewise.
5964
5965 2000-12-20  Richard Henderson  <rth@redhat.com>
5966
5967         * cp-tree.h: Update declarations.
5968         * decl.c (finish_case_label): Return the new stmt node.
5969         * semantics.c (finish_goto_stmt): Likewise.
5970         (finish_expr_stmt, finish_return_stmt): Likewise.
5971         (finish_break_stmt, finish_continue_stmt): Likewise.
5972         (finish_asm_stmt): Likewise.
5973         * parse.y (already_scoped_stmt): Set STMT_LINENO.
5974         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
5975         (simple_if, simple_stmt): Return the new stmt node.
5976         (save_lineno): New.
5977
5978 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5979
5980         * cp-tree.h: Don't declare warn_long_long.
5981
5982 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5983
5984         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
5985         IS_AGGR_TYPE.
5986
5987 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5988
5989         * pt.c (unify): Handle when both ARG and PARM are
5990         BOUND_TEMPLATE_TEMPLATE_PARM.
5991
5992 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5993
5994         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
5995         DECL_TEMPLATE_PARM_P.
5996
5997 2000-12-15  Jason Merrill  <jason@redhat.com>
5998
5999         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
6000
6001         * init.c (build_new_1): Don't strip quals from type.
6002
6003         * decl.c (pushdecl): Don't check for linkage on a non-decl.
6004
6005         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
6006
6007         * call.c (build_new_function_call): Lose space before paren in
6008         error message.
6009         (build_new_method_call): Likewise.
6010
6011         * typeck2.c (build_m_component_ref): Propagate quals from datum.
6012
6013 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6014
6015         * pt.c (check_explicit_specialization): Propagate default
6016         function arguments to explicit specializations.
6017
6018 2000-12-13  DJ Delorie  <dj@redhat.com>
6019
6020         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
6021         and <? operators.
6022
6023 2000-12-08  Jason Merrill  <jason@redhat.com>
6024
6025         * error.c (dump_function_name): Don't let the user see __comp_ctor.
6026
6027         Clean up copy-initialization in overloading code.
6028         * call.c (build_user_type_conversion_1): Die if we are asked to
6029         convert to the same or a base type.
6030         (implicit_conversion): Avoid doing so.  Lose reference binding code.
6031         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
6032         direct-initialization.  Also do direct-init part of copy-init.
6033         (build_user_type_conversion): Don't provide context to convert_like.
6034         * cvt.c (ocp_convert): build_user_type_conversion will now provide
6035         the constructor call for copy-init.
6036
6037         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
6038         instantiation of a member template.
6039         (do_decl_instantiation): Not here.
6040
6041 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
6042
6043         * class.c (check_field_decls): Don't special case anonymous
6044         fields in error messages.
6045         (note_name_declared_in_class): Use %D on diagnostic.
6046
6047         * tree.c (pod_type_p): Use strip_array_types.
6048         (cp_valid_lang_attribute): Likewise.
6049         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
6050         multiple evaluations.
6051         (cp_has_mutable_p): Use strip_array_types.
6052
6053 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
6054
6055         * cp-tree.h (sufficient_parms_p): Declare new function.
6056         * call.c (sufficient_parms_p): New function, broken out of ...
6057         (add_function_candidate): ... here. Use it.
6058         (add_conv_candidate): Use it.
6059         * decl.c (grok_ctor_properties): Use it.
6060
6061 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
6062
6063         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
6064
6065 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6066
6067         * decl2.c (lang_decode_option): Handle -Wformat-security.
6068
6069 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6070
6071         * pt.c (verify_class_unification): New function.
6072         (get_class_bindings): Use it.
6073         (try_class_unification): Tidy.
6074         (unify): Handle when argument of a template-id is not
6075         template parameter dependent.
6076         (template_args_equal): Handle when TREE_CODE's do not match.
6077
6078 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
6079
6080         * lang-specs.h (c++): When invoking the stand-alone preprocessor
6081         for -save-temps, pass all relevant -Defines to it, and then don't
6082         pass them to cc1plus.
6083
6084 2000-12-05  Will Cohen  <wcohen@redhat.com>
6085
6086         * decl.c (finish_case_label): Cleared
6087         more_cleanups_ok in surrounding function scopes.
6088         (define_label): Likewise.
6089
6090 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
6091
6092         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
6093         (get_matching_virtual): Remove.
6094         (look_for_overrides): Declare new function.
6095         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
6096         DECL_VINDEX here.
6097         * class.c (check_for_override): Move base class iteration code
6098         to look_for_overrides.
6099         * search.c (next_baselink): Remove.
6100         (get_virtuals_named_this): Remove.
6101         (get_virtual_destructor): Remove.
6102         (tree_has_any_destructors_p): Remove.
6103         (struct gvnt_info): Remove.
6104         (check_final_overrider): Remove `virtual' from error messages.
6105         (get_matching_virtuals): Remove. Move functionality to ...
6106         (look_for_overrides): ... here, and ...
6107         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
6108         to be overriding.
6109
6110 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
6111
6112         * typeck.c (get_delta_difference): If via a virtual base,
6113         return zero.
6114         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
6115         adjustment.
6116
6117 2000-12-04  Richard Henderson  <rth@redhat.com>
6118
6119         * error.c (dump_tree): Use output_add_string not OB_PUTS.
6120
6121 2000-12-04  Jason Merrill  <jason@redhat.com>
6122
6123         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
6124         (write_builtin_type): Pass intSI_type_node and the like through
6125         type_for_mode.
6126         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
6127         Pass intSI_type_node and the like through type_for_mode.
6128         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
6129         * pt.c (tsubst, unify): Likewise.
6130         * tree.c (walk_tree): Likewise.
6131         * error.c (dump_type): Likewise.
6132         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
6133
6134         * Make-lang.in: Tweak top comment for emacs.
6135         (cp/TAGS): Restore.
6136
6137         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
6138
6139         * class.c (clone_function_decl): Robustify.
6140
6141 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
6142
6143         * decl.c (store_bindings): Only search in the non modified
6144         old_bindings for duplicates.
6145
6146 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6147
6148         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
6149         TYPE_POLYMORPHIC_P.
6150
6151         * typeck.c (build_static_cast): Remove unused variable.
6152
6153 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6154
6155         * pt.c: Fix typo in comment.
6156
6157 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
6158
6159         * decl2.c (warn_format): Remove definition.
6160         (lang_decode_option): Handle -Wformat-nonliteral,
6161         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
6162
6163 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
6164
6165         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
6166         (init_decl_processing): Don't create string_type_node,
6167         const_string_type_node, wint_type_node, intmax_type_node,
6168         uintmax_type_node, default_function_type, ptrdiff_type_node and
6169         unsigned_ptrdiff_type_node.  Adjust position of call to
6170         c_common_nodes_and_builtins.
6171         (identifier_global_value): New function.
6172
6173 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
6174
6175         * call.c (standard_conversion): Reject pointer to member
6176         conversions from ambiguous, inaccessible or virtual bases.
6177         * typeck.c (build_static_cast): Don't check pointers to members
6178         specially.
6179
6180 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
6181
6182         * method.c (do_build_copy_constructor): Preserve cv
6183         qualifications when accessing source object members.
6184         (do_build_assign_ref): Likewise. Remove separate diagnostics for
6185         unnamed fields.
6186
6187 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
6188
6189         * method.c (do_build_assign_ref): Construct appropriately
6190         CV-qualified base reference. Don't allow const casts in base
6191         conversion.
6192
6193 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
6194
6195         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
6196         incomplete return type.
6197
6198 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6199
6200         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
6201         * semantics.c (finish_base_specifier): Accept a _TYPE not a
6202         _DECL.
6203
6204 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6205
6206         * spew.c (yyerror): Cope if yylval.ttype is NULL.
6207
6208 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6209
6210         * decl.c (grokdeclarator): Diagnose undefined template contexts.
6211
6212 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6213
6214         * decl.c (grokdeclarator): Do type access control on friend
6215         class.
6216
6217 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
6218
6219         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
6220         bison parser ickiness.
6221         * pt.c (tsubst_friend_function): Enter namespace scope when
6222         tsubsting the function name.
6223         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
6224
6225 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
6226
6227         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
6228         * cvt.c (cp_convert_to_pointer): Add force parameter.
6229         Allow conversions via virtual base if forced.
6230         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
6231         (ocp_convert): Likewise.
6232         * search.c (binfo_from_vbase): Return the virtual base's binfo.
6233         * typeck.c (get_delta_difference): Adjust handling of virtual
6234         bases.
6235
6236 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
6237
6238         * tree.c (struct list_hash): Remove.
6239         (list_hash_table): Make it be an htab.
6240         (struct list_proxy): New type.
6241         (list_hash_eq): New function.
6242         (list_hash_pieces): Renamed from ...
6243         (list_hash): ... this.
6244         (list_hash_lookup): Remove.
6245         (list_hash_add): Remove.
6246         (hash_tree_cons): Use the generic hashtable.
6247         (mark_list_hash): Remove.
6248         (init_tree): Create the hashtable.
6249
6250 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
6251
6252         * method.c (build_mangled_C9x_name): Rename to
6253         build_mangled_C99_name.  Change C9X references in comments to
6254         refer to C99.
6255
6256 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
6257
6258         * parse.y (unary_expr): Move VA_ARG from here ...
6259         (primary): ... to here.
6260
6261 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
6262
6263         * semantics.c (finish_id_expr): If type is error_mark, return
6264         error_mark.
6265
6266 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
6267
6268         * pt.c (lookup_template_class): Simplify loop exit constructs.
6269         Cope when there is no partial instantiation of a template
6270         template member.
6271
6272 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
6273
6274         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
6275
6276 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
6277
6278         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
6279         prefix.
6280
6281         * pt.c (do_decl_instantiate): Explicitly clone constructors and
6282         destructors that haven't already been cloned.
6283
6284 2000-11-20  Richard Henderson  <rth@redhat.com>
6285
6286         * parse.y (yyparse_1): Rename the parser entry point.
6287
6288 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
6289
6290         * mangle.c (write_name): Use <unscoped-name> for names directly in
6291         function scope.
6292         (write_unscoped_name): Accept names directly in function scope.
6293
6294 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
6295
6296         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
6297         * parse.y (extdef): Add EXPORT reduction.
6298         * spew.c (yylex): Don't skip export here.
6299
6300 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
6301
6302         * decl.c (init_decl_processing): Correct name of pure virtual
6303         function under the new ABI.
6304         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
6305         (throw_bad_typeid): Likewise for bad typeid function.
6306
6307 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
6308
6309         * decl.c (grokparms): Don't even function types of `void' type,
6310         either.
6311         * mangle.c (write_type): Don't crash when confronted with the
6312         error_mark_node.
6313
6314         * decl.c (grokparms): Don't create parameters of `void' type.
6315
6316 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
6317
6318         * lex.c (mark_impl_file_chain): Delete.
6319         (init_parse): Remove call to ggc_add_string_root.  No need to
6320         ggc_strdup a string constant.  Do not add impl_file_chain to GC
6321         roots.
6322         (handle_pragma_implementation): No need to ggc_strdup main_filename.
6323
6324 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
6325
6326         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
6327
6328 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
6329
6330         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
6331         * decl.c (grokdeclarator): Don't reject void parms here.
6332         (require_complete_types_for_parms): Simplify, use
6333         complete_type_or_else.
6334         (grokparms): Remove bitrot. Remove funcdef parm.
6335         Deal with ellipsis parm lists here.
6336         * semantics.c (finish_parmlist): Don't append void_list_node
6337         here. Set PARMLIST_ELLIPSIS_P.
6338
6339 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
6340
6341         * typeck2.c (incomplete_type_error): Reorganise to avoid
6342         excessive diagnostics.
6343
6344 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
6345
6346         * lex.c (struct impl_files, internal_filename): Constify a char *.
6347
6348 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
6349
6350         * mangle.c (write_special_name_constructor): Don't generate
6351         assembler junk when confronted with an old-style constructor.
6352         (write_special_name_destructor): Likewise.
6353         (mangle_decl_string): Do it here instead.
6354
6355 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
6356
6357         * call.c (op_error): Make error messages clearer.
6358
6359 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
6360
6361         * decl.c (wrapup_globals_for_namespace): Don't mark things
6362         TREE_ASM_WRITTEN when they're not.
6363
6364 2000-11-15  Jason Merrill  <jason@redhat.com>
6365
6366         * typeck2.c (friendly_abort): Uncount the error before handing
6367         off to fancy_abort.
6368
6369 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6370
6371         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
6372
6373 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
6374
6375         * class.c (build_vtbl_initializer): Fix typo in comment.
6376         * typeck.c (expr_sizeof): Don't crash on errors.
6377
6378 2000-11-14  Jim Wilson  <wilson@redhat.com>
6379
6380         * lang-specs.h: Add %2 after %(cc1_options).
6381
6382 2000-11-14  Richard Henderson  <rth@redhat.com>
6383
6384         * typeck.c (c_sizeof): Be strict about casting result value
6385         back to c_size_type_node.
6386         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
6387
6388 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6389
6390         * typeck.c (build_unary_op): Use boolean_increment from
6391         c-common.c, moving the relevant code there.
6392
6393 2000-11-11  Jason Merrill  <jason@redhat.com>
6394
6395         * typeck.c (mark_addressable): Don't call put_var_into_stack.
6396
6397         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
6398         in inlines.
6399
6400 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6401
6402         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
6403         * lex.c (copy_lang_decl): Likewise.
6404
6405 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
6406
6407         * dump.c (cp_dump_tree): Don't dump function bodies here.
6408
6409         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6410         (dump.o): Update dependency list.
6411         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
6412         (flag_dump_translation_unit): Likewise.
6413         (CP_TYPE_QUALS): Adjust definition.
6414         (DECL_C_BIT_FIELD): Remove.
6415         (SET_DECL_C_BIT_FIELD): Likewise.
6416         (CLEAR_DECL_C_BIT_FIELD): Likewise.
6417         (add_maybe_template): Likewise.
6418         (strip_array_types): Likewise.
6419         (dump_node_to_file): Likewise.
6420         (cp_dump_tree): New function.
6421         * decl.c (init_decl_processing): Set lang_dump_tree.
6422         * decl2.c (flag_dump_translation_unit): Remove.
6423         * dump.c: Move most of it to ../c-dump.c.
6424         (cp_dump_tree): New function.
6425         * pt.c (add_maybe_template): Remove.
6426         * typeck.c (strip_array_types): Likewise.
6427
6428 2000-11-07  Eric Christopher  <echristo@redhat.com>
6429
6430         * decl.c (init_decl_processing): Change definition of
6431         __wchar_t to wchar_t.  Remove artificial declaration of
6432         wchar_t.
6433         * lex.c: Change instances of __wchar_t to wchar_t.
6434
6435 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
6436
6437         * lex.c (do_identifier): Don't lookup_name for operators.
6438         * parse.y (operator): Save looking_for_typename.
6439         (unoperator): Restore it.
6440         * spew.c (frob_opname): Use nth_token for lookahead.
6441
6442 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
6443
6444         * decl.c (grok_op_properties): Always use coerce_new_type and
6445         coerce_delete_type.
6446         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
6447         exception specification. Tidy up.
6448         (coerce_delete_type): Preserve exception specification. Tidy up.
6449
6450 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6451
6452         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
6453         (push_binding_level), error.c (cp_tree_printer), pt.c
6454         (process_partial_specialization, tsubst_template_arg_vector),
6455         search.c (lookup_member): Use memset () instead of bzero ().
6456
6457 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
6458
6459         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
6460
6461 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6462
6463         * Make-lang.in (c++.distdir): Remove.
6464
6465 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
6466
6467         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
6468         declarations from different namespaces to be combined.
6469
6470 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
6471
6472         * decl.c: Include tm_p.h.
6473
6474 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
6475
6476         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
6477
6478 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6479
6480         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
6481         (build_overload_value), repo.c (open_repo_file), xref.c
6482         (open_xref_file): Use strchr () and strrchr () instead of index ()
6483         and rindex ().
6484
6485 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
6486
6487         * call.c (build_over_call): Call fold on the CALL_EXPR.
6488
6489 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
6490
6491         * error.c (dump_template_decl): Separate template hearders with
6492         space not comma.
6493
6494 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
6495
6496         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
6497         TS_* flags with corresponding TFF_*.  Adjust prototypes of
6498         functions (which used to take a tree_string_flags) to take an int.
6499
6500         * cp-tree.h (enum tree_string_flags): Remove
6501         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
6502         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
6503         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
6504         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
6505         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
6506         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
6507         (type_as_string, decl_as_string, expr_as_string,
6508         context_as_string): Adjust prototype.
6509
6510         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
6511         instead of TS_PLAIN.
6512
6513         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
6514         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
6515         plain `0'.
6516
6517 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
6518
6519         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
6520         (linkage_kind): New enumeration.
6521         (decl_linkage): New function.
6522         * decl2.c (comdat_linkage): Extend comment.
6523         * error.c (dump_function_decl): Print the arguments used to
6524         instantiate a template, even when not printing the type of the
6525         function.
6526         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
6527         not TREE_PUBLIC, to test for external linkage.
6528         * tree.c (decl_linkage): New function.
6529
6530 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
6531
6532         * pt.c (instantiate_decl): Always instantiate static data members
6533         initialized in-class.
6534
6535 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6536
6537         * Make-lang.in: Move all build rules here from Makefile.in,
6538         adapt to new context.  Wrap all rules that change the current
6539         directory in parentheses.  Expunge all references to $(P).
6540         When one command depends on another and they're run all at
6541         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6542         all object-file generation rules.  Delete obsolete variables.
6543
6544         * Makefile.in: Delete.
6545         * config-lang.in: Delete outputs= line.
6546
6547 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6548
6549         * error.c (dump_function_decl): Print no space between
6550         `ptr-operator' the `type-specifier' of the return type.
6551         (dump_type_prefix): Make sure we put space at the appropriate
6552         place.
6553
6554 2000-10-23  Jason Merrill  <jason@redhat.com>
6555
6556         * call.c (equal_functions): Also call decls_match for extern "C" fns.
6557
6558 2000-10-22  Jason Merrill  <jason@redhat.com>
6559
6560         * call.c (build_conditional_expr): Use ocp_convert to force
6561         rvalue conversion.
6562
6563 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
6564
6565         * call.c (standard_conversion): Use RVALUE_CONVs for all
6566         expressions that satisfy lvalue_p, not just those that satisfy
6567         real_lvalue_p.
6568
6569         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
6570
6571         * typeck.c (c_sizeof): Return an expression of `size_t' type,
6572         not one with TYPE_IS_SIZETYPE set.
6573         (dubious_conversion_warnings): Remove special-case code.
6574
6575 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
6576
6577         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
6578         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
6579         (dump_type_prefix): Print vector-of-int as 'int vector'.
6580         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
6581         * tree.c (walk_tree): Handle VECTOR_TYPE.
6582
6583         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
6584
6585 2000-10-21  Jason Merrill  <jason@redhat.com>
6586
6587         * parse.y (operator): Set got_object from got_scope.
6588         Set looking_for_typename.
6589         * decl.c (lookup_name_real): Clear val after setting from_obj.
6590         Reorganize diagnostic.
6591
6592 2000-10-20  Jason Merrill  <jason@redhat.com>
6593
6594         * tree.c (walk_tree): Don't walk into default args.
6595
6596         * error.c (dump_expr): Use host_integerp.
6597
6598 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
6599
6600         * typeck2.c (abstract_virtuals_error): Use "because" instead of
6601         "since" in error message.
6602
6603 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6604
6605         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
6606
6607 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
6608
6609         * decl.c (revert_static_member_fn): Fixed typo.
6610
6611 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
6612
6613         * class.c (subobject_offset_fn): New type.
6614         (dfs_record_base_offsets): Remove.
6615         (record_base_offsets): Likewise.
6616         (dfs_search_base_offsets): Likewise.
6617         (record_subobject_offset): New function.
6618         (check_subobject_offset): Likewise.
6619         (walk_subobject_offsets): Likewise.
6620         (record_subobject_offsets): Likewise.
6621         (layout_conflict_p): Reimplement.
6622         (layout_nonempty_base_or_field): Correct handling of type
6623         conflicts during layout.
6624         (layout_empty_base): Likewise.
6625         (build_base_field): Adjust to handle new representation of empty
6626         base offset table.
6627         (build_base_fields): Likewise.
6628         (layout_virtual_bases): Likewise.
6629         (splay_tree_compare_integer_csts): New function.
6630         (layout_class_type): Use a splay_tree, rather than a varray, to
6631         represent the offsets of empty bases.
6632
6633         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
6634         * decl.c (select_decl): Don't return declarations that are
6635         DECL_ANTICIPATED.
6636
6637 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
6638
6639         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
6640         (fake_std_node): New macro.
6641         * decl.c (in_std): Rename to ...
6642         (in_fake_std): ... this.
6643         (flag_no_builtin): Remove.
6644         (flag_no_nonansi_builtin): Likewise.
6645         (walk_namespaces_r): Use fake_std_node.
6646         (push_namespace): Use std_identifier.
6647         (pop_namespace): Use in_fake_std.
6648         (lookup_name_real): Use fake_std_node.
6649         (init_decl_processing): When -fhonor-std, create the `std'
6650         namespace.  Don't create a dummy fake_std_node in that case.
6651         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
6652         (builtin_function): Put builtins whose names don't begin
6653         with `_' in the std namespace.
6654         * decl2.c (flag_no_builtin): Remove.
6655         (flag_no_nonansi_builtin): Likewise.
6656         (set_decl_namespace): Use fake_std_node.
6657         (validate_nonmember_using_decl): Likewise.
6658         (do_using_directive): Likewise.
6659         (handle_class_head): Likewise.
6660         * dump.c (dequeue_and_dump): Likewise.
6661         * except.c (init_exception_processing): Use std_identifier.
6662         * init.c (build_member_call): Use fake_std_node.
6663         * rtti.c (init_rtti_processing): Use std_identifier.
6664
6665 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
6666
6667         * cp-tree.h (back_end_hook): Remove declaration.
6668         * decl2.c (back_end_hook): Remove definition.
6669
6670         * dump.c (dequeue_and_dump): Dump TREE_USED.
6671
6672 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
6673
6674         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
6675
6676 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6677
6678         * decl.c (WINT_TYPE): Define.
6679         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
6680         c_size_type_node, signed_size_type_node and wint_type_node.
6681
6682 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6683
6684         * decl2.c (warn_missing_format_attribute): New variable.
6685         (lang_decode_option): Decode -Wmissing-format-attribute.
6686
6687 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
6688
6689         * typeck.c (qualify_type): Remove.
6690         (composite_pointer_type): Fix handling of conversions to `cv void*'.
6691
6692 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6693
6694         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
6695
6696 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6697
6698         * Makefile.in (parse.c, parse.h): Create atomically.
6699
6700 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6701
6702         * class.c (current_obstack): Remove.
6703         * decl.c (ggc_p): Remove.
6704         (start_decl): Don't use decl_tree_cons.
6705         (grokdeclarator): Don't use build_decl_list.
6706         (start_function): Don't use decl_tree_cons.
6707         (finish_function): Don't mess with obstacks.
6708         * decl2.c (grok_x_components): Don't use build_decl_list.
6709         * lex.c (make_call_declarator): Don't call decl_tree_cons.
6710         (implicitly_declare_fn): Don't call build_decl_list.
6711         * parse.y (frob_specs): Don't call build_decl_list or
6712         decl_tree_cons.
6713         (expr_or_declarator_intern): Don't call decl_tree_cons.
6714         (primary): Don't call build_decl_list.
6715         (fcast_or_absdcl): Likewise.
6716         (typed_declspecs): Don't call decl_tree_cons.
6717         (reserved_declspecs): Don't call build_decl_list.
6718         (declmods): Likewise.
6719         (reserved_typespecquals): Likewise.
6720         (aggr): Likewise.
6721         (new_type_id): Likewise.
6722         (cv_qualifiers): Likewise.
6723         (after_type_declarator_intern): Likewise.
6724         (notype_declarator_intern): Likewise.
6725         (absdcl_intern): Likewise.
6726         (named_parm): Likewise.
6727         * pt.c (most_specialized_class): Likewise.
6728         * repo.c (temporary_obstack): Make it a structure, not a pointer.
6729         (init_repo): Initialize it.
6730         * search.c (current_obstack): Remove.
6731         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
6732
6733 2000-10-09  Richard Henderson  <rth@cygnus.com>
6734
6735         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
6736         (c++ language support bits for libgcc): Remove.
6737         (c++.clean): Remove cplib2.txt cleanup.
6738         * config-lang.in (headers, lib2funcs): Remove.
6739
6740         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
6741         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
6742         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
6743         * inc/new.h, inc/typeinfo: Remove files.
6744
6745 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6746
6747         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
6748         defined.
6749         (init_decl_processing): Initialize intmax_type_node and
6750         uintmax_type_node.
6751
6752 2000-10-06  Richard Henderson  <rth@cygnus.com>
6753
6754         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
6755         (original_result_rtx): Remove.
6756         * decl.c (save_function_data): Don't clear x_result_rtx.
6757         (mark_lang_function): Don't mark it either.
6758         * expr.c (fixup_result_decl): Remove.
6759         * semantics.c (genrtl_named_return_value): Frob the return decl
6760         before calling emit_local_var.
6761         (genrtl_finish_function): Don't call fixup_result_decl.
6762         Always emit the jump to return_label.
6763
6764 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
6765
6766         * pt.c (lookup_template_class): Set current access for enum.
6767         (tsubst_enum): Set file & line for enum decl.
6768
6769         * spew.c (yylex): Remove unused variable.
6770
6771 2000-10-05  Richard Henderson  <rth@cygnus.com>
6772
6773         * semantics.c (genrtl_finish_function): Don't init or check
6774         can_reach_end; remove noreturn and return value checks.
6775
6776 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6777
6778         * init.c (build_java_class_ref): Use `build_static_name' with a
6779         suffix, not a prefix, to build the class object's name.
6780
6781 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6782
6783         * cp-tree.h (access_kind): Fix comment typo.
6784         * decl2.c (grokfield): Fix diagnostic typo.
6785         * semantics.c (finish_template_type): Fix comment typo.
6786         (finish_qualified_object_call_expr): Likewise.
6787
6788 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6789
6790         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
6791         tsubsting fails.
6792
6793 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6794
6795         * spew.c (frob_id): New static function.
6796         (frob_opname): Use it.
6797         (yylex): Use it.
6798
6799 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6800
6801         * decl.c (lang_mark_false_label_stack): Remove.
6802         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
6803
6804 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
6805
6806         * gxxint.texi: Use @email for formatting email addresses.
6807
6808 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
6809
6810         * error.c: Remove direct obstack manipulation.  Replace with
6811         output_buffer-based formatting.  Adjust calls to removed macros.
6812         (obstack_chunk_alloc, obstack_chunk_free): Remove.
6813         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
6814         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
6815
6816 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
6817
6818         * ir.texi: Move to ../c-tree.texi.
6819
6820 2000-09-20  Jason Merrill  <jason@redhat.com>
6821
6822         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
6823
6824 2000-09-21  Andreas Jaeger  <aj@suse.de>
6825
6826         * errfn.c: Move declaration of cp_printer and cp_printers to ...
6827         * cp-tree.h: ... here.
6828
6829         * error.c: Remove declaration of cp_printer.
6830
6831 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
6832
6833         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
6834
6835 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
6836
6837         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
6838         users.
6839
6840 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
6841
6842         * decl.c (start_function): Robustify.
6843
6844 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6845
6846         * cp-tree.h (check_function_format): Accept a `status' parameter.
6847
6848         * call.c, typeck.c: Updates calls to `check_function_format'.
6849
6850 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
6851
6852         * decl2.c (handle_class_head): Always push some scope even
6853         in the error case.
6854
6855 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
6856
6857         * cp-tree.h (struct cp_language_function): Remove
6858         x_scope_stmt_stack and name_declared.
6859         (current_scope_stmt_stack): Remove.
6860         (function_name_declared_p): New macro.
6861         (struct lang_decl_flags): Use c_lang_decl as a base class.
6862         (context): Remove.
6863         (struct lang_decl): Replace saved_tree with context.
6864         (DECL_FRIEND_CONTEXT): Adjust accordingly.
6865         (SET_DECL_FRIEND_CONTEXT): Likewise.
6866         (DECL_VIRTUAL_CONTEXT): Likewise.
6867         (DECL_SAVED_TREE): Remove.
6868         (C_DECLARED_LABEL_FLAG): Likewise.
6869         (cplus_expand_expr_stmt): Don't declare.
6870         (add_decl_stmt): Likewise.
6871         (add_scope_stmt): Likewise.
6872         * decl.c (mark_stmt_tree): Remove.
6873         (case_compare): Likewise.
6874         (finish_case_label): Use c_add_case_label.
6875         (init_decl_processing): Set more language-specific hooks.
6876         (build_enumerator): Fix typo in comment.
6877         (cplus_expand_expr_stmt): Remove.
6878         (mark_lang_function): Use mark_c_language_function.
6879         (lang_mark_tree): Use c_mark_lang_decl.
6880         * decl2.c: Change order of inclusion.
6881         * except.c: Likewise.
6882         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
6883         back on c_expand_expr.
6884         * friend.c: Include expr.h.
6885         * init.c: Change order of inclusion.
6886         * Makefile.in: Update dependencies.
6887         * lex.h (free_lang_decl_chain): Remove.
6888         * optimize.c (maybe_clone_body): Use function_name_declared_p.
6889         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
6890         it doesn't exist.
6891         (instantiate_decl): Use function_name_declared_p.
6892         * semantics.c (lang_expand_expr_stmt): Remove.
6893         (set_current_function_name_declared): Likewise.
6894         (current_function_name_declared): Likewise.
6895         (begin_compound_stmt): Use function_name_declared_p.
6896         (add_decl_stmt): Remove.
6897         (setup_vtbl_ptr): Use function_name_declared_p.
6898         (add_scope_stmt): Remove.
6899         (current_scope_stmt_stack): New function.
6900         (cp_expand_stmt): Don't handle SCOPE_STMTs.
6901         (expand_body): Use function_name_declared_p.
6902         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
6903         * typeck.c: Change order of includes.
6904         (convert_sequence): Remove.
6905
6906 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6907
6908         * lex.c (reswords): Add _Complex.
6909
6910 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6911
6912         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
6913
6914 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
6915
6916         * init.c (begin_init_stmts): Don't use // comments.
6917
6918 2000-09-12  Jason Merrill  <jason@redhat.com>
6919
6920         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
6921         all non-extern arrays.
6922
6923         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
6924         typenames, too.  Downgrade complaint to pedwarn.
6925         (xref_tag): Warn about surprising behavior of 'friend struct T'.
6926         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
6927         'class This::Inherited'.
6928
6929 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
6930
6931         * decl.c (finish_case_label): Given the LABEL_DECL a
6932         DECL_CONTEXT.
6933
6934 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
6935
6936         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
6937         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
6938         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
6939         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
6940         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
6941         New macros.
6942         (sorry_for_unsupported_tree, print_scope_operator,
6943         print_left_paren, print_right_paren, print_left_bracket,
6944         print_right_bracket, print_whitespace): Likewise.
6945         (aggr_variety): Rename to class_key_or_enum.
6946         (print_type): Rename to print_type_id.
6947         (print_type_specifier_seq, print_simple_type_specifier,
6948         print_elaborated_type_specifier,
6949         print_rest_of_abstract_declarator,
6950         print_parameter_declaration_clause, print_exception_specification,
6951         print_nested_name_specifier, print_template_id,
6952         typedef_original_name,  print_template_argument_list_start,
6953         print_template_argument_list_end): New functions.
6954
6955 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
6956
6957         * ir.texi: Add more documentation.
6958
6959 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
6960
6961         * cp-tree.h (struct saved_scope): Remove x_function_parms.
6962         (current_function_parms): Don't define.
6963         (struct cp_language_function): Remove parms_stored.
6964         (current_function_just_assigned_this): Don't define.
6965         (current_function_parms_stored): Likewise.
6966         (static_ctors): Declare.
6967         (static_dtors): Likewise.
6968         (SF_EXPAND): Don't define.
6969         (expand_start_early_try_stmts): Remove declaration.
6970         (store_parm_decls): Likewise.
6971         * decl.c (static_ctors): Don't declare.
6972         (static_dtors): Likewise.
6973         (struct binding_level): Remove this_block.
6974         (poplevel): Remove dead code.
6975         (set_block): Likewise.
6976         (mark_binding_level): Don't mark this_block.
6977         (mark_saved_scope): Don't mark x_function_parms.
6978         (init_decl_processing): Don't add current_function_parms as a GC
6979         root.
6980         (check_function_type): Change prototype.
6981         (start_function): Remove RTL-generation code.
6982         (expand_start_early_try_stmts): Remove.
6983         (store_parm_decls): Give it internal linkage.  Remove
6984         RTL-generation code.
6985         (finish_function): Remove RTL-generation code.
6986         * decl2.c (static_ctors): Fix formatting.
6987         (static_dtors): Likewise.
6988         * method.c (use_thunk): Don't call store_parm_decls.
6989         (synthesize_method): Likewise.
6990         * optimize.c (maybe_clone_body): Likewise.
6991         * parse.y (fn.def2): Likewise.
6992         (.set_base_init): Likewise.
6993         (nodecls): Likewise.
6994         * pt.c (instantiate_decl): Likewise.
6995         * rtti.c (synthesize_tinfo_fn): Likewise.
6996         * semantics.c (genrtl_try_block): Simplify.
6997         (expand_body): Use genrtl_start_function and
6998         genrtl_finish_function.
6999         (genrtl_start_function): New function.
7000         (genrtl_finish_function): Likewise.
7001
7002 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
7003
7004         * error.c (cp_tree_printer, case 'P'): Append break.
7005
7006 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
7007
7008         * cp-tree.h (frob_opname): Declare.
7009         * parse.y (saved_scopes): New static variable.
7010         (cp_parse_init): Adjust.
7011         (do_id): If lastiddecl is NULL, do do_identifier.
7012         (operator): Save scope information.
7013         (unoperator): New reduction. Restore scope information.
7014         (operator_name): Append unoperator. Call frob_opname.
7015         * spew.c (frob_opname): Define.
7016
7017 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
7018
7019         * decl.c, rtti.c: Include defaults.h if not already included.
7020         Don't define the *_TYPE_SIZE macros.
7021
7022 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
7023
7024         * cp-tree.h (push_switch): Change prototype.
7025         (check_cp_case_value): Remove declaration.
7026         (decl_constant_value): Likewise.
7027         * decl.c (struct cp_switch): Add switch_stmt and cases.
7028         (case_compare): New function.
7029         (push_switch): Set switch_stmt.  Initialize cases.
7030         (pop_switch): Clean up cases.
7031         (define_case_label): Rename to ...
7032         (finish_case_label): ... this.  Do semantic analysis for case
7033         labels here.
7034         (start_function): Correct comment.
7035         * decl2.c (check_cp_case_value): Remove.
7036         * expr.c (do_case): Remove.
7037         * pt.c (tsubst_expr): Adjust call to finish_case_label.
7038         * semantics.c (genrtl_do_poplevel): Remove declaration.
7039         (RECHAIN_STMTS): Remove.
7040         (finish_break_stmt): Use build_break_stmt.
7041         (finish_continue_stmt): Use build_continue_stmt.
7042         (finish_switch_cond): Adjust condition here, rater than in
7043         c_expand_start_case.
7044         (finish_case_label): Remove.
7045         * typeck.c (c_expand_return): Remove.
7046         (c_expand_start_case): Likewise.
7047
7048 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
7049
7050         * ir.texi: Document type nodes.
7051
7052 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
7053
7054         * cp-tree.h (init_cp_semantics): Declare.
7055         (genrtl_try_block): Don't declare.
7056         (genrtl_handler): Likewise.
7057         (genrtl_catch_block): Likewise.
7058         (genrtl_ctor_stmt): Likewise.
7059         (genrtl_subobject): Likewise.
7060         (genrtl_do_poplevel): Likewise.
7061         (genrtl_named_return_value): Likewise.
7062         * lex.c (init_parse): Call init_cp_semantics.
7063         * semantics.c (genrtl_try_block): Give it internal linkage.
7064         (genrtl_handler): Likewise.
7065         (genrtl_catch_block): Likewise.
7066         (genrtl_ctor_stmt): Likewise.
7067         (genrtl_subobject): Likewise.
7068         (genrtl_do_poplevel): Likewise.
7069         (genrtl_named_return_value): Likewise.
7070         (lang_expand_stmt): Rename to ...
7071         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
7072         (init_cp_semantics): Define.
7073
7074         * decl.c (initialize_local_var): Remove RTL-generating code.
7075         * semantics.c (genrtl_try_block): Fix formatting.
7076
7077         Move statement-tree facilities from C++ to C front-end.
7078         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
7079         (void_zero_node): Remove.
7080         (stmt_tree): Likewise.
7081         (scope_chain): Adjust.
7082         (language_function): Rename to cp_language_function.
7083         (cp_function_chain): Adjust.
7084         (current_stmt_tree): Remove.
7085         (last_tree): Likewise.
7086         (last_expr_type): Likewise.
7087         (struct lang_decl): Adjust.
7088         (STMT_IS_FULL_EXPR_P): Remove.
7089         (add_tree): Remove.
7090         (begin_stmt_tree): Likewise.
7091         (finish_stmt_tree): Likewise.
7092         (walk_tree_fn): Likewise.
7093         (walk_stmt_tree): Likewise.
7094         * class.c (finish_struct): Replace use of add_tree with add_stmt.
7095         * decl.c (mark_stmt_tree): Adjust type.
7096         (init_decl_processing): Don't build void_zero_node.
7097         (initialize_local_var): Adjust usage of current_stmt_tree.
7098         (finish_enum): Use add_stmt, not add_tree.
7099         (save_function_data): Adjust use of language_function.
7100         (finish_constructor_body): Use add_stmt, not add_tree.
7101         (finish_destructor_body): Likewise.
7102         (push_cp_function_context): Adjust use of language_function.
7103         (pop_cp_function_context): Likewise.
7104         (mark_lang_function): Likewise.
7105         (mark_cp_function_context): Likewise.
7106         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
7107         (build_vec_init): Likewise.
7108         * semantics.c (SET_LAST_STMT): Remove.
7109         (RECHAIN_STMTS): Don't use it.
7110         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
7111         (current_stmt_tree): Define.
7112         (add_tree): Remove.
7113         (finish_goto_stmt): Use add_stmt, not add_tree.
7114         (finish_expr_stmt): Likewise.
7115         (begin_if_stmt): Likewise.
7116         (finish_then_clause): Likewise.
7117         (begin_while_stmt): Likewise.
7118         (begin_do_stmt): Likewise.
7119         (finish_return_stmt): Likewise.
7120         (begin_for_stmt): Likewise.
7121         (finish_break_stmt): Likewise.
7122         (finish_continue_stmt): Likewise.
7123         (begin_switch_stmt): Likewise.
7124         (finish_case_label): Likewise.
7125         (begin_try_block): Likewise.
7126         (begin_function_try_block): Likewise.
7127         (begin_handler): Likewise.
7128         (begin_catch_block): Likewise.
7129         (begin_compound_stmt): Likewise.
7130         (begin_asm_stmt): Likewise.
7131         (finish_asm_stmt): Likewise.
7132         (finish_label_stmt): Likewise.
7133         (add_decl_stmt): Likewise.
7134         (finish_subobject): Likewise.
7135         (finish_decl_cleanup): Likewise.
7136         (finish_named_return_value): Likewise.
7137         (setup_vtbl_ptr): Likewise.
7138         (add_scope_stmt): Likewise.
7139         (finish_stmt_expr): Likewise.
7140         (prune_unused_decls): Remove.
7141         (begin_stmt_tree): Likewise.
7142         (finish_stmt_tree): Likewise.
7143         (prep_stmt): Adjust use of current_stmt_tree.
7144         (lang_expand_stmt): Likewise.
7145         * tree.c (statement_code_p): Remove.
7146         (cp_statement_code_p): New function.
7147         (walk_stmt_tree): Remove.
7148         (init_tree): Set lang_statement_code_p.
7149
7150 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
7151
7152         Integrated preprocessor.
7153
7154         * Make-lang.in, Makefile.in: Remove all references to input.c,
7155         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
7156         * gxx.gperf, hash.h, input.c: Delete.
7157         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
7158         initialized properly.
7159
7160         * class.c (fixup_pending_inline): Take a tree, not a
7161         struct pending_inline *.  All callers changed.
7162         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
7163         RID_PROTECTED entries in ridpointers[] array here.
7164         * decl.c (duplicate_decls): Do not refer to struct
7165         pending_inline.
7166         (record_builtin_type, init_decl_processing): Use RID_MAX not
7167         CP_RID_MAX.
7168         (grokdeclarator): Use C_IS_RESERVED_WORD.
7169         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
7170         cpplib.
7171         (grok_x_components): Do not inspect pending_inlines chain.
7172
7173         * cp-tree.h (struct lang_identifier): Add rid_code entry.
7174         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
7175         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
7176         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
7177         TIME_IDENTIFIER_FILEINFO): Kill.
7178         Update prototypes.
7179         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
7180         single 32-bit word.
7181         * parse.y: Call do_pending_inlines unconditionally.
7182         reinit_parse_for_method is now snarf_method.  fn.defpen is no
7183         longer necessary.  Remove unnecessary <itype> annotation on
7184         SCOPE.  Do not refer to end_of_file or struct pending_inline.
7185         * semantics.c (begin_inline_definitions): Call
7186         do_pending_inlines unconditionally.
7187
7188         * lex.c: Remove all code now shared with C front end.
7189         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
7190         into the get_identifier table.  Rewrite pragma handling to
7191         work with the registry.  Move code to save tokens for later
7192         processing to spew.c.
7193
7194         * spew.c: Rewrite everything in terms of token streams instead
7195         of text.  Move routines here from lex.c / input.c as
7196         appropriate.  GC-mark trees hanging off the pending inlines
7197         chain.
7198
7199 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
7200
7201         * NEWS: Mention that the named return value extension has been
7202         deprecated.
7203         * cp-tree.h (original_result_rtx): Define.
7204         (TREE_REFERENCE_EXPR): Remove.
7205         (DECL_VPARENT): Likewise.
7206         (pushdecl_nonclass_level): Likewise.
7207         (store_return_init): Likewise.
7208         (reinit_lang_specific): Likewise.
7209         (genrtl_named_return_value): Change prototype.
7210         * decl.c (original_result_rtx): Remove.
7211         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
7212         Do not generate RTL for local variables here.
7213         (store_return_init): Remove.
7214         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
7215         store_return_init.
7216         (finish_named_return_value): Adjust accordingly.  Warn that this
7217         extension is deprecated.
7218         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
7219
7220 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7221
7222         * pt.c (type_unification_real): Replace switch with if.
7223         (unify): Tsubst non-type parms before comparing.
7224
7225 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7226
7227         * error.c (dump_typename): New function, broken out of ...
7228         (dump_type): ... here. Use it.
7229         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
7230
7231 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7232
7233         * init.c (build_offset_ref): Deal with namespace scoped
7234         TEMPLATE_ID_EXPRs.
7235
7236 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7237
7238         * class.c (resolve_address_of_overloaded_function): Add
7239         explanation message.
7240         * decl.c (define_case_label): Reformat explanation.
7241         * decl2.c (finish_static_data_member_decl): Likewise.
7242         (grokfield): Likewise.
7243         * friend.c (do_friend): Likewise.
7244
7245 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
7246
7247         * tree.c (walk_tree): Expose tail recursion.
7248         (walk_stmt_tree): New function.
7249         * cp-tree.h: Prototype walk_stmt_tree.
7250         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
7251         the BLOCKs directly.  If a BLOCK has no variables after
7252         pruning, discard it.
7253         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
7254         restore the line number.
7255
7256 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
7257
7258         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
7259         (pt.o): Remove dependency on HTAB_H.
7260         * cp-tree.h: Include hashtab.h.
7261         (walk_tree): Change prototype.
7262         (walk_tree_without_duplicates): New function.
7263         * decl.c (check_default_argument): Use it.
7264         * optimize.c (remap_decl): Adjust calls to walk_tree.
7265         (copy_body): Likewise.
7266         (expand_calls_inline): Likewise.
7267         (calls_setjmp_p): Use walk_tree_without_duplicates.
7268         * pt.c: Don't include hashtab.h.
7269         (for_each_template_parm): Use walk_tree_without_duplicates.
7270         * semantics.c (finish-stmt_tree): Likewise.
7271         (expand_body): Likewise.
7272         * tree.c (walk_tree): Add additional parameter.
7273         (walk_tree_without_duplicates): New function.
7274         (count_trees): Use it.
7275         (verify_stmt_tree): Adjust call to walk_tree.
7276         (find_tree): Use walk_tree_without_duplicates.
7277         (no_linkage_check): Likewise.
7278         (break_out_target_exprs): Adjust call to walk_tree.
7279         (cp_unsave): Likewise.
7280
7281 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7282
7283         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
7284         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
7285         * cp-tree.h (TYPE_BINFO): Adjust comment.
7286         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
7287         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
7288         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
7289         (TYPE_TEMPLATE_INFO): Likewise.
7290         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
7291         * class.c (push_nested_class): Likewise.
7292         * decl.c (lookup_name_real): Likewise.
7293         (grokdeclarator): Likewise.
7294         (grok_op_properties): Likewise.
7295         (xref_tag): Likewise.
7296         (xref_basetypes): Likewise.
7297         * decl2.c (constructor_name_full): Likewise.
7298         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
7299         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
7300         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
7301         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7302         (dump_type_suffix): Likewise.
7303         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
7304         instead.
7305         (get_aggr_from_typedef): Likewise.
7306         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
7307         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7308         (write_template_parm): Likewise.
7309         (write_template_template_parm): Check tree code instead of
7310         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7311         * method.c (build_overload_nested_name): Add
7312         BOUND_TEMPLATE_TEMPLATE_PARM.
7313         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
7314         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7315         * pt.c (convert_template_argument): Check tree code instead of
7316         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7317         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
7318         (for_each_template_parm): Adjust comment.
7319         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
7320         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7321         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
7322         template_args_equal to compare template template parameter cases.
7323         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7324         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
7325         instead.
7326         * tree.c (copy_template_template_parm): Decide whether to create
7327         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
7328         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7329         (copy_tree_r): Likewise.
7330         * typeck.c (comptypes): Likewise.  Check tree code instead of
7331         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7332
7333 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
7334
7335         * decl.c (finish_function): Move the code for handling functions
7336         marked with the constructor and destructor attributes inside the
7337         expand_p block.
7338
7339 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7340
7341         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
7342
7343 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7344
7345         * pt.c (lookup_template_class): Remove abort.
7346         * tree.c (get_type_decl): Allow error_mark_node.
7347
7348 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7349
7350         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
7351         TEMPLATE_ID_EXPRs.
7352
7353 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
7354
7355         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
7356         new ABI mangling.
7357
7358 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
7359
7360         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
7361         union tag mismatch error reporting.
7362
7363 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
7364
7365         * call.c (build_scoped_method_call): Check it is not a namespace.
7366
7367 2000-08-30  Jason Merrill  <jason@redhat.com>
7368
7369         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
7370
7371         * tree.c (bot_manip): Check TREE_CONSTANT rather than
7372         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
7373         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
7374
7375         * decl.c (start_function): Always call make_function_rtl.
7376
7377 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7378
7379         * semantics.c (prune_unused_decls): New function.
7380         (finish_stmt_tree): Call it via walk_tree.
7381
7382 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7383
7384         * class.c (build_secondary_vtable): Constify a char *.
7385         * decl.c (init_decl_processing): Initialize function_id_node,
7386         pretty_function_id_node, and func_id_node.
7387         * input.c (struct input_source): Constify 'str'.
7388         (feed_input): Constify first argument.
7389         * mangle.c (write_identifier): Constify argument.
7390         * pt.c (mangle_class_name_for_template): Constify argument.
7391
7392 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
7393
7394         * typeck.c (mark_addressable): Remove code that pokes around in
7395         RTL.
7396
7397 2000-08-28  Jason Merrill  <jason@redhat.com>
7398
7399         * lex.c (file_name_nondirectory): Move to toplev.c.
7400
7401         * cp-tree.h (LOCAL_CLASS_P): New macro.
7402         * class.c (finish_struct_1): Use it.
7403
7404 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
7405
7406         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
7407         (write_encoding): Pass another argument to write_name.
7408         (write_name): Add ignore_local_scope parameter.  Fix handling of
7409         local names.
7410         (write_nested_name): Use write_unqualified_name.
7411         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
7412         (write_template_prefix): Use write_unqualified_name.
7413         (write_component): Remove.
7414         (write_local_name): Add parameter.  Use direct local entity to
7415         discriminator calculation.
7416         (write_class_enum_type): Pass another argument to write_name.
7417         (write_template_template_arg): Likewise.
7418         (make_guard_variable): Likewise.
7419
7420 2000-08-27  Jason Merrill  <jason@redhat.com>
7421
7422         * decl.c (pushdecl): Matching decls for local externs are found in
7423         the current level.  Propagate linkage information from previous
7424         declarations.
7425
7426 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7427
7428         * ir.texi (Expressions): Fix typo.
7429
7430 2000-08-25  Greg McGary  <greg@mcgary.org>
7431
7432         * tree.c (init_tree): Use ARRAY_SIZE.
7433
7434 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7435
7436         * error.c (cp_tree_printer): Rework.
7437
7438 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
7439
7440         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
7441         dyn-string.o.
7442         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
7443         (cp-demangle.o): Remove target.
7444         (dyn-string.o): Likewise.
7445
7446         * decl.c (grokfndecl): Require that `main' return an `int'.
7447         * mangle.c (write_encoding): Don't mangle return types for
7448         conversion functions.
7449
7450 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7451
7452         * error.c (tree_formatting_info): New data type.
7453         (tree_being_formatted): New macro.
7454         (tree_formatting_flags): Likewise.
7455         (put_whitespace): Likewise.
7456         (print_tree_identifier): Likewise.
7457         (print_identifier): Likewise.
7458         (cp_tree_printer, print_function_argument_list, print_declaration,
7459         print_expression, print_function_declaration,
7460         print_function_parameter, print_type, print_cv_qualifier): New
7461         functions.
7462         (init_error): Initialize lang_printer.
7463
7464 2000-08-24  Jason Merrill  <jason@redhat.com>
7465
7466         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
7467         adjustment necessary.
7468
7469 2000-08-24  Greg McGary  <greg@mcgary.org>
7470
7471         * cp-tree.h (MAIN_NAME_P): Remove macro.
7472
7473 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
7474
7475         * error.c (print_instantiation_context): Don't forget to flush the
7476         buffer.
7477
7478 2000-08-23  Jason Merrill  <jason@redhat.com>
7479
7480         * typeck.c (build_ptrmemfunc): Save the input pmf.
7481
7482         * method.c (process_modifiers): Use same_type_p.
7483
7484 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
7485
7486         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
7487         * mangle.c (write_function_type): Change prototype.
7488         (write_encoding): Don't mangle return types for
7489         constructors or destructors.
7490         (write_type): Adjust call to write_function_type.
7491         * pt.c (instantiate_template): Instantiate alternate entry points
7492         when instantiating the main function.
7493
7494 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
7495
7496         * error.c (cp_print_error_function): Don't use embedded '\n' in
7497         output_printf.
7498
7499 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
7500
7501         * decl.c (init_decl_processing): Remove bogus initialization.
7502         * error.c (lang_print_error_function): Restore here.
7503         (init_error): Initialize print_error_function.
7504
7505 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7506
7507         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
7508
7509 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
7510
7511         * Makefile.in (error.o): Depends on diagnostic.h
7512
7513         * cp-tree.h (problematic_instantiation_changed,
7514         record_last_problematic_instantiation, current_instantiation,
7515         print_instantiation_context): Declare.
7516         (maybe_print_template_context): Remove.
7517
7518         * decl.c (init_decl_processing): Set print_error_function to NULL.
7519         (lang_print_error_function): Remove, since we're using a new
7520         machinery.
7521
7522         * error.c: #include diagnostic.h
7523         (function_category): New function.
7524         (cp_diagnostic_starter): Likewise.
7525         (cp_diagnostic_finalizer): Likewise.
7526         (cp_print_error_function): Likewise.
7527         (maybe_print_instantiation_context): Likewise.
7528         (print_instantiation_full_context): Likewise.
7529         (print_instantiation_partial_context): Likewise.
7530         (print_instantiation_context): Define.
7531         (init_error): Initialize diagnostic pager and finalizer.
7532
7533         * pt.c (problematic_instantiation_changed): Define.
7534         (record_last_problematic_instantiation): Likewise.
7535         (current_instantiation): Likewise.
7536         (maybe_print_template_context): Remove.
7537         (print_template_context): Likewise.
7538         (current_tinst_level): Make static to reflect Brendan Kehoe's
7539         change of 1995-04-13.
7540         (push_tinst_level): Call print_instantiation_context.
7541
7542 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7543
7544         * lang-specs.h: Do not process -o or run the assembler if
7545         -fsyntax-only.
7546
7547 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7548
7549         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
7550         variables.
7551         * decl2.c (lang_decode_option): Disable gettext attributes for
7552         -ansi.
7553
7554 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
7555
7556         * lex.c (lang_init_options): Default diagnostic message maximum
7557         length to 80, when line-wrapping.
7558
7559 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
7560
7561         * class.c (build_vtbl_initializer): Clear the entire
7562         vtbl_init_data.  Start keeping track of the functions for which we
7563         have created vcall offsets here.
7564         (dfs_build_vcall_offset_vtbl_entries): Remove.
7565         (build_vcall_offset_vtbl_entries): Reimplement.
7566         (add_vcall_offset_vtbl_entries_r): New function.
7567         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
7568         computing when vcall offsets are necessary.
7569
7570 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7571
7572         * decl.c (member_function_or_else): Use cp_error ... %T.
7573         (grokdeclarator): Likewise.
7574         (start_method): Likewise.
7575         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
7576
7577 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7578
7579         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
7580         TYPE_DECLs.
7581
7582 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7583
7584         * cp-tree.h (PTRMEM_OK_P): New macro.
7585         (itf_ptrmem_ok): New enumeration value.
7586         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
7587         argument. Diagnose implicit pointer to member.
7588         (instantiate_type): Don't diagnose implicit pointer to member
7589         here. Pass itf_ptrmem_ok if ok. Adjust calls to
7590         resolve_address_of_overloaded_function.
7591         * init.c (build_offset_ref): Set PTRMEM_OK_P.
7592         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
7593         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
7594         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
7595         (build_unary_op): Deal with single non-static member in
7596         microsoft-land.
7597
7598 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7599
7600         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
7601
7602 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7603
7604         * cp-tree.h (enum_name_string): Remove prototype.
7605         (report_case_error): Remove prototype.
7606         * cp/typeck2.c (enum_name_string): Remove.
7607         (report_case_error): Remove.
7608         * error.c (dump_expr): Deal with enum values directly.
7609         Correctly negate integer constant.
7610
7611 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7612
7613         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
7614         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
7615         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
7616         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
7617         (__cxa_vec_new): Use __cxa_vec_new2.
7618         (__cxa_vec_delete): Use __cxa_vec_delete2.
7619
7620 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7621
7622         * vec.cc (__cxa_vec_new): Set "C" linkage.
7623         (__cxa_vec_ctor): Likewise.
7624         (__cxa_vec_cctor): Likewise.
7625         (__cxa_vec_dtor): Likewise.
7626         (__cxa_vec_delete): Likewise.
7627         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
7628         (__cxa_vec_ctor): Likewise.
7629         (__cxa_vec_cctor): Likewise.
7630         (__cxa_vec_dtor): Likewise.
7631         (__cxa_vec_delete): Likewise.
7632
7633 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7634
7635         * class.c (instantiate_type): Reinstate local variable
7636         deleted in previous change.
7637
7638         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
7639         itf_no_attributes.
7640
7641 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7642
7643         * cp-tree.h (instantiate_type_flags): New enumeration.
7644         (instantiate_type): Change parameter.
7645         * class.c (instantiate_type): Adjust prototype. Adjust.
7646         * call.c (standard_conversion): Adjust instantiate_type call.
7647         (reference_binding): Likewise.
7648         (build_op_delete_call): Likewise.
7649         (convert_like_real): Likewise.
7650         * cvt.c (cp_convert_to_pointer): Likewise.
7651         (convert_to_reference): Likewise.
7652         * pt.c (convert_nontype_argument): Likewise.
7653         * typeck.c (build_binary_op): Likewise.
7654         (build_ptrmemfunc): Likewise.
7655         (convert_for_assignment): Likewise.
7656
7657 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7658
7659         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
7660         (current_aggr): Define.
7661         * decl.c (grokdeclarator): Make sure a friend class is an
7662         elaborated type specifier.
7663         * parse.y (current_aggr): Remove static definition.
7664         (cp_parse_init): Adjust.
7665         (structsp): Clear and restore current_aggr.
7666         (component_decl_list): Clear current_aggr.
7667
7668         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
7669         aggregate tag on the typename's context.
7670
7671         * pt.c (tsubst_friend_class): Return error_mark_node, if
7672         parms becomes NULL.
7673         (instantiate_class_template): Ignore error_mark_node friend types.
7674
7675 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
7676
7677         * cvt.c (warn_ref_binding): New static function, broken out of ...
7678         (convert_to_reference): ... here. Use it.
7679
7680 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7681
7682         * parse.y (template_arg): Add rule for template qualified with
7683         global scope.
7684
7685 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7686
7687         * decl2.c (add_function): Reorganize.
7688         (arg_assoc): Do not consider function template decls.
7689
7690 2000-08-11  Jason Merrill  <jason@redhat.com>
7691
7692         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
7693         looking inside.
7694
7695 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7696
7697         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
7698         (lookup_nested_tag): Likewise.
7699
7700         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
7701         can be produced.
7702
7703 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7704
7705         * parse.y (named_complex_class_head_sans_basetype): Remove
7706         always true if.
7707
7708 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7709
7710         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
7711         explicit TEMPLATE_ID_EXPR args.
7712         (build_expr_from_tree, case CALL_EXPR): Likewise.
7713
7714 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7715
7716         * decl.c (check_tag_decl): Diagnose typename's which don't
7717         declare anything.
7718
7719 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7720
7721         * init.c (build_aggr_init): Reject bogus array initializers
7722         early.
7723
7724 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7725
7726         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
7727         runtime.
7728         * cp/tinfo.cc (__dynamic_cast): Likewise.
7729         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7730
7731 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7732
7733         * cvt.c (convert_to_pointer_force): Fix error message when
7734         attempting to cast from ambiguous base.
7735
7736 2000-08-08  Jason Merrill  <jason@redhat.com>
7737
7738         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
7739         (tsubst_template_arg_vector): Likewise.
7740
7741         * decl2.c (build_anon_union_vars): Choose the largest field; don't
7742         assume that one will be as large as the union.
7743
7744 2000-08-07  Kazu Hirata  <kazu@hxi.com>
7745
7746         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
7747         * decl.c (pop_labels): Likewise.
7748
7749 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
7750
7751         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
7752         specifications.
7753         (__pointer_to_member_type_info): Likewise.
7754         (__base_class_info): Likewise.
7755         (__class_type_info): Likewise.
7756         (__si_class_type_info): Likewise.
7757         (__vmi_class_type_info): Likewise.
7758         * tinfo.cc (__si_class_type_info::__do_find_public_src):
7759         Changed member names to match specifications.
7760         (__vmi_class_type_info::__do_find_public_src): Likewise.
7761         (__si_class_type_info::__do_dyncast): Likewise.
7762         (__vmi_class_type_info::__do_dyncast): Likewise.
7763         (__si_class_type_info::__do_upcast): Likewise.
7764         (__vmi_class_type_info::__do_upcast): Likewise.
7765         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
7766         (__pbase_type_info::__pointer_catch): Likewise.
7767         (__pointer_type_info::__pointer_catch): Likewise.
7768         (__pointer_to_member_type_info::__pointer_catch): Likewise.
7769
7770 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7771
7772         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
7773         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
7774         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
7775
7776 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
7777
7778         * cp-tree.h (add_method): Change prototype.
7779         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
7780         Don't double the size of the method vector in the error case.
7781         (handle_using_decl): Adjust call to add_method.
7782         (add_implicitly_declared_members): Likewise.
7783         (clone_function_decl): Likewise.
7784         * decl2.c (check_classfn): Likewise.
7785         * semantics.c (finish_member_declaration): Likewise.
7786
7787 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
7788
7789         * decl.c (flag_isoc94): New variable.
7790
7791 2000-08-02  Jason Merrill  <jason@redhat.com>
7792
7793         * pt.c (do_type_instantiation): Add complain parm; don't complain
7794         if called recursively.
7795         * cp-tree.h, parse.y: Adjust.
7796
7797 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7798
7799         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
7800         -Wno-strict-prototypes.
7801
7802         * g++spec.c: Adjust type of second argument to
7803         lang_specific_driver, and update code as necessary.
7804
7805         * cp-tree.h: Don't prototype min_precision here.
7806         (my_friendly_assert): Cast expression to void.
7807         * semantics.c (do_poplevel): Initialize scope_stmts.
7808
7809 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
7810
7811         * cp-tree.h (DECL_NEEDED_P): Tweak.
7812
7813 2000-07-28  Jason Merrill  <jason@redhat.com>
7814
7815         * lang-specs.h: Use %i in rule for .ii files.
7816
7817 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
7818
7819         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
7820
7821 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
7822
7823         Allow indirect primary bases.
7824         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
7825         primary_base.
7826         (CLASSTYPE_VFIELD_PARENT): Remove.
7827         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
7828         (BINFO_PRIMARY_BINFO): Remove.
7829         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
7830         (BINFO_VBASE_PRIMARY_P): Likewise.
7831         (BINFO_PRIMARY_BASE_OF): New macro.
7832         (BINFO_INDIRECT_PRIMARY_P): Likewise.
7833         (get_primary_binfo): New function.
7834         * decl.c (lang_mark_tree): Make lang_type::primary_base.
7835         * class.c (vcall_offset_data_s): Rename to ...
7836         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
7837         and add ctor_vtbl_p.
7838         (get_derived_offset): Use get_primary_binfo.
7839         (dfs_mark_primary_bases): Adjust handling of virtual primary
7840         bases.
7841         (mark_primary_bases): Likewise.
7842         (set_primary_base): Take a binfo, not an integer, as a
7843         representation of the primary base.
7844         (indirect_primary_base_p): Remove.
7845         (determine_primary_base): Adjust for indirect primary bases.
7846         (dfs_find_final_overrider): Fix typo in coment.
7847         (update_vtable_entry_for_fn): Use get_primary_binfo.
7848         (layout_nonempty_base_or_field): Tweak.
7849         (build_base_fields): Adjust for new primary base semantics.
7850         (dfs_propagate_binfo_offsets): Remove.
7851         (propagate_binfo_offsets): Rewrite.
7852         (dfs_set_offset_for_shared_vbases): Remove.
7853         (layout_virtual_bases): Don't use it.
7854         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
7855         ABI.
7856         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
7857         CLASSTYPE_VFIELD_PARENT.
7858         (dfs_get_primary_binfo): New function.
7859         (get_primary_binfo): Likewise.
7860         (dump_class_hierarchy_r): Tweak printing of primary bases.
7861         (build_vtbl_initializer): Fix typo in comments.  Use
7862         vtbl_init_data.
7863         (build_vcall_and_vbase_vtbl_entries): Likewise.
7864         (build_vbaes_offset_vtbl_entries): Likewise.
7865         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
7866         BV_VCALL_INDEX to handle indirect primary bases.
7867         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
7868         (build_rtti_vtbl_entries): Likewise.
7869         * search.c (get_shared_vbase_if_not_primary): Tweak.
7870         (find_vbase_instance): Likewise.
7871         (binfo_for_vtable): Simplify.
7872         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
7873         (make_binfo): Make it have 11 entries.
7874
7875 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
7876
7877         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
7878         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
7879         ascertaining primaryness.
7880         (G): Remove template_args.
7881         (decl_is_template_id): New function.
7882         (write_encoding): Use decl_is_template_id.
7883         (write_name): Likewise.  Handle type_decls.  Get main variant of
7884         type decls.
7885         (write_nested_name): Likewise.
7886         (write_prefix): Likewise.
7887         (write_template_prefix): Likewise.
7888         (write_special_name_constructor): Remove defunct production from
7889         comment.
7890         (write_bare_function_type): Remove comment about absent parameter.
7891         (write_template_template_arg): Add missing grammar production to
7892         comment.
7893
7894 2000-07-27  Jason Merrill  <jason@redhat.com>
7895
7896         * decl.c (duplicate_decls): If common_type produces a non-typedef
7897         type for a typedef, just use the old type.
7898
7899 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
7900
7901         * cp-tree.h (function_depth): Declare.
7902         (verify_stmt_tree): Likewise.
7903         (find_tree): Likewise.
7904         * decl.c (function_depth): Give it external linkage.
7905         * optimize.c (optimize_function): Increment and decrement it.
7906         * tree.c (verify_stmt_tree_r): New function.
7907         (verify_stmt_tree): Likewise.
7908         (find_tree_r): Likewise.
7909         (find_tree): Likewise.
7910
7911 2000-07-27  Jason Merrill  <jason@redhat.com>
7912
7913         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
7914         TYPE_PTRMEMFUNC_P.
7915         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
7916
7917 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7918
7919         * decl.c (start_cleanup_fn): Mark the function as `inline'.
7920         * decl2.c (get_guard): Call cp_finish_decl, not
7921         rest_of_decl_compilation, for local guards.
7922         * lex.c (do_identifier): Remove unused variable.
7923
7924 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
7925
7926         * parse.y:  Add missing ';'.
7927
7928 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7929
7930         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
7931         of `extern "C++"'.
7932
7933 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7934
7935         Kill strict_prototype. Backwards compatibility only for
7936         non NO_IMPLICIT_EXTERN_C systems.
7937         * cp-tree.h (flag_strict_prototype): Remove.
7938         (strict_prototype): Remove.
7939         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7940         * decl.c (maybe_push_to_top_level): Adjust.
7941         (pop_from_top_level): Adjust.
7942         (decls_match): Only allow sloppy parm matching for ancient
7943         system headers.
7944         (init_decl_processing): Adjust.
7945         (grokdeclarator): Adjust.
7946         * decl2.c (flag_strict_prototype): Remove.
7947         (strict_prototype): Remove.
7948         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7949         (lang_f_options): Remove "strict-prototype".
7950         (unsupported-options): Add "strict-prototype".
7951         * lex.c (do_identifier): Adjust.
7952         (do_scoped_id): Adjust.
7953         * parse.y (empty_parms): Adjust.
7954         * class.c (push_lang_context): Adjust.
7955         (pop_lang_context): Adjust.
7956         * typeck.c (comp_target_parms): Adjust.
7957
7958 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7959
7960         * decl.c (poplevel): Deal with anonymous variables at for scope.
7961         (maybe_inject_for_scope_var): Likewise.
7962
7963 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
7964
7965         * decl.c: Remove all signal handling code, now done in toplev.c.
7966
7967 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
7968
7969         * decl.c (make_rtl_for_nonlocal_decl): Rework.
7970
7971         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
7972         correctly.
7973
7974 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
7975
7976         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
7977         Define my_friendly_assert and my_friendly_abort as macros
7978         which may call friendly_abort.  Prototype friendly abort, not
7979         my_friendly_abort or my_friendly_assert.
7980         * decl.c (signal_catch): Report the signal caught in the error
7981         message.  Call fatal directly.
7982         * typeck2.c (ack, my_friendly_assert): Delete.
7983         (my_friendly_abort): Rename to friendly_abort.  Expect file,
7984         line, and function parameters.  Report the abort code, then
7985         call fancy_abort.  Do not mask an abort if errors have
7986         already occurred.
7987
7988 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
7989
7990         * typeck.c (comp_target_parms): Remove obsolete parameter.
7991         (comp_target_types): Adjust.
7992
7993 2000-07-17  Jason Merrill  <jason@redhat.com>
7994
7995         * typeck.c (mark_addressable): Never set TREE_USED.
7996         * call.c (build_call): Don't abort on calls to library functions
7997         that have been declared normally.
7998
7999         * typeck.c (build_binary_op): Fix grammar in warning.
8000
8001         * exception.cc (__eh_free): Fix prototype.
8002
8003         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
8004
8005         * decl.c (pushdecl): Handle seeing an OVERLOAD in
8006         IDENTIFIER_NAMESPACE_VALUE.
8007
8008 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
8009
8010         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
8011         * method.c (use_thunk): Correct handling of vcall offsets.
8012
8013 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
8014
8015         * .cvsignore: parse.h and parse.c have no cp- prefix.
8016
8017 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
8018
8019         * .cvsignore: New file.
8020
8021 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
8022
8023         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
8024
8025 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
8026
8027         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
8028         * parse.c: Remove.
8029         * parse.h: Likewise.
8030
8031 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
8032
8033         * class.c (layout_class_type): Add pointers to virtual bases after
8034         base classes under the old ABI.
8035
8036 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
8037
8038         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
8039         (finish_continue_stmt): Likewise.
8040         (begin_for_stmt): Remove call to note_level_for_for.
8041         (finish_goto_stmt): Change call from build_min_nt
8042         to build_stmt.
8043         (finish_expr_stmt): Likewise.
8044         (begin_if_stmt): Likewise.
8045         (begin_while_stmt): Likewise.
8046         (finish_while_stmt): Likewise.
8047         (finish_return_stmt): Likewise.
8048         (begin_for_stmt): Likewise.
8049         (finish_for_stmt): Likewise.
8050         (finish_break_stmt): Likewise.
8051         (begin_switch_stmt): Likewise.
8052         (finish_case_label): Likewise.
8053         (genrtl_try_block): Likewise.
8054         (begin_try_block): Likewise.
8055         (begin_handler): Likewise.
8056         (begin_compound_stmt): Likewise.
8057         (finish_asm_stmt): Likewise.
8058         (finish_label_stmt): Likewise.
8059         (add_decl_stmt): Likewise.
8060         (finish_subobject): Likewise.
8061         (finish_decl_cleanup): Likewise.
8062         (finish_named_return_value): Likewise.
8063         (setup_vtbl_ptr): Likewise.
8064         (add_scope_stmt): Likewise.
8065         * decl.c (finish_constructor_body): Likewise.
8066         (finish_destructor_body): Likewise.
8067         * optimize.c (copy_body_r): Likewise.
8068         (initialize_inlined_parameters): Likewise.
8069         (declare_return_variable): Likewise.
8070         (expand_call_inline): Likewise.
8071
8072 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
8073
8074         * semantics.c (expand_body): Sync interface information
8075         at the end of function body expansion.
8076
8077 2000-07-09  Jason Merrill  <jason@redhat.com>
8078
8079         * init.c (build_new_1): Bail early if the call to new fails.
8080
8081         * decl.c (compute_array_index_type): Check specifically for
8082         an INTEGER_CST, not just TREE_CONSTANT.
8083
8084         * decl.c (duplicate_decls): Don't call duplicate_decls on
8085         the DECL_TEMPLATE_RESULT.
8086         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
8087         codes.
8088
8089         * error.c (dump_template_bindings): Don't crash if we had an
8090         invalid argument list.
8091
8092         * typeck.c (c_expand_start_case): Do narrowing here.
8093         * semantics.c (finish_switch_cond): Not here.
8094
8095 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
8096
8097         * parse.y (asm_clobbers): Do string concatenation.
8098
8099 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
8100
8101         * decl.c (pushtag): Don't put local classes in template functions
8102         on the local_classes list.
8103
8104 2000-07-04  Scott Snyder  <snyder@fnal.gov>
8105
8106         * decl2.c (get_guard): Add missing return for old ABI local
8107         variable case.
8108
8109 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
8110
8111         * cp-tree.h (char_type_p): New function.
8112         * decl.c (init_decl_processing): Don't initialize
8113         signed_wchar_type_node or unsigned_wchar_type_node.
8114         (complete_array_type): Handle brace-enclosed string-constants.
8115         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
8116         * tree.c (char_type_p): New function.
8117         * typeck2.c (digest_init): Use char_type_p.
8118
8119 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
8120
8121         * pt.c (tsubst): Don't layout type, if it's error_mark.
8122
8123 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
8124
8125         * pt.c (instantiate_pending_templates): Reset template level.
8126
8127 2000-07-05  Jason Merrill  <jason@redhat.com>
8128
8129         * call.c (joust): Don't complain about `operator char *()' beating
8130         `operator const char *() const'.
8131
8132 2000-07-04  scott snyder  <snyder@fnal.gov>
8133             Jason Merrill  <jason@redhat.com>
8134
8135         * repo.c (repo_get_id): Handle the case where a class with virtual
8136         bases has a null TYPE_BINFO_VTABLE.
8137
8138 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
8139             Jason Merrill  <jason@redhat.com>
8140
8141         * parse.y (member_init): Just pass in the type.
8142         * init.c (expand_member_init): Handle getting a type.
8143
8144 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8145             Jason Merrill  <jason@redhat.com>
8146
8147         * decl.c (finish_function): Warn if a function has no return
8148         statement.
8149         Suggested by Andrew Koenig.
8150         * typeck.c (check_return_expr): Do set current_function_returns_value
8151         if we got an error_mark_node.
8152
8153 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
8154
8155         * decl2.c (push_decl_namespace): Push the original namespace.
8156
8157 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
8158
8159         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
8160         * semantics.c (begin_class_definition): Clear it.
8161
8162 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
8163
8164         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
8165         (genrtl_expr_stmt): Likewise.
8166         (genrtl_decl_stmt): Likewise.
8167         (genrtl_if_stmt): Likewise.
8168         (genrtl_while_stmt): Likewise.
8169         (genrtl_do_stmt): Likewise.
8170         (genrtl_return_stmt): Likewise.
8171         (genrtl_for_stmt): Likewise.
8172         (genrtl_break_stmt): Likewise.
8173         (genrtl_continue_stmt): Likewise.
8174         (genrtl_scope_stmt): Likewise.
8175         (genrtl_switch_stmt): Likewise.
8176         (genrtl_case_label): Likewise.
8177         (genrtl_begin_compound_stmt): Likewise.
8178         (genrtl_finish_compound_stmt): Likewise.
8179         (genrtl_compound_stmt): Likewise.
8180         (genrtl_asm_stmt): Likewise.
8181
8182         * init.c (begin_init_stmts): Remove call to
8183         genrtl_begin_compound_stmt.
8184         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
8185
8186         * semantics.c (lang_expand_stmt): Changed call to
8187         genrtl_compound_stmt to ignore return value.
8188
8189 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
8190
8191         * mangle.c (canonicalize_for_substitution): Return the canonical
8192         variant of a type.
8193
8194         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
8195         TYPE_DECL.
8196         * typeck.c (commonparms): Remove obstack manipulations.
8197
8198 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
8199
8200         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
8201
8202         * Makefile.in (OBJS): Added ../c-semantics.o.
8203         (OBJDEPS): Likewise.
8204
8205         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
8206         ../c-common.h.
8207         (struct stmt_tree): Added comment.
8208         (current_function_name_declared): Removed.
8209         (stmts_are_full_exprs_p): Likewise.
8210         (genrtl_do_pushlevel): Likewise.
8211         (genrtl_clear_out_block): Likewise.
8212         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
8213         (DECL_ANON_UNION_ELEMS): Likewise.
8214         (emit_local_var): Likewise.
8215         (make_rtl_for_local_static): Likewise.
8216         (do_case): Likewise.
8217         (expand_stmt): Likewise.
8218         (genrtl_decl_cleanup): Likewise.
8219         (c_expand_asm_operands): Likewise.
8220         (c_expand_return): Likewise.
8221         (c_expand_start_case): Likewise.
8222
8223         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
8224         (emit_local_var): Likewise.
8225         (initialize_local_var): Change reference to
8226         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
8227         Change reference to stmts_are_full_exprs_p to
8228         current_stmt_tree->stmts_are_full_exprs_p.
8229         (push_cp_function_context): Likewise.
8230
8231         * expect.c (expand_throw): Change reference to
8232         stmts_are_full_exprs_p.
8233
8234         * init.c (build_aggr_init): Change reference to
8235         stmts_are_full_exprs_p.
8236         (build_vec_init): Likewise.
8237
8238         * optimize.c (maybe_clone_body): Change reference to
8239         current_function_name_declared to
8240         cp_function_chain->name_declared.
8241
8242         * pt.c (instantiate_decl): Change reference to
8243         current_function_name_declared to
8244         cp_function_chain->name_declared.
8245
8246         * semantics.c (expand_cond): Moved declaration to c-common.h.
8247         (genrtl_do_pushlevel): Moved to c-semantics.c.
8248         (genrtl_clear_out_block): Likewise.
8249         (genrtl_goto_stmt): Likewise.
8250         (genrtl_expr_stmt): Likewise.
8251         (genrtl_decl_stmt): Likewise.
8252         (gerntl_if_stmt): Likewise.
8253         (genrtl_while_stmt): Likewise.
8254         (genrtl_do_stmt): Likewise.
8255         (genrtl_return_stmt): Likewise.
8256         (genrtl_for_stmt): Likewise.
8257         (genrtl_break_stmt): Likewise.
8258         (genrtl_continue_stmt): Likewise.
8259         (genrtl_scope_stmt): Likewise.
8260         (genrtl_switch_stmt): Likewise.
8261         (genrtl_case_label): Likewise.
8262         (genrtl_begin_compound_stmt): Likewise.
8263         (genrtl_finish_compound_stmt): Likewise.
8264         (genrtl_compound_stmt): Likewise.
8265         (genrtl_asm_stmt): Likewise.
8266         (genrtl_decl_cleanup): Likewise.
8267         (expand_cond): Likewise.
8268         (expand_stmt): Renamed to ...
8269         (lang_expand_stmt): ... this.
8270         (lang_expand_expr_stmt): Initialize.
8271         (set_current_function_name_declared): Likewise.
8272         (stmts_are_full_exprs_p): Likewise.
8273         (current_function_name_declared): Likewise.
8274         (anon_aggr_type_p): Likewise.
8275         (do_poplevel): Change reference to
8276         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
8277         Change reference to stmts_are_full_exprs_p to
8278         current_stmt_tree->stmts_are_full_exprs_p.
8279         (add_tree): Likewise.
8280         (finish_expr_stmt): Likewise.
8281         (prep_stmt): Likewise.
8282         (lang_expand_stmt): Likewise.
8283         (begin_compound_stmt): Change reference to
8284         current_function_name_declared to
8285         cp_function_chain->name_declared and call to
8286         current_function_name_declared().
8287         (setup_vtbl_ptr): Likewise.
8288         (genrtl_do_poplevel): Removed.
8289
8290 2000-06-30  Jason Merrill  <jason@redhat.com>
8291
8292         * init.c (init_init_processing): Go back to aligning like
8293         double_type_node for old ABI.
8294         (get_cookie_size): Make cookie larger if we get a type that needs
8295         more alignment.
8296         (build_vec_delete): Call it.
8297
8298         * typeck.c (qualify_type_recursive): New fn.
8299         (composite_pointer_type): Use it.
8300         (build_binary_op): Use composite_pointer_type.
8301
8302 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
8303             Jason Merrill  <jason@redhat.com>
8304
8305         * typeck.c (check_return_expr): Don't complain about returning
8306         NULL from operator new if -fcheck-new.
8307         * cp-tree.h: Declare flag_check_new here.
8308         * init.c: Not here.
8309
8310 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
8311
8312         * mangle.c (find_substitution): Use same_type_p.
8313         (write_encoding): Don't check for substitutions.
8314
8315 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8316
8317         * parse.y (expr_no_comma_rangle): New non-terminal.
8318         (template_parm): Use it for default parameter case.
8319         (template_arg): Use it.
8320         (expr_no_commas): Remove commented out undefined extensions.
8321         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
8322         * parse.h, parse.c: Rebuilt.
8323
8324 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
8325
8326         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
8327         (finish_asm_stmt): Do it here, instead.
8328
8329         * cp-tree.h (ridpointers): Don't declare.
8330         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
8331         (record_builtin_java_type): Likewise.
8332         (init_decl_processing): Likewise.
8333         * lex.c: Move inclusion of lex.h.
8334         (ridpointers): Don't define.
8335         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
8336         RID_MAX.
8337         * lex.h (enum rid): Rename to ...
8338         (enum cp_rid): ... this.
8339         (ridpointers): Don't declare.
8340         * parse.y: Move inclusion of lex.h.
8341         * parse.c: Regenerated.
8342         * spew.c: Move inclusion of lex.h.
8343
8344         * cp-tree.h (struct language_function): Remove temp_name_counter.
8345         (temp_name_counter): Remove.
8346         (get_temp_name): Change prototype.
8347         (get_guard): New function.
8348         (get_guard_cond): Likewise.
8349         (set_guard): Likewise.
8350         * cvt.c (build_up_reference): Adjust call to get_temp_name.
8351         * decl.c (expand_static_init): Use get_guard and friends to
8352         implement guard variables.
8353         * decl2.c (get_temp_name): Assume that the variables created are
8354         always static.
8355         (get_sentry): Rename to ...
8356         (get_guard): ... this.  Implement new ABI guard variables.
8357         (get_guard_bits): New function.
8358         (get_guard_cond): Likewise.
8359         (set_guard): Likewise.
8360         (start_static_initialization_or_destruction): Use them.
8361         (do_static_initialization): Replace sentry with guard throughout.
8362         (do_static_destruction): Likewise.
8363         * init.c (create_temporary_var): Add comment.
8364
8365 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
8366
8367         * mangle.c (find_substitution): Use same_type_p.
8368         (write_encoding): Don't check for substitutions.
8369
8370 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8371
8372         * parse.y (expr_no_comma_rangle): New non-terminal.
8373         (template_parm): Use it for default parameter case.
8374         (template_arg): Use it.
8375         (expr_no_commas): Remove commented out undefined extensions.
8376         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
8377         * parse.h, parse.c: Rebuilt.
8378
8379 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
8380
8381         * cp-tree.h (flag_const_strings): Remove.
8382         (warn_parentheses): Likewise.
8383         (warn_format): Likewise.
8384         (common_type): Likewise.
8385         (default_conversion): Likewise.
8386         (build_binary_op): Likewise.
8387         (cp_build_binary_op): New macro.
8388         * call.c (build_new_op): Use cp_build_binary_op instead of
8389         build_binary_op.
8390         * class.c (build_vtable_entry_ref): Likewise.
8391         * decl.c (expand_static_init): Likewise.
8392         (compute_array_index_type): Likewise.
8393         (build_enumerator): Likewise.
8394         * decl2.c (delete_sanity): Likewise.
8395         (start_static_initialization_or_destruction): Likewise.
8396         * error.c (dump_type_suffix): Likewise.
8397         * init.c (resolve_offset_ref): Likewise.
8398         (build_new): Likewise.
8399         (build_new_1): Likewise.
8400         (build_vec_delete_1): Likewise.
8401         (build_vec_init): Likewise.
8402         (build_delete): Likewise.
8403         * rtti.c (synthesize_tinfo_fn): Likewise.
8404         (synthesize_tinfo_var): Likewise.
8405         * search.c (expand_upcast_fixups): Likewise.
8406         (fixup_all_virtual_upcast_offsets): Likewise.
8407         * typeck.c (build_array_ref): Likewise.
8408         (get_member_function_from_ptrfunc): Likewise.
8409         (build_binary_op): Add parameter.
8410         (pointer_int_sum): Use cp_build_binary_op.
8411         (pointer_diff): Likewise.
8412         (build_modify_expr): Likewise.
8413         (get_delta_difference): Likewise.
8414         (build_ptrmemfunc): Likewise.
8415
8416 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8417
8418         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
8419         * decl.c (create_implicit_typedef): Adjust.
8420         * decl2.c (build_artificial_parm): Adjust.
8421         * method.c (implicitly_declare_fn): Adjust.
8422         * pt.c (push_inline_template_parms_recursive): Adjust.
8423         (process_template_parm): Adjust.
8424         (overloaded_template_name): Adjust.
8425         * semantics.c (finish_template_template_parm): Adjust.
8426
8427 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
8428
8429         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
8430         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
8431         where to emit thunks.
8432         (build_vtt): Adjust call to build_vtt_inits.
8433         (build_vtt_inits): Add parameter to indicate whether or not
8434         sub-VTTs for virtual bases should be included.  Adjust handling of
8435         construction vtables.
8436         (get_matching_base): New function.
8437         (dfs_build_vtt_inits): Rename to ...
8438         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
8439         construction vtables.
8440         (dfs_fixup_binfo_vtbls): Likewise.
8441         (build_ctor_vtbl_groups): Build construction vtables for virtual
8442         bases, too.
8443         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
8444         to build construction vtbls.
8445         (dfs_accumulate_vtbl_inits): Adjust handling of
8446         construction vtables.
8447
8448         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
8449         types correctly.
8450
8451 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
8452
8453         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
8454
8455 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
8456
8457         * search.c (hides): Remove.
8458         (is_subobject_of_p): Add most_derived parameter. Use
8459         CANONICAL_BINFO.
8460         (lookup_field_queue_p): Adjust.
8461         (lookup_field_r): Adjust.
8462
8463 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
8464
8465         * decl2.c (handle_class_head): Bash typedefs to the type's main
8466         decl.
8467
8468 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
8469
8470         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
8471         (begin_global_stmt_expr): ... this.
8472         (genrtl_finish_stmt_expr): Rename to ...
8473         (finish_global_stmt_expr): ... this.
8474         * init.c (begin_init_stmts): Adjust calls.
8475         (finish_init_stmts): Likewise.
8476         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
8477         (begin_global_stmt_expr): ... this.
8478         (genrtl_finish_stmt_expr): Rename to ...
8479         (finish_global_stmt_expr): ... this.
8480
8481 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8482
8483         * search.c (lookup_member): Fix typo in comment.
8484
8485 2000-06-24  Jason Merrill  <jason@redhat.com>
8486
8487         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
8488         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
8489
8490 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8491
8492         * parse.y (complex_direct_notype_declarator): Support global_scope.
8493         * Makefile.in: Adjust conflict count.
8494
8495 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8496
8497         * parse.y (template_arg): Convert TEMPLATE_DECL
8498         that is a template template parameter to
8499         TEMPLATE_TEMPLATE_PARM here.
8500
8501         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
8502         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
8503         (copy_template_template_parm): Adjust prototype.
8504         * decl.c (grokdeclarator): Remove dead code.
8505         * pt.c (process_template_parm): Tidy.
8506         (lookup_template_class): Construct nodes in
8507         copy_template_template_parm.
8508         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
8509         lookup_template_class.  Use TYPE_TI_TEMPLATE.
8510         * tree.c (copy_template_template_parm): Add NEWARGS
8511         parameter.
8512         (mapcar): Adjust call to copy_template_template_parm.
8513         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
8514         * method.c (build_template_template_parm_names): Change error
8515         code to avoid compilation warning.
8516
8517         * gxxint.texi: Document template template parameter
8518         name mangling.
8519
8520 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
8521
8522         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
8523         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
8524         (cp-demangle.o): New rule.
8525         (dyn-string.o): Likewise.
8526         * inc/cxxabi.h (__cxa_demangle): New declaration.
8527
8528 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
8529
8530         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
8531         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
8532         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
8533         a tree, not an int.
8534         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
8535         (make_thunk): Change prototype.
8536         (emit_thunk): Rename to use_thunk.
8537         (mangle_thunk): Change prototype.
8538         * class.c (get_derived_offset): Simplify.
8539         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
8540         BV_GENERATE_THUNK_WITH_VTABLE_P.
8541         (build_primary_vtable): Simplify.
8542         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
8543         (dfs_find_base): Remove.
8544         (update_vtable_entry_for_fn): Correct bug in finding the base
8545         where a virtual function was first declared.  Figure out whether
8546         or not to emit a vcall-thunk with the vtables in which it appears.
8547         Correct logic for deciding whether to use an ordinary thunk, or a
8548         vcall thunk.
8549         (finish_struct_1): Remove unnecssary code.
8550         (build_vtbl_initializer): Use ssize_int for the running counter of
8551         negative indices.
8552         (build_vtbl_initializer): Only use vcall thunks where necessary.
8553         Mark thunks as needing to be emitted with their vtables, or not.
8554         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
8555         indices.  Use size_binop.
8556         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
8557         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
8558         size_binop.
8559         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
8560         (build_vtable_entry): Mark thunks as needing to be emitted with
8561         their vtables, or not.
8562         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
8563         * decl2.c (mark_vtable_entries): Use use_thunk instead of
8564         emit_thunk.
8565         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
8566         information.
8567         * error.c (dump_expr): Use BV_FN.
8568         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
8569         not an int.
8570         * method.c (make_thunk): Likewise.
8571         (emit_thunk): Rename to use_thunk.  Allow callers to decide
8572         whether or not to actually emit the thunk.  Adjust for changes in
8573         representation of vcall offsets.
8574         * search.c (dfs_get_pure_virtuals): Use BV_FN.
8575         * semantics.c (emit_associated_thunks): New function.
8576         (expand_body): Use it.
8577         * ir.texi: Adjust decriptions of thunks.
8578
8579 2000-06-22  Jason Merrill  <jason@redhat.com>
8580
8581         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
8582         (tsubst_friend_function): Copy it here.
8583
8584         * decl.c (grok_op_properties): Fix typo.
8585
8586         * decl2.c (delete_sanity): Clarify warning, avoid failure on
8587         deleting void*.
8588
8589         * pt.c (check_explicit_specialization): Clarify error.
8590
8591         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
8592         an old OVERLOAD when we're declaring a non-function.
8593         (pushdecl, destroy_local_var): Check for error_mark_node.
8594         (warn_extern_redeclared_static): Also bail early if
8595         we're a CONST_DECL.
8596         (push_overloaded_decl): Ignore an old error_mark_node.
8597
8598 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
8599
8600         * call.c (build_x_va_arg): Check if in a template decl.
8601         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
8602
8603 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8604
8605         * class.c (push_lang_context): TYPE_NAME gets you to the Java
8606         types DECLs.
8607         * decl.c (check_goto): Computed gotos assumed OK.
8608
8609 2000-06-20  Jason Merrill  <jason@redhat.com>
8610
8611         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
8612         for which we don't need to look for instantiations.
8613
8614 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
8615
8616         * parse.y (program): Always call finish_translation_unit.
8617         * parse.c, parse.h: Rebuilt.
8618
8619 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
8620
8621         * method.c: Don't include hard-reg-set.h.
8622
8623 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
8624
8625         * rtti.c (get_base_offset): Cope when vbase field is in a base.
8626
8627 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
8628
8629         * call.c (build_conditional_expr): Use VOID_TYPE_P.
8630         * cvt.c (cp_convert_to_pointer): Likewise.
8631         (convert_to_void): Likewise.
8632         * error.c (dump_expr): Likewise.
8633         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
8634         * init.c (build_delete): Likewise.
8635         * method.c (emit_thunk): Likewise.
8636         * optmize.c (declare_return_variable): Likewise.
8637         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8638         (get_typeid): Likewise.
8639         (build_dynamic_cast_1): Likewise.
8640         * typeck.c (composite_pointer_type): Likewise.
8641         (common_type): Likewise.
8642         (build_indirect_ref): Likewise.
8643         (build_binary_op): Likewise.
8644         (build_x_compound_expr): Likewise.
8645         (check_return_expr): Likewise.
8646         * typeck2.c (add_exception_specifier): Likewise.
8647
8648         * mangle.c (write_method_parms): Use direct comparison for end
8649         of parmlist.
8650
8651 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
8652
8653         * cp-tree.h (genrtl_try_block): Declare function.
8654         (genrtl_handler): Likewise.
8655         (genrtl_catch_block): Likewise.
8656         (genrtl_ctor_stmt): Likewise.
8657         (genrtl_subobject): Likewise.
8658         (genrtl_decl_cleanup): Likewise.
8659         (genrtl_do_poplevel): Likewise.
8660         (genrtl_do_pushlevel): Likewise.
8661         (genrtl_clear_out_block): Likewise.
8662         (genrtl_goto_stmt): Likewise.
8663         (genrtl_expr_stmt): Likewise.
8664         (genrtl_decl_stmt): Likewise.
8665         (genrtl_if_stmt): Likewise.
8666         (genrtl_while_stmt): Likewise.
8667         (genrtl_do_stmt): Likewise.
8668         (genrtl_return_stmt): Likewise.
8669         (genrtl_for_stmt): Likewise.
8670         (genrtl_break_stmt): Likewise.
8671         (genrtl_continue_stmt): Likewise.
8672         (genrtl_scope_stmt): Likewise.
8673         (genrtl_switch_stmt): Likewise.
8674         (genrtl_case_label): Likewise.
8675         (genrtl_begin_compound_stmt): Likewise.
8676         (genrtl_finish_compound_stmt): Likewise.
8677         (genrtl_compound_stmt): Likewise.
8678         (genrtl_asm_stmt): Likewise.
8679         (genrtl_named_return_value): Likewise.
8680         (genrtl_begin_stmt_expr): Likewise.
8681         (genrtl_finish_stmt_expr): Likewise.
8682         (finish_for_stmt): Removed first argument.
8683         (finish_switch_stmt): Likewise.
8684
8685         * semantics.c (genrtl_try_block): Define function.
8686         (genrtl_handler): Likewise.
8687         (genrtl_catch_block): Likewise.
8688         (genrtl_ctor_stmt): Likewise.
8689         (genrtl_subobject): Likewise.
8690         (genrtl_decl_cleanup): Likewise.
8691         (genrtl_do_poplevel): Likewise.
8692         (genrtl_do_pushlevel): Likewise.
8693         (genrtl_clear_out_block): Likewise.
8694         (genrtl_goto_stmt): Likewise.
8695         (genrtl_expr_stmt): Likewise.
8696         (genrtl_decl_stmt): Likewise.
8697         (genrtl_if_stmt): Likewise.
8698         (genrtl_while_stmt): Likewise.
8699         (genrtl_do_stmt): Likewise.
8700         (genrtl_return_stmt): Likewise.
8701         (genrtl_for_stmt): Likewise.
8702         (genrtl_break_stmt): Likewise.
8703         (genrtl_continue_stmt): Likewise.
8704         (genrtl_scope_stmt): Likewise.
8705         (genrtl_switch_stmt): Likewise.
8706         (genrtl_case_label): Likewise.
8707         (genrtl_begin_compound_stmt): Likewise.
8708         (genrtl_finish_compound_stmt): Likewise.
8709         (genrtl_compound_stmt): Likewise.
8710         (genrtl_asm_stmt): Likewise.
8711         (genrtl_named_return_value): Likewise.
8712         (genrtl_begin_stmt_expr): Likewise.
8713         (genrtl_finish_stmt_expr): Likewise.
8714         (finish_for_stmt): Removed first argument and generate rtl
8715         specific code.
8716         (finish_switch_stmt): Likewise.
8717         (do_poplevel): Removed generate rtl specific code.
8718         (do_pushlevel): Likewise.
8719         (add_tree): Likewise.
8720         (finish_goto_stmt): Likewise.
8721         (finish_expr_stmt): Likewise.
8722         (begin_if_stmt): Likewise.
8723         (finish_if_stmt_cond): Likewise.
8724         (finish_then_clause): Likewise.
8725         (begin_else_clause): Likewise.
8726         (finish_else_clause): Likewise.
8727         (finish_if_stmt): Likewise.
8728         (clear_out_block): Likewise.
8729         (begin_while_stmt): Likewise.
8730         (finish_while_stmt_cond): Likewise.
8731         (finish_while_stmt): Likewise.
8732         (begin_do_stmt): Likewise.
8733         (finish_do_body): Likewise.
8734         (finish_do_stmt): Likewise.
8735         (finish_return_stmt): Likewise.
8736         (begin_for_stmt): Likewise.
8737         (finish_for_init_stmt): Likewise.
8738         (finish_for_cond): Likewise.
8739         (finish_for_expr): Likewise.
8740         (finish_break_stmt): Likewise.
8741         (finish_continue_stmt): Likewise.
8742         (begin_switch_stmt): Likewise.
8743         (finish_switch_cond): Likewise.
8744         (finish_case_label): Likewise.
8745         (begin_try_block): Likewise.
8746         (begin_function_try_block): Likewise.
8747         (finish_try_block): Likewise.
8748         (finish_cleanup_try_block): Likewise.
8749         (finish_cleanup): Likewise.
8750         (finish_function_try_block): Likewise.
8751         (finish_handler_sequence): Likewise.
8752         (finish_function_handler_sequence): Likewise.
8753         (begin_handler): Likewise.
8754         (finish_handler_parms): Likewise.
8755         (begin_catch_block): Likewise.
8756         (finish_handler): Likewise.
8757         (begin_compound_stmt): Likewise.
8758         (finish_compound_stmt): Likewise.
8759         (finish_asm_stmt): Likewise.
8760         (finish_label_stmt): Likewise.
8761         (finish_label_decl): Likewise.
8762         (finish_subobject): Likewise.
8763         (finish_decl_cleanup): Likewise.
8764         (finish_named_return_value): Likewise.
8765         (begin_stmt_expr): Likewise.
8766         (finish_stmt_expr): Likewise.
8767
8768         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
8769         to call genrtl_expr_stmt when appropriate.
8770
8771         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
8772         begin_compound_expr to call genrtl_begin_stmt_expr and
8773         genrtl_begin_compound_expr when appropriate.
8774         (finish_init_stmts): Changed calls to finish_compound_expr and
8775         finish_stmt_expr to call genrtl_finish_compound_expr and
8776         genrtl_finish_stmt_expr when appropriate.
8777         (expand_default_init): Changed call to finish_expr_stmt to call
8778         genrtl_expr_stmt when appropriate.
8779         (build_vec_init): Likewise.
8780
8781         * parse.y (simple_stmt): Removed first argument from call to
8782         finish_for_stmt. Removed first argument from call to
8783         finish_switch_stmt.
8784
8785         * parse.c: Regenerated.
8786
8787         * pt.c (tsubst_expr): Removed first argument from call to
8788         finish_for_stmt. Removed first argument from call to
8789         finish_switch_stmt.
8790
8791 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
8792
8793         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
8794         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
8795
8796         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
8797         (cplus_tree_code_length[]): Likewise.
8798         (cplus_tree_code_name[]): Likewise.
8799         (init_parse): Added call to add_c_tree_codes. Changed
8800         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
8801
8802 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
8803
8804         * cp-tree.h (finish_mem_initializers): Declare.
8805         (count_trees): Likewise.
8806         * parse.y (base_init): Use finish_mem_initializers.
8807         * semantics.c (finish_mem_initializers): New function.
8808
8809         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
8810         the number of trees.
8811         (n_trees): Remove.
8812         (count_trees): Don't use it.
8813
8814 2000-06-15  Jason Merrill  <jason@redhat.com>
8815
8816         * tree.c (count_trees): New debugging function.
8817
8818         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
8819         * init.c (build_member_call): Pull out the name of a DECL.
8820
8821         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
8822         * semantics.c (expand_body): Push to TV_INTEGRATION here.
8823         * optimize.c (optimize_function): Not here.
8824         * pt.c (instantiate_decl): Push to TV_PARSE.
8825
8826 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
8827
8828         * cp-tree.h (struct language_function): Remove x_base_init_list
8829         and x_member_init_list.
8830         (current_base_init_list): Remove.
8831         (current_member_init_list): Likewise.
8832         (setup_vtbl_ptr): Change prototype.
8833         (emit_base_init): Likewise.
8834         (expand_member_init): Likewise.
8835         (reinit_parse_for_function): Remove.
8836         * decl.c (save_function_data): Don't clear x_base_init_list and
8837         x_member_init_list.
8838         (mark_language_function): Don't mark them.
8839         * init.c (perform_member_init): Tweak comment.
8840         (sort_member_init): Take the list of initializers as an argument.
8841         (sort_base_init): Likewise.
8842         (emit_base_init): Likewise.
8843         (expand_member_init): Return the initializer.  Don't use global
8844         variables.
8845         * lex.c (reinit_parse_for_function): Remove.
8846         * method.c (build_template_parm_names): Correct substitution.
8847         (do_build_copy_constructor): Don't use current_member_init_list
8848         and current_base_init_list.
8849         (synthesize_method): Likewise.
8850         * parse.y (base_init): Split mem-initializers into
8851         base-initializers and field-initializers.
8852         (member_init_list): Build up the list here.
8853         (member_init): Return the initializer.
8854         (fn.depfn): Don't use reinit_parse_for_function.
8855         * parse.c: Regenerated.
8856         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
8857         ERROR_MARK.
8858         (tsubst_expr): Don't use current_member_init_list
8859         and current_base_init_list.
8860         (tsubst_expr_values): Rename to ...
8861         (tsubst_initializer_list): ... this.  Use convert_from_reference.
8862         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
8863         and current_base_init_list.
8864         (begin_function_definition): Don't call reinit_parse_for_function.
8865
8866         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
8867
8868         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
8869         correctly.
8870
8871         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
8872
8873 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
8874
8875         * cp-tree.h (IF_COND): Move to c-common.h.
8876         (THEN_CLAUSE): Likewise.
8877         (ELSE_CLAUSE): Likewise.
8878         (WHILE_COND): Likewise.
8879         (WHILE_BODY): Likewise.
8880         (DO_COND): Likewise.
8881         (DO_BODY): Likewise.
8882         (RETURN_EXPR): Likewise.
8883         (EXPR_STMT_EXPR): Likewise.
8884         (FOR_INIT_STMT): Likewise.
8885         (FOR_COND): Likewise.
8886         (FOR_EXPR): Likewise.
8887         (FOR_BODY): Likewise.
8888         (SWITCH_COND): Likewise.
8889         (SWITCH_BODY): Likewise.
8890         (CASE_LOW): Likewise.
8891         (CASE_HIGH): Likewise.
8892         (GOTO_DESTINATION): Likewise.
8893         (COMPOUND_BODY): Likewise.
8894         (ASM_CV_QUAL): Likewise.
8895         (ASM_STRING): Likewise.
8896         (ASM_OUTPUTS): Likewise.
8897         (ASM_INPUTS): Likewise.
8898         (ASM_CLOBBERS): Likewise.
8899         (DECL_STMT_DECL): Likewise.
8900         (STMT_EXPR_STMT): Likewise.
8901         (LABEL_STMT_LABEL): Likewise.
8902         (SCOPE_BEGIN_P): Likewise.
8903         (SCOPE_END_P): Likewise.
8904         (SCOPE_STMT_BLOCK): Likewise.
8905         (SCOPE_NULLIFIED_P): Likewise.
8906         (SCOPE_NO_CLEANUPS_P): Likewise.
8907         (SCOPE_PARTIAL_P): Likewise.
8908         (ASM_VOLATILE_P): Likewise.
8909         (STMT_LINENO): Likewise.
8910         (STMT_LINENO_FOR_FN_P): Likewise.
8911
8912         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
8913         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
8914         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
8915         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
8916         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
8917
8918         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
8919
8920         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
8921         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
8922
8923         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
8924         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
8925         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
8926
8927 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
8928
8929         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
8930         * class.c (dfs_find_final_overrider): Set it appropriately.
8931         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
8932         avoid unneeded secondary vptrs.
8933
8934 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
8935
8936         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
8937         (check_bitfield_decl, check_field_decl): Likewise.
8938         (build_vtbl_or_vbase_field, build_base_field): Likewise.
8939         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
8940         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
8941         (xfer_tag, finish_enum): Likewise.
8942         * decl2.c (finish_builtin_type): Likewise.
8943         * init.c (init_init_processing): Likewise.
8944         * pt.c (instantiate_class_template): Likewise.
8945         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
8946         * cp-tree.h (struct lang_type): Add user_align member.
8947         (CLASSTYPE_USER_ALIGN): Define.
8948
8949 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8950
8951         * Make-lang.in (c++.install-common): Install g++-cross in
8952         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
8953         $(target_alias)-g++ and $(target_alias)-c++.
8954
8955 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
8956
8957         * class.c (vcall_offset_data_s): Add last_init and fns.
8958         (overrides): Rename to same_signature_p.
8959         (dfs_find_final_overrider): Adjust accordingly.
8960         (mark_overriders): Likewise.
8961         (warn_hidden): Likewise.
8962         (build_vtbl_initializer): Reorganize machinery for building things
8963         at negative offsets.
8964         (build_vcall_and_vbase_vtbl_entries): Likewise.
8965         (build_vbase_offset_vtbl_entries): Likewise.
8966         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
8967         offset entries.  Do not create two entries for functions with the
8968         same signature.
8969         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
8970         (build_rtti_vtbl_entries): Reorganize machinery for building things
8971         at negative offsets.
8972
8973         * optimize.c (expand_call_inline): Don't recurse into the code
8974         used to initialize the parameters more than once.
8975
8976 2000-06-11  Mark Mitchell <mark@codesourcery.com>
8977
8978         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
8979         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
8980         (find_substitution): Only use the `Sa' substitution for
8981         std::allocator, not instantiations of it.
8982         (write_template_prefix): Move comment.  Only use a TREE_LIST to
8983         represent substitutions for a member template.
8984         (write_array_type): Mangle array dimensions correctly.
8985         * optimize.c (maybe_clone_body): Copy more information from the
8986         cloned function.
8987         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
8988         on the regenerated declaration.
8989
8990 2000-06-11  Chip Salzenberg  <chip@valinux.com>
8991             Mark Mitchell <mark@codesourcery.com>
8992
8993         * class.c (build_vtable): Clarify comment.
8994         (build_ctor_vtbl_group): Pass the most derived type to
8995         build_vtable.
8996
8997 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8998
8999         * decl2.c (compare_options): Don't needlessly cast away const-ness.
9000
9001 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
9002
9003         * decl.c (add_binding): Handle duplicate declarations of external
9004         variables.
9005
9006 2000-06-09  Chip Salzenberg  <chip@valinux.com>
9007             Mark Mitchell <mark@codesourcery.com>
9008
9009         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
9010         argument.
9011         (write_signed_number): New macro.
9012         (write_unsigned_number): Likewise.
9013         (write_source_name): Use them.
9014         (write_number): Handle signed and unsigned values.
9015         (write_integer_cst): Use tree_int_cst_sgn, and use
9016         write_unsigned_number or write_signed_number as appropriate.
9017         (write_discriminator): Use write_unsigned_number or
9018         write_signed_number as appropriate.
9019         (write_template_arg_literal): Likewise.
9020         (write_array_type): Use tree_low_cst.
9021         (write_template_parm):  Use write_unsigned_number or
9022         write_signed_number as appropriate.
9023         (write_substitution): Adjust call to write_number.
9024         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
9025         (write_expression): Handle non-type template arguments of
9026         reference type correctly.
9027         (mangle_thunk): Use write_signed_number.
9028
9029 2000-06-09  Chip Salzenberg  <chip@valinux.com>
9030
9031         * mangle.c (find_substition): Don't mangle objects with typename
9032         substitutions (e.g. "cin" as "Si").
9033
9034 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
9035
9036         * call.c (add_candidate): Use ggc_alloc_cleared.
9037         * decl.c (lookup_label): Likewise.
9038         * lex.c (retrofit_lang_decl): Likewise.
9039
9040 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
9041
9042         * semantics.c (expand_body): Push to TV_EXPAND.
9043         * optimize.c (optimize_function): Push to TV_INTEGRATION.
9044         * decl.c (start_function): Always call announce_function.
9045
9046         * tinfo2.cc: Just declare abort.
9047
9048 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
9049
9050         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
9051         whenever @ is a symbolic name.
9052
9053 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
9054
9055         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
9056
9057 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
9058
9059         * decl.c (pushdecl): Look up functions by DECL_NAME, not
9060         DECL_ASSEMBLER_NAME.
9061
9062 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
9063
9064         * decl2.c (c_language): Define.
9065
9066 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
9067
9068         * lex.c (lang_init_options): Tweak.
9069
9070         * decl2.c: Remove #inclusion of diagnostic.h
9071         (lang_decode_option): Move diagnostic formatting options to
9072         toplevel.
9073
9074         * lang-options.h: Remove documentation for diagnostic options.
9075
9076         * Makefile.in (lex.o): Depends upon diagnostic.h
9077
9078 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
9079
9080         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
9081         the same DECL_RESULT, it's not a redefinition.
9082         * pt.c (tsubst_decl): Remove code to handle illegal
9083         specializations.
9084
9085 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
9086
9087         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
9088
9089 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
9090
9091         * search.c (maybe_suppress_debug_info): Don't check
9092         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
9093
9094         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
9095         here if extern_p.
9096
9097         Remember instantiation context in deferred instantiations.
9098         * cp-tree.h (struct tinst_level): Remove.
9099         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
9100         * pt.c (current_tinst_level): Now a tree.
9101         (print_template_context, push_tinst_level, pop_tinst_level,
9102         tinst_for_decl): Adjust.
9103         (reopen_tinst_level): New fn.
9104         (init_pt): Register current_tinst_level as a root.
9105         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
9106         of the pending templates list.
9107         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
9108         * lex.c (extract_interface_info): Adjust.
9109         * decl2.c (warn_if_unknown_interface): Adjust.
9110
9111 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
9112
9113         * class.c (indirect_primary_base_p): New function.
9114         (determine_primary_base): Use it.
9115
9116 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9117
9118         Update new-abi dynamic cast algorithm.
9119         * tinfo.cc (__class_type_info::__dyncast_result): Add
9120         whole_details. Adjust constructor.
9121         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
9122         Avoid unnecessary searching.
9123         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
9124
9125 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9126
9127         * decl.c (init_decl_processing): Don't call record_component_aliases.
9128         * tree.c (build_cplus_array_type_1): Likewise.
9129
9130 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
9131
9132         * ir.texi: Correct typo.
9133         * mangle.c (write_expression): Handle non-type template arguments
9134         with reference type.
9135         * method.c (build_overload_value): Likewise.
9136         * pt.c (convert_nontype_argument): Explicitly represent conversion
9137         to a reference with an ADDR_EXPR.
9138         (unify): Always unify arguments in left-to-right order.
9139
9140 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
9141             Mark Mitchell  <mark@codesourcery.com>
9142
9143         * Make-lang.in (CXX_SRCS): Add mangle.c.
9144         * Makefile.in (CXX_OBJS): Add mangle.o.
9145         (mangle.o): New rule.
9146
9147         * class.c (local_classes): New variable.
9148         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
9149         (get_vtt_name): Use mangle_vtt_name for new ABI.
9150         (init_class_processing): Initialize local_classes.
9151         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
9152         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
9153         (std_identifier): New macro.
9154         (DECL_VOLATILE_MEMFUNC_P): New macro.
9155         (DECL_NAMESPACE_STD_P): Likewise.
9156         (local_classes): Declare.
9157         (get_mostly_instantiated_function_type): Declare.
9158         (init_mangle): Declare.
9159         (mangle_decl): Likewise.
9160         (mangle_type_string): Likewise.
9161         (mangle_type): Likewise.
9162         (mangle_typeinfo_for_type): Likewise.
9163         (mangle_typeinfo_string_for_type): Likewise.
9164         (mangle_vtbl_for_type): Likewise.
9165         (mangle_vtt_for_type): Likewise.
9166         (mangle_ctor_vtbl_for_type): Likewise.
9167         (mangle_thunk): Likewise.
9168         (mangle_conv_op_name_for_type): Likewise.
9169         (mangle_guard_variable): Likewise.
9170         * decl.c (pushtag): Keep track of local classes.
9171         (initialize_predefined_identifiers): Initialize std_identifier.
9172         (init_decl_processing): Use std_identifier.
9173         (start_decl): Don't treat instantiations as specializations.
9174         (grokdeclarator): Likewise.
9175         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
9176         name for fully-instantiated templates.
9177         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
9178         destructors with the new ABI.
9179         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
9180         (grokfield): Use mangle_type for new ABI.
9181         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
9182         (get_sentry): Use mangle_guard_variable for new ABI.
9183         (start_static_initialization_or_destruction): Likewise.
9184         * expr.c (extract_aggr_init): Remove.
9185         (extract_scalar_init): Likewise.
9186         (extract_init): Remove #if 0'd code.
9187         * mangle.c: New function.
9188         * method.c (build_mangled_name): Assert not flag_new_abi.
9189         (build_static_name): Likewise.
9190         (build_decl_overload_real): Likewise.
9191         (build_typename_overload): Likewise.
9192         (build_overload_with_type): Likewise.
9193         (build_overload_name): Likewise.
9194         (get_ctor_vtbl_name): Likewise.
9195         (start_squangling): Likewise.
9196         (get_id_2): Likewise.
9197         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
9198         (init_method): Call init_mangle for new ABI.
9199         (make_thunk): Call mangle_thunk for new ABI.
9200         * operators.def: Correct new ABI manglings for the `%' operator.
9201         Add `::' operator.
9202         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
9203         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
9204         (lookup_template_class): Call mangle_decl for new ABI.
9205         (get_mostly_instantiated_function_type): New function.
9206         (set_mangled_name_for_template_decl): Use it.
9207         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
9208         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
9209         conversion op names.
9210         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
9211         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
9212         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
9213         mangle_typeinfo_string_for_type.
9214
9215 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
9216
9217         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
9218         (INNERMOST_TEMPLATE_ARGS): New macro.
9219         (innermost_args): Remove.
9220         (get_innermost_template_args): New function.
9221         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
9222         * error.c (dump_function_decl): Be caution when using
9223         most_general_template.
9224         * method.c (build_template_parm_names):  Use
9225         INNERMOST_TEMPLATE_ARGS.
9226         * pt.c (add_to_template_args): Tidy comment
9227         (get_innermost_template_args): New function.
9228         (check_explicit_specialization): Clear DECL_INITIAL for a new
9229         specialization.
9230         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
9231         Tidy.
9232         (push_template_decl): Always register specializations of the most
9233         general template.
9234         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
9235         (coerce_template_parms): Likewise.
9236         (lookup_template_class): Likewise.
9237         (innermost_args): Remove.
9238         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
9239         (tsubst_decl): Handle tricky specializations.  Use
9240         get_innermost_template_args.
9241         (instantiate_template): Simplify handling of partial
9242         instantiations.
9243         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
9244         (most_general_template): Reimplement, in a more straightforward
9245         manner.
9246         (regenerate_decl_from_template): Tweak formatting.  Use
9247         TMPL_ARGS_DEPTH for clarity.
9248         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
9249
9250         * dump.c (dequeue_and_dump): Dump information about thunks.
9251
9252 2000-06-01  Richard Henderson  <rth@cygnus.com>
9253
9254         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
9255
9256 2000-06-01  Richard Henderson  <rth@cygnus.com>
9257
9258         * decl2.c (unsupported_options): Fix typo, make const.
9259         (lang_decode_option): Fix bsearch argument order.
9260
9261 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
9262
9263         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
9264         on FIELD_DECLs.
9265
9266 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9267
9268         * cp-tree.h (c_get_alias_set): Deleted.
9269         * Makefile.in (decl.o): Include ../expr.h.
9270         * decl.c (expr.h): Include.
9271         (init_decl_processing): Call record_component_aliases for arrays.
9272         (grokdeclarator): Likewise.
9273         Set TREE_ADDRESSABLE for fields that aren't bitfields.
9274         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
9275
9276 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
9277
9278         Remove guiding declaration support.
9279         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
9280         (flag_guiding_decls): Remove.
9281         * call.c (build_user_type_conversion_1): Remove support for
9282         guiding decls.
9283         (build_new_function_call): Likewise.
9284         (build_new_op): Likewise.
9285         (build_new_method_call): Likewise.
9286         * decl.c (start_function): Likewise.
9287         * friend.c (is_friend): Likewise.
9288         (do_friend): Likewise.
9289         * decl2.c ((flag_dump_translation_unit): Make it const.
9290         (flag_guiding_decls): Remove.
9291         (unsupported_options): New variable
9292         (compare_options): New function.
9293         (lang_decode_option): Use them.
9294
9295         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
9296
9297         * method.c (mangle_expression): Adjust test for legal expression
9298         operators.
9299
9300         * pt.c (instantiate_decl): Save and restore the local
9301         specializations list.
9302
9303 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
9304
9305         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
9306
9307 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
9308
9309         * call.c (add_template_candidate_real): Handle member template
9310         constructors for classes with virtual bases.
9311         (build_user_type_conversion_1): Use in_charge_arg_for_name.
9312         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
9313
9314         * ir.texi: Update thunk documentation.
9315
9316         * call.c (joust): Fix handling of overloaded builtin operators.
9317
9318 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
9319
9320         * cp-tree.h (DECL_ANTICIPATED): New macro.
9321         Document new use of DECL_LANG_FLAG_7.
9322         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
9323         in the user namespace.
9324         * lex.c (do_identifier): If the identifier's declaration has
9325         DECL_ANTICIPATED on, it has not yet been declared.  But do not
9326         replace it with an ordinary implicit declaration.
9327
9328         * tinfo2.cc: Include stdlib.h.
9329
9330 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
9331
9332         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
9333         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
9334         CLASSTYPE_ALIGN.
9335
9336 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
9337
9338         * decl2.c (lang_decode_option): Use skip_leading_substring instead
9339         of plain strncmp.
9340
9341 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
9342
9343         * operators.def (<?): Duplicated, should have been...
9344         (>?): this.  Fixed.
9345
9346 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
9347             Mark Mitchell  <mark@codesourcery.com>
9348
9349         * cp-tree.h (ansi_opname): Make it a macro.
9350         (ansi_assopname): Likewise.
9351         (struct lang_decl_flags): Add assignment_operator_p.
9352         (struct lang_decl): Add operator_code.
9353         (DECL_VTT_PARM): Adjust.
9354         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
9355         overloaded operator.
9356         (SET_OVERLOADED_OPERATOR_CODE): New macro.
9357         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
9358         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
9359         (opname_tab): Remove.
9360         (assignop_tab): Likewise.
9361         (operator_name_info_t): New type.
9362         (operator_name_info): New variable.
9363         (assignment_operator_name_info): Likewise.
9364         (build_cp_library_fn): Remove declaration.
9365         (push_cp_library_fn): Likewise.
9366         (operator_name_string): Likewise.
9367         (build_decl_overload): Likewise.
9368         * call.c (print_z_candidates): Simplify.
9369         (build_object_call): Adjust usage of ansi_opname.  Use
9370         DECL_OVERLOADED_OPERATOR_P.
9371         (op_error): Adjust operator name lookup.
9372         (build_conditional_expr): Adjust usage of ansi_opname.
9373         (build_new_op): Likewise.
9374         (build_op_delete_call): Likewise.
9375         (build_over_call): Likewise.
9376         (joust): Use DECL_OVERLOADED_OPERATOR_P.
9377         * decl.c (duplicate_decls): Copy operator_code.
9378         (init_decl_processing): Adjust parameters to push_cp_library_fn.
9379         (builtin_function): Adjust parameters to build_library_fn_1.
9380         (build_library_fn_1): Accept an overloaded operator code.
9381         (build_library_fn): Pass ERROR_MARK.
9382         (build_cp_library_fn): Accept an overloaded operator code.
9383         (push_cp_library_fn): Likewise.
9384         (grokfndecl): Tweak.
9385         (grokdeclarator): Simplify code to compute names of overloaded
9386         operators.  Adjust use of ansi_opname.
9387         (ambi_op_p): Work on tree_codes, not identifiers.
9388         (unary_op_p): Likewise.
9389         (grok_op_properties): Likewise.
9390         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
9391         (lang_mark_tree): Don't try to mark the operator_code.
9392         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
9393         * error.c (dump_decl): Remove special handling for operator
9394         names.
9395         (dump_function_name): Likewise.
9396         (dump_expr): Adjust name lookup of operators.
9397         (op_to_string): Simplify.
9398         (assop_to_string): Likewise.
9399         * init.c (build_new_1): Adjust use of ansi_opname.
9400         * lex.c (opname_tab): Remove.
9401         (assignop_tab): Likewise.
9402         (ansi_opname): Likewise.
9403         (ansi_assopname): Likewise.
9404         (operator_name_string): Likewise.
9405         (reinit_lang_specific): Likewise.
9406         (operator_name_info): New variable.
9407         (assignment_operator_name_info): Likewise.
9408         (init_operators): New function.
9409         (init_parse): Use it.
9410         (do_identifier): Adjust use of ansi_opname.
9411         * method.c (mangle_expression): Don't use ansi_opname for
9412         mangling.
9413         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
9414         (build_decl_overload): Remove.
9415         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
9416         (do_build_assign_ref): Adjust use of ansi_opname.
9417         (synthesize_method): Likewise.
9418         (implicitly_declare_fn): Likewise.
9419         * operators.def: New file.
9420         * parse.y (operator): Adjust use of ansi_opname.
9421         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
9422         (set_mangled_name_for_template_decl): Don't play games with
9423         current_namespace.
9424         (special_function_p): Adjust use of ansi_opname.
9425         * typeck.c (check_return_expr): Likewise.
9426         * Make-lang.in (cc1plus): Depend on operators.def.
9427         * Makefile.in (lex.o): Likewise.
9428         (decl.o): Likewise.
9429
9430 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
9431
9432         * Make-lang.in (cplib2.ready): Eradicate.
9433
9434 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9435
9436         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
9437         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
9438         (built_min, cp_tree_equal): Likewise.
9439
9440 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
9441
9442         * class.c (layout_nonempty_base_or_field): Replace
9443         `record_layout_info' with `record_layout_info_s'.
9444
9445 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
9446
9447         Fix goto checking.
9448         * cp-tree.h (struct language_function): x_named_labels is now
9449         a struct named_label_list*.
9450         * decl.c (struct named_label_use_list): Renamed from...
9451         (struct named_label_list): ...this.  New struct.
9452         (push_binding_level): Don't set eh_region.
9453         (note_level_for_eh): New fn.
9454         (pop_label): Take label and old value directly.
9455         (pop_labels): Adjust for new named_labels format.
9456         (lookup_label): Likewise.
9457         (poplevel): Note characteristics of a binding level containing a
9458         named label.  Mess with named label lists earlier.
9459         (mark_named_label_lists): New fn.
9460         (mark_lang_function): Call it.
9461         (use_label): New fn, split out from...
9462         (make_label_decl): ...here.  Don't call it.
9463         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
9464         check_previous_gotos): New fns, split out from...
9465         (define_label): ...here.
9466         (check_switch_goto): New fn.
9467         (define_case_label): Call it.
9468         (check_goto): New fn.
9469         * semantics.c (finish_goto_stmt): Call it and use_label.
9470         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
9471         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
9472
9473 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
9474
9475         * class.c (build_vtable_entry_ref): Correct usage of
9476         get_vtbl_decl_for_binfo.
9477
9478         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
9479         * method.c (implicitly_declare_fn): Not here.
9480
9481 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
9482
9483         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
9484         (CPTI_PTMD_DESC_TYPE): ... here.
9485         (ptmd_desc_type_node): Rename to ...
9486         (ptm_desc_type_node): ... here.
9487         * decl.c: Likewise.
9488         * rtti.c (ptmd_initializer): Rename to ...
9489         (ptm_initializer): ... here.
9490         (sythesize_tinfo_var): Adjust. Deal with pointer to member
9491         function.
9492         (create_tinfo_types): Adjust.
9493
9494 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
9495
9496         Finish implementation of VTTs.
9497         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
9498         CPTI_VTT_PARM_IDENTIFIER.
9499         (vtt_parm_identifier): New macro.
9500         (vtt_parm_type): Likewise.
9501         (BINFO_SUBVTT_INDEX): Likewise.
9502         (BINFO_VPTR_INDEX): Likewise.
9503         (struct lang_decl): Add vtt_parm.
9504         (DECL_VTT_PARM): New macro.
9505         (DECL_USE_VTT_PARM): Likewise.
9506         (DECL_NEEDS_VTT_PARM_P): Likewise.
9507         (get_vtt_name): Declare.
9508         (build_artificial_parm): Likewise.
9509         (fixup_all_virtual_upcast_offsets): Likewise.
9510         (expand_indirect_vtbls_init): Remove.
9511         * call.c (build_new_method_call): Pass the vtt to subobject
9512         constructors and destructors.
9513         * class.c (get_vtt_name): Give it external linkage.
9514         (build_clone): Handle the magic VTT parameters for clones.
9515         (clone_function_decl): Fix typo in comment.
9516         (build_vtt): Keep track of the indices in the VTTs where various
9517         entities are stored.
9518         (build_vtt_inits): Likewise.
9519         (dfs_build_vtt_inits): Likewise.
9520         (build_ctor_vtbl_group): Tweak type of construction vtables.
9521         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
9522         primary bases, when building construction vtables.
9523         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
9524         (initialize_predefined_identifiers): Add vtt_parm_identifier.
9525         (init_decl_processing): Initialize vtt_parm_type.
9526         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
9527         (lang_mark_tree): Make vtt_parm.
9528         * decl2.c (build_artificial_parm): New function.
9529         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
9530         (grokclassfn): Use build_artificial_parm.
9531         * init.c (initialize_vtbl_ptrs): Call
9532         fixup_all_virtual_upcast_offsets directly.
9533         (perform_member_init): Use the complete subobject destructor for
9534         member cleanups.
9535         (build_vtbl_address): New function.
9536         (expand_virtual_init): Handle VTTs.
9537         * optimize (maybe_clone_body): Likewise.
9538         * search.c (fixup_all_virtual_upcast_offsets): Give it external
9539         linkage.
9540         (expand_indirect_vtbls_init): Remove.
9541         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
9542         * tree.c (make_binfo): Make them bigger.
9543
9544 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
9545
9546         * inc/cxxabi.h (__pbase_type_info): Define, based on
9547         __pointer_type_info.
9548         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
9549         (__pointer_to_member_type_info): Likewise.
9550         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
9551         (__pointer_to_member_type_info::__is_pointer_p): Remove.
9552         (__pointer_type_info::__do_catch): Rename to ...
9553         (__pbase_type_info::__do_catch): ... here. Adjust.
9554         (__pbase_type_info::__pointer_catch): Implement.
9555         (__pointer_type_info::__pointer_catch): Adjust.
9556         (__pointer_to_member_type_info::__pointer_catch): Adjust.
9557
9558 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
9559
9560         * tinfo.h (__user_type_info::contained_virtual_p): New
9561         predicate.
9562         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
9563         shaped hierarchy.
9564         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
9565         diamond shaped hierarchy. Add early out for mixed diamond and
9566         duplicate shaped hierarchy.
9567
9568 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
9569
9570         * cp-tree.h (build_delete): Change prototype.
9571         (build_vec_delete): Likewise.
9572         * call.c (build_scoped_method_call): Use special_function_kind
9573         values to indicate the kind of destruction to be done.
9574         (build_method_call): Likewise.
9575         * decl.c (finish_destructor_body): Likewise.
9576         (maybe_build_cleanup_1): Likewise.  Rename to ...
9577         (maybe_build_cleanup): ... this.
9578         * decl2.c (delete_sanity): Use special_function_kind
9579         values to indicate the kind of destruction to be done.
9580         (build_cleanup): Likewise.
9581         * init.c (perform_member_init): Likewise.
9582         (build_vec_delete_1): Likewise.
9583         (build_dtor_call): Simplify.
9584         (build_delete): Use special_function_kind
9585         values to indicate the kind of destruction to be done.
9586         (build_vbase_delete): Likewise.
9587         (build_vec_delete): Likewise.
9588
9589         * init.c (sort_member_init): Fix typo in error message generation
9590         code.
9591
9592 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
9593
9594         * semantics.c (begin_class_definition): make the packed
9595         attribute be sensitive to the "-fpack-struct" command line flag
9596
9597 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
9598
9599         Update new-abi upcast algorithm.
9600         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
9601         prototype and meaning of return value.
9602         (__si_class_type_info::__do_upcast): Likewise.
9603         (__vmi_class_type_info::__do_upcast): Likewise.
9604         * tinfo.cc (__class_type_info::__upcast_result): Replace
9605         whole2dst with part2dst. Adjust ctor.
9606         (__class_type_info::__do_upcast): Adjust call of worker function.
9607         (__class_type_info::__do_upcast): Adjust.
9608         (__si_class_type_info::__do_upcast): Adjust. Use parent's
9609         __do_upcast.
9610         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
9611         virtual base in diamond hierarchy bug.
9612
9613 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
9614
9615         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
9616         and bitfield to tinfo_fn_p.
9617         (DECL_TINFO_FN_P): Adjust.
9618         (SET_DECL_TINFO_FN_P): Likewise.
9619         (DECL_MUTABLE_P): Likewise.
9620         (DECL_C_BIT_FIELD): Likewise.
9621         (SET_DECL_C_BIT_FIELD): Likewise.
9622         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9623         (DECL_UNINLINABLE): Likewise.
9624         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
9625         (handle_using_decl): Remove assertion.
9626         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
9627         to build FIELD_DECLs.
9628         (build_base_field): Likewise.
9629         (layout_class_type): Likewise.
9630         * decl.c (init_decl_processing): Likewise.
9631         (build_ptrmemfunc_type): Likewise.
9632         (grokdeclarator): Likewise.
9633         * decl2.c (grok_x_components): Likewise.
9634         * except.c (call_eh_info): Likewise.
9635         * init.c (init_init_processing): Likewise.
9636         * rtti.c (expand_class_desc): Likewise.
9637         (create_pseudo_type_info): Likewise.
9638         (get_vmi_pseudo_type_info): Likewise.
9639         (create_tinfo_types): Likewise.
9640         * ptree.c (print_lang_decl): Adjust.
9641         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
9642         before checking DECL_MUTABLE_P.
9643
9644         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
9645         parameters for template functions.
9646         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
9647         destructors as well as constructors.
9648
9649 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
9650
9651         * class.c (build_ctor_vtbl_group): Set inits.
9652         * optimize.c (maybe_clone_body): Set DECL_INLINE and
9653         DECL_THIS_INLINE appropriately for clones.
9654
9655         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
9656         (DECL_CONV_FN_P): Simplify.
9657         (DECL_OPERATOR): Remove.
9658         (language_to_string): Declare.
9659         * decl.c (duplicate_decls): Fix typo in comment.
9660         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
9661         (grok_op_properties): Use DECL_CONV_FN_P instead of
9662         IDENTIFIER_TYPENAME_P.
9663         * dump.c (dequeue_and_dump): Dump the language linkage of
9664         declarations.
9665         * error.c (language_to_string): Give it external linkage.
9666         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
9667         (implicitly_declare_fn): Set DECL_LANGUAGE.
9668         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
9669         IDENTIFIER_TYPENAME_P.
9670         (tsubst_decl): Likewise.
9671         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
9672         * semantics.c (finish_member_declaration): Don't mark members of
9673         classes declared in an extern "C" region as extern "C".
9674
9675 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9676
9677         * decl2.c (qualified_lookup_using_namespace): Look through
9678         namespace aliases.
9679
9680         * decl.c (push_using_decl): Return the old decl on namespace level.
9681
9682 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
9683
9684         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
9685         (VTT_NAME_PREFIX): New macro.
9686         (CTOR_VTBL_NAME_PREFIX): Likewise.
9687         (get_ctor_vtbl_name): New function.
9688         * class.c (get_vtable_name): Simplify.
9689         (get_vtt_name): New function.
9690         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
9691         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
9692         when a virtual base becomes primary.
9693         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
9694         VTTs.
9695         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
9696         additional parameters.
9697         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
9698         (initialize_array): New function.
9699         (build_vtt): Likewise.
9700         (build_vtt_inits): Likewise.
9701         (dfs_build_vtt_inits): Likewise.
9702         (dfs_fixup_binfo_vtbls): Likewise.
9703         (build_ctor_vtbl_group): Likewise.
9704         (initialize_vtable): Use initialize_array.
9705         (accumulate_vtbl_inits): Reimplement to handle construction
9706         vtables.
9707         (dfs_accumulate_vtbl_inits): Likewise.
9708         (bulid_vtbl_initializer): Adjust parameter name.
9709         * method.c (build_typename_overload): Remove #if 0'd code.
9710         (get_ctor_vtbl_name): New function.
9711         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
9712         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
9713
9714         * cp-tree.h (struct lang_type): Remove search_slot.
9715         (CLASSTYPE_SEARCH_SLOT): Remove.
9716         (emit_base_init): Change prototype.
9717         (initialize_vtbl_ptrs): Likewise.
9718         (expand_indirect_vtbls_init): Likewise.
9719         (clear_search_slots): Remove.
9720         * decl.c (lang_mark_tree): Don't mark search_slot.
9721         * init.c (initialize_vtbl_ptrs): Simplify.
9722         (emit_base_init): Likewise.
9723         * search.c (struct vbase_info): Document decl_ptr.
9724         (convert_pointer_to_single_level): Remove.
9725         (dfs_find_vbases): Remove.
9726         (dfs_init_base_pointers): Simplify.
9727         (dfs_clear_vbase_slots): Remove.
9728         (dfs_vtable_path_unmark): New function.
9729         (init_vbase_pointers): Simplify.
9730         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
9731         (expand_indirect_vtbls_init): Simplify.  Don't call
9732         mark_all_temps_used.
9733         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
9734         initialize_vtbl_ptrs.
9735
9736 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
9737
9738         * except.c: Add static prototypes.
9739
9740 2000-05-20  H.J. Lu  <hjl@gnu.org>
9741
9742         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
9743
9744 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
9745
9746         Don't create a separate copy of virtual bases for the
9747         CLASSTYPE_VBASECLASSES list.
9748         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
9749         (BINFO_FOR_VBASE): Remove.
9750         (CANONICAL_BINFO): Adjust.
9751         (binfo_for_vbase): New function.
9752         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
9753         instead of BINFO_FOR_VBASE.
9754         (build_vbase_pointer): Likewise.
9755         (build_secondary_vtable): Likewise.
9756         (dfs_mark_primary_bases): Likewise.
9757         (mark_primary_bases): Likewise.
9758         (layout_nonempty_base_or_field): Likewise.
9759         (dfs_set_offset_for_shared_vbases): Likewise.
9760         (dfs_set_offset_for_unshared_vbases): Likewise.
9761         (layout_virtual_bases): Likewise.  Adjust for changes to the
9762         CLASSTYPE_VBASECLASSES list.
9763         (dump_class_hierarchy_r): Use binfo_for_vbase
9764         instead of BINFO_FOR_VBASE.
9765         (dump_class_hierarchy): Likewise.
9766         (finish_vtbls): Likewise.
9767         (build_vtbl_initializer): Adjust for changes to the
9768         CLASSTYPE_VBASECLASSES list.
9769         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
9770         * decl.c (finish_destructor_body): Adjust for changes to the
9771         CLASSTYPE_VBASECLASSES list.
9772         * init.c (sort_base_init): Use binfo_for_vbase.
9773         (construct_virtual_bases): Adjust for changes to the
9774         CLASSTYPE_VBASECLASSES list.
9775         (expand_member_init): Use binfo_for_vbase.
9776         (build_vbase_delete):  Adjust for changes to the
9777         CLASSTYPE_VBASECLASSES list.
9778         * method.c (do_build_copy_constructor): Likewise.
9779         * rtti.c (get_base_offset): Use binfo_for_vbase.
9780         (expand_class_desc): Remove #if 0'd code.
9781         * search.c (struct vbase_info): Remove vbase_types.
9782         (get_base_distance):  Use binfo_for_vbase.
9783         (lookup_field_queue_p): Use CANONICAL_BINFO.
9784         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
9785         (get_pure_virtuals): Adjust for changes to the
9786         CLASSTYPE_VBASECLASSES list.
9787         (dfs_find_vbases): Use binfo_for_vbase.
9788         (dfs_init_vbase_pointers): Likewise.
9789         (init_vbase_pointers): Don't initialize vi.vbase_types.
9790         (virtual_context): Use binfo_for_vbase.
9791         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
9792         CLASSTYPE_VBASECLASSES list.
9793         (expand_indirect_vtbls_init): Simplify.
9794         (dfs_get_vbase_types): Don't replicate virtual bases.
9795         (find_vbase_instance): Use binfo_for_vbase.
9796         (binfo_for_vbase): New function.
9797         * typeck.c (get_delta_difference): Use binfo_for_vbase.
9798
9799 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
9800
9801         * decl2.c (finish_anon_union): Generalize error messages to handle
9802         anonymous structures.
9803         * init.c (perform_member_init): Remove `name' parameter.
9804         (build_field_list): New function.
9805         (sort_member_init): Handle anonymous union initialization order
9806         correctly.  Check for multiple initializations of the same union.
9807         (emit_base_init): Don't look up fields by name here.
9808         (expand_member_init): Record the result of name lookup for future
9809         reference.
9810         * typeck.c (build_component_ref): Fix formatting.
9811
9812 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
9813
9814         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
9815         * typeck.c (build_x_compound_expr): Replace warn_unused with
9816         warn_unused_value.
9817
9818         * decl2.c (lang_decode_option): Update -Wall unused flags by
9819         calling set_Wunused.
9820
9821 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
9822
9823         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
9824         * init.c (dfs_vtable_path_unmark): Remove.
9825         * search.c (marked_new_vtable_p): Likewise.
9826         (unmarked_new_vtable_p): Likewise.
9827         (dfs_search_slot_nonempty_p): Likewise.
9828         (dfs_mark): Likewise.
9829         (dfs_vtable_path_unmark): Likewise.
9830         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
9831         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
9832         (dfs_init_vbase_pointers): Remove special-case new ABI code.
9833         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
9834         (init_vbase_pointers): Simplify.
9835         (expand_indirect_vtbls_init): Likewise.
9836
9837         * class.c (copy_virtuals): New function.
9838         (build_primary_table): Use it.
9839         (build_secondary_vtable): Likewise.
9840         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
9841         indicate that no vcall offset is required.
9842         (add_virtual_function): Likewise.
9843         (modify_all_vtables): Likewise.
9844         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
9845         (dfs_accumulate_vtbl_inits): Likewise.
9846         (build_vtbl_initializer): Make changes to handle construction
9847         vtables.
9848         (dfs_build_vcall_offset_vtbl_entries): Likewise.
9849         (build_rtti_vtbl_entries): Likewise.
9850         (build_vtable_entries): Handle a NULL vcall_index.
9851
9852 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9853
9854         * decl2.c (lang_decode_option): Fix thinko.
9855
9856 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
9857
9858         * except.c (check_handlers): New fn.
9859         * cp-tree.h: Declare it.
9860         * semantics.c (finish_handler_sequence): Call it.
9861         (finish_function_handler_sequence): Likewise.
9862         (finish_handler_parms): Set TREE_TYPE on the handler.
9863         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
9864         * search.c (get_base_distance_recursive): If protect>1, ignore
9865         special access.
9866         (get_base_distance): Don't reduce watch_access.
9867
9868 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
9869
9870         * lex.c: #include diagnostic.h.
9871         (lang_init_options): Set default prefixing rules.
9872
9873         * lang-options.h: Add -fdiagnostics-show-location=.
9874
9875         * decl2.c: #include diagnostic.h.
9876         (lang_decode_option): Handle -fdiagnostics-show-location=.
9877
9878 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
9879
9880         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
9881         * vec.cc: Revert my 2000-05-07 change.
9882
9883 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
9884
9885         * class.c (check_field_decls): Complain about non-static data
9886         members with same name as class in class with constructor.
9887
9888 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
9889
9890         * decl.c (grokdeclarator): Allow non-static data members with
9891         same name as class.
9892
9893 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
9894
9895         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
9896         and pending_inline.filename.  Update prototypes.
9897         * decl.c (define_label): Constify filename parameter.
9898         * decl2.c (warn_if_unknown_interface): Constify local char *.
9899         * input.c Constify input_source.filename. Don't declare
9900         input_filename or lineno.  Constify filename parameter to feed_input.
9901         * lex.c (init_parse): Constify parameter and return value.
9902         (cp_pragma_interface, cp_pragma_implementation): Constify
9903         filename argument.
9904         (reinit_parse_for_method, reinit_parse_for_block,
9905         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
9906         Constify local char *.
9907         * pt.c: Don't declare lineno or input_filename.
9908         (print_template_context, tsubst_friend_function, tsubst_decl,
9909         tsubst, instantiate_decl): Constify local char *.
9910         * semantics.c (expand_body): Constify local char *.
9911         * tree.c (build_srcloc): Constify filename parameter.
9912         * typeck.c (c_expand_asm_operands): Constify filename
9913         parameter.
9914
9915 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
9916
9917         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
9918         offsetof expansion.
9919
9920 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
9921
9922         * inc/cxxabi.h:  Fix typos in comment.
9923         (__base_class_info::__offset): Use a static_cast.
9924
9925 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
9926
9927         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
9928         of std::size_t and std::ptrdiff_t respectively.
9929         * tinfo.cc: Likewise.
9930         * vec.cc: Likewise.
9931
9932 2000-05-06  Richard Henderson  <rth@cygnus.com>
9933
9934         * typeck.c (build_c_cast): Don't warn integer->pointer size
9935         mismatch for constants.
9936
9937 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
9938
9939         * rtti.c (ptmd_initializer): Set non-public, if class is
9940         incomplete.
9941
9942         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
9943         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9944         __cxa_vec_delete): Likewise.
9945         * tinfo.cc (__dynamic_cast): Likewise.
9946         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9947         __cxa_vec_delete): Likewise.
9948
9949 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9950
9951         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
9952         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
9953         (lang_decl_flags): Add vcall_offset.
9954         (THUNK_VCALL_OFFSET): Use it.
9955         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
9956         * method.c (make_thunk): Create the lang_decl here, not in
9957         emit_thunk.
9958         (emit_thunk): Make generic thunks into ordinary functions once
9959         they have been fed to expand_body.
9960         * semantics.c (expand_body): Set current_function_is_thunk here.
9961
9962 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9963
9964         * class.c (update_vtable_entry_for_fn): Prototype.
9965
9966         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
9967         and `tmpl'.
9968
9969         * search.c (dfs_build_inheritance_graph_order): Prototype.
9970
9971 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9972
9973         * cp-tree.h (special_function_kind): Add various kinds of
9974         destructors.
9975         (special_function_p): New function.
9976         * class.c (overrides): Don't let one kind of destructor override
9977         another.
9978         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
9979         whether or not to instantiate a template.
9980         * tree.c (special_function_p): Define.
9981
9982 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
9983
9984         * cp-tree.def (THUNK_DECL): Remove.
9985         * cp-tree.h (DECL_THUNK_P): New macro.
9986         (DECL_NON_THUNK_FUNCTION_P): Likewise.
9987         (DECL_EXTERN_C_FUNCTION_P): Likewise.
9988         (SET_DECL_THUNK_P): Likewise.
9989         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
9990         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
9991         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
9992         * decl.c (decls_match): Use DECL_EXTERN_C_P.
9993         (duplicate_decls): Likewise.
9994         (pushdecl): Likewise.  Adjust thunk handling.
9995         (grokfndecl): Use DECL_EXTERN_C_P.
9996         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
9997         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
9998         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
9999         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
10000         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
10001         DECL_NO_STATIC_CHAIN.
10002         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
10003         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
10004         * search.c (covariant_return_p): Remove THUNK_DECL handling.
10005         * ir.texi: Update.
10006
10007 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
10008
10009         * tree.c (walk_tree): Set lineno.
10010
10011 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
10012
10013         * exception.cc: Update license notice.
10014         * new.cc: Likewise.
10015         * new1.cc: Likewise.
10016         * new2.cc: Likewise.
10017         * tinfo.cc: Likewise.
10018         * tinfo2.cc: Likewise.
10019         * vec.cc: Likewise.
10020         * inc/cxxabi.h: Likewise.
10021         * inc/exception: Likewise.
10022         * inc/new: Likewise.
10023         * inc/new.h: Likewise.
10024         * inc/typeinfo: Likewise.
10025
10026 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
10027
10028         * tree.c (build_target_expr_with_type): If we already have a
10029         TARGET_EXPR, just return it.
10030
10031         * optimize.c (initialize_inlined_parameters): Don't generate an
10032         EXPR_STMT if we can just use DECL_INITIAL.
10033         * decl.c (emit_local_var): Only make the initialization a
10034         full-expression if stmts_are_full_exprs_p.
10035
10036 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
10037
10038         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
10039         macro.
10040         * call.c (standard_conversion): Use it.
10041         (direct_reference_binding): Likewise.
10042         (build_over_call): Likewise.
10043         (is_properly_derived_from): Likewise.
10044         (compare_ics): Likewise.
10045         * class.c (resolves_to_fixed_type_p): Likewise.
10046         * optimize.c (declare_return_variable): Likewise.
10047         * pt.c (is_specialization_of): Likewise.
10048         (unify): Likewise.
10049         * typeck.c (comp_target_parms): Likeiwse.
10050         (build_static_cast): Likewise.
10051         (build_reinterpret_cast): Likewise.
10052         (build_const_cast): Likewise.
10053         (comp_ptr_ttypes_real): Likewise.
10054         (comp_ptr_ttypes_const): Likewise.
10055         * typeck2.c (process_init_constructor): Likewise.
10056
10057 2000-04-30  Scott Snyder <snyder@fnal.gov>
10058
10059         * decl.c (finish_destructor_body): Use the base destructor when
10060         destroying virtual bases.
10061
10062 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
10063
10064         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
10065         STMT_EXPRs.
10066         * optimize.c (struct inline_data): Add target_exprs field.
10067         (declare_return_variable): When a function returns an aggregate,
10068         use the variable declared in the TARGET_EXPR as the remapped
10069         DECL_RESULT.
10070         (expand_call_inline): Update the pending target_exprs stack.
10071         (optimize_function): Initialize the stack.
10072
10073         * decl2.c (finish_file): Fix typo in comment.
10074
10075         * method.c (emit_thunk): Don't try to return a `void' value.
10076
10077         * optimize.c (initialize_inlined_parameters): If the parameter is
10078         addressable, we need to make a new VAR_DECL, even if the
10079         initializer is constant.
10080
10081 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
10082
10083         * decl.c (grok_op_properties): Add an extra check of argtypes.
10084
10085 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
10086
10087         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
10088         variables.
10089         (initialize_inlined_parameters): Try to avoid creating new
10090         VAR_DECLs.
10091
10092 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
10093
10094         * lex.c (my_get_run_time): Remove.
10095         (init_filename_times): Use get_run_time instead of my_get_run_time.
10096         (check_newline): Likewise.
10097         (dump_time_statistics): Likewise.
10098         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
10099         of computing elapsed time explicitly.
10100
10101 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
10102
10103         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
10104         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
10105         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
10106         before calling decl_constant_value.
10107         * class.c (check_bitfield_decl): Likewise.
10108         * cvt.c (ocp_convert): Likewise.
10109         (convert): Likewise.
10110         * decl.c (compute_array_index_type): Likewise.
10111         (build_enumerator): Likewise.
10112         * decl2.c (check_cp_case_value): Likewise.
10113         * pt.c (convert_nontype_argument): Likewise.
10114         (tsubst): Likewise.
10115         * typeck.c (decay_conversion): Likewise.
10116         (build_compound_expr): Likewise.
10117         (build_reinterpret_cast): Likewise.
10118         (build_c_cast): Likewise.
10119         (convert_for_assignment): Likewise.
10120
10121 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
10122
10123         * decl.c (finish_function): Don't play games with DECL_INLINE.
10124
10125 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
10126
10127         * ir.texi: Correct typo.
10128
10129 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10130
10131         * decl.c (grokdeclarator): Reject VLAs as members.
10132
10133 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
10134
10135         * call.c (standard_conversion): Accept conversion between
10136         COMPLEX_TYPEs.
10137
10138         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
10139
10140 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
10141
10142         * decl2.c (finish_file): Remove double setup for accounting
10143         compile time.
10144
10145 2000-04-24  Robert Lipe <robertlipe@usa.net>
10146
10147         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
10148
10149 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
10150
10151         * new.cc (set_new_handler): Needs to be in std::.
10152
10153 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
10154
10155         * cp-tree.h (lang_decl): Remove pretty_function_p.
10156         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
10157         language-specific node.
10158         * decl.c (cp_make_fname_decl): Use build_decl, not
10159         build_lang_decl, to build the variables.
10160         (grokvardecl): Don't call build_lang_decl for local variables in
10161         templates.
10162         (grokdeclarator): Don't call build_lang_decl for local type
10163         declarations in templates.
10164         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
10165         zero'd memory, rather than calling memset.
10166         * pt.c: Include hashtab.h.
10167         (local_specializations): New variable.
10168         (retrieve_local_specialization): Use it.
10169         (register_local_specialization): Likewise.
10170         (tsubst_decl): Don't assume local variables have
10171         DECL_LANG_SPECIFIC.
10172         (instantiate_decl): Set up local_specializations.
10173         * Makefile.in (HTAB_H): New variable.
10174
10175 2000-04-23  Richard Henderson  <rth@cygnus.com>
10176
10177         * typeck.c (c_expand_asm_operands): Restore the original
10178         contents of the output list.
10179
10180 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
10181
10182         * ir.texi:  Document complex number representation.
10183
10184 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10185
10186         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
10187         (target_incomplete_p): New function.
10188         (tinfo_base_init): Create comdat NTBS name variable.
10189         (ptr_initializer): Add non_public parameter. Calculate it.
10190         (ptmd_initializer): Likewise.
10191         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
10192         (create_real_tinfo_var): Add non_public parameter. Use it.
10193         Push proxy into global namespace.
10194         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
10195         New enumeration.
10196         * inc/typeinfo (type_info::before, type_info::operator==):
10197         Compare __name addresses.
10198
10199         * tinfo2.cc: Remove new-abi builtins comment.
10200
10201 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
10202
10203         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
10204
10205         * call.c (joust): Exit early if we get the same function, too.
10206
10207         * decl2.c (key_method): Return NULL_TREE for template classes.
10208         (import_export_class): Don't need to check for template classes.
10209
10210 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
10211
10212         * lex.c: Remove references to cccp.c.
10213
10214 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
10215
10216         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
10217         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
10218         (DECL_DESTRUCTOR_P): Use destructor_attr.
10219         (DECL_CONST_MEMFUNC_P): Reimplement.
10220         (DECL_VOLATILE_MEMFUNC_P): Remove.
10221         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
10222         (overrides): Use DECL_DESTRUCTOR_P.
10223         (check_for_override): Likewise.
10224         * decl.c (start_function): Likewise.
10225         * decl2.c (grokfclassfn): Likewise.
10226         (check_classfn): Likewise.
10227         (grok_function_init): Likewise.
10228
10229 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
10230
10231         * decl2.c (grokfield): Issue error on illegal data member
10232         declaration.
10233
10234 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
10235
10236         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
10237
10238 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
10239
10240         * class.c (build_vtable_entry): Don't build thunks for type-info
10241         functions.
10242
10243 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
10244
10245         * decl.c (decls_match): Allow a redeclaration of a builtin to
10246         specify args while the builtin did not.
10247
10248 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
10249
10250         * cp-tree.def (THUNK_DECL): Add to documentation.
10251         * cp-tree.h (flag_huge_objects): Declare.
10252         * class.c (modify_vtable_entry): Tidy.
10253         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
10254         Calculate delta appropriately for the new ABI.
10255         (dfs_modify_vtables): Use it.
10256         (modify_all_vtables): Fix thinko in code to add overriding copies
10257         of functions to primary vtables.
10258         (build_clone): Fix typo in comment.
10259         (clone_function_decl): Correct order of destructors in vtable.
10260         (build_vbase_offset_vtbl_entries): Adjust comment.
10261         (dfs_vcall_offset_queue_p): Remove.
10262         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
10263         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
10264         (build_vtable_entry): Correct check for pure virtual functions.
10265         Don't declare flag_huge_objects.
10266         * decl.c (flag_huge_objects): Remove declaration.
10267         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
10268         Use int_size_in_bytes.
10269         (emit_thunk): Handle vcall offset thunks.
10270
10271 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10272
10273         * decl2.c (parse_time, varconst_time): Delete declarations.
10274         (finish_file): Delete LINENO declaration.
10275         START_TIME and THIS_TIME now long.
10276
10277 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
10278
10279         * class.c (build_base_field): Reformat comment.
10280
10281         * inc/cxxabi.h (stddef.h): Comment inclusion.
10282         (__base_class_info::__offset): Comment shift.
10283
10284 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
10285
10286         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
10287         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
10288         (cp_push_exception_identifier): New macro.
10289         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
10290         (DECL_BASE_DESTRUCTOR_P): Likewise.
10291         (DECL_DELETING_DESTRUCTOR_P): Likewise.
10292         (get_vtbl_decl_for_binfo): Fix formatting.
10293         (in_charge_arg_for_name): New macro.
10294         (maybe_build_cleanup_and_delete): Remove declaration.
10295         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
10296         (in_charge_arg_for_name): New function.
10297         (build_new_method_call): Use it.  Handle cloned destructors.
10298         (build_clone): Don't make the base constructor virtual.
10299         Automatically defer generated functions.
10300         (clone_function_decl): Handle destructors, too.
10301         (clone_constructors_and_destructors): Likewise.
10302         (create_vtable_ptr): Don't create a vtable entry for a cloned
10303         function.
10304         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
10305         (initialize_predefined_identifiers): Update appropriately.
10306         (finish_destructor_body): Simplify.
10307         (maybe_build_cleanup_and_delete): Remove.
10308         * except.c (expand_throw): Handle new-ABI destructors.
10309         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
10310         (build_dtor_call): New function.
10311         (build_delete): Use it.  Simplify.
10312         * optimize.c (maybe_clone_body): Handle destructors.
10313         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
10314
10315         * exception.cc (cleanup_fn): New typedef.
10316         (CALL_CLEANUP): New macro.
10317         (cp_eh_info): Use them.
10318         (__cp_push_exception): Likewise.
10319         (__cp_pop_exception): Likewise.
10320
10321 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
10322
10323         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
10324         (complete_dtor_identifier): New macro.
10325         (CLASSTYPE_FIRST_CONVERSION): Remove.
10326         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
10327         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
10328         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
10329         (CLASSTYPE_CONSTRUCTORS): Likewise.
10330         (CLASSTYPE_DESTRUCTORS): Likewise.
10331         (lang_decl): Add cloned_function.
10332         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
10333         (DECL_BASE_CONSTRUCTOR_P): Likewise.
10334         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
10335         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
10336         (DECL_CLONED_FUNCTION_P): Likewise.
10337         (DECL_CLONED_FUNCTION): Likewise.
10338         (clone_function_decl): Declare.
10339         (maybe_clone_body): Likewise.
10340         * call.c (build_user_type_conversion_1): Call complete object
10341         constructors in the new ABI.
10342         (build_new_method_call): Don't add in-charge parameters under the
10343         new ABI.
10344         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
10345         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
10346         CLASSTYPE_DESTRUCTOR_SLOT.
10347         (build_clone): New function.
10348         (clone_function_decl): Likewise.
10349         (clone_constructors_and_destructors): Likewise.
10350         (check_bases_and_members): Use it.
10351         * decl.c (iniitialize_predefined_identifiers): Initialize
10352         complete_dtor_identifier.
10353         (finish_function): Don't add extra code to a clone.
10354         (lang_mark_tree): Mark cloned_function.
10355         * decl2.c (mark_used): Don't bother trying to instantiate things
10356         we synthesized.
10357         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
10358         * method.c (set_mangled_name_for_decl): Don't treat clones as
10359         constructors.
10360         (synthesize_method): Sythesize cloned functions, not the clones.
10361         * optimize.c (inline_data): Update comment on ret_label.
10362         (remap_block): Don't assume DECL_INITIAL exists.
10363         (copy_body_r): Allow ret_label to be NULL.
10364         (maybe_clone_body): Define.
10365         * pt.c (tsubst_decl): Handle clones.
10366         (instantiate_clone): New function.
10367         (instantiate_template): Use it.
10368         (set_mangled_name_for_template_decl): Don't treat clones as
10369         constructors.
10370         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
10371         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
10372         * semantics.c (expand_body): Clone function bodies as necessary.
10373
10374         * optimize.c (remap_decl): Avoid sharing structure for arrays
10375         whose size is only known at run-time.
10376         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
10377
10378         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
10379         to has_in_charge_parm_p.
10380         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
10381         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
10382         (DECL_COPY_CONSTRUCTOR_P): New macro.
10383         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
10384         (build_user_type_conversion_1): Likewise.
10385         (convert_like_real): Likewise.
10386         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
10387         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
10388         (copy_args_p): Likewise.
10389         (grok_ctor_properties): Likewise.
10390         (start_function): Likewise.
10391         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
10392         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
10393         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
10394         * method.c (do_build_copy_constructor): Use
10395         DECL_HAS_IN_CHARGE_PARM_P.
10396         (synthesize_method): Likewise.
10397         * pt.c (instantiate_template): Remove goto.
10398         * tree.c (build_cplus_method_type): Remove mention of obstacks in
10399         comment.
10400
10401         * cp-tre.h (finish_function): Change prototype.
10402         * decl.c (end_cleanup_fn): Adjust caller.
10403         (finish_function): Take only one parameter.
10404         * decl2.c (finish_objects): Adjust caller.
10405         (finish_static_storage_duration_function): Likewise.
10406         * method.c (emit_thunk): Likewise.
10407         * parse.y: Likewise.
10408         * parse.c: Regenerated.
10409         * pt.c (instantiate_decl): Likewise.
10410         * rtti.c (synthesize_tinfo_fn): Likewise.
10411         * semantics.c (expand_body): Likewise.
10412
10413         * cp-tree.h (copy_decl): New function.
10414         * class.c (finish_struct_1): Use it.
10415         * lex.c (copy_decl): Define it.
10416         * pt.c (tsubst_decl): Likewise.
10417         * tree.c (copy_template_template_parm): Likewise.
10418
10419         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
10420         has_nonpublic_assign_ref.
10421         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
10422         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
10423         * class.c (finish_struct_methods): Don't set
10424         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
10425         (interface_only): Don't declare.
10426         (interface_unknown): Likewise.
10427
10428 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10429
10430         * tree.h (HAVE_TEMPLATES): Remove definition.
10431         * lang-options.h (-fthis-is-variable): Remove documentation.
10432
10433 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
10434
10435         * class.c (instantiate_type): Handle object-relative template-id.
10436
10437         * semantics.c (finish_expr_stmt): Call convert_to_void here.
10438         * decl.c (cplus_expand_expr_stmt): Not here.
10439
10440         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
10441         Initialize exprtype earlier.
10442
10443         * parse.y (fn.def1): Check for defining types in return types.
10444
10445         * decl.c (check_tag_decl): Notice extra fundamental types.
10446         Diagnose empty decls in classes, too.
10447
10448         * decl.c (grokdeclarator): Don't override an anonymous name if no
10449         declarator was given.
10450
10451         * cvt.c (convert_to_void): Call resolve_offset_ref.
10452
10453         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
10454
10455         * decl2.c (decl_namespace): Handle getting a type.
10456
10457         * typeck.c (build_c_cast): Re-enable warning for cast between
10458         pointer and integer of different size.
10459
10460 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
10461
10462         * inc/cxxabi.h (__pointer_type_info): Add restrict and
10463         incomplete flags.
10464         (__pointer_type_info::__pointer_catch): New virtual function.
10465         (__pointer_to_member_type_info): Derive from
10466         __pointer_type_info. Adjust.
10467         (__pointer_to_member_type_info::__do_catch): Remove.
10468         (__pointer_to_member_type_info::__is_pointer_p): Declare.
10469         (__pointer_to_member_type_info::__pointer_catch): Declare.
10470         * rtti.c (qualifier_flags): Add restrict flag.
10471         (ptmd_initializer): Reorder members.
10472         (create_tinfo_types): Expand comments. Reorder
10473         ptmd_desc_type_node members.
10474         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
10475         Implement.
10476         (__pointer_type_info::__do_catch): Move specific code into
10477         __pointer_catch. Call it.
10478         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
10479         specific catch checking. Fix void conversion check.
10480         (__pointer_to_member_type_info::__do_catch): Remove.
10481         (__pointer_to_member_type_info::__pointer_catch): Implement.
10482
10483 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10484
10485         * lex.c (init_parse): Remove traces of classof and headof.
10486         * decl2.c (flag_operator_names): Default to 1.
10487         (lang_decode_option): Do not set it for -ansi.
10488
10489 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
10490
10491         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
10492         (DECL_MAIN_VARIANT): Remove.
10493         * decl.c (duplicate_decls): Don't set it.
10494         (start_function): Likewise.
10495         (lang_mark_tree): Don't mark it.
10496         * decl2.c (defer_fn): Don't use it.
10497         * lex.c (retrofit_lang_decl): Don't set it.
10498         * pt.c (tsubst_decl): Likewise.
10499         * ptree.c (print_lang_decl): Don't print it.
10500         * typeck.c (mark_addressable): Don't use it.
10501
10502 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
10503
10504         * vec.cc: Include <new> and <exception>.
10505         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
10506         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
10507         terminate.
10508         (__cxa_vec_delete): Catch dtor exceptions.
10509
10510 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
10511
10512         Prepend __ to implementation defined names.
10513         * inc/typeinfo (type_info): Rename _name to __name.
10514         (type_info::type_info): Rename parameter.
10515         (type_info::operator==, type_info::operator!=,
10516         type_info::before): Likewise.
10517         (type_info::is_pointer_p, type_info::is_function_p,
10518         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
10519         parameters.
10520         * inc/cxxabi.h
10521         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
10522         (__pointer_type_info::__pointer_type_info): Likewise.
10523         (__pointer_type_info::is_pointer_p,
10524         __pointer_type_info::do_catch): Prepend __. Rename parameters.
10525         (__array_type_info::__array_type_info): Rename parameters.
10526         (__function_type_info::__function_type_info): Likewise.
10527         (__function_type_info::is_function_p): Prepend __.
10528         (__enum_type_info::__enum_type_info): Rename parameters.
10529         (__pointer_to_member_type_info::__pointer_to_member_type_info):
10530         Likewise.
10531         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
10532         parameters.
10533         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
10534         (__class_type_info::__class_type_info): Rename parameters.
10535         (__class_type_info::sub_kind): Prepend __. Adjust member names.
10536         (__class_type_info::upcast_result,
10537         __class_type_info::dyncast_result): Prepend __. Move definition
10538         into tinfo.cc.
10539         (__class_type_info::do_upcast, __class_type_info::do_catch,
10540         __class_type_info::find_public_src,
10541         __class_type_info::do_dyncast,
10542         __class_type_info::do_find_public_src): Prepend __. Rename
10543         parameters.
10544         (__si_class_type_info::__si_class_type_info): Rename parameters.
10545         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
10546         __si_class_type_info::do_find_public_src): Prepent __. Rename
10547         parameters.
10548         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
10549         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
10550         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
10551         parameters.
10552         (__dynamic_cast): Rename parameters.
10553         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
10554         type_info::do_catch, type_info::do_upcast): Prepend __.
10555         (contained_p, public_p, virtual_p, contained_public_p,
10556         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
10557         (__class_type_info::do_catch,
10558         __class_type_info::do_upcast): Prepend __. Adjust.
10559         (__class_type_info::__upcast_result,
10560         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
10561         Adjust.
10562         (__class_type_info::find_public_src): Prepend __. Adjust.
10563         (__class_type_info::do_find_public_src,
10564         __si_class_type_info::do_find_public_src,
10565         __vmi_class_type_info::do_find_public_src): Likewise.
10566         (__class_type_info::do_dyncast,
10567         __si_class_type_info::do_dyncast,
10568         __vmi_class_type_info::do_dyncast): Likewise.
10569         (__class_type_info::do_upcast,
10570         __si_class_type_info::do_upcast,
10571         __vmi_class_type_info::do_upcast): Likewise.
10572         (__dynamic_cast): Adjust.
10573         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
10574         (__function_type_info::is_function_p): Likewise.
10575         (__pointer_type_info::do_catch): Likewise. Adjust.
10576         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
10577         (__throw_type_match_rtti_2): Adjust.
10578         (__is_pointer): Adjust.
10579
10580 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
10581
10582         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
10583         (complete_ctor_identifier): New macro.
10584         (special_function_kind): Add sfk_copy_constructor and
10585         sfk_assignment_operator.
10586         (LOOKUP_HAS_IN_CHARGE): Remove.
10587         (cons_up_default_function): Rename to ...
10588         (implicitly_declare_fn): ... this.
10589         * call.c (build_new_method_call): Add in-charge parameters for
10590         constructors here.
10591         * class.c (add_implicitly_declared_members): Change parameter name
10592         from cant_have_assignment to cant_have_const_assignment.
10593         Replace calls to cons_up_default_function to implicitly_declare_fn.
10594         * cvt.c (ocp_convert): Use complete_ctor_identifier.
10595         * decl.c (initialize_predefined_identifiers): Initialize it.
10596         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
10597         complex expression.
10598         * init.c (expand_default_init): Don't calculate the in-charge
10599         parameter here.
10600         (build_new_1): Likewise.
10601         * lex.c (cons_up_default_function): Move to method.c.
10602         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
10603         (implicitly_declare_fn): New function.
10604         * typeck.c (build_static_cast): Use complete_ctor_identifier.
10605         (build_modify_expr): Likewise.
10606         * typeck2.c (build_functional_cast): Likewise.
10607
10608         Under the new ABI, constructors don't return `this'.
10609         * cp-tree.h (warn_reorder): Declare.
10610         (special_function_kind): New enum.
10611         (global_base_init_list): Remove declaration.
10612         (emit_base_init): Don't return a value.
10613         (check_base_init): Don't declare.
10614         (is_aggr_typedef): Likewise.
10615         * decl.c (check_special_function_return_type): New function.
10616         (return_types): Remove.
10617         (grokdeclarator): Use check_special_function_return_type.
10618         (start_function): Don't initialize ctor_label under the new ABI.
10619         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
10620         * init.c (begin_init_stmts): Move to top of file.
10621         (finish_init_stmts): Likewise.
10622         (warn_reorder): Don't declare.
10623         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
10624         value.
10625         (check_base_init): Remove.
10626         (is_aggr_typedef): Likewise.
10627         (build_new_1): Don't use the return value of a constructor.
10628         * semantics.c (setup_vtbl_ptr): Don't use the return value
10629         of emit_base_init.
10630         * typeck.c (check_return_expr): Don't magically convert return
10631         statements into `return this' in constructors under the new ABI.
10632
10633         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
10634         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
10635         (base_ctor_identifier): New macro.
10636         (base_dtor_identifier): Likewise.
10637         (deleting_dtor_identifier): Likewise.
10638         * decl.c: Don't include obstack.h.
10639         (obstack_chunk_alloc): Don't define.
10640         (obstack_chunk_free): Likewise.
10641         (struct predefined_identifier): New type.
10642         (initialize_predefined_identifiers): New function.
10643         (init_decl_processing): Use it.
10644         (debug_temp_inits): Remove.
10645         (start_method): Don't call preserve_data.
10646         (hack_incomplete_structures): Update comment.
10647         * init.c (init_init_processing): Don't initialize
10648         nelts_identifier.
10649         (build_offset_rf): Remove dead code.
10650         (build_delete): Use CLASSTYPE_N_BASECLASSES.
10651         * search.c (init_search_processing): Don't initialize
10652         vptr_identifier.
10653
10654 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10655
10656         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
10657         some sign_compare warnings.
10658
10659 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10660
10661         Rename abi::__vmi_class_type_info members.
10662         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
10663         base_list, detail_masks members to vmi_flags, vmi_base_count,
10664         vmi_bases and vmi_flags_masks respectively.
10665         (__vmi_class_type_info::vmi_flags_masks): Rename
10666         details_unknown_mask to flags_unknown_mask.
10667         * tinfo.cc (__class_type_info::do_upcast): Adjust.
10668         (__vmi_class_type_info::do_find_public_src): Adjust.
10669         (__vmi_class_type_info::do_dyncast): Adjust.
10670         (__vmi_class_type_info::do_upcast): Adjust.
10671
10672 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10673
10674         * tinfo.cc (convert_to_base): New function.
10675         (get_vbase_offset): Remove. Move into convert_to_base.
10676         (__vmi_class_type_info::do_find_public_src): Adjust.
10677         (__vmi_class_type_info::do_dyncast): Adjust.
10678         (__vmi_class_type_info::do_upcast): Adjust.
10679
10680 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
10681
10682         * tinfo.cc (operator=): Use __builtin_strcmp.
10683         * tinfo2.cc (before): Likewise.
10684
10685 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
10686
10687         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
10688         (DECL_SAVED_INLINE): Rename to ...
10689         (DECL_DEFERRED_FN): ... this.
10690         (in_function_p): Remove declaration.
10691         (mark_inline_for_output): Rename to ...
10692         (defer_fn): ... this.
10693         * decl.c (finish_function): Adjust call to mark_inline_for_output.
10694         (in_function_p): Remove definition.
10695         * decl2.c (saved_inlines): Rename to ...
10696         (deferred_fns): ... this.
10697         (saved_inlines_used): Rename to ...
10698         (deferred_fns_used): ... this.
10699         (mark_inline_for_output): Rename to ...
10700         (defer_fn): ... this.
10701         (finish_file): Adjust accordingly.
10702         (init_decl2): Likewise.
10703         * lex.c (cons_up_default_function): Likewise.
10704         * pt.c (mark_decl_instantiated): Likewise.
10705         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
10706         circumstances.
10707         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
10708         * semantics.c (expand_body): Defer more functions.
10709
10710 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10711
10712         * vec.cc: New file.
10713         * Make-lang.in (CXX_LIB2FUNCS): Add it.
10714         (vec.o): Build it.
10715         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10716         __cxa_vec_delete): Declare.
10717
10718 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10719
10720         * rtti.c (dfs_class_hint_mark): New static function.
10721         (dfs_class_hint_unmark): New static function.
10722         (class_hint_flags): Use them.
10723
10724 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
10725
10726         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
10727
10728 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
10729
10730         * cp-tree.h (instantiate_decl): Change prototype.
10731         * decl2.c (mark_used): Adjust call.
10732         * optimize.c (inlinable_function_p): Adjust handling of templates.
10733         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
10734         (do_type_instantiation): Likewise.
10735         (instantiate_decl): Defer more templates.
10736         (instantiate_pending_templates): Adjust logic to handle inline
10737         friend functions.
10738
10739         * Makefile.in (GGC_H): New variable.  Use it throughout in place
10740         of ggc.h.
10741
10742         * call.c: Don't include obstack.h.  Include ggc.h.
10743         (obstack_chunk_alloc): Don't define.
10744         (obstack_chunk_free): Likewise.
10745         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
10746         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
10747         (pop_switch): Free it.
10748
10749         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
10750
10751         * dump.c (dequeue_and_dump): Don't try to print the bit_position
10752         if we don't have a DECL_FIELD_OFFSET.
10753
10754 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
10755
10756         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
10757         special_function_p.
10758
10759 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10760
10761         * cfns.gperf (hash, libc_name_p): Prototype.
10762
10763         * rtti.c (build_dynamic_cast_1): Constification.
10764
10765         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
10766
10767         * semantics.c (deferred_type_access_control): Prototype.
10768
10769 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
10770
10771         Correct many new ABI issues regarding vbase and vcall offset
10772         layout.
10773         * cp-tree.h (BINFO_VTABLE): Document.
10774         (struct lang_type): Tweak formatting.
10775         (BINFO_PRIMARY_BINFO): Add to documentation.
10776         (CLASSTYPE_VSIZE): Fix typo in comment.
10777         (CLASSTYPE_VBASECLASSES): Update documentation.
10778         (BINFO_VBASE_MARKED): Remove.
10779         (SET_BINFO_VBASE_MARKED): Likewise.
10780         (CLEAR_BINFO_VBASE_MARKED): Likewise.
10781         (BINFO_FIELDS_MARKED): Remove.
10782         (SET_BINFO_FIELDS_MARKED): Likewise.
10783         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
10784         (enum access_kind): New enumeration.
10785         (num_extra_vtbl_entries): Remove declaration.
10786         (size_extra_vtbl_entries): Likewise.
10787         (get_vtbl_decl_for_binfo): New function.
10788         (dfs_vbase_unmark): Remove declaration.
10789         (mark_primary_bases): Likewise.
10790         * class.c (SAME_FN): Remove.
10791         (struct vcall_offset_data_s): Move definition.
10792         (build_vbase_pointer): Use `build', not `build_binary_op', to
10793         access the vbase pointer under the new ABI.
10794         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
10795         (build_primary_vtable): Likewise.
10796         (dfs_mark_primary_bases): Move here from search.c.
10797         (mark_primary_bases): Likewise.
10798         (determine_primary_bases): Under the new ABI, don't make a base
10799         class a primary base just because we don't yet have any virtual
10800         functions.
10801         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
10802         (num_vfun_entries): Remove.
10803         (dfs_count_virtuals): Likewise.
10804         (num_extra_vtbl_entries): Likewise.
10805         (size_extra_vtbl_entries): Likewise.
10806         (layout_virtual_bases): Iterate in inheritance graph order under
10807         the new ABI.
10808         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
10809         indicate that a vfield is present.
10810         (init_class_processing): Initialize access_public_node, etc., from
10811         ak_public, etc.
10812         (get_vtbl_decl_for_binfo): New function.
10813         (dump_class_hierarchy_r): Likewise.
10814         (dump_class_hierarchy): Use it.
10815         (finish_vtbls): Build the vtbls in inheritance graph order.
10816         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
10817         (initialize_vtable): Use get_vtbl_decl_for_binfo.
10818         (accumulate_vtbl_inits): Add comments explaining why a pre-order
10819         walk is required.
10820         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
10821         where the vptr points, even for primary vtables.
10822         (build_vtbl_initializer): Adjust handling of vbase and vcall
10823         offsets.
10824         (build_vcall_and_vbase_vtable_entries): New function.
10825         (dfs_build_vbase_offset_vtbl_entries): Remove.
10826         (build_vbase_offset_vtbl_entries): Reimplement.
10827         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
10828         were already handled in a primary base class vtable.
10829         (build_vcall_offset_vtbl_entries): Adjust.
10830         (build_rtti_vtbl_entries): Adjust.
10831         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
10832         * init.c (expand_virtual_init): Simplify.
10833         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
10834         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
10835         * search.c (BINFO_ACCESS): New macro.
10836         (SET_BINFO_ACCESS): Likewise.
10837         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
10838         (access_in_type): Likewise.
10839         (dfs_accessible_p): Likewise.
10840         (protected_accessible_p): Likewise.
10841         (lookup_fnfields_1): Adjust documentation.
10842         (dfs_mark_primary_bases): Move to class.c
10843         (mark_primary_bases): Likewise.
10844         (dfs_vbase_unmark): Remove.
10845         (virtual_context): Use BINFO_FOR_VBASE.
10846         (dfs_get_vbase_types): Simplify.
10847         (dfs_build_inheritance_graph_order): New function.
10848         (get_vbase_types): Use it.
10849         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
10850
10851         * tinfo.cc (get_vbase_offset): New function.
10852         (__vmi_class_type_info::do_find_public_src): Use it.
10853         (__vmi_class_type_info::do_dyncast): Likewise.
10854         (__vmi_class_type_info::do_upcast): Likewise.
10855
10856 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
10857
10858         * lang-specs.h: Pass -fno-show-column to the preprocessor.
10859
10860 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
10861
10862         * rtti.c (class_hint_flags): Rename flags.
10863         (class_initializer): Remove flags.
10864         (synthesize_tinfo_var): Combine offset and flags. Add flags
10865         for __vmi_class_type_info.
10866         (create_tinfo_types): Remove flags from __class_type_info and
10867         __si_class_type_info. Merge flags and offset from
10868         base_class_type_info.
10869         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
10870         (__base_class_info::is_virtual_p): Adjust.
10871         (__base_class_info::is_public_p): Adjust.
10872         (__base_class_info::offset): New accessor.
10873         (__class_type_info::details): Remove member.
10874         (__class_type_info::__class_type_info): Lose details.
10875         (__class_type_info::detail_masks): Remove.
10876         (__si_class_type_info::__si_class_type_info): Lose details.
10877         (__vmi_class_type_info::details): New member.
10878         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
10879         (__vmi_class_type_info::detail_masks): New member.
10880         * tinfo.cc (__class_type_info::do_upcast): Initialize result
10881         with unknown_details_mask.
10882         (__vmi_class_type_info::do_find_public_src): Adjust
10883         (__vmi_class_type_info::do_dyncast): Adjust.
10884         (__vmi_class_type_info::do_upcast): Set result details, if
10885         needed. Adjust.
10886         (__dynamic_cast): Temporarily #if out optimization.
10887
10888 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
10889
10890         * rtti.c (get_tinfo_decl): Mark used.
10891         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
10892         mark as dealt with, if we output it.
10893
10894 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10895
10896         * class.c: Reorganize to put virtual function table initialization
10897         machinery at the end of the file.
10898
10899 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
10900
10901         * class.c (finish_struct): Use bitsize_zero_node.
10902         * pt.c (instantiate_class_template): Likewise.
10903
10904 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10905
10906         Put RTTI entries at negative offsets in new ABI.
10907         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
10908         vbase offset at index -3, not -1.
10909         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
10910         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
10911         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
10912         (build_rtti_vtbl_entries): New function.
10913         (set_rtti_entry): Remove.
10914         (build_primary_vtable): Don't use it.
10915         (build_secondary_vtable): Likewise.
10916         (start_vtable): Remove.
10917         (first_vfun_index): New function.
10918         (set_vindex): Likewise.
10919         (add_virtual_function): Don't call start_vtable.  Do call
10920         set_vindex.
10921         (set_primary_base): Rename parameter.
10922         (determine_primary_base): Likewise.
10923         (num_vfun_entries): Don't use skip_rtti_stuff.
10924         (num_extra_vtbl_entries): Include RTTI information.
10925         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
10926         (skip_rtti_stuff): Remove.
10927         (dfs_modify_vtables): Don't use it.
10928         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
10929         (layout_nonempty_base_or_field): Update size handling.
10930         (create_vtable_ptr): Tweak.
10931         (layout_class_type): Adjust parameter names.
10932         (finish_struct_1): Simplify.
10933         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
10934         (skip_rtti_stuff): Remove.
10935         (first_vfun_index): New function.
10936         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10937         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
10938         (marked_vtable_pathp): Declare.
10939         (unmarked_vtable_pathp): Likewise.
10940         * error.c (dump_expr): Use first_vfun_index to calculate vtable
10941         offsets.
10942         * rtti.c (build_headof): Look for RTTI at negative offsets.
10943         (get_tinfo_decl_dynamic): Likewise.
10944         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
10945         here.
10946         (create_pseudo_type_info): Do it here instead.  Adjust so that
10947         vptr points at first virtual function.
10948         * search.c (marked_vtable_pathp): Make it global.
10949         (unmarked_vtable_pathp): Likewise.
10950         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10951         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
10952         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
10953         (get_pure_virtuals): Likewise.
10954         (expand_upcast_fixups): Likewise.
10955         * tree.c (debug_binfo): Likewise.
10956         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
10957         negative offset.
10958
10959 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10960
10961         * class.c (check_field_decl): Fix typo.
10962         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
10963         (check_methods): Likewise.
10964         (check_field_decls): Likewise.
10965         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
10966         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
10967         Use DECL_RESULT_FLD, not DECL_RESULT.
10968         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
10969         * lex.c (identifier_type): Likewise.
10970         * pt.c (determine_specialization, lookup_template_class): Likewise.
10971         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
10972         (resolve_overloaded_unification, more_specialized): Likewise.
10973         * semantics.c (finish_member_declaration): Likewise.
10974         * typeck.c (build_x_function_call): Likewise.
10975
10976 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
10977
10978         * class.c (layout_empty_base): Handle empty bases with non-byte
10979         alignment.
10980         (build_base_field): Likewise.
10981         (layout_virtual_bases): Likewise.
10982
10983         * class.c (finish_struct_1): Fix typo in this change:
10984
10985         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10986
10987 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
10988
10989         * decl.c (grokdeclarator): Count partial specializations when
10990         keeping track of how many template classes have been seen.
10991
10992         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
10993
10994 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10995
10996         * class.c (build_vbase_pointer_fields): layout_field now place_field.
10997         (get_vfield_offset): Use byte_position.
10998         (set_rtti_entry): Set OFFSET to ssizetype zero.
10999         (get_binfo_offset_as_int): Deleted.
11000         (dfs_record_base_offsets): Use tree_low_cst.
11001         (dfs_search_base_offsets): Likewise.
11002         (layout_nonempty_base_or_field): Reflect changes in RLI format
11003         and call byte_position.
11004         (layout_empty_base): Convert offset to ssizetype.
11005         (build_base_field): use rli_size_unit_so_far.
11006         (dfs_propagate_binfo_offsets): Do computation in proper type.
11007         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
11008         (layout_class_type): Reflect changes in RLI names and fields.
11009         (finish_struct_1): Set DECL_FIELD_OFFSET.
11010         * dump.c (dequeue_and_dump): Call bit_position.
11011         * expr.c (cplus_expand_constant): Use byte_position.
11012         * rtti.c (expand_class_desc): Use bitsize_one_node.
11013         * typeck.c (build_component_addr): Use byte_position and don't
11014         special case for zero offset.
11015
11016 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
11017
11018         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
11019
11020         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
11021         tinfo object.
11022         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
11023         vtable.
11024
11025 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11026
11027         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
11028         DECL_P macros.
11029         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
11030         make_typename_type, check_initializer, cp_finish_decl,
11031         xref_tag): Likewise.
11032         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
11033         decl_namespace, arg_assoc_template_arg, arg_assoc,
11034         validate_nonmember_using_decl, do_class_using_decl): Likewise.
11035         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
11036         args_to_string): Likewise.
11037         * friend.c (is_friend): Likewise.
11038         * lex.c (note_got_semicolon, note_list_got_semicolon,
11039         is_global): Likewise.
11040         * method.c (build_overload_nested_name, build_overload_value,
11041         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
11042         * parse.y (typename_sub, typename_sub1): Likewise.
11043         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
11044         process_partial_specialization, convert_template_argument,
11045         template_args_equal, add_pending_template, lookup_template_class,
11046         for_each_template_parm_r, maybe_fold_nontype_arg,
11047         tsubst, instantiate_template, type_unification_real, unify,
11048         instantiate_pending_templates, set_mangled_name_for_template_decl):
11049         Likewise.
11050         * repo.c (repo_get_id, repo_template_used): Likewise.
11051         * search.c (lookup_field_1): Likewise.
11052         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
11053         * xref.c (classname): Likewise.
11054
11055 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
11056
11057         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
11058         (CANONICAL_BINFO): New macro.
11059         (BINFO_NEW_VTABLE_MARKED): Use it.
11060         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
11061         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
11062         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
11063         not TREE_TYPE.
11064         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
11065         (build_secondary_vtable): Likewise.
11066         (dfs_finish_vtbls): Likewise.
11067         (dfs_accumulate_vtbl_inits): Likewise.
11068         (accumulate_vtbl_inits): New function.
11069         (finish_vtbls): Make sure that virtual bases come after
11070         non-virtual bases in the vtable group.
11071         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
11072         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
11073         * search.c (struct vbase_info): Move definition.
11074         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
11075         (unmarked_new_vtable_p): Likewise.
11076         (dfs_mark_vtable_path): Remove.
11077         (dfs_mark_new_vtable): Remove.
11078         (dfs_unmark_new_vtable): Likewise.
11079         (dfs_clear_search_slot): Likewise.
11080         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
11081         (dfs_clear_vbase_slots): Likewise.
11082         (init_vbase_pointers): LIkewise.
11083
11084 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
11085
11086         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
11087         SIZETYPE to a non-SIZETYPE.
11088
11089 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
11090
11091         * class.c (layout_virtual_bases): Adjust names in conditionally
11092         compiled code.
11093
11094         * class.c (record_base_offsets): New function.
11095         (layout_conflict_p): Likewise.
11096         (layout_nonempty_base_or_field): Use it.
11097         (layout_empty_base): New function.
11098         (build_base_field): Use it.
11099         (build_base_fields): Update comment.
11100         (layout_virtual_bases): Fold in a little code form
11101         layout_basetypes.  Use layout_empty_base.
11102         (layout_basetypes): Remove.
11103         (end_of_class): New function.
11104         (layout_class_type): Use it.  Adjust.
11105
11106         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
11107         (fntype_p): Remove.
11108         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
11109         comment.
11110         (dfs_skip_nonprimary_vbases_markedp): Likewise.
11111         * typeck.c (fntype_p): Remove.
11112
11113         * cp-tree.h (TI_SPEC_INFO): Remove.
11114         (CLASSTYPE_TI_SPEC_INFO): Likewise.
11115         * pt.c (process_partial_specialization): Likewise.
11116
11117         * class.c (build_base_field): Fix thinko in computation of binfo
11118         offsets.
11119
11120         * tree.c (mark_local_for_remap_p): Mark variables declared in
11121         TARGET_EXPRs as well.
11122
11123 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
11124
11125         * typeck.c (require_complete_type, complete_type,
11126         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
11127         build_array_ref, convert_arguments, pointer_diff,
11128         build_x_unary_op, build_unary_op, build_c_cast,
11129         build_modify_expr): Use COMPLETE_TYPE_P etc.
11130         * call.c (is_complete, convert_like_real,
11131         build_new_method_call): Likewise.
11132         * class.c (build_vbase_pointer_fields, check_bases,
11133         build_base_field, finish_struct_1, pushclass): Likewise.
11134         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
11135         * decl.c (maybe_process_template_type_declaration, pushtag,
11136         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
11137         layout_var_decl, check_initializer, cp_finish_decl,
11138         grokdeclarator, require_complete_types_for_parms,
11139         grok_op_properties, xref_tag, xref_basetypes,
11140         check_function_type): Likewise.
11141         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
11142         * friend.c (do_friend): Likewise.
11143         * init.c (build_offset_ref): Likewise.
11144         * parse.y (structsp): Likewise.
11145         * pt.c (maybe_process_partial_specialization,
11146         tsubst_friend_function, instantiate_class_template, tsubst,
11147         do_type_instantiation, instantiate_pending_templates): Likewise.
11148         * repo.c (repo_get_id): Likewise.
11149         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
11150         synthesize_tinfo_var, emit_support_tinfos): Likewise.
11151         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
11152         * semantics.c (begin_class_definition): Likewise.
11153         * tree.c (build_cplus_method_type): Likewise.
11154         * typeck2.c (digest_init, build_functional_cast,
11155         add_exception_specifier): Likewise.
11156         * parse.h, parse.c: Regenerated.
11157
11158 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
11159
11160         * inc/cxxabi.h: New header file. Define new-abi entry points.
11161         (__pointer_type_info::target): Rename member to ...
11162         (__pointer_type_info::type): ... here.
11163         (__base_class_info::type): Rename member to ...
11164         (__base_class_info::base): ... here.
11165         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
11166         * cp-tree.h (CPTI_ABI): New global tree enumeration.
11167         (abi_node): New global tree node.
11168         * decl.c (abi_node): Document.
11169         (init_decl_processing): Initialize abi_node.
11170         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
11171         (get_vmi_pseudo_type_info): Likewise.
11172         (create_tinfo_types): Likewise.
11173         (emit_support_tinfos): Likewise.
11174         * tinfo.h (cxxabi.h): Include for new-abi.
11175         Move rtti class definitions to new header file.
11176         * tinfo.cc (abi): Use the namespace.
11177         (std): Move new abi rtti classes from here ...
11178         (__cxxabiv1): ... to here.
11179         * tinfo2.cc (cxxabi.h): Include for new-abi.
11180         Move rtti class definitions to new header file.
11181         (std): Move new abi rtti classes from here ...
11182         (__cxxabiv1): ... to here.
11183         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
11184         namespace.
11185
11186 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
11187             Jason Merrill  <jason@casey.cygnus.com>
11188
11189         * method.c (build_overload_int): Use host_integerp.
11190
11191 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11192
11193         * init.c (build_offset_ref): Handle the case of a templated member
11194         function.
11195
11196 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11197
11198         * except.c (expand_exception_blocks): Clear catch_clauses_last.
11199
11200 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
11201
11202         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
11203         * class.c (check_bitfield_decl): Turn illegal bitfields into
11204         non-bitfields.
11205         (dfs_propagate_binfo_offsets): Adjust for new size_binop
11206         semantics.
11207         (dfs_offset_for_unshared_vbases): Likewise.
11208         * cvt.c (cp_convert_to_pointer): Convert NULL to a
11209         pointer-to-member correctly under the new ABI.
11210         * expr.c (cplus_expand_constant): Don't use cp_convert when
11211         turning an offset into a pointer-to-member.
11212         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
11213         when dereferencing them under the new ABI.
11214         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
11215         of pointers-to-members under the new ABI.
11216
11217         * class.c (check_bitfield_decl): Remove restriction on really long
11218         bitfields.
11219         (layout_class_type): Implement new ABI handling of bitfields
11220         longer than their types.
11221
11222 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11223
11224         * parse.y (extdefs): Call ggc_collect.
11225         * parse.c: Regenerated.
11226
11227 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
11228
11229         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
11230         (note_name_declared_in_class): Use OVL_CURRENT to get at a
11231         potential overload.
11232
11233 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11234
11235         * class.c (build_vbase_path): Use integer_zerop.
11236         (build_vtable_entry): Use tree_low_cst.
11237         (get_vfield_offset): Use bit_position.
11238         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
11239         Use tree_low_cst.
11240         (check_bitfield_decl): Set DECL_SIZE using convert.
11241         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
11242         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
11243         Use tree_low_cst.
11244         (finish_struct_1): Use bit_position.
11245         (dump_class_hierarchy): Use tree_low_cst.
11246         * cp-tree.h (min_precision): Add declaration.
11247         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
11248         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
11249         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
11250         * expr.c (cplus_expand_constant): Use bit_position.
11251         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
11252         * rtti.c (get_base_offset): Use bit_position.
11253         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
11254         host_integerp, and tree_low_cst.
11255         (pointer_int_sum): Use integer_zerop.
11256         (build_component_addr): Use bit_position.
11257
11258 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
11259
11260         * typeck.c (require_complete_type): Don't assume size_zero_node.
11261         (complete_type_or_else): Likewise.
11262
11263 2000-03-16  Steven Grady <grady@digitaldeck.com>
11264             Jason Merrill  <jason@casey.cygnus.com>
11265
11266         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
11267
11268 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
11269
11270         * decl2.c (grokfield): Bail out if type is error_mark_node.
11271
11272 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
11273
11274         * tinfo2.cc (__ptr_to_member_data): Rename to ...
11275         (__pointer_to_member_data): ... here. Adjust.
11276         * rtti.c (create_tinfo_types): Adjust.
11277
11278 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
11279
11280         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
11281         * decl.c (ref_desc_type_node): Undocument.
11282         * rtti.c (ptr_ref_initializer): Rename to ...
11283         (ptr_initializer): ... here. Adjust comments.
11284         (ptmd_initializer): Fix comment thinko.
11285         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
11286         (create_tinfo_types): Remove ref_desc_type_node init.
11287         * tinfo2.cc (__reference_type_info): Remove.
11288
11289 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
11290
11291         * decl.c (cp_finish_decl): Remove obsolete comment.
11292
11293         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
11294
11295 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
11296
11297         * cp-tree.h: Tweak documentation.
11298         * class.c (build_vbase_pointer_fields): Layout the fields, too.
11299         (avoid_overlap): Remove.
11300         (get_binfo_offset_as_int): New function.
11301         (dfs_serach_base_offsets): Likewise.
11302         (layout_nonempty_base_or_field): Likewise.
11303         (build_base_field): Layout fields here.  Avoid placing two objects
11304         of the same type at the same address, under the new ABI.
11305         (build_base_fields): Adjust accordingly.
11306         (create_vtable_ptr): Return the new field, but don't attach it to
11307         TYPE_FIELDS.
11308         (remove_base_field): Remove.
11309         (remove_base_fields): Remove.
11310         (layout_basetypes): Adjust accordingly.
11311         (layout_class_type): Call layout_field for each field, rather than
11312         just making a wholesale call to layout_type.
11313
11314 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
11315
11316         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
11317
11318 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
11319
11320         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
11321
11322         * except.c (dtor_nothrow): New fn.
11323         (do_pop_exception): Use it.  Take type parm.
11324         (push_eh_cleanup): Take type parm.
11325         (expand_start_catch_block): Pass it.
11326         (build_eh_type_type_ref): Accept null type.
11327
11328 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
11329
11330         * cp-tree.h (revert_static_member_fn): Change prototype.
11331         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
11332         (grok_op_properties): Likewise.
11333         (start_function): Likewise.
11334         (revert_static_member_fn): Simplify.
11335         * pt.c (check_explicit_specialization): Adjust call to
11336         revert_static_member_fn.
11337
11338 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
11339
11340         * cp-tree.h (scope_kind): New type.
11341         (tmpl_spec_kind): Likewise.
11342         (declare_pseudo_global_level): Remove.
11343         (pseudo_global_level_p): Rename to template_parm_scope_p.
11344         (pushlevel): Remove declaration.
11345         (begin_scope): New function.
11346         (finish_scope): Likewise.
11347         (current_tmpl_spec_kind): Likewise.
11348         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
11349         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
11350         Add template_spec_p.
11351         (toplevel_bindings_p): Adjust.
11352         (declare_pseudo_global_level): Remove.
11353         (pseudo_global_level_p): Rename to template_parm_scope_p.
11354         (current_tmpl_spec_kind): New function.
11355         (begin_scope): Likewise.
11356         (finish_scope): Likewise.
11357         (maybe_push_to_top_level): Adjust.
11358         (maybe_process_template_type_declaration): Likewise.
11359         (pushtag): Likewise.
11360         (pushdecl_nonclass_level): Likewise.
11361         (lookup_tag): Likewise.
11362         (grokfndecl): Handle member template specializations.  Share
11363         constructor and non-constructor code.
11364         * decl2.c (check_classfn): Handle member template specializations.
11365         * pt.c (begin_template_parm_list): Use begin_scope.
11366         (begin_specialization): Likewise.
11367         (end_specialization): Likewise.
11368         (check_explicit_specialization): Use current_tmpl_spec_kind.
11369         Handle member template specializations.
11370         (end_template_decl): Use finish_scope.  Remove call to
11371         get_pending_sizes.
11372         (push_template_decl_real): Remove bogus error message.
11373         (tsubst_decl): Fix typo in code contained in comment.
11374         (instantiate_template): Handle member template specializations.
11375         (most_general_template): Likewise.
11376
11377 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11378
11379         * lex.c (whitespace_cr): Compress consecutive calls to warning().
11380         (do_identifier): Ditto for error().
11381
11382         * pt.c (convert_nontype_argument): Ditto for cp_error().
11383         (convert_template_argument): Ditto for cp_pedwarn().
11384
11385 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
11386
11387         * exception.cc (__check_null_eh_spec): New fn.
11388         * except.c (expand_end_eh_spec): Call it if the spec is throw().
11389
11390 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
11391
11392         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
11393         * except.c (expand_end_eh_spec): Add the return type.
11394         * rtti.c (throw_bad_cast): Add the parmtypes.
11395         (throw_bad_typeid): Likewise.
11396
11397         * semantics.c (expand_stmt): Only leave out rtl for unused
11398         artificials, and set DECL_IGNORED_P on them as well.
11399         * decl.c (wrapup_globals_for_namespace): Likewise.
11400
11401 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
11402
11403         * decl.c (maybe_commonize_var): Skip all artificial decls.
11404         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
11405
11406 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
11407
11408         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
11409         * cp-tree.h: Declare flag_enforce_eh_specs.
11410         * decl.c (store_parm_decls, finish_function): Check it.
11411
11412         C library functions don't throw.
11413         * Makefile.in (cfns.h): New target.
11414         (except.o): Depend on it.
11415         * Make-lang.in (cc1plus): Depend on cfns.gperf.
11416         * cfns.gperf: New file.
11417         * cfns.h: Generated.
11418         * except.c: Include it.
11419         (nothrow_libfn_p): New fn.
11420         * decl.c (grokfndecl): Use it.
11421         * cp-tree.h: Declare it.
11422
11423         * decl.c (push_overloaded_decl_1, auto_function,
11424         define_function): Lose.
11425         (build_library_fn_1): New static fn.
11426         (builtin_function): Use it.
11427         (get_atexit_node): Use build_library_fn_ptr.
11428         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
11429         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
11430         push_void_library_fn, push_throw_library_fn): New fns.
11431         * cp-tree.h: Declare them.
11432         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
11433         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
11434         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
11435         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
11436         * rtti.c (build_runtime_decl): Lose.
11437         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
11438         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
11439         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
11440
11441         * call.c (build_call): Remove result_type parm.
11442         Call mark_used on unused artificial fns.
11443         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
11444
11445 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
11446
11447         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
11448         appropriate.
11449         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
11450         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
11451         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
11452         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
11453         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
11454         expand_generic_desc): Likewise.
11455
11456 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11457
11458         * exception.cc (__cp_pop_exception): Cleanup the original object.
11459
11460 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11461
11462         * decl.c (grok_op_properties): Merge conversion to void warning
11463         with other silly op warnings.
11464
11465 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
11466
11467         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
11468         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
11469
11470 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11471
11472         * decl.c (cp_make_fname_decl): New function.
11473         (wrapup_globals_for_namespace): Don't emit unused static vars.
11474         (init_decl_processing): Remove comment about use of
11475         array_domain_type. Set make_fname_decl.
11476         (cp_finish_decl): Remove __FUNCTION__ nadgering.
11477         * semantics.c (begin_compound_stmt): Remove
11478         current_function_name_declared flagging.
11479         (expand_stmt): Don't emit unused local statics.
11480         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
11481         specially.
11482
11483 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11484
11485         * typeck.c (convert_for_assignment): Don't look at array
11486         initializer.
11487         * call.c (convert_like_real): Likewise.
11488
11489 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
11490
11491         Add initial support for '\uNNNN' specifier.
11492         * lex.c (read_ucs): New fn.
11493         (readescape, skip_white_space): Call it.
11494         (is_extended_char, is_extended_char_1): New fns.
11495         (utf8_extend_token): New fn, #if 0'd out.
11496         (real_yylex): Treat extended chars like letters.
11497
11498         * search.c (note_debug_info_needed): Walk the bases even if we
11499         weren't deferring the type itself.
11500
11501 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11502
11503         * decl2.c (finish_objects): Constify a char*.
11504
11505         * method.c (emit_thunk): Likewise.
11506
11507 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
11508
11509         * typeck.c (dubious_conversion_warnings): Look through
11510         REFERENCE_TYPE.
11511
11512 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11513
11514         * class.c (dfs_modify_vtables): I is now unsigned.
11515         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
11516         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
11517         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
11518         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
11519         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
11520         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
11521         Call integer_all_onesp.
11522         * typeck2.c (process_init_constructor): Use compare_tree_int.
11523
11524         * lang-specs.h (as): Don't call if -syntax-only.
11525
11526 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
11527
11528         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
11529         RTL_EXPR_HAS_NO_SCOPE after all.
11530
11531 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
11532
11533         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
11534         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
11535         RTL_EXPR_HAS_NO_SCOPE.
11536
11537         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
11538         later.
11539
11540         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
11541
11542 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
11543
11544         * call.c (convert_like): Macrofy.
11545         (convert_like_with_context): New macro.
11546         (convert_like_real): Renamed from convert_like.  Add calling
11547         context parameters, for diagnostics. Add recursive flag.  Call
11548         dubious_conversion_warnings for outer conversion.
11549         (build_user_type_conversion): Use convert_like_with_context.
11550         (build_over_call): Likewise. Don't warn about dubious
11551         conversions here. Adjust convert_default_arg calls.
11552         (convert_default_arg): Add context parameters for diagnostics.
11553         Pass through to convert_like_with_context.
11554         * cp-tree.h (convert_default_arg): Add context parameters.
11555         (dubious_conversion_warnings): Prototype new function.
11556         * typeck.c (convert_arguments): Adjust convert_default_arg call.
11557         (dubious_conversion_warnings): New function, broken
11558         out of convert_for_assignment.
11559         (convert_for_assignment): Adjust.
11560
11561 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
11562
11563         * decl2.c (key_method): Break out from...
11564         (import_export_vtable, import_export_class): ...here.
11565
11566         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
11567         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
11568
11569         * search.c (note_debug_info_needed, dfs_debug_mark,
11570         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
11571         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
11572
11573 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
11574
11575         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
11576         typos.
11577
11578 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
11579
11580         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
11581         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
11582         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
11583         (lang_type): Split gets_new into has_new and has_array_new.
11584         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11585         (TYPE_GETS_NEW): Split into ...
11586         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
11587         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
11588         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
11589         (build_op_new_call): Don't declare.
11590         (build_new_1): Likewise.
11591         * call.c (build_op_new_call): Remove.
11592         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
11593         instead of TYPE_NEEDS_DESTRUCTOR.
11594         (finish_struct_bits): Likewise.
11595         (add_implicitly_declared_members): Likewise.
11596         (check_field_decl): Likewise.
11597         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
11598         correctly under the new ABI.
11599         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
11600         instead of TYPE_NEEDS_DESTRUCTOR.
11601         (initialize_local_var): Likewise.
11602         (destroy_local_var): Likewise.
11603         (cp_finish_decl): Likewise.
11604         (register_dtor_fn): Likewise.
11605         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
11606         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
11607         TYPE_VEC_DELETE_TAKES_SIZE here.
11608         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
11609         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
11610         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11611         (finish_destructor_body): Likewise.
11612         (maybe_build_cleanup_1): Likewise.
11613         * decl2.c (do_static_destruction): Likewise.
11614         * init.c (build_new_1): Make it static.
11615         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11616         (expand_cleanup_for_base): Likewise.
11617         (get_cookie_size): New function.
11618         (build_new_1): Handle array-new cookies correctly under the new
11619         ABI.
11620         (build_vec_delete_1): Likewise.
11621         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11622         (build_delete): Likewise.
11623         (build_vec_delete): Handle array-new cookies correctly under the new
11624         ABI.
11625         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11626         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
11627         TYPE_HAS_ARRAY_NEW_OPERATOR.
11628         * ptree.c (print_lang_type): Check them.
11629         * search.c (context_for_name_lookup): Fix typo in comment.
11630         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11631         * tree.c (break_out_cleanups): Likewise.
11632         (build_cplus_array_test_1): Likewise.
11633         (cp_build_qualified_type_real): Likewise.
11634         * typeck.c (complete_type): Likewise.
11635
11636         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
11637         the command-line, not the end.
11638
11639 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
11640
11641         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
11642
11643 2000-03-02  Tom Tromey  <tromey@cygnus.com>
11644
11645         * cp-tree.h (build_java_class_ref): Declare.
11646         * init.c (build_java_class_ref): No longer static.
11647         * except.c (expand_throw): Generate a Java-style `throw' if the
11648         thrown object is a "Java" object.
11649         (initialize_handler_parm): Generate a Java-style lookup of
11650         exception info if the caught object is a "Java" object.
11651         (catch_language, catch_language_init): New globals.
11652         (decl_is_java_type): New function.
11653         (expand_start_catch_block): Don't call push_eh_info() or
11654         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
11655         class reference to build_catch_block.
11656
11657 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11658
11659         * typeck.c (comptypes): Treat sizetype like its language equivalent.
11660
11661 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
11662
11663         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
11664         to merge reference/pointer code and fix incorrect warnings.
11665
11666 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
11667
11668         * search.c (protected_accessible_p): Use context_for_name_lookup.
11669
11670         * init.c (construct_virtual_bases): Fix thinko.
11671         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
11672
11673 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11674
11675         * decl.c (current_function_decl): Move to toplev.c.
11676
11677 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
11678
11679         * pt.c (fn_type_unification): Unify return type, whenever
11680         provided.
11681         (get_bindings_real): Only pass return type when necessary.
11682         Remove explicit return type check.
11683         * class.c (resolve_address_of_overloaded_function): Pass desired
11684         return type to fn_type_unification.
11685
11686 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11687
11688         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
11689         DECL_FIELD_SIZE.
11690         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
11691         DECL_FIELD_SIZE.
11692         * rtti.c (expand_class_desc): Likewise.
11693         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
11694         (THUNK_VCALL_OFFSET): Likewise.
11695         (THUNK_DELTA): Reflect changes in ../tree.h.
11696
11697 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
11698
11699         * search.c (protected_accessible_p): Also allow the access if
11700         the member is public in DERIVED.  Lose TYPE parm.
11701         (friend_accessible_p): Lose TYPE parm.
11702         (accessible_p): Adjust.
11703
11704 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11705
11706         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
11707         on things that are not sizes; ssize_binop deleted.
11708         Call size_diffop when appropriate.
11709         (dfs_build_vcall_offset_vtbl_entries): Likewise.
11710         (build_primary_vtable, build_secondary_vtable): Likewise.
11711         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
11712         Variable I is HOST_WIDE_INT.
11713         (get_vfield_offset): Pass proper types to size_binop.
11714         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
11715         (finish_struct_1): Likewise.
11716         (skip_rtti_stuff): Arg N is now pointer to signed.
11717         (layout_class_type): Use size_zero_node.
11718         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
11719         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
11720         * decl.c (complete_arry_type): Pass proper types to size_binop.
11721         (xref_basetypes): BINFO_OFFSET is sizetype.
11722         * error.c (dump_expr): Don't use size_binop non-sizes.
11723         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
11724         * init.c (construct_virtual_bases): Fix type error.
11725         (build_vec_delete_1): Pass proper type to size_binop and don't
11726         fold result.
11727         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
11728         * rtti.c (get_base_offset): Pass proper type to size_binop.
11729         * search.c (dfs_find_vbases): Fix type error.
11730         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
11731         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
11732         * tree.c (debug_binfo): Variable N is signed.
11733         Use HOST_WIDE_INT_PRINT_DEC.
11734         * typeck.c (comptypes): sizetype is same as equivalent integer type.
11735         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
11736         size_one_node and size_zero_node.
11737         (c_alignof): Use size_one_node.
11738         (build_component_addr): Pass proper types to size_binop.
11739         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
11740
11741 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
11742
11743         Implement class scope using-declarations for functions.
11744         * class.c (handle_using_decl): Call add_method for used functions.
11745         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
11746         (add_method): Used functions are hidden by local functions.
11747         (check_bases_and_members): Handle using-decls before finalizing
11748         CLASSTYPE_METHOD_VEC.
11749         * call.c (add_function_candidate): Add ctype parm; if non-zero,
11750         override the type of 'this' accordingly.
11751         (add_template_candidate, add_template_candidate_real): Add ctype parm.
11752         (convert_class_to_reference, build_user_type_conversion_1,
11753         build_new_function_call, build_object_call, build_new_op,
11754         build_new_method_call): Pass ctype parm.
11755
11756         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
11757         the baselink.
11758         * call.c (convert_class_to_reference, build_user_type_conversion_1,
11759         build_new_function_call, build_object_call, build_new_op,
11760         build_new_method_call, build_op_delete_call): Don't get basetype_path
11761         from a baselink.
11762         * typeck.c (build_component_ref): Likewise.
11763         * init.c (build_offset_ref): Likewise.
11764         (resolve_offset_ref): Don't call enforce_access.
11765         Call build_scoped_ref.
11766         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
11767         would cause an error or if -pedantic.
11768         * class.c (alter_access): Lose binfo parm.
11769
11770 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11771
11772         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
11773         types.
11774
11775 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
11776
11777         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
11778         pseudo_type_info creation into the std namespace
11779
11780 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11781
11782         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
11783         (import_export_class): Remove declaration.
11784         * decl2.c (import_export_class): Make it static.
11785         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
11786         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
11787         EXPR_WITH_FILE_LOCATION.
11788         * lex.c (check_newline): Tweak filename/lineno setting.
11789         * semantics.c (begin_while_stmt): Fix typo in comment.
11790
11791 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11792
11793         * lang-options.h (-fmessage-length=): Add missing option.
11794
11795         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
11796
11797 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
11798
11799         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
11800
11801 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
11802
11803         * optimize.c (expand_call_inline): Emit the return label before
11804         evaluating the return value.
11805
11806 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
11807
11808         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
11809         than duplicating functionality here.
11810         * optimize.c: Include input.h.
11811         (expand_call_inline): Use push_srcloc and pop_srcloc.
11812         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
11813         * parse.c: Regenerated.
11814         * Makefile.in (lex.o): Depend on input.h.
11815         (optimize.o): Likewise.
11816
11817 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
11818
11819         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
11820         function type, rather than ICE.
11821
11822 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
11823
11824         * decl.c (grokdeclarator): Call decl_type_access_control.
11825         * parse.y (parse_end_decl): Don't call decl_type_access_control if
11826         decl is null.
11827
11828 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
11829
11830         * decl.c (decls_match): Remove obsolete static member nadgering.
11831
11832 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11833
11834         * decl.c (grokdeclarator): Change ANSI to ISO.
11835         * lex.c (consume_string, readescape, do_identifier): Likewise.
11836         (parse_float, real_yylex): Likewise.
11837         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
11838         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
11839         new_type_id, maybe_label_decls, simple_stmt,
11840         for.init.statement): Likewise.
11841         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
11842         * semantics.c (finish_named_return_value): Likewise.
11843         * parse.c: Regenerate.
11844
11845 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
11846
11847         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
11848         (CPTI_CLASS_STAR_TYPE): Remove.
11849         (vtable_index_type): Likewise.
11850         (class_star_type_node): Remove.
11851         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
11852         (build_binary_op_nodefault): Remove.
11853         * call.c (build_new_op): Use build_binary_op instead of
11854         build_binary_op_nodefault.
11855         * decl.c (init_decl_processing): Remove class_star_type_node
11856         initialization.  Make delta_type_node ptrdiff_type_node under the
11857         new ABI.  Initialize vtable_index_type.
11858         (build_ptrmemfunc_type): Build different structures for the new
11859         ABI.
11860         (build_enumerator): Use build_binary_op instead of
11861         build_binary_op_nodefault.
11862         * method.c (build_overload_value): Mangle pointers-to-members
11863         appropriately under the new ABI.
11864         * typeck.c (build_array_ref): Use build_binary_op instead of
11865         build_binary_op_nodefault.
11866         (get_member_function_from_ptrfunc): Adjust for the new ABI.
11867         (build_binary_op_nodefault): Rename to ...
11868         (build_binary_op): ... this.  Remove old version.  Adjust for
11869         pointer-to-member comparisons under the new ABI.
11870         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
11871         (build_ptrmemfunc): Adjust for the new ABI.
11872         (expand_ptrmemfunc_cst): Likewise.
11873         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
11874         (pfn_from_ptrmemfunc): Adjust for the new ABI.
11875
11876 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11877
11878         * call.c (build_object_call): Compress consecutive calls to
11879         cp_error.
11880         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
11881         (build_op_delete_call): Adjust message formatting.
11882
11883         * class.c (check_bases): Compress consecutive calls to
11884         cp_pedwarn.
11885         (finish_struct_anon): Say 'ISO C++'.
11886
11887         * decl.c (start_decl): Same here.
11888         (grok_reference_init): Likewise.
11889         (grokfndecl): Correct message formatting.
11890         (grokfndecl): Improve diagnostic.
11891         (check_static_variable_definition): Likewise. Say 'ISO C++'
11892         (compute_array_index_type): Say 'ISO C++'
11893         (create_array_type_for_decl): Compress consecutive calls to
11894         cp_error.
11895         (grokdeclarator): Say 'ISO C++'
11896         (grok_op_properties): Likewise.
11897
11898         * decl2.c (delete_sanity): Clairify diagnostic.
11899         (check_member_template): Same here.
11900         (grok_function_init): Use consistent terminology.
11901
11902         * expr.c (do_case): Say 'ISO C++'
11903
11904         * friend.c (do_friend): Compress consecutive calls to warning.
11905
11906 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
11907
11908         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
11909         * class.c (build_secondary_vtable): Reorganize.  Don't create a
11910         new vtable under the new ABI.
11911         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
11912         computing the size.
11913         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
11914         the initializing elements.
11915         (initialize_vtable): New function.
11916         (dfs_finish_vtbls): Use it.
11917         (dfs_accumulate_vtbl_inits): New function.
11918         (finish_vtbls): Merge primary and secondary vtables under the new
11919         ABI.
11920         (finish_struct_1): Remove redundant call to layout_vtable_decl.
11921         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
11922         aren't VAR_DECLs.
11923
11924         * class.c (build_vtable): New function, split out from ...
11925         (get_vtable_decl): ... here, and ...
11926         (build_secondary_vtable): ... here.
11927
11928         * pt.c (tsubst_decl): Fix formatting.
11929
11930 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11931
11932         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
11933         (avoid_overlap, build_base_field): Likewise.
11934         (build_base_field, build_base_fields, is_empty_class):
11935         Test DECL_SIZE with integer_zero.
11936         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
11937         * cp-tree.h (struct lang_type): New field size_unit.
11938         (CLASSTYPE_SIZE_UNIT): New macro.
11939         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
11940         (cp_finish_decl): Delete -Wlarger-than processing.
11941         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
11942         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
11943         * tree.c (make_binfo): binfo vector is one entry longer.
11944         (walk_tree): Walk DECL_SIZE_UNIT.
11945
11946 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
11947
11948         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
11949         comment.
11950         (build_vtable_entry): Don't assume all vtable entries are
11951         functions.
11952         (build_vtbl_initializer): Adjust accordingly.
11953         (get_vtable_decl): Fix formatting.
11954
11955 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
11956
11957         * semantics.c (deferred_type_access_control): Walk the entire
11958         type_lookups list.
11959         (save_type_access_control): Rename from
11960         initial_deferred_type_access_control.  Just remember the value.
11961         (decl_type_access_control): New fn.
11962         (begin_function_definition): Use deferred_type_access_control, after
11963         we've started the function.  Set type_lookups to error_mark_node.
11964         * parse.y (frob_specs, fn.def1): Adjust.
11965         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
11966         (parse_end_decl, parse_bitfield0, parse_method): New fns.
11967         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
11968         (after_type_component_declarator0): Likewise.
11969         (after_type_component_declarator): Likewise.
11970         (notype_component_declarator): Likewise.
11971         * cp-tree.h: Adjust.
11972
11973         * decl.c (redeclaration_error_message): Allow redeclaration of
11974         namespace-scope decls.
11975
11976 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11977
11978         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
11979
11980 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
11981
11982         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
11983         * decl2.c (grokclassfn): Likewise.
11984
11985         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
11986
11987         * decl2.c (lang_decode_option): Don't set default message length
11988         here.
11989         * lex.c (lang_init_options): Set it here.
11990
11991 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
11992
11993         Make DECL_CONTEXT mean the class in which a member function was
11994         declared, even for a virtual function.
11995         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
11996         (DECL_FRIEND_CONTEXT): New macro.
11997         (DECL_REAL_CONTEXT): Remove.
11998         (SET_DECL_FRIEND_CONTEXT): Likewise.
11999         (DECL_VIRTUAL_CONTEXT): Adjust.
12000         (DECL_CLASS_SCOPE_P): Use TYPE_P.
12001         (add_friends): Remove.
12002         (hack_decl_function_context): Likewise.
12003         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
12004         CP_DECL_CONTEXT.
12005         (build_over_call): Fix indentation.  Use DECL_CONTEXT
12006         instead of DECL_CLASS_CONTEXT.
12007         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
12008         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
12009         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12010         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
12011         (build_base_field): Likewise.
12012         (finish_struct_1): Likewise.
12013         (build_self_reference): Likewise.
12014         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
12015         DECL_REAL_CONTEXT.
12016         (pushtag): Use decl_function_context, not
12017         hack_decl_function_context.
12018         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
12019         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
12020         (pushdecl): Remove bogus code.
12021         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
12022         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
12023         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12024         Use decl_function_context, nothack_decl_function_context.
12025         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
12026         (grokdeclarator): Likewise.  Use decl_function_context, not
12027         hack_decl_function_context.
12028         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
12029         (start_function): Use DECL_FRIEND_CONTEXT, not
12030         DECL_CLASS_CONTEXT.  Use decl_function_context, not
12031         hack_decl_function_context.
12032         (finish_function): Use decl_function_context, not
12033         hack_decl_function_context.
12034         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
12035         DECL_CLASS_CONTEXT.
12036         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
12037         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
12038         (grokfield): Likewise.
12039         (finish_builtin_type): Likewise.
12040         (finish_vtable_vardec): Use decl_function_context, not
12041         hack_decl_function_context.
12042         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12043         (start_static_initialization_or_destruction): Likewise.
12044         (finish_static_initialization_or_destruction): Likewise.
12045         (mark_used): Adjust logic for deciding when to synthesize methods.
12046         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
12047         DECL_REAL_CONTEXT.
12048         * error.c (dump_function_decl): Use DECL_CONTEXT, not
12049         DECL_CLASS_CONTEXT.
12050         * friend.c (is_friend): Likewise.
12051         (add_friends): Remove.
12052         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
12053         * lex.c (begin_definition_of_inclass_inline): Use
12054         decl_function_context, not hack_decl_function_context.
12055         (process_next_inline): Likewise.
12056         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
12057         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
12058         DECL_CLASSS_CONTEXT.
12059         (hack_identifier): Likewise.
12060         (synthesize_method):  Use decl_function_context, not
12061         hack_decl_function_context.
12062         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
12063         DECL_REAL_CONTEXT.
12064         (is_member_template): Use decl_function_context, not
12065         hack_decl_function_context.  Use DECL_CONTEXT, not
12066         DECL_CLASS_CONTEXT.
12067         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
12068         DECL_CLASS_CONTEXT.
12069         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
12070         DECL_REAL_CONTEXT.
12071         (push_template_decl_real): Likewise.
12072         (instantiate_class_template): Don't call add_friends.
12073         (tsubst_default_argument): Use DECL_CONTEXT, not
12074         DECL_REAL_CONTEXT.
12075         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
12076         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12077         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
12078         DECL_CLASS_CONTEXT.
12079         * repo.c (repo_inline_used): Likewise.
12080         * search.c (current_scope): Adjust for new _CONTEXT macros.
12081         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
12082         DECL_REAL_CONTEXT.
12083         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12084         (lookup_fnfields_here):Likewise.
12085         (check_final_overrider): Likewise.
12086         (init_vbase_pointers): Likewise.
12087         (virtual_context): Likewise.
12088         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
12089         (expand_body): Use decl_function_context, not
12090         hack_decl_function_context.
12091         * tree.c (hack_decl_function_context): Remove.
12092         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
12093         DECL_CLASS_CONTEXT.
12094         * typeck2.c (error_not_base_type): Likewise.
12095
12096 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
12097
12098         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
12099
12100 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12101
12102         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
12103
12104 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
12105
12106         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
12107
12108 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
12109
12110         * decl2.c (lang_decode_option): Enable automatic line wrapping.
12111
12112 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
12113
12114         * parse.y (frob_specs): Split out...
12115         (parse_decl): From here.
12116         (fn.def2): Call initial_deferred_type_access_control.
12117         (after_type_component_declarator0): Call frob_specs.
12118         (notype_component_declarator0): Likewise.
12119         * search.c (friend_accessible_p): Nested classes are friends of their
12120         enclosing classes.
12121
12122 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
12123
12124         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
12125         used to create an implicit temporary.
12126
12127         * class.c (dfs_modify_vtables): Tweak calculation of functions to
12128         override.
12129
12130 2000-02-08  Nathan Sidwell  <nathan@acm.org>
12131
12132         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
12133         strip array element qualifiers too.
12134
12135 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
12136
12137         * decl.c (store_parm_decls): Don't build cleanups for parameters
12138         while processing_template_decl.
12139
12140 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
12141
12142         * cp-tree.h (struct saved_scope): Add incomplete field.
12143         (namespace_scope_incomplete): New macro.
12144         * decl.c (pushdecl): Use it.
12145         (hack_incomplete_structures): Use it.  See through artificial
12146         binding levels.
12147         (mark_saved_scope): Mark it.
12148
12149         Implement access control for nested types.
12150         * search.c (type_access_control): New fn.
12151         (accessible_p): Now we do perform access control for types.
12152         * semantics.c (deferred_type_access_control): New fn.
12153         (initial_deferred_type_access_control): New fn.
12154         (begin_function_definition): Call it.  Add lookups parm.
12155         * decl.c (struct binding_level): Add this_class field.
12156         (pushlevel_class): Set it.
12157         (mark_binding_level): Mark it.
12158         (lookup_name_real): Use it.  Call type_access_control.
12159         (mark_saved_scope): Mark lookups field.
12160         * cp-tree.h (flagged_type_tree): Add lookups field.
12161         (struct saved_scope): Add lookups field.
12162         (type_lookups): New macro.
12163         * parse.y (declmods): Now <ftype>.
12164         (parse_decl): Add lookups parm.  Call
12165         initial_deferred_type_access_control.
12166         (lang_extdef): Clear type_lookups.
12167         (typed_declspecs, declmods, typespec): Set lookups field.
12168         (initdcl): Call deferred_type_access_control.
12169         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
12170         component_decl_1, named_parm): Adjust.
12171         * friend.c (is_friend): Nested classes are friends of their
12172         enclosing classes.
12173
12174         * class.c (currently_open_derived_class): New fn.
12175         * method.c (hack_identifier): Use it.
12176
12177         * lex.c (do_identifier): Remove obsolete code.
12178
12179         * parse.y (typed_typespecs): Propagate new_type_flag properly.
12180
12181 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
12182
12183         * tinfo.h: Remove apostrophes from C++ comment (xgettext
12184         thinks this file is plain C).
12185
12186 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12187
12188         * Makefile.in (call.o): Depend on $(EXPR_H).
12189
12190         * call.c: Include "expr.h".
12191
12192         * class.c (dump_class_hierarchy): Add prototype.
12193
12194         * search.c (dfs_get_pure_virtuals): Likewise.
12195
12196 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
12197
12198         * parse.y (simple_stmt): Allow :: token in asm parameter list.
12199         * parse.c: Rebuilt.
12200
12201 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
12202
12203         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
12204         Store it in DECL_FCONTEXT.
12205         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
12206
12207 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
12208
12209         * tinfo.h (old abi): #include "tconfig.h".
12210         * tinfo.cc (convert_to_base): Move into old abi section.
12211
12212 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
12213
12214         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
12215         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
12216         (BINFO_PRIMARY_BINFO): New macro.
12217         (BF_DELTA): Rename to ...
12218         (BV_DELTA): ... this.
12219         (BF_VCALL_INDEX): Rename to ...
12220         (BV_VCALL_INDEX): ... this.
12221         (BF_FN): Rename to ...
12222         (BV_FN): ... this.
12223         * class.c (build_vbase_path): Adjust for changes to reverse_path.
12224         (set_rtti_entry): Rename BF_ macros to BV_ variants.
12225         (modify_vtable_entry): Simplify.
12226         (add_virtual_function): Rename BF_ macros to BV_ variants.
12227         (build_vtable_initializer): Likewise.
12228         (get_class_offset_1): Remove.
12229         (dfs_get_class_offset): Likewise.
12230         (get_class_offset): Likewise.
12231         (dfs_find_final_overrider): New function.
12232         (find_final_overrider): Likewise.
12233         (modify_one_vtable): Remove.
12234         (dfs_find_base): New function.
12235         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
12236         find_final_overrider.
12237         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
12238         virtuals.
12239         (dfs_fixup_vtable_deltas): Remove.
12240         (override_one_vtable): Remove.
12241         (merge_overrides): Likewise.
12242         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
12243         unreal chilren of virtual bases.
12244         (finish_struct_1): Don't use merge_overrides.  Don't use
12245         dfs_fixup_vtable_deltas.
12246         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
12247         BINFOs.
12248
12249 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
12250             Jason Merrill  <jason@yorick.cygnus.com>
12251
12252         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
12253
12254 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
12255
12256         * exception.cc (__throw_bad_typeid): Add missing std::.
12257
12258 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12259
12260         * cp-tree.h (make_thunk): PROTO -> PARAMS.
12261
12262 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
12263
12264         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
12265
12266         Runtime support for new-abi rtti.
12267         * inc/typeinfo (type_info::operator!=): Define in class.
12268         (type_info::before, type_info::name, type_info::operator==,
12269         type_info::operator!=): Define new ABI implementations.
12270         (type_info::is_pointer_p, type_info::is_function_p): Declare
12271         new virtual functions.
12272         (type_info::do_catch, type_info::do_upcast): Likewise.
12273
12274         * tinfo.h (__base_class_info): Define new class.
12275         (__class_type_info): Likewise.
12276         (__si_class_type_info): Likewise.
12277         (__vmi_class_type_info): Likewise.
12278         (__dynamic_cast): Prototype.
12279
12280         * tinfo.cc: Conditionalize old and new rtti mechanisms.
12281         (type_info::is_pointer_p): Define new function.
12282         (type_info::is_function_p): Likewise.
12283         (type_info::do_catch): Likewise.
12284         (type_info::do_upcast): Likewise.
12285         (vtable_prefix): New structure for vtable access.
12286         (adjust_pointer): Define new template function.
12287         (contained_p, public_p, virtual_p, contained_public_p,
12288         contained_nonpublic_p, contained_nonvirtual_p): Define new
12289         functions.
12290         (nonvirtual_base_type): New local variable.
12291         (__class_type_info::~__class_type_info): Define.
12292         (__si_class_type_info::~__si_class_type_info): Likewise.
12293         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
12294         (__class_type_info::do_catch): Define new function.
12295         (__class_type_info::do_upcast): Likewise.
12296         (__class_type_info::find_public_src): Likewise.
12297         (__class_type_info::do_find_public_src): Likewise.
12298         (__si_class_type_info::do_find_public_src): Likewise.
12299         (__vmi_class_type_info::do_find_public_src): Likewise.
12300         (__class_type_info::do_dyncast): Likewise.
12301         (__si_class_type_info::do_dyncast): Likewise.
12302         (__vmi_class_type_info::do_dyncast): Likewise.
12303         (__class_type_info::do_upcast): Likewise.
12304         (__si_class_type_info::do_upcast): Likewise.
12305         (__vmi_class_type_info::do_upcast): Likewise.
12306         (__dynamic_cast): Likewise.
12307
12308         * tinfo2.cc (__fundamental_type_info): Define new class.
12309         (__pointer_type_info): Likewise.
12310         (__reference_type_info): Likewise.
12311         (__array_type_info): Likewise.
12312         (__function_type_info): Likewise.
12313         (__enum_type_info): Likewise.
12314         (__ptr_to_member_type_info): Likewise.
12315         (__fundamental_type_info::~__fundamental_type_info): Define.
12316         (__pointer_type_info::~__pointer_type_info): Likewise.
12317         (__reference_type_info::~__reference_type_info): Likewise.
12318         (__array_type_info::~__array_type_info): Likewise.
12319         (__function_type_info::~__function_type_info): Likewise.
12320         (__enum_type_info::~__enum_type_info): Likewise.
12321         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
12322         (__pointer_type_info::do_catch): Define new function.
12323         (__ptr_to_member_type_info::do_catch): Define new function.
12324
12325         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
12326         (__is_pointer): Likewise.
12327
12328         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
12329
12330 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
12331
12332         * cp/class.c (build_vtable): Rename to build_primary_vtable.
12333         (prepare_fresh_vtable): Rename to build_secondary_vtable.
12334         (make_new_vtable): New function.
12335         (modify_vtable_entry): Handle generation of new vtables correctly.
12336         (modify_one_vtable): Remove unused parameter.
12337         (dfs_fixup_vtable_deltas): Likewise.
12338         (override_one_vtable): Use build_secondary_vtable.
12339         (finish_struct_1): Use build_primary_vtable and
12340         build_secondary_vtable.
12341
12342 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
12343
12344         * cp/decl.c: Adjust variable names, comments, help strings.
12345
12346 2000-01-29  Nathan Sidwell  <nathan@acm.org>
12347
12348         * new2.cc (operator delete[]): Use operator delete, don't assume
12349         implementation.
12350
12351 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
12352
12353         * class.c (build_vtbl_initializer): Add argument to
12354         build_vtable_entry call.
12355
12356 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
12357
12358         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
12359         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
12360         (BF_DELTA): New macro.
12361         (BF_VCALL_INDEX): Likewise.
12362         (BF_FN): Likewise.
12363         (THUNK_VCALL_OFFSET): Likewise.
12364         (make_thunk): Change prototype.
12365         * class.c (build_vtable_entry): Integrate
12366         build_vtable_entry_for_fn.  Handle vcall indices.
12367         (build_vtable_entry_for_fn): Remove.
12368         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
12369         BF_VCALL_INDEX, BF_FN.
12370         (modify_vtable_entry): Integrate common code from
12371         modify_one_vtable and dfs_fixup_vtable_deltas.
12372         (add_virtual_function): Set BF_VCALL_INDEX.
12373         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
12374         and BF_FN.
12375         (modify_one_vtable): Simplify.
12376         (dfs_fixup_vtable_deltas): Likewise.
12377         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
12378         * method.c (make_thunk): Handle vcall indices.
12379
12380 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
12381
12382         Compiler side new abi rtti (not enabled).
12383         * cp-tree.h (new_abi_rtti_p): New macro.
12384         (emit_support_tinfos): Prototype new function.
12385         (tinfo_decl_p): Likewise.
12386         (emit_tinfo_decl): Likwise.
12387         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
12388         macros.
12389         (doing_runtime): New local static.
12390         (init_rtti_processing): Add new-abi initializer.
12391         (get_tinfo_decl): Add new-abi logic.
12392         (tinfo_from_decl): Likewise.
12393         (build_dynamic_cast_1): Likewise.
12394         (qualifier_flags): New static function.
12395         (tinfo_base_init): Likewise.
12396         (generic_initializer): Likewise.
12397         (ptr_ref_initializer): Likewise.
12398         (ptmd_initializer): Likewise.
12399         (class_hint_flags): Likewise.
12400         (class_initializer): Likewise.
12401         (synthesize_tinfo_var): Likewise.
12402         (create_real_tinfo_var): Likewise.
12403         (create_pseudo_type_info): Likewise.
12404         (get_vmi_pseudo_type_info): Likewise.
12405         (create_tinfo_types): Likewise.
12406         (emit_support_tinfos): New global function.
12407         (tinfo_decl_p): New global predicate.
12408         (emit_tinfo_decl): New global function.
12409         * class.c (set_rtti_entry): Generalize for old and new rtti.
12410         (build_vtbl_initializer): Likewise.
12411         * decl2.c (finish_file): Likewise.
12412
12413 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
12414
12415         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
12416         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
12417
12418 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
12419
12420         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
12421         for scopes.
12422
12423 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
12424
12425         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
12426
12427 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
12428
12429         * optimize.c (calls_setjmp_r): Supply new argument
12430         to special_function_p.
12431
12432 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12433
12434         * call.c: PROTO -> PARAMS.
12435         * class.c: Likewise.
12436         * cp-tree.h: Likewise.
12437         * cvt.c: Likewise.
12438         * decl.c: Likewise.
12439         * decl.h: Likewise.
12440         * decl2.c: Likewise.
12441         * dump.c: Likewise.
12442         * errfn.c: Likewise.
12443         * error.c: Likewise.
12444         * except.c: Likewise.
12445         * expr.c: Likewise.
12446         * init.c: Likewise.
12447         * input.c: Likewise.
12448         * lex.c: Likewise.
12449         * lex.h: Likewise.
12450         * method.c: Likewise.
12451         * optimize.c: Likewise.
12452         * parse.y: Likewise.
12453         * pt.c: Likewise.
12454         * repo.c: Likewise.
12455         * rtti.c: Likewise.
12456         * search.c: Likewise.
12457         * semantics.c: Likewise.
12458         * spew.c: Likewise.
12459         * tree.c: Likewise.
12460         * typeck.c: Likewise.
12461         * typeck2.c: Likewise.
12462         * xref.c: Likewise.
12463
12464 2000-01-25  Richard Henderson  <rth@cygnus.com>
12465
12466         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
12467
12468 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
12469
12470         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
12471         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
12472         (struct vcall_offset_data_s): New type.
12473         (dfs_vcall_offset_queue_p): New function.
12474         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12475         (build_vcall_offset_vtbl_entries): Likewise.
12476         (layout_vtable_decl): Likewise.
12477         (num_vfun_entries): Likewise.
12478         (num_extra_vtbl_entries): Add the entries for vcall offsets.
12479         (build_vtbl_initializer): Likewise.
12480         (dfs_finish_vtabls): Use layout_vtable_decl.
12481         (modify_one_vtables): Always duplicate vtables under the new ABI.
12482         (finish_struct_1): Use layout_vtable_decl.
12483
12484 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12485
12486         * decl.c (member_function_or_else): Change third arg from a format
12487         specifier to an `enum overload_flags'.  Callers changed.
12488
12489 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12490
12491         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
12492         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
12493         build_const_cast, get_delta_difference, check_return_expr): Avoid
12494         ANSI string concatenation usage.
12495
12496 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
12497
12498         * class.c (layout_class_type): Put the fields required to make a
12499         class non-empty at the end, not the beginning, of the TYPE_FIELDs
12500         list.
12501
12502 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
12503
12504         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
12505         template.
12506
12507         * decl2.c (mark_used): Do instantiate inlines that have been
12508         explicitly instantiated.
12509
12510 2000-01-24  Richard Henderson  <rth@cygnus.com>
12511
12512         * call.c (build_over_call): Use expand_tree_builtin.
12513         * typeck.c (build_function_call_real): Likewise.
12514         (build_binary_op_nodefault): Handle unordered compares.
12515
12516 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12517
12518         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
12519         cp_tree_index values.
12520         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
12521         New global node #defines for them.
12522         * rtti.c (call_void_fn): Replace with ...
12523         (build_runtime_decl): ... new static function.
12524         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
12525         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
12526         (build_dynamic_cast_1): Always produce correctly typed result.
12527         Explicitly produce type_info addresses. Use dynamic_cast_node.
12528         * exception.cc (__throw_bad_cast): Return `void *'.
12529         (__throw_bad_typeid): Return `const type_info &'.
12530
12531 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12532
12533         * cp-tree.h (get_vtable_decl): Prototype new function.
12534         * class.c (get_vtable_decl): New function. Broken out from ...
12535         (build_vtable): ... here. Use it.
12536         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
12537         by get_vtable_decl.
12538
12539 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12540
12541         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
12542         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
12543         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
12544         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
12545         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
12546         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
12547         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
12548         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
12549         (CPTI_TINFO_VAR_ID): New enumeration.
12550         (__tp_desc_type_node, __access_mode_type_node,
12551         __bltn_desc_type_node, __user_desc_type_node,
12552         __class_desc_type_node, __ptr_desc_type_node,
12553         __attr_desc_type_node, __func_desc_type_node,
12554         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
12555         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
12556         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
12557         enum_desc_type_node, class_desc_type_node,
12558         si_class_desc_type_node, vmi_class_desc_type_node,
12559         ptmd_desc_type_node, base_desc_type_node): New #defines.
12560         (tinfo_fn_id, tinfo_fn_type): Rename to ...
12561         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
12562         (tinfo_var_id): New enumeration.
12563         (DECL_TINFO_FN_P): Augment comment.
12564         * decl.c (cp_global_trees): Adjust documentation.
12565         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
12566         tinfo_decl_type and tinfo_var_id.
12567         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
12568         (build_typeid): Remove unused variable.
12569         (get_tinfo_var): Use tinfo_var_id.
12570         (tinfo_name): New static function.
12571         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
12572         (tinfo_from_decl): Likewise.
12573         (get_base_offset): New static function, broken out of
12574         expand_class_desc.
12575         (expand_si_desc): Use tinfo_name.
12576         (expand_class_desc): Likewise. Lose local static variable.
12577         Use base_desc_type_node. Use get_base_offset.
12578         (expand_ptr_desc): Use tinfo_name.
12579         (expand_attr_desc): Likewise.
12580         (expand_generic_desc): Likewise.
12581
12582         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
12583         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
12584
12585 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
12586
12587         * cp-tree.h (__eprintf): Remove declaration.
12588         * tree.c (__eprintf): Remove definition.
12589
12590 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
12591             Mark Mitchell  <mark@codesourcery.com>
12592
12593         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
12594         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
12595
12596 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
12597
12598         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
12599
12600 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
12601
12602         * cp-tree.h (register_dtor_fn): New function.
12603         * decl.c (destroy_local_static): Rename to ...
12604         (register_dtor_fn): ... this.  Give it external linkage.
12605         (expand_static_init): Use it.
12606         * decl2.c (do_static_initialization): Likewise, if using
12607         __cxa_atexit.
12608         (do_static_destruction): Check that __cxa_atexit is not in use.
12609         (finish_file): Don't call do_static_destruction if using
12610         __cxa_atexit.
12611
12612         * typeck.c (convert_arguments): Restore two-message error
12613         reporting.
12614
12615 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
12616
12617         Remap dynamic cast hint values to be consistent across ABIs.
12618         * search.c (dynamic_cast_base_recurse): Remap generated value.
12619         (get_dynamic_cast_base_type): Adjust documentation.
12620         * tinfo.h (__user_type_info::dyncast): Likewise.
12621         (__user_type_info::find_public_subobj): Remap BOFF meaning.
12622         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
12623         (__class_type_info::do_dyncast): Likewise.
12624         (__class_type_info::do_find_public_subobj): Likewise.
12625         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
12626
12627 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
12628
12629         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
12630
12631         * typeck2.c (incomplete_type_error): Restore previous
12632         cp_error and cp_error_at call sequence.
12633
12634 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
12635
12636         * class.c (dump_class_hierarchy): Make format agree with argument;
12637         cast pointer to unsigned long and print with %lx.
12638
12639 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
12640
12641         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
12642
12643         * typeck.c (composite_pointer_type, common_type,
12644         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
12645         build_function_call_real, convert_arguments,
12646         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
12647         build_unary_op, mark_addressable, build_compound_expr,
12648         build_static_cast, build_reinterpret_cast, build_const_cast,
12649         build_c_cast, build_modify_expr, get_delta_difference,
12650         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
12651         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
12652         into a single one.
12653         * typeck2.c (readonly_error, abstract_virtuals_error,
12654         process_init_constructor, check_for_new_type): Likewise.
12655
12656 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
12657
12658         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
12659         VAR_DECLs.
12660
12661 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
12662
12663         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
12664         (build_x_typeid): Likewise.
12665         (get_tinfo_fn): Likewise.
12666         (get_tinfo_fn_unused): Rename to ...
12667         (get_tinfo_decl): ... here.
12668         * rtti.c (build_headof): Replace logic error with assertion.
12669         (get_tinfo_fn_dynamic): Rename to ...
12670         (get_tinfo_decl_dynamic): ... here. Make static. Use
12671         complete_type_or_else.
12672         (build_x_typeid): Move into ...
12673         (build_typeid): ... here. Adjust call to
12674         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
12675         throw_bad_typeid expression.
12676         (get_tinfo_fn_unused): Rename to ...
12677         (get_tinfo_decl): ... here. Adjust comment.
12678         (get_tinfo_fn): Delete.
12679         (tinfo_from_decl): New static function.
12680         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
12681         (get_typeid): Use complete_type_or_else.
12682         (build_dynamic_cast_1): Adjust calls to
12683         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
12684         * parse.y (primary): Adjust call to build_typeid.
12685         * except.c (build_eh_type_type_ref): Adjust call to
12686         get_tinfo_decl. Mark as used.
12687         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
12688         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
12689         * parse.c: Regenerated.
12690
12691 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
12692
12693         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
12694         calling convention.
12695         (resolves_to_fixed_type_p): Document calling convention.
12696         * rtti.c (build_x_typeid): Initialize NONNULL.
12697
12698         * cp-tree.h (build_shared_int_cst): New function.
12699         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
12700         * class.c (modify_vtable_entry): Likewise.
12701         (add_virtual_function): Split out code to generated shared
12702         INTEGER_CSTs to build_share_int_cst.
12703         (modify_all_vtables): Handle all the overridden functions here.
12704         Add overridden functions from non-primary virtual bases to the
12705         primary vtable.
12706         (finish_struct_1): Adjust call to modify_all_vtables.  Add
12707         overridden functions from non-primary bases to the vtable.
12708         * tree.c (build_shared_int_cst): New function.
12709
12710         * cp-tree.h (scratchalloc): Remove.
12711         (build_scratch_list): Likewise.
12712         * call.c (convert_class_to_reference): Replace build_scratch_list
12713         and build_expr_list with build_tree_list.
12714         (add_candidate): Replace scratchalloc with expralloc.  Note memory
12715         leak.
12716         (build_user_type_conversion_1):  Replace build_scratch_list
12717         and build_expr_list with build_tree_list.
12718         (build_new_op): Likewise.
12719         (build_op_delete_call): Likewise.
12720         (convert_like): Likewise.
12721         * cvt.c (ocp_convert): Likewise.
12722         * decl.c (start_decl): Likewise.
12723         (start_function): Likewise.
12724         (finish_destructor_body): Likewise.
12725         (maybe_build_cleanup_1): Likewise.
12726         * decl2.c (reparse_decl_as_expr): Likewise.
12727         * init.c (perform_member_init): Likewise.
12728         (expand_cleanup_for_base): Likewise.
12729         (build_builtin_delete_call): Likewise.
12730         (build_new_1): Likewise.
12731         (build_delete): Likewise.
12732         * method.c (do_build_assign_ref): Likewise.
12733         * parse.y (already_scoped_stmt): Likewise.
12734         (nontrivial_exprlist): Likewise.
12735         (net_initializer): Likewise.
12736         (initlist): Likewise.
12737         * parse.c: Regenerated.
12738         * rtti.c (build_x_typeid): Likewise.
12739         (build_dynamic_cast_1): Likewise.
12740         * typeck.c (build_x_compound_expr): Likewise.
12741         (build_static_cast): Likewise.
12742         (build_modify_expr): Likewise.
12743
12744         * cp-tree.h (DECL_VINDEX): Add documentation.
12745         * class.c (build_vtable_entry): Likewise.
12746         (start_vtable): Add comment.
12747         (add_virtual_function): Replace pending_hard_virtuals with
12748         overridden_virtuals and pending_virtuals with new_virtuals.
12749         Replace redundant assignments with assertions.
12750         (check_for_override): Add comment.
12751         (check_bases_and_members): Replace pending_hard_virtuals with
12752         overridden_virtuals and pending_virtuals with new_virtuals.
12753         (create_vtbl_ptr): Likewise.
12754         (layout_class_type): Likewise.
12755         (finish_struct_1): Likewise.  Add comments.
12756
12757 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
12758
12759         * class.c (finish_struct_1): Replace redundant code with
12760         assertions.
12761
12762         * cp-tree.h (flag_new_abi): Move.
12763         (flag_use_cxa_atexit): Likewise.
12764         (flag_honor_std): Likewise.
12765         (flag_rtti): Likewise.
12766         (vbase_offsets_in_vtable_p): Define.
12767         (vptrs_present_everywhere_p): Likewise.
12768         (TYPE_CONTAINS_VPTR_P): Likewise.
12769         (dfs_walk_real): Declare.
12770         * class.c (build_vbase_pointer_fields): Check
12771         vbase_offsets_in_vtable_p.
12772         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
12773         BINFO_VPTR_FIELD.
12774         (build_vbase_offset_vtbl_entries): Simplify.
12775         (build_vbase_offset_vtbl_entries): Adjust.
12776         (build_vbase_pointer): Add ability to look up vbase offsets in
12777         vtable.
12778         (start_vtable): New function.
12779         (add_virtual_function): Use it.
12780         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
12781         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
12782         (build_vtbl_initializer): Take the type of the complete object as
12783         input.  Use it to correctly calculate vbase offsets.
12784         (dfs_finish_vtbls): Pass the complete type to
12785         build_vtbl_initializer.
12786         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
12787         (create_vtable_ptr): Create a vtable even if there are no
12788         new virtual functions, under the new ABI.
12789         (finish_struct_1): Likewise.
12790         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
12791         * decl.c (exapnd_static_init): Remove call to
12792         preserve_initializer.
12793         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
12794         vtables.
12795         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
12796         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
12797         (construct_virtual_bases): Don't initialize virtual base pointers
12798         under the new ABI.
12799         (build_aggr_init): Clean up comment.
12800         (expand_aggr_init_1): Likewise.
12801         * rtti.c (expand_class_desc): Store the virtual function table
12802         index where the vbase offset lives in the offset field.
12803         * search.c (dfs_walk_real): Make it global.
12804         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
12805         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
12806
12807         * tinfo.h (USItype): Make it signed under the new ABI.
12808         * tinfo.cc (convert_to_base): New function.  Encapsulate base
12809         conversion logic here.
12810         (__class_type_info::do_upcast): Use it.
12811         (__class_type_info::do_dyncast): Likewise.
12812         (__class_type_info::do_find_public_subobj): Likewise.
12813
12814         * init.c (construct_virtual_bases): Don't look up the addresses of
12815         virtual bases at run-time.
12816
12817         * class.c (build_vbase_pointer): Relocate.
12818         (build_vbase_pointer_fields): Likewise.
12819         (dfs_build_vbase_offset_vtbl_entries): Likewise.
12820         (build_vbase_offset_vtbl_entries): Likewise.
12821
12822         * decl.c (init_decl_processing): Complain if -fnew-abi
12823         -fno-vtable-thunks is used.
12824
12825         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
12826         flag_new_abi.
12827
12828 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
12829
12830         * cp-tree.h (num_extra_vtbl_entries): New function.
12831         (size_extra_vtbl_entries): Likewise.
12832         (dfs_vtable_path_unmark): Likewise.
12833         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
12834         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
12835         * class.c (num_extra_vtbl_entries): New function.
12836         (size_extra_vtbl_entries): Likewise.
12837         (dfs_build_vbase_offset_vtbl_entries): New function.
12838         (build_vbase_offset_vtbl_entries): Likewise.
12839         (build_vtbl_initializer): Use it.
12840         (finish_struct_1): Adjust vtable sizes (using
12841         num_extra_vtbl_entries).
12842         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
12843         THUNK_DECL is non-NULL before expanding it.
12844         * init.c (expand_virtual_init): Adjust the vtable pointer by
12845         size_extra_vtbl_entries before storing it.
12846         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
12847         Handle TREE_LIST parameters here, not in the dfs_* functions.
12848         (dfs_unmarked_real_bases_queue_p): Adjust.
12849         (dfs_marked_real_bases_queue_p): Likewise.
12850         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
12851         (dfs_vtable_path_marked_real_bases_queue_p): New function.
12852         (dfs_vtable_path_unmark): Likewise.
12853
12854 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
12855
12856         * optimize.c (copy_body_r): Clear the operand three of a
12857         TARGET_EXPR when copying it.
12858
12859 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12860
12861         * method.c (build_decl_overload_real): Check whether we are in ::
12862         before returning __builtin_new/delete.
12863
12864 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
12865
12866         * pt.c (tsubst_friend_function): Improve comment.
12867         (instantiate_decl): Avoid crashing when a "nested" function is
12868         instantiated from the top level.
12869
12870         * dump.c (dqeueue_and_dump): Dump
12871         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
12872
12873 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12874
12875         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
12876
12877 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
12878
12879         * g++spec.c (lang_specific_driver): Add -fnew-abi if
12880         ENABLE_NEW_GXX_ABI defined.
12881         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
12882         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
12883         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
12884
12885 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
12886
12887         * decl.c (start_cleanup_fn): Call pushdecl.
12888
12889         * call.c (convert_class_to_reference): Fix typos.
12890         (build_conditional_expr): Handle errors gracefully.
12891         * class.c (push_nested_class): Likewise.
12892         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
12893         (DECL_THIS_EXTERN): Use it.
12894         (DECL_THIS_STATIC): Likewise.
12895         * cvt.c (convert_to_void): Handle errors gracefully.
12896         (build_expr_type_conversion): Likewise.
12897         * decl.c (maybe_push_decl): Likewise.
12898         (start_decl_1): Likewise.
12899         (require_complete_types_for_parms): Likewise.
12900         * parse.y (structsp): Likewise.
12901         (base_class): Likewise.
12902         * parse.c: Regenerated.
12903         * pt.c (finish_member_template_decl): Likewise.
12904         * typeck.c (decay_conversion): Likewise.
12905
12906         * cp-tree.h (dfs_skip_vbases): New function.
12907         (find_vbase_instance): Likewise.
12908         * class.c (determine_primary_base): Allow a nearly empty base to
12909         serve as a primary base class under the new ABI.
12910         (get_class_offset_1): Rename to ...
12911         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
12912         messages here.
12913         (get_class_offset): Use it.  Issue error messages here.
12914         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
12915         find the right copies of virtual bases.
12916         (fixup_vtable_deltas1): Rename to ...
12917         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
12918         bases as primary bases.
12919         (fixup_vtable_deltas): Remove.
12920         (override_one_vtable): Handle virtual bases as primary bases.
12921         (merge_overrides): Likewise.
12922         (finish_struct_1): Likewise.
12923         (dump_class_hierarchy): Dump primary-ness of bases as well.
12924         * search.c (mark_primary_bases): Use a pre-order traversal to
12925         handle primary virtual bases.
12926         (dfs_skip_vbases): New fiunction.
12927         (expand_upcast_fixups): Adjust to handle primary virtual bases.
12928         (fixup_virtual_upcast_offsets): Likewise.
12929         (fixup_all_virtual_upcast_offsets): Likewise.
12930         (dfs_find_vbase_instances): New function.
12931         (find_vbase_instance): Likewise.
12932
12933 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
12934
12935         * lex.c (DIR_SEPARATOR): Delete macro.
12936
12937 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12938
12939        * decl2.c (lang_decode_option): Handle automatic line wrapping
12940        option.
12941
12942 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
12943
12944         * friend.c (do_friend): Don't resolve scopes when processing
12945         template declarations, even if the qualifying scope doesn't
12946         involve template parameters.
12947
12948 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
12949
12950         * class.c (dfs_modify_vtables_queue_p): Remove.
12951         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
12952         and dfs_marked_real_bases_queue_p instead of
12953         dfs_modify_vtables_queue_p.
12954
12955         * class.c (build_vbase_path): Simplify.
12956         (dfs_propagate_binfo_offsets): New function.
12957         (propagate_binfo_offsets): Use it.
12958         (remove_base_field): Simplify.
12959         (dfs_set_offset_for_vbases): Remove.
12960         (dfs_set_offset_for_shared_vbases): New function.
12961         (dfs_set_offset_for_unshared_vbases): Likewise.
12962         (layout_virtual_bases): Use them.
12963         (layout_basetypes): Don't call propagate_binfo_offsets.
12964         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
12965         for the vbases.
12966
12967         * class.c (build_base_field): New function, split out from ...
12968         (build_base_fields): ... here.  Use it.  Allocate primary bases
12969         first, under the new ABI.
12970         (get_vtable_entry): Remove.
12971         (remove_base_field): New function, split out from ...
12972         (remove_base_fields): ... here.  Adjust since primary bases come
12973         first under the new ABI.
12974
12975         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
12976         (initialize_vtbl_ptrs): New function.
12977         (expand_indirect_vtbls_init): Change prototype.
12978         (convert_pointer_to_vbase): Declare.
12979         * init.c (expand_direct_vtbls_init): Remove.
12980         (dfs_initialize_vtbl_ptrs): New function.
12981         (initialize_vtbl_ptrs): Likewise.
12982         (emit_base_init): Use initialize_vtbl_ptrs.
12983         * search.c (convert_pointer_to_vbase): Make it global.
12984         (expand_indirect_vtbls_init): Remove vtable initialization code.
12985         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
12986
12987         * class.c (dfs_finish_vtbls): New function.
12988         (finish_vtbls): Use it.
12989         (dump_class_hierarchy): New function.
12990
12991         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
12992         (BINFO_VBASE_PRIMARY_P): New macro.
12993         (BINFO_VIRTUALS): Add to documentation.
12994         (SET_BINFO_PRIMARY_MARKED_P): Remove.
12995         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12996         (dfs_mark_primary_bases_queue_p): Likewise.
12997         (dfs_unmarked_real_bases_queue_p): New function.
12998         (dfs_marked_real_bases_queue_p): Likewise.
12999         * search.c (dfs_mark_primary_bases): Adjust.
13000         (mark_primary_bases): Likewise.
13001         (get_shared_vbase_if_not_primary): New function.
13002         (dfs_unmarked_real_bases_queue_p): Likewise.
13003         (dfs_marked_real_bases_queue_p): Likewise.
13004         (dfs_get_pure_virtuals): Simplify.
13005         (get_pure_virtuals): Likewise.
13006
13007 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13008
13009         * lex.c: Include tm_p.h.
13010
13011 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
13012
13013         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
13014
13015 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
13016
13017         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
13018         * pt.c (instantiate_decl): Defer comdat templates that might not be
13019         needed.
13020
13021         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
13022         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
13023         (finish_file): Likewise.
13024
13025         * decl2.c (import_export_class): Undo 12/14 change.
13026
13027         * error.c (dump_decl): operator new, not operatornew.
13028
13029         * class.c (field_decl_cmp): A nontype is "greater" than a type.
13030         * search.c (lookup_field_1): Look for the last field with the
13031         desired name.
13032
13033 2000-01-05  Nathan Sidwell  <nathan@acm.org>
13034
13035         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
13036         FUNCTION_DECL.
13037
13038 2000-01-05  Nathan Sidwell  <nathan@acm.org>
13039
13040         * typeck.c (build_static_cast): Don't strip target qualifiers
13041         when casting from a class.
13042
13043 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13044
13045         * class.c (warn_hidden): Initialize variable `fndecl'.
13046
13047 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
13048
13049         * decl.c (flag_isoc9x): New variable to be able to use code in
13050         c-common.c.  For now always zero.
13051
13052 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
13053
13054         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
13055         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
13056         or unshare_base_binfos for virtual bases here.
13057         * search.c (dfs_get_vbase_types): Do it here.
13058         (get_vbase_types): Adjust.
13059
13060 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
13061
13062         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
13063         (BINFO_PRIMARY_MARKED_P): Use flag 5.
13064         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
13065         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
13066         (unmark_primary_bases): Remove declaration.
13067         (unmarkedp): Declare.
13068         (dfs_vbase_unmark): Likewise.
13069         * class.c (determine_primary_base): Return immediately if there
13070         are no base classes.  Call mark_primary_bases here.
13071         (modify_all_direct_vtables): Remove.
13072         (modify_all_indirect_vtables): Remove.
13073         (dfs_modify_vtables_queue_p): New function.
13074         (dfs_modify_vtables): New function.
13075         (modify_all_vtables): Use them.
13076         (build_base_fields): Build FIELD_DECLs for primary virtual base
13077         classes.
13078         (create_vtable_ptr): Don't call determine_primary_base here.
13079         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
13080         (dfs_set_offset_for_vbases): ... this.
13081         (layout_virtual_bases): Use it.
13082         (layout_class_type): Call determine_primary_base here.
13083         * search.c (unmarkedp): Make it global.
13084         (shared_marked_p): Simplify.
13085         (shared_unmarked_p): Likewise.
13086         (dfs_primary_bases_queue_p): Remove.
13087         (dfs_unmark_primary_bases): Likewise.
13088         (unmark_primary_bases): Likewise.
13089         (mark_primary_bases): Simplify.
13090         (get_pure_virtuals): Don't call mark_primary_bases here.
13091         (dfs_vbase_unmark): New function.
13092         (get_vbase_types): Simplify.
13093
13094         * class.c (struct base_info): Remove.
13095         (determine_primary_base): Take has_virtual_p rather than a
13096         base_info as input.  Don't calculate max_has_virtual.
13097         (finish_struct_bits): Remove max_has_virtual argument.
13098         (create_vtable_ptr): Remove max_has_virtual_p argument.
13099         (layout_virtual_bases): Remove max argument.
13100         (layout_basetypes): Likewise.
13101         (layout_class_type): Remove max_has_virtual_p argument.
13102         (finish_struct_1): Remove max_has_virtual.
13103
13104         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
13105         (layout_basetypes): Remove.
13106         * class.c (propagate_binfo_offsets): Moved here from tree.c.
13107         Update to handle primary virtual bases.
13108         (remove_base_fields): New function, split out from
13109         layout_basetypes.
13110         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
13111         (layout_virtual_bases): New function, split out from
13112         layout_basetypes.  Update to handle primary virtual bases.
13113         (layout_basetypes): Moved here from tree.c.  Use
13114         remove_base_fields and layout_virtual_bases.
13115         * search.c (dfs_mark_primary_bases_queue_p): New function.
13116         (mark_primary_bases): Use it.
13117         * tree.c (CEIL): Remove.
13118         (propagate_binfo_offsets): Remove.
13119         (layout_basetypes): Remove.
13120
13121 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
13122
13123         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
13124         (BINFO_PRIMARY_MARKED_P): New macro.
13125         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
13126         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
13127         (mark_primary_bases): New function.
13128         (unmark_primary_bases): Likewise.
13129         * search.c (get_abstract_virtuals_1): Remove.
13130         (dfs_mark_primary_bases): New function.
13131         (mark_primary_bases): Likewise.
13132         (dfs_unmark_primary_bases): Likewise.
13133         (unmark_primary_bases): Likewise.
13134         (dfs_get_pure_virtuals): Likewise.
13135
13136 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
13137
13138         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
13139         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
13140         (modify_one_vtable): Adjust.
13141         (fixup_vtable_deltas1): Likewise.
13142         (override_one_vtable): Likewise.
13143         * search.c (get_abstract_virtuals_1): Likewise.
13144         (get_pure_virtuals): Likewise.
13145         (expand_upcast_fixups): Likewise.
13146         * tree.c (debug_binfo): Likewise.
13147
13148         * class.c (build_vtable): Don't return a value.  Don't rebuild
13149         vtables for bases that have already been handled.
13150         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
13151         already been handled.
13152         (modify_one_vtable): Adjust accordingly.
13153         (fixup_vtable_deltas1): Likewise.
13154         (finish_struct_1): Likewise.
13155
13156 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13157
13158         * call.c (build_new_method_call): Also check destructors.