OSDN Git Service

* rtti.c (get_base_offset): Cope when vbase field is in a base.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2
3         * rtti.c (get_base_offset): Cope when vbase field is in a base.
4
5 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6
7         * call.c (build_conditional_expr): Use VOID_TYPE_P.
8         * cvt.c (cp_convert_to_pointer): Likewise.
9         (convert_to_void): Likewise.
10         * error.c (dump_expr): Likewise.
11         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
12         * init.c (build_delete): Likewise.
13         * method.c (emit_thunk): Likewise.
14         * optmize.c (declare_return_variable): Likewise.
15         * rtti.c (get_tinfo_decl_dynamic): Likewise.
16         (get_typeid): Likewise.
17         (build_dynamic_cast_1): Likewise.
18         * typeck.c (composite_pointer_type): Likewise.
19         (common_type): Likewise.
20         (build_indirect_ref): Likewise.
21         (build_binary_op): Likewise.
22         (build_x_compound_expr): Likewise.
23         (check_return_expr): Likewise.
24         * typeck2.c (add_exception_specifier): Likewise.
25         
26         * mangle.c (write_method_parms): Use direct comparison for end
27         of parmlist.
28
29 2000-06-19  Benjamin Chelf  <chelf@cabriolet.stanford.edu>
30
31         * cp-tree.h (genrtl_try_block): Declare function.
32         (genrtl_handler): Likewise.
33         (genrtl_catch_block): Likewise.
34         (genrtl_ctor_stmt): Likewise.
35         (genrtl_subobject): Likewise.
36         (genrtl_decl_cleanup): Likewise.
37         (genrtl_do_poplevel): Likewise.
38         (genrtl_do_pushlevel): Likewise.
39         (genrtl_clear_out_block): Likewise.
40         (genrtl_goto_stmt): Likewise.
41         (genrtl_expr_stmt): Likewise.
42         (genrtl_decl_stmt): Likewise.
43         (genrtl_if_stmt): Likewise.
44         (genrtl_while_stmt): Likewise.
45         (genrtl_do_stmt): Likewise.
46         (genrtl_return_stmt): Likewise.
47         (genrtl_for_stmt): Likewise.
48         (genrtl_break_stmt): Likewise.
49         (genrtl_continue_stmt): Likewise.
50         (genrtl_scope_stmt): Likewise.
51         (genrtl_switch_stmt): Likewise.
52         (genrtl_case_label): Likewise.
53         (genrtl_begin_compound_stmt): Likewise.
54         (genrtl_finish_compound_stmt): Likewise.
55         (genrtl_compound_stmt): Likewise.
56         (genrtl_asm_stmt): Likewise.
57         (genrtl_named_return_value): Likewise.
58         (genrtl_begin_stmt_expr): Likewise.
59         (genrtl_finish_stmt_expr): Likewise.
60         (finish_for_stmt): Removed first argument.
61         (finish_switch_stmt): Likewise.
62
63         * semantics.c (genrtl_try_block): Define function.
64         (genrtl_handler): Likewise.
65         (genrtl_catch_block): Likewise.
66         (genrtl_ctor_stmt): Likewise.
67         (genrtl_subobject): Likewise.
68         (genrtl_decl_cleanup): Likewise.
69         (genrtl_do_poplevel): Likewise.
70         (genrtl_do_pushlevel): Likewise.
71         (genrtl_clear_out_block): Likewise.
72         (genrtl_goto_stmt): Likewise.
73         (genrtl_expr_stmt): Likewise.
74         (genrtl_decl_stmt): Likewise.
75         (genrtl_if_stmt): Likewise.
76         (genrtl_while_stmt): Likewise.
77         (genrtl_do_stmt): Likewise.
78         (genrtl_return_stmt): Likewise.
79         (genrtl_for_stmt): Likewise.
80         (genrtl_break_stmt): Likewise.
81         (genrtl_continue_stmt): Likewise.
82         (genrtl_scope_stmt): Likewise.
83         (genrtl_switch_stmt): Likewise.
84         (genrtl_case_label): Likewise.
85         (genrtl_begin_compound_stmt): Likewise.
86         (genrtl_finish_compound_stmt): Likewise.
87         (genrtl_compound_stmt): Likewise.
88         (genrtl_asm_stmt): Likewise.
89         (genrtl_named_return_value): Likewise.
90         (genrtl_begin_stmt_expr): Likewise.
91         (genrtl_finish_stmt_expr): Likewise.
92         (finish_for_stmt): Removed first argument and generate rtl 
93         specific code.
94         (finish_switch_stmt): Likewise.
95         (do_poplevel): Removed generate rtl specific code.
96         (do_pushlevel): Likewise.
97         (add_tree): Likewise.
98         (finish_goto_stmt): Likewise.
99         (finish_expr_stmt): Likewise.
100         (begin_if_stmt): Likewise.
101         (finish_if_stmt_cond): Likewise.
102         (finish_then_clause): Likewise.
103         (begin_else_clause): Likewise.
104         (finish_else_clause): Likewise.
105         (finish_if_stmt): Likewise.
106         (clear_out_block): Likewise.
107         (begin_while_stmt): Likewise.
108         (finish_while_stmt_cond): Likewise.
109         (finish_while_stmt): Likewise.
110         (begin_do_stmt): Likewise.
111         (finish_do_body): Likewise.
112         (finish_do_stmt): Likewise.
113         (finish_return_stmt): Likewise.
114         (begin_for_stmt): Likewise.
115         (finish_for_init_stmt): Likewise.
116         (finish_for_cond): Likewise.
117         (finish_for_expr): Likewise.
118         (finish_break_stmt): Likewise.
119         (finish_continue_stmt): Likewise.
120         (begin_switch_stmt): Likewise.
121         (finish_switch_cond): Likewise.
122         (finish_case_label): Likewise.
123         (begin_try_block): Likewise.
124         (begin_function_try_block): Likewise.
125         (finish_try_block): Likewise.
126         (finish_cleanup_try_block): Likewise.
127         (finish_cleanup): Likewise.
128         (finish_function_try_block): Likewise.
129         (finish_handler_sequence): Likewise.
130         (finish_function_handler_sequence): Likewise.
131         (begin_handler): Likewise.
132         (finish_handler_parms): Likewise.
133         (begin_catch_block): Likewise.
134         (finish_handler): Likewise.
135         (begin_compound_stmt): Likewise.
136         (finish_compound_stmt): Likewise.
137         (finish_asm_stmt): Likewise.
138         (finish_label_stmt): Likewise.
139         (finish_label_decl): Likewise.
140         (finish_subobject): Likewise.
141         (finish_decl_cleanup): Likewise.
142         (finish_named_return_value): Likewise.
143         (begin_stmt_expr): Likewise.
144         (finish_stmt_expr): Likewise.
145         
146         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
147         to call genrtl_expr_stmt when appropriate.
148
149         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
150         begin_compound_expr to call genrtl_begin_stmt_expr and
151         genrtl_begin_compound_expr when appropriate.
152         (finish_init_stmts): Changed calls to finish_compound_expr and
153         finish_stmt_expr to call genrtl_finish_compound_expr and
154         genrtl_finish_stmt_expr when appropriate.
155         (expand_default_init): Changed call to finish_expr_stmt to call
156         genrtl_expr_stmt when appropriate.
157         (build_vec_init): Likewise.
158
159         * parse.y (simple_stmt): Removed first argument from call to 
160         finish_for_stmt. Removed first argument from call to 
161         finish_switch_stmt.
162
163         * parse.c: Regenerated.
164
165         * pt.c (tsubst_expr): Removed first argument from call to 
166         finish_for_stmt. Removed first argument from call to 
167         finish_switch_stmt.
168         
169 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
170
171         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
172         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
173
174         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
175         (cplus_tree_code_length[]): Likewise.
176         (cplus_tree_code_name[]): Likewise.
177         (init_parse): Added call to add_c_tree_codes. Changed 
178         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
179         
180 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
181
182         * cp-tree.h (finish_mem_initializers): Declare.
183         (count_trees): Likewise.
184         * parse.y (base_init): Use finish_mem_initializers.
185         * semantics.c (finish_mem_initializers): New function.
186
187         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
188         the number of trees.
189         (n_trees): Remove.
190         (count_trees): Don't use it.
191         
192 2000-06-15  Jason Merrill  <jason@redhat.com>
193
194         * tree.c (count_trees): New debugging function.
195
196         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
197         * init.c (build_member_call): Pull out the name of a DECL.
198
199         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
200         * semantics.c (expand_body): Push to TV_INTEGRATION here.
201         * optimize.c (optimize_function): Not here.
202         * pt.c (instantiate_decl): Push to TV_PARSE.
203
204 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
205
206         * cp-tree.h (struct language_function): Remove x_base_init_list
207         and x_member_init_list.
208         (current_base_init_list): Remove.
209         (current_member_init_list): Likewise.
210         (setup_vtbl_ptr): Change prototype.
211         (emit_base_init): Likewise.
212         (expand_member_init): Likewise.
213         (reinit_parse_for_function): Remove.
214         * decl.c (save_function_data): Don't clear x_base_init_list and
215         x_member_init_list.
216         (mark_language_function): Don't mark them.
217         * init.c (perform_member_init): Tweak comment.
218         (sort_member_init): Take the list of initializers as an argument.
219         (sort_base_init): Likewise.
220         (emit_base_init): Likewise.
221         (expand_member_init): Return the initializer.  Don't use global
222         variables.
223         * lex.c (reinit_parse_for_function): Remove.
224         * method.c (build_template_parm_names): Correct substitution.
225         (do_build_copy_constructor): Don't use current_member_init_list
226         and current_base_init_list.
227         (synthesize_method): Likewise.
228         * parse.y (base_init): Split mem-initializers into
229         base-initializers and field-initializers.
230         (member_init_list): Build up the list here.
231         (member_init): Return the initializer.
232         (fn.depfn): Don't use reinit_parse_for_function.
233         * parse.c: Regenerated.
234         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
235         ERROR_MARK.
236         (tsubst_expr): Don't use current_member_init_list
237         and current_base_init_list.
238         (tsubst_expr_values): Rename to ...
239         (tsubst_initializer_list): ... this.  Use convert_from_reference.
240         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
241         and current_base_init_list.
242         (begin_function_definition): Don't call reinit_parse_for_function.
243         
244         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
245
246         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
247         correctly.
248         
249         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
250
251 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
252
253         * cp-tree.h (IF_COND): Move to c-common.h.
254         (THEN_CLAUSE): Likewise.
255         (ELSE_CLAUSE): Likewise.
256         (WHILE_COND): Likewise.
257         (WHILE_BODY): Likewise.
258         (DO_COND): Likewise.
259         (DO_BODY): Likewise.
260         (RETURN_EXPR): Likewise.
261         (EXPR_STMT_EXPR): Likewise.
262         (FOR_INIT_STMT): Likewise.
263         (FOR_COND): Likewise.
264         (FOR_EXPR): Likewise.
265         (FOR_BODY): Likewise.
266         (SWITCH_COND): Likewise.
267         (SWITCH_BODY): Likewise.
268         (CASE_LOW): Likewise.
269         (CASE_HIGH): Likewise.
270         (GOTO_DESTINATION): Likewise.
271         (COMPOUND_BODY): Likewise.
272         (ASM_CV_QUAL): Likewise.
273         (ASM_STRING): Likewise.
274         (ASM_OUTPUTS): Likewise.
275         (ASM_INPUTS): Likewise.
276         (ASM_CLOBBERS): Likewise.
277         (DECL_STMT_DECL): Likewise.
278         (STMT_EXPR_STMT): Likewise.
279         (LABEL_STMT_LABEL): Likewise.
280         (SCOPE_BEGIN_P): Likewise.
281         (SCOPE_END_P): Likewise.
282         (SCOPE_STMT_BLOCK): Likewise.
283         (SCOPE_NULLIFIED_P): Likewise.
284         (SCOPE_NO_CLEANUPS_P): Likewise.
285         (SCOPE_PARTIAL_P): Likewise.
286         (ASM_VOLATILE_P): Likewise.
287         (STMT_LINENO): Likewise.
288         (STMT_LINENO_FOR_FN_P): Likewise.
289
290         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
291         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
292         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
293         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
294         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
295
296         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
297
298         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
299         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
300         
301         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
302         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
303         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
304         
305 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
306
307         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
308         * class.c (dfs_find_final_overrider): Set it appropriately.
309         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
310         avoid unneeded secondary vptrs.
311
312 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
313
314         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
315         (check_bitfield_decl, check_field_decl): Likewise.
316         (build_vtbl_or_vbase_field, build_base_field): Likewise.
317         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
318         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
319         (xfer_tag, finish_enum): Likewise.
320         * decl2.c (finish_builtin_type): Likewise.
321         * init.c (init_init_processing): Likewise.
322         * pt.c (instantiate_class_template): Likewise.
323         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
324         * cp-tree.h (struct lang_type): Add user_align member.
325         (CLASSTYPE_USER_ALIGN): Define.
326
327 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
328
329         * Make-lang.in (c++.install-common): Install g++-cross in
330         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
331         $(target_alias)-g++ and $(target_alias)-c++.
332
333 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
334
335         * class.c (vcall_offset_data_s): Add last_init and fns.
336         (overrides): Rename to same_signature_p.
337         (dfs_find_final_overrider): Adjust accordingly.
338         (mark_overriders): Likewise.
339         (warn_hidden): Likewise.
340         (build_vtbl_initializer): Reorganize machinery for building things
341         at negative offsets.
342         (build_vcall_and_vbase_vtbl_entries): Likewise.
343         (build_vbase_offset_vtbl_entries): Likewise.
344         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
345         offset entries.  Do not create two entries for functions with the
346         same signature.
347         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
348         (build_rtti_vtbl_entries): Reorganize machinery for building things
349         at negative offsets.
350
351         * optimize.c (expand_call_inline): Don't recurse into the code
352         used to initialize the parameters more than once.
353
354 2000-06-11  Mark Mitchell <mark@codesourcery.com>
355         
356         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
357         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
358         (find_substitution): Only use the `Sa' substitution for
359         std::allocator, not instantiations of it.
360         (write_template_prefix): Move comment.  Only use a TREE_LIST to
361         represent substitutions for a member template.
362         (write_array_type): Mangle array dimensions correctly.
363         * optimize.c (maybe_clone_body): Copy more information from the
364         cloned function.
365         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
366         on the regenerated declaration.
367
368 2000-06-11  Chip Salzenberg  <chip@valinux.com>
369             Mark Mitchell <mark@codesourcery.com>
370
371         * class.c (build_vtable): Clarify comment.
372         (build_ctor_vtbl_group): Pass the most derived type to
373         build_vtable.
374         
375 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
376
377         * decl2.c (compare_options): Don't needlessly cast away const-ness.
378
379 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
380
381         * decl.c (add_binding): Handle duplicate declarations of external
382         variables.
383
384 2000-06-09  Chip Salzenberg  <chip@valinux.com>
385             Mark Mitchell <mark@codesourcery.com>
386
387         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
388         argument.
389         (write_signed_number): New macro.
390         (write_unsigned_number): Likewise.
391         (write_source_name): Use them.
392         (write_number): Handle signed and unsigned values.
393         (write_integer_cst): Use tree_int_cst_sgn, and use
394         write_unsigned_number or write_signed_number as appropriate.
395         (write_discriminator): Use write_unsigned_number or
396         write_signed_number as appropriate.
397         (write_template_arg_literal): Likewise.
398         (write_array_type): Use tree_low_cst.
399         (write_template_parm):  Use write_unsigned_number or
400         write_signed_number as appropriate.
401         (write_substitution): Adjust call to write_number.
402         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
403         (write_expression): Handle non-type template arguments of
404         reference type correctly.
405         (mangle_thunk): Use write_signed_number.
406
407 2000-06-09  Chip Salzenberg  <chip@valinux.com>
408
409         * mangle.c (find_substition): Don't mangle objects with typename
410         substitutions (e.g. "cin" as "Si").
411
412 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
413
414         * call.c (add_candidate): Use ggc_alloc_cleared.
415         * decl.c (lookup_label): Likewise.
416         * lex.c (retrofit_lang_decl): Likewise.
417
418 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
419
420         * semantics.c (expand_body): Push to TV_EXPAND.
421         * optimize.c (optimize_function): Push to TV_INTEGRATION.
422         * decl.c (start_function): Always call announce_function.
423
424         * tinfo2.cc: Just declare abort.
425
426 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
427
428         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
429         whenever @ is a symbolic name.
430
431 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
432
433         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
434
435 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
436
437         * decl.c (pushdecl): Look up functions by DECL_NAME, not
438         DECL_ASSEMBLER_NAME.
439
440 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
441
442         * decl2.c (c_language): Define.
443
444 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
445
446         * lex.c (lang_init_options): Tweak.
447
448         * decl2.c: Remove #inclusion of diagnostic.h
449         (lang_decode_option): Move diagnostic formatting options to
450         toplevel. 
451
452         * lang-options.h: Remove documentation for diagnostic options.
453
454         * Makefile.in (lex.o): Depends upon diagnostic.h
455
456 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
457
458         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
459         the same DECL_RESULT, it's not a redefinition.
460         * pt.c (tsubst_decl): Remove code to handle illegal
461         specializations.
462
463 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
464
465         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
466
467 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
468
469         * search.c (maybe_suppress_debug_info): Don't check
470         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
471
472         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
473         here if extern_p.
474
475         Remember instantiation context in deferred instantiations.
476         * cp-tree.h (struct tinst_level): Remove.
477         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
478         * pt.c (current_tinst_level): Now a tree.
479         (print_template_context, push_tinst_level, pop_tinst_level,
480         tinst_for_decl): Adjust.
481         (reopen_tinst_level): New fn.
482         (init_pt): Register current_tinst_level as a root.
483         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
484         of the pending templates list.
485         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
486         * lex.c (extract_interface_info): Adjust.
487         * decl2.c (warn_if_unknown_interface): Adjust.
488
489 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
490
491         * class.c (indirect_primary_base_p): New function.
492         (determine_primary_base): Use it.
493
494 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
495
496         Update new-abi dynamic cast algorithm.
497         * tinfo.cc (__class_type_info::__dyncast_result): Add
498         whole_details. Adjust constructor.
499         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
500         Avoid unnecessary searching.
501         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
502
503 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
504
505         * decl.c (init_decl_processing): Don't call record_component_aliases.
506         * tree.c (build_cplus_array_type_1): Likewise.
507
508 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
509
510         * ir.texi: Correct typo.
511         * mangle.c (write_expression): Handle non-type template arguments
512         with reference type.
513         * method.c (build_overload_value): Likewise.
514         * pt.c (convert_nontype_argument): Explicitly represent conversion
515         to a reference with an ADDR_EXPR.
516         (unify): Always unify arguments in left-to-right order.
517
518 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
519             Mark Mitchell  <mark@codesourcery.com>
520
521         * Make-lang.in (CXX_SRCS): Add mangle.c.
522         * Makefile.in (CXX_OBJS): Add mangle.o.
523         (mangle.o): New rule.
524
525         * class.c (local_classes): New variable.
526         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
527         (get_vtt_name): Use mangle_vtt_name for new ABI.
528         (init_class_processing): Initialize local_classes.
529         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
530         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
531         (std_identifier): New macro.
532         (DECL_VOLATILE_MEMFUNC_P): New macro.
533         (DECL_NAMESPACE_STD_P): Likewise.
534         (local_classes): Declare.
535         (get_mostly_instantiated_function_type): Declare.
536         (init_mangle): Declare.
537         (mangle_decl): Likewise.
538         (mangle_type_string): Likewise.
539         (mangle_type): Likewise.
540         (mangle_typeinfo_for_type): Likewise.
541         (mangle_typeinfo_string_for_type): Likewise.
542         (mangle_vtbl_for_type): Likewise.
543         (mangle_vtt_for_type): Likewise.
544         (mangle_ctor_vtbl_for_type): Likewise.
545         (mangle_thunk): Likewise.
546         (mangle_conv_op_name_for_type): Likewise.
547         (mangle_guard_variable): Likewise.
548         * decl.c (pushtag): Keep track of local classes.
549         (initialize_predefined_identifiers): Initialize std_identifier.
550         (init_decl_processing): Use std_identifier.
551         (start_decl): Don't treat instantiations as specializations.
552         (grokdeclarator): Likewise.
553         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
554         name for fully-instantiated templates.
555         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
556         destructors with the new ABI.   
557         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
558         (grokfield): Use mangle_type for new ABI.
559         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
560         (get_sentry): Use mangle_guard_variable for new ABI.
561         (start_static_initialization_or_destruction): Likewise.
562         * expr.c (extract_aggr_init): Remove.
563         (extract_scalar_init): Likewise.
564         (extract_init): Remove #if 0'd code.
565         * mangle.c: New function.
566         * method.c (build_mangled_name): Assert not flag_new_abi.
567         (build_static_name): Likewise.
568         (build_decl_overload_real): Likewise.
569         (build_typename_overload): Likewise.
570         (build_overload_with_type): Likewise.
571         (build_overload_name): Likewise.
572         (get_ctor_vtbl_name): Likewise.
573         (start_squangling): Likewise.
574         (get_id_2): Likewise.
575         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
576         (init_method): Call init_mangle for new ABI.
577         (make_thunk): Call mangle_thunk for new ABI.
578         * operators.def: Correct new ABI manglings for the `%' operator.
579         Add `::' operator.
580         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
581         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
582         (lookup_template_class): Call mangle_decl for new ABI.
583         (get_mostly_instantiated_function_type): New function.
584         (set_mangled_name_for_template_decl): Use it.
585         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
586         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
587         conversion op names.
588         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
589         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
590         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
591         mangle_typeinfo_string_for_type.
592         
593 2000-06-01  Richard Henderson  <rth@cygnus.com>
594
595         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
596
597 2000-06-01  Richard Henderson  <rth@cygnus.com>
598
599         * decl2.c (unsupported_options): Fix typo, make const.
600         (lang_decode_option): Fix bsearch argument order.
601
602 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
603
604         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
605         on FIELD_DECLs.
606
607 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
608
609         * cp-tree.h (c_get_alias_set): Deleted.
610         * Makefile.in (decl.o): Include ../expr.h.
611         * decl.c (expr.h): Include.
612         (init_decl_processing): Call record_component_aliases for arrays.
613         (grokdeclarator): Likewise.
614         Set TREE_ADDRESSABLE for fields that aren't bitfields.
615         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
616
617 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
618
619         Remove guiding declaration support.
620         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
621         (flag_guiding_decls): Remove.
622         * call.c (build_user_type_conversion_1): Remove support for
623         guiding decls.
624         (build_new_function_call): Likewise.
625         (build_new_op): Likewise.
626         (build_new_method_call): Likewise.
627         * decl.c (start_function): Likewise.
628         * friend.c (is_friend): Likewise.
629         (do_friend): Likewise.
630         * decl2.c ((flag_dump_translation_unit): Make it const.
631         (flag_guiding_decls): Remove.
632         (unsupported_options): New variable
633         (compare_options): New function.
634         (lang_decode_option): Use them.
635         
636         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
637
638         * method.c (mangle_expression): Adjust test for legal expression
639         operators.
640
641         * pt.c (instantiate_decl): Save and restore the local
642         specializations list.
643
644 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
645
646         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
647
648 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
649
650         * call.c (add_template_candidate_real): Handle member template
651         constructors for classes with virtual bases.
652         (build_user_type_conversion_1): Use in_charge_arg_for_name.
653         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
654
655         * ir.texi: Update thunk documentation.
656         
657         * call.c (joust): Fix handling of overloaded builtin operators.
658
659 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
660
661         * cp-tree.h (DECL_ANTICIPATED): New macro.
662         Document new use of DECL_LANG_FLAG_7.
663         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
664         in the user namespace.
665         * lex.c (do_identifier): If the identifier's declaration has
666         DECL_ANTICIPATED on, it has not yet been declared.  But do not
667         replace it with an ordinary implicit declaration.             
668
669         * tinfo2.cc: Include stdlib.h.
670
671 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
672
673         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
674         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
675         CLASSTYPE_ALIGN.
676
677 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
678
679         * decl2.c (lang_decode_option): Use skip_leading_substring instead
680         of plain strncmp.
681
682 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
683
684         * operators.def (<?): Duplicated, should have been...
685         (>?): this.  Fixed.
686
687 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
688             Mark Mitchell  <mark@codesourcery.com>
689
690         * cp-tree.h (ansi_opname): Make it a macro.
691         (ansi_assopname): Likewise.
692         (struct lang_decl_flags): Add assignment_operator_p.
693         (struct lang_decl): Add operator_code.
694         (DECL_VTT_PARM): Adjust.
695         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
696         overloaded operator.
697         (SET_OVERLOADED_OPERATOR_CODE): New macro.
698         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
699         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
700         (opname_tab): Remove.
701         (assignop_tab): Likewise.
702         (operator_name_info_t): New type.
703         (operator_name_info): New variable.
704         (assignment_operator_name_info): Likewise.
705         (build_cp_library_fn): Remove declaration.
706         (push_cp_library_fn): Likewise.
707         (operator_name_string): Likewise.
708         (build_decl_overload): Likewise.
709         * call.c (print_z_candidates): Simplify.
710         (build_object_call): Adjust usage of ansi_opname.  Use
711         DECL_OVERLOADED_OPERATOR_P.
712         (op_error): Adjust operator name lookup.
713         (build_conditional_expr): Adjust usage of ansi_opname.
714         (build_new_op): Likewise.
715         (build_op_delete_call): Likewise.
716         (build_over_call): Likewise.
717         (joust): Use DECL_OVERLOADED_OPERATOR_P.
718         * decl.c (duplicate_decls): Copy operator_code.
719         (init_decl_processing): Adjust parameters to push_cp_library_fn.
720         (builtin_function): Adjust parameters to build_library_fn_1.
721         (build_library_fn_1): Accept an overloaded operator code.
722         (build_library_fn): Pass ERROR_MARK.
723         (build_cp_library_fn): Accept an overloaded operator code.
724         (push_cp_library_fn): Likewise.
725         (grokfndecl): Tweak.
726         (grokdeclarator): Simplify code to compute names of overloaded
727         operators.  Adjust use of ansi_opname.
728         (ambi_op_p): Work on tree_codes, not identifiers.
729         (unary_op_p): Likewise.
730         (grok_op_properties): Likewise.
731         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
732         (lang_mark_tree): Don't try to mark the operator_code.
733         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
734         * error.c (dump_decl): Remove special handling for operator
735         names.
736         (dump_function_name): Likewise.
737         (dump_expr): Adjust name lookup of operators.
738         (op_to_string): Simplify.
739         (assop_to_string): Likewise.
740         * init.c (build_new_1): Adjust use of ansi_opname.
741         * lex.c (opname_tab): Remove.
742         (assignop_tab): Likewise.
743         (ansi_opname): Likewise.
744         (ansi_assopname): Likewise.
745         (operator_name_string): Likewise.
746         (reinit_lang_specific): Likewise.
747         (operator_name_info): New variable.
748         (assignment_operator_name_info): Likewise.
749         (init_operators): New function.
750         (init_parse): Use it.
751         (do_identifier): Adjust use of ansi_opname.
752         * method.c (mangle_expression): Don't use ansi_opname for
753         mangling.
754         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
755         (build_decl_overload): Remove.
756         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
757         (do_build_assign_ref): Adjust use of ansi_opname.
758         (synthesize_method): Likewise.
759         (implicitly_declare_fn): Likewise.
760         * operators.def: New file.
761         * parse.y (operator): Adjust use of ansi_opname.
762         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
763         (set_mangled_name_for_template_decl): Don't play games with
764         current_namespace.
765         (special_function_p): Adjust use of ansi_opname.
766         * typeck.c (check_return_expr): Likewise.
767         * Make-lang.in (cc1plus): Depend on operators.def.
768         * Makefile.in (lex.o): Likewise.
769         (decl.o): Likewise.
770
771 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
772
773         * Make-lang.in (cplib2.ready): Eradicate.
774
775 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
776
777         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
778         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
779         (built_min, cp_tree_equal): Likewise.
780
781 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
782
783         * class.c (layout_nonempty_base_or_field): Replace
784         `record_layout_info' with `record_layout_info_s'.
785
786 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
787
788         Fix goto checking.
789         * cp-tree.h (struct language_function): x_named_labels is now
790         a struct named_label_list*.
791         * decl.c (struct named_label_use_list): Renamed from...
792         (struct named_label_list): ...this.  New struct.
793         (push_binding_level): Don't set eh_region.
794         (note_level_for_eh): New fn.
795         (pop_label): Take label and old value directly.
796         (pop_labels): Adjust for new named_labels format.
797         (lookup_label): Likewise.
798         (poplevel): Note characteristics of a binding level containing a
799         named label.  Mess with named label lists earlier.
800         (mark_named_label_lists): New fn.
801         (mark_lang_function): Call it.
802         (use_label): New fn, split out from...
803         (make_label_decl): ...here.  Don't call it.
804         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, 
805         check_previous_gotos): New fns, split out from...
806         (define_label): ...here.
807         (check_switch_goto): New fn.
808         (define_case_label): Call it.
809         (check_goto): New fn.
810         * semantics.c (finish_goto_stmt): Call it and use_label.
811         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
812         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
813
814 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
815
816         * class.c (build_vtable_entry_ref): Correct usage of
817         get_vtbl_decl_for_binfo.
818
819         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
820         * method.c (implicitly_declare_fn): Not here.
821
822 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
823
824         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
825         (CPTI_PTMD_DESC_TYPE): ... here.
826         (ptmd_desc_type_node): Rename to ...
827         (ptm_desc_type_node): ... here.
828         * decl.c: Likewise.
829         * rtti.c (ptmd_initializer): Rename to ...
830         (ptm_initializer): ... here.
831         (sythesize_tinfo_var): Adjust. Deal with pointer to member
832         function.
833         (create_tinfo_types): Adjust.   
834
835 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
836
837         Finish implementation of VTTs.
838         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
839         CPTI_VTT_PARM_IDENTIFIER.
840         (vtt_parm_identifier): New macro.
841         (vtt_parm_type): Likewise.
842         (BINFO_SUBVTT_INDEX): Likewise.
843         (BINFO_VPTR_INDEX): Likewise.
844         (struct lang_decl): Add vtt_parm.
845         (DECL_VTT_PARM): New macro.
846         (DECL_USE_VTT_PARM): Likewise.
847         (DECL_NEEDS_VTT_PARM_P): Likewise.
848         (get_vtt_name): Declare.
849         (build_artifical_parm): Likewise.
850         (fixup_all_virtual_upcast_offsets): Likewise.
851         (expand_indirect_vtbls_init): Remove.
852         * call.c (build_new_method_call): Pass the vtt to subobject
853         constructors and destructors.
854         * class.c (get_vtt_name): Give it external linkage.
855         (build_clone): Handle the magic VTT parameters for clones.
856         (clone_function_decl): Fix typo in comment.
857         (build_vtt): Keep track of the indices in the VTTs where various
858         entities are stored.
859         (build_vtt_inits): Likewise.
860         (dfs_build_vtt_inits): Likewise.
861         (build_ctor_vtbl_group): Tweak type of construction vtables.
862         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
863         primary bases, when building construction vtables.
864         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
865         (initialize_predefined_identifiers): Add vtt_parm_identifier.
866         (init_decl_processing): Initialize vtt_parm_type.
867         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
868         (lang_mark_tree): Make vtt_parm.
869         * decl2.c (build_artificial_parm): New function.
870         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
871         (grokclassfn): Use build_artificial_parm.
872         * init.c (initialize_vtbl_ptrs): Call
873         fixup_all_virtual_upcast_offsets directly.
874         (perform_member_init): Use the complete subobject destructor for
875         member cleanups.
876         (build_vtbl_address): New function.
877         (expand_virtual_init): Handle VTTs.
878         * optimize (maybe_clone_body): Likewise.
879         * search.c (fixup_all_virtual_upcast_offsets): Give it external
880         linkage.
881         (expand_indirect_vtbls_init): Remove.
882         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
883         * tree.c (make_binfo): Make them bigger.
884         
885 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
886
887         * inc/cxxabi.h (__pbase_type_info): Define, based on
888         __pointer_type_info.
889         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
890         (__pointer_to_member_type_info): Likewise.
891         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
892         (__pointer_to_member_type_info::__is_pointer_p): Remove.
893         (__pointer_type_info::__do_catch): Rename to ...
894         (__pbase_type_info::__do_catch): ... here. Adjust.
895         (__pbase_type_info::__pointer_catch): Implement.
896         (__pointer_type_info::__pointer_catch): Adjust.
897         (__pointer_to_member_type_info::__pointer_catch): Adjust.
898
899 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
900
901         * tinfo.h (__user_type_info::contained_virtual_p): New
902         predicate.
903         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
904         shaped heirarchy.
905         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
906         diamond shaped heirarchy. Add early out for mixed diamond and
907         duplicate shaped heirarchy.
908
909 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
910
911         * cp-tree.h (build_delete): Change prototype.
912         (build_vec_delete): Likewise.
913         * call.c (build_scoped_method_call): Use special_function_kind
914         values to indicate the kind of destruction to be done.
915         (build_method_call): Likewise.
916         * decl.c (finish_destructor_body): Likewise.
917         (maybe_build_cleanup_1): Likewise.  Rename to ...
918         (maybe_build_cleanup): ... this.
919         * decl2.c (delete_sanity): Use special_function_kind
920         values to indicate the kind of destruction to be done.
921         (build_cleanup): Likewise.
922         * init.c (perform_member_init): Likewise.
923         (build_vec_delete_1): Likewise.
924         (build_dtor_call): Simplify.
925         (build_delete): Use special_function_kind
926         values to indicate the kind of destruction to be done.
927         (build_vbase_delete): Likewise.
928         (build_vec_delete): Likewise.
929         
930         * init.c (sort_member_init): Fix typo in error message generation
931         code.
932
933 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
934
935         * semantics.c (begin_class_definition): make the packed
936         attribute be sensitive to the "-fpack-struct" command line flag
937
938 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
939
940         Update new-abi upcast algorithm.
941         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
942         prototype and meaning of return value.
943         (__si_class_type_info::__do_upcast): Likewise.
944         (__vmi_class_type_info::__do_upcast): Likewise.
945         * tinfo.cc (__class_type_info::__upcast_result): Replace
946         whole2dst with part2dst. Adjust ctor.
947         (__class_type_info::__do_upcast): Adjust call of worker function.
948         (__class_type_info::__do_upcast): Adjust.
949         (__si_class_type_info::__do_upcast): Adjust. Use parent's
950         __do_upcast.
951         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
952         virtual base in diamond heirarchy bug.
953
954 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
955
956         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
957         and bitfield to tinfo_fn_p.
958         (DECL_TINFO_FN_P): Adjust.
959         (SET_DECL_TINFO_FN_P): Likewise.
960         (DECL_MUTABLE_P): Likewise.
961         (DECL_C_BIT_FIELD): Likewise.
962         (SET_DECL_C_BIT_FIELD): Likewise.
963         (CLEAR_DECL_C_BIT_FIELD): Likewise.
964         (DECL_UNINLINABLE): Likewise.
965         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
966         (handle_using_decl): Remove assertion.
967         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
968         to build FIELD_DECLs.
969         (build_base_field): Likewise.
970         (layout_class_type): Likewise.
971         * decl.c (init_decl_processing): Likewise.
972         (build_ptrmemfunc_type): Likewise.
973         (grokdeclarator): Likewise.
974         * decl2.c (grok_x_components): Likewise.
975         * except.c (call_eh_info): Likewise.
976         * init.c (init_init_processing): Likewise.
977         * rtti.c (expand_class_desc): Likewise.
978         (create_pseudo_type_info): Likewise.
979         (get_vmi_pseudo_type_info): Likewise.
980         (create_tinfo_types): Likewise.
981         * ptree.c (print_lang_decl): Adjust.
982         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
983         before checking DECL_MUTABLE_P.
984         
985         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
986         parameters for template functions.
987         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
988         destructors as well as constructors.
989
990 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
991
992         * class.c (build_ctor_vtbl_group): Set inits.
993         * optimize.c (maybe_clone_body): Set DECL_INLINE and
994         DECL_THIS_INLINE appropriately for clones.
995
996         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
997         (DECL_CONV_FN_P): Simplify.
998         (DECL_OPERATOR): Remove.
999         (language_to_string): Declare.
1000         * decl.c (duplicate_decls): Fix typo in comment.
1001         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
1002         (grok_op_properties): Use DECL_CONV_FN_P instead of
1003         IDENTIFIER_TYPENAME_P.
1004         * dump.c (dequeue_and_dump): Dump the language linkage of
1005         declarations.
1006         * error.c (language_to_string): Give it external linkage.
1007         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
1008         (implicitly_declare_fn): Set DECL_LANGUAGE.
1009         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
1010         IDENTIFIER_TYPENAME_P.
1011         (tsubst_decl): Likewise.
1012         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
1013         * semantics.c (finish_member_declaration): Don't mark members of
1014         classes declared in an extern "C" region as extern "C".
1015         
1016 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1017
1018         * decl2.c (qualified_lookup_using_namespace): Look through
1019         namespace aliases.
1020
1021         * decl.c (push_using_decl): Return the old decl on namespace level.
1022
1023 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
1024
1025         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
1026         (VTT_NAME_PREFIX): New macro.
1027         (CTOR_VTBL_NAME_PREFIX): Likewise.
1028         (get_ctor_vtbl_name): New function.
1029         * class.c (get_vtable_name): Simplify.
1030         (get_vtt_name): New function.
1031         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
1032         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
1033         when a virtual base becomes primary.
1034         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
1035         VTTs.
1036         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
1037         additional parameters.
1038         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
1039         (initialize_array): New function.
1040         (build_vtt): Likewise.
1041         (build_vtt_inits): Likewise.
1042         (dfs_build_vtt_inits): Likewise.
1043         (dfs_fixup_binfo_vtbls): Likewise.
1044         (build_ctor_vtbl_group): Likewise.
1045         (initialize_vtable): Use initialize_array.
1046         (accumulate_vtbl_inits): Reimplement to handle construction
1047         vtables.
1048         (dfs_accumulate_vtbl_inits): Likewise.
1049         (bulid_vtbl_initializer): Adjust parameter name.
1050         * method.c (build_typename_overload): Remove #if 0'd code.
1051         (get_ctor_vtbl_name): New function.
1052         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
1053         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
1054         
1055         * cp-tree.h (struct lang_type): Remove search_slot.
1056         (CLASSTYPE_SEARCH_SLOT): Remove.
1057         (emit_base_init): Change prototype.
1058         (initialize_vtbl_ptrs): Likewise.
1059         (expand_indirect_vtbls_init): Likewise.
1060         (clear_search_slots): Remove.
1061         * decl.c (lang_mark_tree): Don't mark search_slot.
1062         * init.c (initialize_vtbl_ptrs): Simplify.
1063         (emit_base_init): Likewise.
1064         * search.c (struct vbase_info): Document decl_ptr.
1065         (convert_pointer_to_single_level): Remove.
1066         (dfs_find_vbases): Remove.
1067         (dfs_init_base_pointers): Simplify.
1068         (dfs_clear_vbase_slots): Remove.
1069         (dfs_vtable_path_unmark): New function.
1070         (init_vbase_pointers): Simplify.
1071         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
1072         (expand_indirect_vtbls_init): Simplify.  Don't call
1073         mark_all_temps_used.
1074         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
1075         initialize_vtbl_ptrs.
1076
1077 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
1078
1079         * except.c: Add static prototypes.
1080
1081 2000-05-20  H.J. Lu  <hjl@gnu.org>
1082
1083         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
1084
1085 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
1086
1087         Don't create a separate copy of virtual bases for the
1088         CLASSTYPE_VBASECLASSES list.
1089         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
1090         (BINFO_FOR_VBASE): Remove.
1091         (CANONICAL_BINFO): Adjust.
1092         (binfo_for_vbase): New function.
1093         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
1094         instead of BINFO_FOR_VBASE.
1095         (build_vbase_pointer): Likewise.
1096         (build_secondary_vtable): Likewise.
1097         (dfs_mark_primary_bases): Likewise.
1098         (mark_primary_bases): Likewise.
1099         (layout_nonempty_base_or_field): Likewise.
1100         (dfs_set_offset_for_shared_vbases): Likewise.
1101         (dfs_set_offset_for_unshared_vbases): Likewise.
1102         (layout_virtual_bases): Likewise.  Adjust for changes to the
1103         CLASSTYPE_VBASECLASSES list.
1104         (dump_class_hierarchy_r): Use binfo_for_vbase
1105         instead of BINFO_FOR_VBASE.
1106         (dump_class_hierarchy): Likewise.
1107         (finish_vtbls): Likewise.
1108         (build_vtbl_initializer): Adjust for changes to the
1109         CLASSTYPE_VBASECLASSES list.
1110         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
1111         * decl.c (finish_destructor_body): Adjust for changes to the
1112         CLASSTYPE_VBASECLASSES list.
1113         * init.c (sort_base_init): Use binfo_for_vbase.
1114         (construct_virtual_bases): Adjust for changes to the
1115         CLASSTYPE_VBASECLASSES list.
1116         (expand_member_init): Use binfo_for_vbase.
1117         (build_vbase_delete):  Adjust for changes to the
1118         CLASSTYPE_VBASECLASSES list.
1119         * method.c (do_build_copy_constructor): Likewise.
1120         * rtti.c (get_base_offset): Use binfo_for_vbase.
1121         (expand_class_desc): Remove #if 0'd code.
1122         * search.c (struct vbase_info): Remove vbase_types.
1123         (get_base_distance):  Use binfo_for_vbase.
1124         (lookup_field_queue_p): Use CANONICAL_BINFO.
1125         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
1126         (get_pure_virtuals): Adjust for changes to the
1127         CLASSTYPE_VBASECLASSES list.
1128         (dfs_find_vbases): Use binfo_for_vbase.
1129         (dfs_init_vbase_pointers): Likewise.
1130         (init_vbase_pointers): Don't initialize vi.vbase_types.
1131         (virtual_context): Use binfo_for_vbase.
1132         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
1133         CLASSTYPE_VBASECLASSES list.
1134         (expand_indirect_vtbls_init): Simplify.
1135         (dfs_get_vbase_types): Don't replicate virtual bases.
1136         (find_vbase_instance): Use binfo_for_vbase.
1137         (binfo_for_vbase): New function.
1138         * typeck.c (get_delta_difference): Use binfo_for_vbase.
1139         
1140 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
1141
1142         * decl2.c (finish_anon_union): Generalize error messages to handle
1143         anonymous structures.
1144         * init.c (perform_member_init): Remove `name' parameter.
1145         (build_field_list): New function.
1146         (sort_member_init): Handle anonymous union initialization order
1147         correctly.  Check for multiple initializations of the same union.
1148         (emit_base_init): Don't look up fields by name here.
1149         (expand_member_init): Record the result of name lookup for future
1150         reference.
1151         * typeck.c (build_component_ref): Fix formatting.
1152         
1153 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1154
1155         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
1156         * typeck.c (build_x_compound_expr): Replace warn_unused with
1157         warn_unused_value.
1158
1159         * decl2.c (lang_decode_option): Update -Wall unused flags by
1160         calling set_Wunused.
1161
1162 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
1163
1164         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
1165         * init.c (dfs_vtable_path_unmark): Remove.
1166         * search.c (marked_new_vtable_p): Likewise.
1167         (unmarked_new_vtable_p): Likewise.
1168         (dfs_search_slot_nonempty_p): Likewise.
1169         (dfs_mark): Likewise.
1170         (dfs_vtable_path_unmark): Likewise.
1171         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
1172         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
1173         (dfs_init_vbase_pointers): Remove special-case new ABI code.
1174         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
1175         (init_vbase_pointers): Simplify.
1176         (expand_indirect_vtbls_init): Likewise.
1177
1178         * class.c (copy_virtuals): New function.
1179         (build_primary_table): Use it.
1180         (build_secondary_vtable): Likewise.
1181         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
1182         indicate that no vcall offset is required.
1183         (add_virtual_function): Likewise.
1184         (modify_all_vtables): Likewise.
1185         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1186         (dfs_accumulate_vtbl_inits): Likewise.
1187         (build_vtbl_initializer): Make changes to handle construction
1188         vtables.
1189         (dfs_build_vcall_offset_vtbl_entries): Likewise.
1190         (build_rtti_vtbl_entries): Likewise.
1191         (build_vtable_entries): Handle a NULL vcall_index.
1192
1193 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
1194
1195         * decl2.c (lang_decode_option): Fix thinko.
1196
1197 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
1198
1199         * except.c (check_handlers): New fn.
1200         * cp-tree.h: Declare it.
1201         * semantics.c (finish_handler_sequence): Call it.
1202         (finish_function_handler_sequence): Likewise.
1203         (finish_handler_parms): Set TREE_TYPE on the handler.
1204         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
1205         * search.c (get_base_distance_recursive): If protect>1, ignore
1206         special access.
1207         (get_base_distance): Don't reduce watch_access.
1208
1209 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
1210
1211         * lex.c: #include diagnostic.h.
1212         (lang_init_options): Set default prefixing rules.
1213
1214         * lang-options.h: Add -fdiagnostics-show-location=.
1215         
1216         * decl2.c: #include diagnostic.h.
1217         (lang_decode_option): Handle -fdiagnostics-show-location=.
1218
1219 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
1220
1221         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
1222         * vec.cc: Revert my 2000-05-07 change.
1223
1224 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
1225
1226         * class.c (check_field_decls): Complain about non-static data
1227         members with same name as class in class with constructor.
1228
1229 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
1230
1231         * decl.c (grokdeclarator): Allow non-static data members with
1232         same name as class.
1233
1234 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
1235
1236         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
1237         and pending_inline.filename.  Update prototypes.
1238         * decl.c (define_label): Constify filename parameter.
1239         * decl2.c (warn_if_unknown_interface): Constify local char *.
1240         * input.c Constify input_source.filename. Don't declare
1241         input_filename or lineno.  Constify filename parameter to feed_input.
1242         * lex.c (init_parse): Constify parameter and return value.
1243         (cp_pragma_interface, cp_pragma_implementation): Constify
1244         filename argument.
1245         (reinit_parse_for_method, reinit_parse_for_block,
1246         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
1247         Constify local char *.
1248         * pt.c: Don't declare lineno or input_filename.
1249         (print_template_context, tsubst_friend_function, tsubst_decl,
1250         tsubst, instantiate_decl): Constify local char *.
1251         * semantics.c (expand_body): Constify local char *.
1252         * tree.c (build_srcloc): Constify filename parameter.
1253         * typeck.c (c_expand_asm_operands): Constify filename
1254         parameter.
1255
1256 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
1257
1258         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
1259         offsetof expansion.
1260
1261 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
1262
1263         * inc/cxxabi.h:  Fix typos in comment.
1264         (__base_class_info::__offset): Use a static_cast.
1265
1266 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
1267
1268         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
1269         of std::size_t and std::ptrdiff_t respectively.
1270         * tinfo.cc: Likewise.
1271         * vec.cc: Likewise.
1272
1273 2000-05-06  Richard Henderson  <rth@cygnus.com>
1274
1275         * typeck.c (build_c_cast): Don't warn integer->pointer size
1276         mismatch for constants.
1277
1278 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
1279
1280         * rtti.c (ptmd_initializer): Set non-public, if class is
1281         incomplete.
1282         
1283         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
1284         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1285         __cxa_vec_delete): Likewise.
1286         * tinfo.cc (__dynamic_cast): Likewise.
1287         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1288         __cxa_vec_delete): Likewise.
1289
1290 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
1291
1292         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
1293         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
1294         (lang_decl_flags): Add vcall_offset.
1295         (THUNK_VCALL_OFFSET): Use it.
1296         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
1297         * method.c (make_thunk): Create the lang_decl here, not in
1298         emit_thunk.
1299         (emit_thunk): Make generic thunks into ordinary functions once
1300         they have been fed to expand_body.
1301         * semantics.c (expand_body): Set current_function_is_thunk here.
1302
1303 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1304
1305         * class.c (update_vtable_entry_for_fn): Prototype.
1306
1307         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
1308         and `tmpl'.
1309
1310         * search.c (dfs_build_inheritance_graph_order): Prototype.
1311
1312 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
1313
1314         * cp-tree.h (special_function_kind): Add various kinds of
1315         destructors.
1316         (special_function_p): New function.
1317         * class.c (overrides): Don't let one kind of destructor override
1318         another.
1319         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
1320         whether or not to instantiate a template.
1321         * tree.c (special_function_p): Define.
1322
1323 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
1324
1325         * cp-tree.def (THUNK_DECL): Remove.
1326         * cp-tree.h (DECL_THUNK_P): New macro.
1327         (DECL_NON_THUNK_FUNCTION_P): Likewise.
1328         (DECL_EXTERN_C_FUNCTION_P): Likewise.
1329         (SET_DECL_THUNK_P): Likewise.
1330         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
1331         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
1332         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
1333         * decl.c (decls_match): Use DECL_EXTERN_C_P.
1334         (duplicate_decls): Likewise.
1335         (pushdecl): Likewise.  Adjust thunk handling.
1336         (grokfndecl): Use DECL_EXTERN_C_P.
1337         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
1338         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
1339         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
1340         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
1341         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
1342         DECL_NO_STATIC_CHAIN.
1343         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
1344         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
1345         * search.c (covariant_return_p): Remove THUNK_DECL handling.
1346         * ir.texi: Update.
1347         
1348 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
1349
1350         * tree.c (walk_tree): Set lineno.
1351
1352 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
1353
1354         * exception.cc: Update license notice.
1355         * new.cc: Likewise.
1356         * new1.cc: Likewise.
1357         * new2.cc: Likewise.
1358         * tinfo.cc: Likewise.
1359         * tinfo2.cc: Likewise.
1360         * vec.cc: Likewise.
1361         * inc/cxxabi.h: Likewise.
1362         * inc/exception: Likewise.
1363         * inc/new: Likewise.
1364         * inc/new.h: Likewise.
1365         * inc/typeinfo: Likewise.
1366
1367 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
1368
1369         * tree.c (build_target_expr_with_type): If we already have a
1370         TARGET_EXPR, just return it.
1371
1372         * optimize.c (initialize_inlined_parameters): Don't generate an
1373         EXPR_STMT if we can just use DECL_INITIAL.
1374         * decl.c (emit_local_var): Only make the initialization a
1375         full-expression if stmts_are_full_exprs_p.
1376
1377 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
1378
1379         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
1380         macro.
1381         * call.c (standard_conversion): Use it.
1382         (direct_reference_binding): Likewise.
1383         (build_over_call): Likewise.
1384         (is_properly_derived_from): Likewise.
1385         (compare_ics): Likewise.
1386         * class.c (resolves_to_fixed_type_p): Likewise.
1387         * optimize.c (declare_return_variable): Likewise.
1388         * pt.c (is_specialization_of): Likewise.
1389         (unify): Likewise.
1390         * typeck.c (comp_target_parms): Likeiwse.
1391         (build_static_cast): Likewise.
1392         (build_reinterpret_cast): Likewise.
1393         (build_const_cast): Likewise.
1394         (comp_ptr_ttypes_real): Likewise.
1395         (comp_ptr_ttypes_const): Likewise.
1396         * typeck2.c (process_init_constructor): Likewise.
1397
1398 2000-04-30  Scott Snyder <snyder@fnal.gov>
1399
1400         * decl.c (finish_destructor_body): Use the base destructor when
1401         destroying virtual bases.
1402
1403 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
1404
1405         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
1406         STMT_EXPRs.
1407         * optimize.c (struct inline_data): Add target_exprs field.
1408         (declare_return_variable): When a function returns an aggregate,
1409         use the variable declared in the TARGET_EXPR as the remapped
1410         DECL_RESULT.
1411         (expand_call_inline): Update the pending target_exprs stack.
1412         (optimize_function): Initialize the stack.
1413         
1414         * decl2.c (finish_file): Fix typo in comment.
1415
1416         * method.c (emit_thunk): Don't try to return a `void' value.
1417
1418         * optimize.c (initialize_inlined_parameters): If the parameter is
1419         addressable, we need to make a new VAR_DECL, even if the
1420         initializer is constant.
1421
1422 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
1423
1424         * decl.c (grok_op_properties): Add an extra check of argtypes.
1425
1426 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
1427
1428         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
1429         variables.
1430         (initialize_inlined_parameters): Try to avoid creating new
1431         VAR_DECLs.
1432
1433 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
1434
1435         * lex.c (my_get_run_time): Remove.
1436         (init_filename_times): Use get_run_time instead of my_get_run_time.
1437         (check_newline): Likewise.
1438         (dump_time_statistics): Likewise.
1439         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
1440         of computing elapsed time explicitly.
1441
1442 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
1443
1444         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
1445         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
1446         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
1447         before calling decl_constant_value.
1448         * class.c (check_bitfield_decl): Likewise.
1449         * cvt.c (ocp_convert): Likewise.
1450         (convert): Likewise.
1451         * decl.c (compute_array_index_type): Likewise.
1452         (build_enumerator): Likewise.
1453         * decl2.c (check_cp_case_value): Likewise.
1454         * pt.c (convert_nontype_argument): Likewise.
1455         (tsubst): Likewise.
1456         * typeck.c (decay_conversion): Likewise.
1457         (build_compound_expr): Likewise.
1458         (build_reinterpret_cast): Likewise.
1459         (build_c_cast): Likewise.
1460         (convert_for_assignment): Likewise.
1461         
1462 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
1463
1464         * decl.c (finish_function): Don't play games with DECL_INLINE.
1465
1466 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
1467
1468         * ir.texi: Correct typo.
1469
1470 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1471
1472         * decl.c (grokdeclarator): Reject VLAs as members.
1473
1474 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
1475
1476         * call.c (standard_conversion): Accept conversion between
1477         COMPLEX_TYPEs.
1478
1479         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
1480
1481 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
1482
1483         * decl2.c (finish_file): Remove double setup for accounting
1484         compile time.
1485
1486 2000-04-24  Robert Lipe <robertlipe@usa.net>
1487
1488         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
1489
1490 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
1491
1492         * new.cc (set_new_handler): Needs to be in std::.
1493
1494 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
1495
1496         * cp-tree.h (lang_decl): Remove pretty_function_p.
1497         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
1498         language-specific node.
1499         * decl.c (cp_make_fname_decl): Use build_decl, not
1500         build_lang_decl, to build the variables.
1501         (grokvardecl): Don't call build_lang_decl for local variables in
1502         templates.
1503         (grokdeclarator): Don't call build_lang_decl for local type
1504         declarations in templates.
1505         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
1506         zero'd memory, rather than calling memset.
1507         * pt.c: Include hashtab.h.
1508         (local_specializations): New variable.
1509         (retrieve_local_specialization): Use it.
1510         (register_local_specialization): Likewise.
1511         (tsubst_decl): Don't assume local variables have
1512         DECL_LANG_SPECIFIC.
1513         (instantiate_decl): Set up local_specializations.
1514         * Makefile.in (HTAB_H): New variable.
1515
1516 2000-04-23  Richard Henderson  <rth@cygnus.com>
1517
1518         * typeck.c (c_expand_asm_operands): Restore the original
1519         contents of the output list.
1520
1521 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
1522
1523         * ir.texi:  Document complex number representation.
1524         
1525 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1526
1527         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
1528         (target_incomplete_p): New function.
1529         (tinfo_base_init): Create comdat NTBS name variable.
1530         (ptr_initializer): Add non_public parameter. Calculate it.
1531         (ptmd_initializer): Likewise.
1532         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
1533         (create_real_tinfo_var): Add non_public parameter. Use it.
1534         Push proxy into global namespace.
1535         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
1536         New enumeration.
1537         * inc/typeinfo (type_info::before, type_info::operator==):
1538         Compare __name addresses.
1539         
1540         * tinfo2.cc: Remove new-abi builtins comment.
1541
1542 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
1543
1544         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
1545
1546         * call.c (joust): Exit early if we get the same function, too.
1547
1548         * decl2.c (key_method): Return NULL_TREE for template classes.
1549         (import_export_class): Don't need to check for template classes.
1550
1551 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
1552
1553         * lex.c: Remove references to cccp.c.
1554
1555 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
1556
1557         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
1558         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
1559         (DECL_DESTRUCTOR_P): Use destructor_attr.
1560         (DECL_CONST_MEMFUNC_P): Reimplement.
1561         (DECL_VOLATILE_MEMFUNC_P): Remove.
1562         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
1563         (overrides): Use DECL_DESTRUCTOR_P.
1564         (check_for_override): Likewise.
1565         * decl.c (start_function): Likewise.
1566         * decl2.c (grokfclassfn): Likewise.
1567         (check_classfn): Likewise.
1568         (grok_function_init): Likewise.
1569
1570 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
1571
1572         * decl2.c (grokfield): Issue error on illegal data member
1573         declaration.
1574
1575 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
1576
1577         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
1578
1579 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
1580
1581         * class.c (build_vtable_entry): Don't build thunks for type-info
1582         functions.
1583
1584 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
1585
1586         * decl.c (decls_match): Allow a redeclaration of a builtin to
1587         specify args while the builtin did not.
1588
1589 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
1590
1591         * cp-tree.def (THUNK_DECL): Add to documentation.
1592         * cp-tree.h (flag_huge_objects): Declare.
1593         * class.c (modify_vtable_entry): Tidy.
1594         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
1595         Calculate delta appropriately for the new ABI.
1596         (dfs_modify_vtables): Use it.
1597         (modify_all_vtables): Fix thinko in code to add overriding copies
1598         of functions to primary vtables.
1599         (build_clone): Fix typo in comment.
1600         (clone_function_decl): Correct order of destructors in vtable.
1601         (build_vbase_offset_vtbl_entries): Adjust comment.
1602         (dfs_vcall_offset_queue_p): Remove.
1603         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
1604         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
1605         (build_vtable_entry): Correct check for pure virtual functions.
1606         Don't declare flag_huge_objects.
1607         * decl.c (flag_huge_objects): Remove declaration.
1608         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
1609         Use int_size_in_bytes.
1610         (emit_thunk): Handle vcall offset thunks.
1611         
1612 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1613
1614         * decl2.c (parse_time, varconst_time): Delete declarations.
1615         (finish_file): Delete LINENO declaration.
1616         START_TIME and THIS_TIME now long.
1617
1618 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
1619
1620         * class.c (build_base_field): Reformat comment.
1621         
1622         * inc/cxxabi.h (stddef.h): Comment inclusion.
1623         (__base_class_info::__offset): Comment shift.
1624
1625 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
1626
1627         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
1628         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
1629         (cp_push_exception_identifier): New macro.
1630         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
1631         (DECL_BASE_DESTRUCTOR_P): Likewise.
1632         (DECL_DELETING_DESTRUCTOR_P): Likewise.
1633         (get_vtbl_decl_for_binfo): Fix formatting.
1634         (in_charge_arg_for_name): New macro.
1635         (maybe_build_cleanup_and_delete): Remove declaration.
1636         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
1637         (in_charge_arg_for_name): New function.
1638         (build_new_method_call): Use it.  Handle cloned destructors.
1639         (build_clone): Don't make the base constructor virtual.
1640         Automatically defer generated functions.
1641         (clone_function_decl): Handle destructors, too.
1642         (clone_constructors_and_destructors): Likewise.
1643         (create_vtable_ptr): Don't create a vtable entry for a cloned
1644         function.
1645         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
1646         (initialize_predefined_identifiers): Update appropriately.
1647         (finish_destructor_body): Simplify.
1648         (maybe_build_cleanup_and_delete): Remove.
1649         * except.c (expand_throw): Handle new-ABI destructors.
1650         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
1651         (build_dtor_call): New function.
1652         (build_delete): Use it.  Simplify.
1653         * optimize.c (maybe_clone_body): Handle destructors.
1654         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
1655         
1656         * exception.cc (cleanup_fn): New typedef.
1657         (CALL_CLEANUP): New macro.
1658         (cp_eh_info): Use them.
1659         (__cp_push_exception): Likewise.
1660         (__cp_pop_exception): Likewise.
1661         
1662 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
1663
1664         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
1665         (complete_dtor_identifier): New macro.
1666         (CLASSTYPE_FIRST_CONVERSION): Remove.
1667         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
1668         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
1669         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
1670         (CLASSTYPE_CONSTRUCTORS): Likewise.
1671         (CLASSTYPE_DESTRUCTORS): Likewise.
1672         (lang_decl): Add cloned_function.
1673         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
1674         (DECL_BASE_CONSTRUCTOR_P): Likewise.
1675         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
1676         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
1677         (DECL_CLONED_FUNCTION_P): Likewise.
1678         (DECL_CLONED_FUNCTION): Likewise.
1679         (clone_function_decl): Declare.
1680         (maybe_clone_body): Likewise.
1681         * call.c (build_user_type_conversion_1): Call complete object
1682         constructors in the new ABI.
1683         (build_new_method_call): Don't add in-charge parameters under the
1684         new ABI.
1685         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
1686         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
1687         CLASSTYPE_DESTRUCTOR_SLOT.
1688         (build_clone): New function.
1689         (clone_function_decl): Likewise.
1690         (clone_constructors_and_destructors): Likewise.
1691         (check_bases_and_members): Use it.
1692         * decl.c (iniitialize_predefined_identifiers): Initialize
1693         complete_dtor_identifier.
1694         (finish_function): Don't add extra code to a clone.
1695         (lang_mark_tree): Mark cloned_function.
1696         * decl2.c (mark_used): Don't bother trying to instantiate things
1697         we synthesized.
1698         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
1699         * method.c (set_mangled_name_for_decl): Don't treat clones as
1700         constructors.
1701         (synthesize_method): Sythesize cloned functions, not the clones.
1702         * optimize.c (inline_data): Update comment on ret_label.
1703         (remap_block): Don't assume DECL_INITIAL exists.
1704         (copy_body_r): Allow ret_label to be NULL.
1705         (maybe_clone_body): Define.
1706         * pt.c (tsubst_decl): Handle clones.
1707         (instantiate_clone): New function.
1708         (instantiate_template): Use it.
1709         (set_mangled_name_for_template_decl): Don't treat clones as
1710         constructors.
1711         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
1712         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
1713         * semantics.c (expand_body): Clone function bodies as necessary.
1714         
1715         * optimize.c (remap_decl): Avoid sharing structure for arrays
1716         whose size is only known at run-time.
1717         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
1718
1719         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
1720         to has_in_charge_parm_p.
1721         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
1722         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
1723         (DECL_COPY_CONSTRUCTOR_P): New macro.
1724         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
1725         (build_user_type_conversion_1): Likewise.
1726         (convert_like_real): Likewise.
1727         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
1728         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
1729         (copy_args_p): Likewise.
1730         (grok_ctor_properties): Likewise.
1731         (start_function): Likewise.
1732         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
1733         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
1734         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
1735         * method.c (do_build_copy_constructor): Use
1736         DECL_HAS_IN_CHARGE_PARM_P.
1737         (synthesize_method): Likewise.
1738         * pt.c (instantiate_template): Remove goto.
1739         * tree.c (build_cplus_method_type): Remove mention of obstacks in
1740         comment.
1741         
1742         * cp-tre.h (finish_function): Change prototype.
1743         * decl.c (end_cleanup_fn): Adjust caller.
1744         (finish_function): Take only one parameter.
1745         * decl2.c (finish_objects): Adjust caller.
1746         (finish_static_storage_duration_function): Likewise.
1747         * method.c (emit_thunk): Likewise.
1748         * parse.y: Likewise.
1749         * parse.c: Regenerated.
1750         * pt.c (instantiate_decl): Likewise.
1751         * rtti.c (synthesize_tinfo_fn): Likewise.
1752         * semantics.c (expand_body): Likewise.
1753
1754         * cp-tree.h (copy_decl): New function.
1755         * class.c (finish_struct_1): Use it.
1756         * lex.c (copy_decl): Define it.
1757         * pt.c (tsubst_decl): Likewise.
1758         * tree.c (copy_template_template_parm): Likewise.
1759         
1760         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
1761         has_nonpublic_assign_ref.
1762         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
1763         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
1764         * class.c (finish_struct_methods): Don't set
1765         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
1766         (interface_only): Don't declare.
1767         (interface_unknown): Likewise.
1768
1769 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1770
1771         * tree.h (HAVE_TEMPLATES): Remove definition.
1772         * lang-options.h (-fthis-is-variable): Remove documentation.
1773
1774 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
1775
1776         * class.c (instantiate_type): Handle object-relative template-id.
1777
1778         * semantics.c (finish_expr_stmt): Call convert_to_void here.
1779         * decl.c (cplus_expand_expr_stmt): Not here.
1780
1781         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
1782         Initialize exprtype earlier.
1783
1784         * parse.y (fn.def1): Check for defining types in return types.
1785
1786         * decl.c (check_tag_decl): Notice extra fundamental types.
1787         Diagnose empty decls in classes, too.
1788
1789         * decl.c (grokdeclarator): Don't override an anonymous name if no 
1790         declarator was given.
1791
1792         * cvt.c (convert_to_void): Call resolve_offset_ref.
1793
1794         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
1795
1796         * decl2.c (decl_namespace): Handle getting a type.
1797
1798         * typeck.c (build_c_cast): Re-enable warning for cast between
1799         pointer and integer of different size.
1800
1801 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
1802
1803         * inc/cxxabi.h (__pointer_type_info): Add restrict and
1804         incomplete flags.
1805         (__pointer_type_info::__pointer_catch): New virtual function.
1806         (__pointer_to_member_type_info): Derive from
1807         __pointer_type_info. Adjust.
1808         (__pointer_to_member_type_info::__do_catch): Remove.
1809         (__pointer_to_member_type_info::__is_pointer_p): Declare.
1810         (__pointer_to_member_type_info::__pointer_catch): Declare.
1811         * rtti.c (qualifier_flags): Add restrict flag.
1812         (ptmd_initializer): Reorder members.
1813         (create_tinfo_types): Expand comments. Reorder
1814         ptmd_desc_type_node members.
1815         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
1816         Implement.
1817         (__pointer_type_info::__do_catch): Move specific code into
1818         __pointer_catch. Call it.
1819         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
1820         specific catch checking. Fix void conversion check.
1821         (__pointer_to_member_type_info::__do_catch): Remove.
1822         (__pointer_to_member_type_info::__pointer_catch): Implement.
1823         
1824 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1825
1826         * lex.c (init_parse): Remove traces of classof and headof.
1827         * decl2.c (flag_operator_names): Default to 1.
1828         (lang_decode_option): Do not set it for -ansi.
1829
1830 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
1831
1832         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
1833         (DECL_MAIN_VARIANT): Remove.
1834         * decl.c (duplicate_decls): Don't set it.
1835         (start_function): Likewise.
1836         (lang_mark_tree): Don't mark it.
1837         * decl2.c (defer_fn): Don't use it.
1838         * lex.c (retrofit_lang_decl): Don't set it.
1839         * pt.c (tsubst_decl): Likewise.
1840         * ptree.c (print_lang_decl): Don't print it.
1841         * typeck.c (mark_addressable): Don't use it.
1842         
1843 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
1844
1845         * vec.cc: Include <new> and <exception>.
1846         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
1847         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
1848         terminate.
1849         (__cxa_vec_delete): Catch dtor exceptions.
1850
1851 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
1852
1853         Prepend __ to implementation defined names.
1854         * inc/typeinfo (type_info): Rename _name to __name.
1855         (type_info::type_info): Rename parameter.
1856         (type_info::operator==, type_info::operator!=,
1857         type_info::before): Likewise.
1858         (type_info::is_pointer_p, type_info::is_function_p,
1859         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
1860         parameters.
1861         * inc/cxxabi.h
1862         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
1863         (__pointer_type_info::__pointer_type_info): Likewise.
1864         (__pointer_type_info::is_pointer_p,
1865         __pointer_type_info::do_catch): Prepend __. Rename parameters.
1866         (__array_type_info::__array_type_info): Rename parameters.
1867         (__function_type_info::__function_type_info): Likewise.
1868         (__function_type_info::is_function_p): Prepend __.
1869         (__enum_type_info::__enum_type_info): Rename parameters.
1870         (__pointer_to_member_type_info::__pointer_to_member_type_info):
1871         Likewise.
1872         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
1873         parameters.
1874         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
1875         (__class_type_info::__class_type_info): Rename parameters.
1876         (__class_type_info::sub_kind): Prepend __. Adjust member names.
1877         (__class_type_info::upcast_result,
1878         __class_type_info::dyncast_result): Prepend __. Move definition
1879         into tinfo.cc.
1880         (__class_type_info::do_upcast, __class_type_info::do_catch,
1881         __class_type_info::find_public_src,
1882         __class_type_info::do_dyncast,
1883         __class_type_info::do_find_public_src): Prepend __. Rename
1884         parameters.
1885         (__si_class_type_info::__si_class_type_info): Rename parameters.
1886         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
1887         __si_class_type_info::do_find_public_src): Prepent __. Rename
1888         parameters.
1889         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
1890         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
1891         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
1892         parameters.
1893         (__dynamic_cast): Rename parameters.
1894         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
1895         type_info::do_catch, type_info::do_upcast): Prepend __.
1896         (contained_p, public_p, virtual_p, contained_public_p,
1897         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
1898         (__class_type_info::do_catch,
1899         __class_type_info::do_upcast): Prepend __. Adjust.
1900         (__class_type_info::__upcast_result,
1901         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
1902         Adjust.
1903         (__class_type_info::find_public_src): Prepend __. Adjust.
1904         (__class_type_info::do_find_public_src, 
1905         __si_class_type_info::do_find_public_src, 
1906         __vmi_class_type_info::do_find_public_src): Likewise.
1907         (__class_type_info::do_dyncast,
1908         __si_class_type_info::do_dyncast,
1909         __vmi_class_type_info::do_dyncast): Likewise.
1910         (__class_type_info::do_upcast,
1911         __si_class_type_info::do_upcast,
1912         __vmi_class_type_info::do_upcast): Likewise.
1913         (__dynamic_cast): Adjust.
1914         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
1915         (__function_type_info::is_function_p): Likewise.
1916         (__pointer_type_info::do_catch): Likewise. Adjust.
1917         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
1918         (__throw_type_match_rtti_2): Adjust.
1919         (__is_pointer): Adjust.
1920
1921 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
1922
1923         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
1924         (complete_ctor_identifier): New macro.
1925         (special_function_kind): Add sfk_copy_constructor and
1926         sfk_assignment_operator.
1927         (LOOKUP_HAS_IN_CHARGE): Remove.
1928         (cons_up_default_function): Rename to ...
1929         (implicitly_declare_fn): ... this.
1930         * call.c (build_new_method_call): Add in-charge parameters for
1931         constructors here.
1932         * class.c (add_implicitly_declared_members): Change parameter name
1933         from cant_have_assignment to cant_have_const_assignment.
1934         Replace calls to cons_up_default_function to implicitly_declare_fn.
1935         * cvt.c (ocp_convert): Use complete_ctor_identifier.
1936         * decl.c (initialize_predefined_identifiers): Initialize it.
1937         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
1938         complex expression.
1939         * init.c (expand_default_init): Don't calculate the in-charge
1940         parameter here.
1941         (build_new_1): Likewise.
1942         * lex.c (cons_up_default_function): Move to method.c.
1943         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
1944         (implicitly_declare_fn): New function.
1945         * typeck.c (build_static_cast): Use complete_ctor_identifier.
1946         (build_modify_expr): Likewise.
1947         * typeck2.c (build_functional_cast): Likewise.
1948         
1949         Under the new ABI, constructors don't return `this'.
1950         * cp-tree.h (warn_reorder): Declare.
1951         (special_function_kind): New enum.
1952         (global_base_init_list): Remove declaration.
1953         (emit_base_init): Don't return a value.
1954         (check_base_init): Don't declare.
1955         (is_aggr_typedef): Likewise.
1956         * decl.c (check_special_function_return_type): New function.
1957         (return_types): Remove.
1958         (grokdeclarator): Use check_special_function_return_type.
1959         (start_function): Don't initialize ctor_label under the new ABI.
1960         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
1961         * init.c (begin_init_stmts): Move to top of file.
1962         (finish_init_stmts): Likewise.
1963         (warn_reorder): Don't declare.
1964         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
1965         value.
1966         (check_base_init): Remove.
1967         (is_aggr_typedef): Likewise.
1968         (build_new_1): Don't use the return value of a constructor.
1969         * semantics.c (setup_vtbl_ptr): Don't use the return value
1970         of emit_base_init.
1971         * typeck.c (check_return_expr): Don't magically convert return
1972         statements into `return this' in constructors under the new ABI.
1973         
1974         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
1975         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
1976         (base_ctor_identifier): New macro.
1977         (base_dtor_identifier): Likewise.
1978         (deleting_dtor_identifier): Likewise.
1979         * decl.c: Don't include obstack.h.
1980         (obstack_chunk_alloc): Don't define.
1981         (obstack_chunk_free): Likewise.
1982         (struct predefined_identifier): New type.
1983         (initialize_predefined_identifiers): New function.
1984         (init_decl_processing): Use it.
1985         (debug_temp_inits): Remove.
1986         (start_method): Don't call preserve_data.
1987         (hack_incomplete_structures): Update comment.
1988         * init.c (init_init_processing): Don't initialize
1989         nelts_identifier.
1990         (build_offset_rf): Remove dead code.
1991         (build_delete): Use CLASSTYPE_N_BASECLASSES.
1992         * search.c (init_search_processing): Don't initialize
1993         vptr_identifier.
1994         
1995 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1996
1997         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
1998         some sign_compare warnings.
1999
2000 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
2001
2002         Rename abi::__vmi_class_type_info members.
2003         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
2004         base_list, detail_masks members to vmi_flags, vmi_base_count,
2005         vmi_bases and vmi_flags_masks respectively.
2006         (__vmi_class_type_info::vmi_flags_masks): Rename
2007         details_unknown_mask to flags_unknown_mask.
2008         * tinfo.cc (__class_type_info::do_upcast): Adjust.
2009         (__vmi_class_type_info::do_find_public_src): Adjust.
2010         (__vmi_class_type_info::do_dyncast): Adjust.
2011         (__vmi_class_type_info::do_upcast): Adjust.
2012         
2013 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
2014
2015         * tinfo.cc (convert_to_base): New function.
2016         (get_vbase_offset): Remove. Move into convert_to_base.
2017         (__vmi_class_type_info::do_find_public_src): Adjust.
2018         (__vmi_class_type_info::do_dyncast): Adjust.
2019         (__vmi_class_type_info::do_upcast): Adjust.
2020
2021 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
2022
2023         * tinfo.cc (operator=): Use __builtin_strcmp.
2024         * tinfo2.cc (before): Likewise.
2025
2026 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
2027
2028         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
2029         (DECL_SAVED_INLINE): Rename to ...
2030         (DECL_DEFERRED_FN): ... this.
2031         (in_function_p): Remove declaration.
2032         (mark_inline_for_output): Rename to ... 
2033         (defer_fn): ... this.
2034         * decl.c (finish_function): Adjust call to mark_inline_for_output.
2035         (in_function_p): Remove definition.
2036         * decl2.c (saved_inlines): Rename to ...
2037         (deferred_fns): ... this.
2038         (saved_inlines_used): Rename to ...
2039         (deferred_fns_used): ... this.
2040         (mark_inline_for_output): Rename to ...
2041         (defer_fn): ... this.
2042         (finish_file): Adjust accordingly.
2043         (init_decl2): Likewise.
2044         * lex.c (cons_up_default_function): Likewise.
2045         * pt.c (mark_decl_instantiated): Likewise.
2046         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
2047         circumstances.
2048         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
2049         * semantics.c (expand_body): Defer more functions.
2050
2051 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
2052
2053         * vec.cc: New file.
2054         * Make-lang.in (CXX_LIB2FUNCS): Add it.
2055         (vec.o): Build it.
2056         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2057         __cxa_vec_delete): Declare.
2058
2059 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
2060
2061         * rtti.c (dfs_class_hint_mark): New static function.
2062         (dfs_class_hint_unmark): New static function.
2063         (class_hint_flags): Use them.
2064
2065 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
2066
2067         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
2068
2069 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
2070
2071         * cp-tree.h (instantiate_decl): Change prototype.
2072         * decl2.c (mark_used): Adjust call.
2073         * optimize.c (inlinable_function_p): Adjust handling of templates.
2074         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
2075         (do_type_instantiation): Likewise.
2076         (instantiate_decl): Defer more templates.
2077         (instantiate_pending_templates): Adjust logic to handle inline
2078         friend functions.
2079
2080         * Makefile.in (GGC_H): New variable.  Use it throughout in place
2081         of ggc.h.
2082         
2083         * call.c: Don't include obstack.h.  Include ggc.h.
2084         (obstack_chunk_alloc): Don't define.
2085         (obstack_chunk_free): Likewise.
2086         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
2087         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
2088         (pop_switch): Free it.
2089
2090         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
2091
2092         * dump.c (dequeue_and_dump): Don't try to print the bit_position
2093         if we don't have a DECL_FIELD_OFFSET.
2094
2095 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
2096
2097         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
2098         special_function_p.
2099
2100 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2101
2102         * cfns.gperf (hash, libc_name_p): Prototype.
2103
2104         * rtti.c (build_dynamic_cast_1): Constification.
2105
2106         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
2107
2108         * semantics.c (deferred_type_access_control): Prototype.
2109
2110 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
2111
2112         Correct many new ABI issues regarding vbase and vcall offset
2113         layout.
2114         * cp-tree.h (BINFO_VTABLE): Document.
2115         (struct lang_type): Tweak formatting.
2116         (BINFO_PRIMARY_BINFO): Add to documentation.
2117         (CLASSTYPE_VSIZE): Fix typo in comment.
2118         (CLASSTYPE_VBASECLASSES): Update documentation.
2119         (BINFO_VBASE_MARKED): Remove.
2120         (SET_BINFO_VBASE_MARKED): Likewise.
2121         (CLEAR_BINFO_VBASE_MARKED): Likewise.
2122         (BINFO_FIELDS_MARKED): Remove.
2123         (SET_BINFO_FIELDS_MARKED): Likewise.
2124         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
2125         (enum access_kind): New enumeration.
2126         (num_extra_vtbl_entries): Remove declaration.
2127         (size_extra_vtbl_entries): Likewise.
2128         (get_vtbl_decl_for_binfo): New function.
2129         (dfs_vbase_unmark): Remove declaration.
2130         (mark_primary_bases): Likewise.
2131         * class.c (SAME_FN): Remove.
2132         (struct vcall_offset_data_s): Move definition.
2133         (build_vbase_pointer): Use `build', not `build_binary_op', to
2134         access the vbase pointer under the new ABI.
2135         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
2136         (build_primary_vtable): Likewise.
2137         (dfs_mark_primary_bases): Move here from search.c.
2138         (mark_primary_bases): Likewise.
2139         (determine_primary_bases): Under the new ABI, don't make a base
2140         class a primary base just because we don't yet have any virtual
2141         functions.
2142         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
2143         (num_vfun_entries): Remove.
2144         (dfs_count_virtuals): Likewise.
2145         (num_extra_vtbl_entries): Likewise.
2146         (size_extra_vtbl_entries): Likewise.
2147         (layout_virtual_bases): Iterate in inheritance graph order under
2148         the new ABI.
2149         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
2150         indicate that a vfield is present.
2151         (init_class_processing): Initialize access_public_node, etc., from
2152         ak_public, etc.
2153         (get_vtbl_decl_for_binfo): New function.
2154         (dump_class_hierarchy_r): Likewise.
2155         (dump_class_hierarchy): Use it.
2156         (finish_vtbls): Build the vtbls in inheritance graph order.
2157         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2158         (initialize_vtable): Use get_vtbl_decl_for_binfo.
2159         (accumulate_vtbl_inits): Add comments explaining why a pre-order
2160         walk is required.
2161         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
2162         where the vptr points, even for primary vtables.
2163         (build_vtbl_initializer): Adjust handling of vbase and vcall
2164         offsets.
2165         (build_vcall_and_vbase_vtable_entries): New function.
2166         (dfs_build_vbase_offset_vtbl_entries): Remove.
2167         (build_vbase_offset_vtbl_entries): Reimplement.
2168         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
2169         were already handled in a primary base class vtable.
2170         (build_vcall_offset_vtbl_entries): Adjust.
2171         (build_rtti_vtbl_entries): Adjust.
2172         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
2173         * init.c (expand_virtual_init): Simplify.
2174         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
2175         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
2176         * search.c (BINFO_ACCESS): New macro.
2177         (SET_BINFO_ACCESS): Likewise.
2178         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
2179         (access_in_type): Likewise.
2180         (dfs_accessible_p): Likewise.
2181         (protected_accessible_p): Likewise.
2182         (lookup_fnfields_1): Adjust documentation.
2183         (dfs_mark_primary_bases): Move to class.c
2184         (mark_primary_bases): Likewise.
2185         (dfs_vbase_unmark): Remove.
2186         (virtual_context): Use BINFO_FOR_VBASE.
2187         (dfs_get_vbase_types): Simplify.
2188         (dfs_build_inheritance_graph_order): New function.
2189         (get_vbase_types): Use it.
2190         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
2191
2192         * tinfo.cc (get_vbase_offset): New function.
2193         (__vmi_class_type_info::do_find_public_src): Use it.
2194         (__vmi_class_type_info::do_dyncast): Likewise.
2195         (__vmi_class_type_info::do_upcast): Likewise.
2196         
2197 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
2198
2199         * lang-specs.h: Pass -fno-show-column to the preprocessor.
2200
2201 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
2202
2203         * rtti.c (class_hint_flags): Rename flags.
2204         (class_initializer): Remove flags.
2205         (synthesize_tinfo_var): Combine offset and flags. Add flags
2206         for __vmi_class_type_info.
2207         (create_tinfo_types): Remove flags from __class_type_info and
2208         __si_class_type_info. Merge flags and offset from
2209         base_class_type_info.
2210         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
2211         (__base_class_info::is_virtual_p): Adjust.
2212         (__base_class_info::is_public_p): Adjust.
2213         (__base_class_info::offset): New accessor.
2214         (__class_type_info::details): Remove member.
2215         (__class_type_info::__class_type_info): Lose details.
2216         (__class_type_info::detail_masks): Remove.
2217         (__si_class_type_info::__si_class_type_info): Lose details.
2218         (__vmi_class_type_info::details): New member.
2219         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
2220         (__vmi_class_type_info::detail_masks): New member.
2221         * tinfo.cc (__class_type_info::do_upcast): Initialize result
2222         with unknown_details_mask.
2223         (__vmi_class_type_info::do_find_public_src): Adjust
2224         (__vmi_class_type_info::do_dyncast): Adjust.
2225         (__vmi_class_type_info::do_upcast): Set result details, if
2226         needed. Adjust.
2227         (__dynamic_cast): Temporarily #if out optimization.
2228
2229 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
2230
2231         * rtti.c (get_tinfo_decl): Mark used.
2232         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
2233         mark as dealt with, if we output it.
2234
2235 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
2236
2237         * class.c: Reorganize to put virtual function table initialization
2238         machinery at the end of the file.
2239
2240 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
2241
2242         * class.c (finish_struct): Use bitsize_zero_node.
2243         * pt.c (instantiate_class_template): Likewise.
2244
2245 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
2246
2247         Put RTTI entries at negative offsets in new ABI.
2248         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
2249         vbase offset at index -3, not -1.
2250         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
2251         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
2252         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
2253         (build_rtti_vtbl_entries): New function.
2254         (set_rtti_entry): Remove.
2255         (build_primary_vtable): Don't use it.
2256         (build_secondary_vtable): Likewise.
2257         (start_vtable): Remove.
2258         (first_vfun_index): New function.
2259         (set_vindex): Likewise.
2260         (add_virtual_function): Don't call start_vtable.  Do call
2261         set_vindex.
2262         (set_primary_base): Rename parameter.
2263         (determine_primary_base): Likewise.
2264         (num_vfun_entries): Don't use skip_rtti_stuff.
2265         (num_extra_vtbl_entries): Include RTTI information.
2266         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
2267         (skip_rtti_stuff): Remove.
2268         (dfs_modify_vtables): Don't use it.
2269         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
2270         (layout_nonempty_base_or_field): Update size handling.
2271         (create_vtable_ptr): Tweak.
2272         (layout_class_type): Adjust parameter names.
2273         (finish_struct_1): Simplify.
2274         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
2275         (skip_rtti_stuff): Remove.
2276         (first_vfun_index): New function.
2277         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
2278         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
2279         (marked_vtable_pathp): Declare.
2280         (unmarked_vtable_pathp): Likewise.
2281         * error.c (dump_expr): Use first_vfun_index to calculate vtable
2282         offsets.
2283         * rtti.c (build_headof): Look for RTTI at negative offsets.
2284         (get_tinfo_decl_dynamic): Likewise.
2285         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
2286         here.
2287         (create_pseudo_type_info): Do it here instead.  Adjust so that
2288         vptr points at first virtual function.
2289         * search.c (marked_vtable_pathp): Make it global.
2290         (unmarked_vtable_pathp): Likewise.
2291         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
2292         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
2293         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
2294         (get_pure_virtuals): Likewise.
2295         (expand_upcast_fixups): Likewise.
2296         * tree.c (debug_binfo): Likewise.
2297         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
2298         negative offset.
2299         
2300 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2301
2302         * class.c (check_field_decl): Fix typo.
2303         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
2304         (check_methods): Likewise.
2305         (check_field_decls): Likewise.
2306         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
2307         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
2308         Use DECL_RESULT_FLD, not DECL_RESULT.
2309         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
2310         * lex.c (identifier_type): Likewise.
2311         * pt.c (determine_specialization, lookup_template_class): Likewise.
2312         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
2313         (resolve_overloaded_unification, more_specialized): Likewise.
2314         * semantics.c (finish_member_declaration): Likewise.
2315         * typeck.c (build_x_function_call): Likewise.
2316         
2317 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
2318
2319         * class.c (layout_empty_base): Handle empty bases with non-byte
2320         alignment.
2321         (build_base_field): Likewise.
2322         (layout_virtual_bases): Likewise.
2323
2324         * class.c (finish_struct_1): Fix typo in this change:
2325         
2326         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2327
2328 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
2329
2330         * decl.c (grokdeclarator): Count partial specializations when
2331         keeping track of how many template classes have been seen.
2332
2333         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
2334         
2335 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2336
2337         * class.c (build_vbase_pointer_fields): layout_field now place_field.
2338         (get_vfield_offset): Use byte_position.
2339         (set_rtti_entry): Set OFFSET to ssizetype zero.
2340         (get_binfo_offset_as_int): Deleted.
2341         (dfs_record_base_offsets): Use tree_low_cst.
2342         (dfs_search_base_offsets): Likewise.
2343         (layout_nonempty_base_or_field): Reflect changes in RLI format
2344         and call byte_position.
2345         (layout_empty_base): Convert offset to ssizetype.
2346         (build_base_field): use rli_size_unit_so_far.
2347         (dfs_propagate_binfo_offsets): Do computation in proper type.
2348         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
2349         (layout_class_type): Reflect changes in RLI names and fields.
2350         (finish_struct_1): Set DECL_FIELD_OFFSET.
2351         * dump.c (dequeue_and_dump): Call bit_position.
2352         * expr.c (cplus_expand_constant): Use byte_position.
2353         * rtti.c (expand_class_desc): Use bitsize_one_node.
2354         * typeck.c (build_component_addr): Use byte_position and don't
2355         special case for zero offset.
2356         
2357 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2358
2359         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
2360         
2361         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
2362         tinfo object.
2363         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
2364         vtable.
2365
2366 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2367
2368         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
2369         DECL_P macros.
2370         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
2371         make_typename_type, check_initializer, cp_finish_decl,
2372         xref_tag): Likewise.
2373         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
2374         decl_namespace, arg_assoc_template_arg, arg_assoc,
2375         validate_nonmember_using_decl, do_class_using_decl): Likewise.
2376         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
2377         args_to_string): Likewise.
2378         * friend.c (is_friend): Likewise.
2379         * lex.c (note_got_semicolon, note_list_got_semicolon,
2380         is_global): Likewise.
2381         * method.c (build_overload_nested_name, build_overload_value,
2382         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
2383         * parse.y (typename_sub, typename_sub1): Likewise.
2384         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
2385         process_partial_specialization, convert_template_argument,
2386         template_args_equal, add_pending_template, lookup_template_class,
2387         for_each_template_parm_r, maybe_fold_nontype_arg,
2388         tsubst, instantiate_template, type_unification_real, unify,
2389         instantiate_pending_templates, set_mangled_name_for_template_decl):
2390         Likewise.
2391         * repo.c (repo_get_id, repo_template_used): Likewise.
2392         * search.c (lookup_field_1): Likewise.
2393         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
2394         * xref.c (classname): Likewise.
2395         
2396 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
2397
2398         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
2399         (CANONICAL_BINFO): New macro.
2400         (BINFO_NEW_VTABLE_MARKED): Use it.
2401         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
2402         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
2403         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
2404         not TREE_TYPE.
2405         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2406         (build_secondary_vtable): Likewise.
2407         (dfs_finish_vtbls): Likewise.
2408         (dfs_accumulate_vtbl_inits): Likewise.
2409         (accumulate_vtbl_inits): New function.
2410         (finish_vtbls): Make sure that virtual bases come after
2411         non-virtual bases in the vtable group.
2412         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
2413         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2414         * search.c (struct vbase_info): Move definition.
2415         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2416         (unmarked_new_vtable_p): Likewise.
2417         (dfs_mark_vtable_path): Remove.
2418         (dfs_mark_new_vtable): Remove.
2419         (dfs_unmark_new_vtable): Likewise.
2420         (dfs_clear_search_slot): Likewise.
2421         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
2422         (dfs_clear_vbase_slots): Likewise.
2423         (init_vbase_pointers): LIkewise.
2424         
2425 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
2426
2427         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
2428         SIZETYPE to a non-SIZETYPE.
2429
2430 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
2431
2432         * class.c (layout_virtual_bases): Adjust names in conditionally
2433         compiled code.
2434         
2435         * class.c (record_base_offsets): New function.
2436         (layout_conflict_p): Likewise.
2437         (layout_nonempty_base_or_field): Use it.
2438         (layout_empty_base): New function.
2439         (build_base_field): Use it.
2440         (build_base_fields): Update comment.
2441         (layout_virtual_bases): Fold in a little code form
2442         layout_basetypes.  Use layout_empty_base.
2443         (layout_basetypes): Remove.
2444         (end_of_class): New function.
2445         (layout_class_type): Use it.  Adjust.
2446
2447         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
2448         (fntype_p): Remove.
2449         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
2450         comment. 
2451         (dfs_skip_nonprimary_vbases_markedp): Likewise.
2452         * typeck.c (fntype_p): Remove.
2453
2454         * cp-tree.h (TI_SPEC_INFO): Remove.
2455         (CLASSTYPE_TI_SPEC_INFO): Likewise.
2456         * pt.c (process_partial_specialization): Likewise.
2457
2458         * class.c (build_base_field): Fix thinko in computation of binfo
2459         offsets.
2460
2461         * tree.c (mark_local_for_remap_p): Mark variables declared in
2462         TARGET_EXPRs as well.
2463
2464 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
2465
2466         * typeck.c (require_complete_type, complete_type,
2467         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
2468         build_array_ref, convert_arguments, pointer_diff,
2469         build_x_unary_op, build_unary_op, build_c_cast,
2470         build_modify_expr): Use COMPLETE_TYPE_P etc.
2471         * call.c (is_complete, convert_like_real,
2472         build_new_method_call): Likewise.
2473         * class.c (build_vbase_pointer_fields, check_bases,
2474         build_base_field, finish_struct_1, pushclass): Likewise.
2475         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
2476         * decl.c (maybe_process_template_type_declaration, pushtag,
2477         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
2478         layout_var_decl, check_initializer, cp_finish_decl,
2479         grokdeclarator, require_complete_types_for_parms,
2480         grok_op_properties, xref_tag, xref_basetypes,
2481         check_function_type): Likewise.
2482         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
2483         * friend.c (do_friend): Likewise.
2484         * init.c (build_offset_ref): Likewise.
2485         * parse.y (structsp): Likewise.
2486         * pt.c (maybe_process_partial_specialization,
2487         tsubst_friend_function, instantiate_class_template, tsubst,
2488         do_type_instantiation, instantiate_pending_templates): Likewise.
2489         * repo.c (repo_get_id): Likewise.
2490         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
2491         synthesize_tinfo_var, emit_support_tinfos): Likewise.
2492         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
2493         * semantics.c (begin_class_definition): Likewise.
2494         * tree.c (build_cplus_method_type): Likewise.
2495         * typeck2.c (digest_init, build_functional_cast,
2496         add_exception_specifier): Likewise.
2497         * parse.h, parse.c: Regenerated.
2498
2499 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
2500
2501         * inc/cxxabi.h: New header file. Define new-abi entry points.
2502         (__pointer_type_info::target): Rename member to ...
2503         (__pointer_type_info::type): ... here.
2504         (__base_class_info::type): Rename member to ...
2505         (__base_class_info::base): ... here.
2506         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
2507         * cp-tree.h (CPTI_ABI): New global tree enumeration.
2508         (abi_node): New global tree node.
2509         * decl.c (abi_node): Document.
2510         (init_decl_processing): Initialize abi_node.
2511         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
2512         (get_vmi_pseudo_type_info): Likewise.
2513         (create_tinfo_types): Likewise.
2514         (emit_support_tinfos): Likewise.
2515         * tinfo.h (cxxabi.h): Include for new-abi.
2516         Move rtti class definitions to new header file.
2517         * tinfo.cc (abi): Use the namespace.
2518         (std): Move new abi rtti classes from here ...
2519         (__cxxabiv1): ... to here.
2520         * tinfo2.cc (cxxabi.h): Include for new-abi.
2521         Move rtti class definitions to new header file.
2522         (std): Move new abi rtti classes from here ...
2523         (__cxxabiv1): ... to here.
2524         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
2525         namespace.
2526
2527 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
2528             Jason Merrill  <jason@casey.cygnus.com>
2529
2530         * method.c (build_overload_int): Use host_integerp.
2531
2532 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2533
2534         * init.c (build_offset_ref): Handle the case of a templated member
2535         function.
2536     
2537 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2538
2539         * except.c (expand_exception_blocks): Clear catch_clauses_last.
2540
2541 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
2542
2543         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
2544         * class.c (check_bitfield_decl): Turn illegal bitfields into
2545         non-bitfields.
2546         (dfs_propagate_binfo_offsets): Adjust for new size_binop
2547         semantics.
2548         (dfs_offset_for_unshared_vbases): Likewise.
2549         * cvt.c (cp_convert_to_pointer): Convert NULL to a
2550         pointer-to-member correctly under the new ABI.
2551         * expr.c (cplus_expand_constant): Don't use cp_convert when
2552         turning an offset into a pointer-to-member.
2553         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
2554         when dereferencing them under the new ABI.
2555         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
2556         of pointers-to-members under the new ABI.
2557         
2558         * class.c (check_bitfield_decl): Remove restriction on really long
2559         bitfields.
2560         (layout_class_type): Implement new ABI handling of bitfields
2561         longer than their types.
2562
2563 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2564
2565         * parse.y (extdefs): Call ggc_collect.
2566         * parse.c: Regenerated.
2567
2568 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
2569
2570         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
2571         (note_name_declared_in_class): Use OVL_CURRENT to get at a
2572         potential overload.
2573
2574 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2575
2576         * class.c (build_vbase_path): Use integer_zerop.
2577         (build_vtable_entry): Use tree_low_cst.
2578         (get_vfield_offset): Use bit_position.
2579         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
2580         Use tree_low_cst.
2581         (check_bitfield_decl): Set DECL_SIZE using convert.
2582         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
2583         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
2584         Use tree_low_cst.
2585         (finish_struct_1): Use bit_position.
2586         (dump_class_hierarchy): Use tree_low_cst.
2587         * cp-tree.h (min_precision): Add declaration.
2588         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
2589         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
2590         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
2591         * expr.c (cplus_expand_constant): Use bit_position.
2592         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
2593         * rtti.c (get_base_offset): Use bit_position.
2594         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
2595         host_integerp, and tree_low_cst.
2596         (pointer_int_sum): Use integer_zerop.
2597         (build_component_addr): Use bit_position.
2598         
2599 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
2600
2601         * typeck.c (require_complete_type): Don't assume size_zero_node.
2602         (complete_type_or_else): Likewise.
2603
2604 2000-03-16  Steven Grady <grady@digitaldeck.com>
2605             Jason Merrill  <jason@casey.cygnus.com>
2606
2607         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
2608
2609 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
2610
2611         * decl2.c (grokfield): Bail out if type is error_mark_node.
2612
2613 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
2614
2615         * tinfo2.cc (__ptr_to_member_data): Rename to ...
2616         (__pointer_to_member_data): ... here. Adjust.
2617         * rtti.c (create_tinfo_types): Adjust.
2618
2619 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
2620
2621         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
2622         * decl.c (ref_desc_type_node): Undocument.
2623         * rtti.c (ptr_ref_initializer): Rename to ...
2624         (ptr_initializer): ... here. Adjust comments.
2625         (ptmd_initializer): Fix comment thinko.
2626         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
2627         (create_tinfo_types): Remove ref_desc_type_node init.
2628         * tinfo2.cc (__reference_type_info): Remove.
2629
2630 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
2631
2632         * decl.c (cp_finish_decl): Remove obsolete comment.
2633         
2634         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
2635
2636 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
2637
2638         * cp-tree.h: Tweak documentation.
2639         * class.c (build_vbase_pointer_fields): Layout the fields, too.
2640         (avoid_overlap): Remove.
2641         (get_binfo_offset_as_int): New function.
2642         (dfs_serach_base_offsets): Likewise.
2643         (layout_nonempty_base_or_field): Likewise.
2644         (build_base_field): Layout fields here.  Avoid placing two objects
2645         of the same type at the same address, under the new ABI.
2646         (build_base_fields): Adjust accordingly.
2647         (create_vtable_ptr): Return the new field, but don't attach it to
2648         TYPE_FIELDS.
2649         (remove_base_field): Remove.
2650         (remove_base_fields): Remove.
2651         (layout_basetypes): Adjust accordingly.
2652         (layout_class_type): Call layout_field for each field, rather than
2653         just making a wholesale call to layout_type.
2654
2655 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
2656
2657         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
2658
2659 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
2660
2661         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
2662
2663         * except.c (dtor_nothrow): New fn.
2664         (do_pop_exception): Use it.  Take type parm.
2665         (push_eh_cleanup): Take type parm.
2666         (expand_start_catch_block): Pass it.
2667         (build_eh_type_type_ref): Accept null type.
2668
2669 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
2670
2671         * cp-tree.h (revert_static_member_fn): Change prototype.
2672         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
2673         (grok_op_properties): Likewise.
2674         (start_function): Likewise.
2675         (revert_static_member_fn): Simplify.
2676         * pt.c (check_explicit_specialization): Adjust call to
2677         revert_static_member_fn.
2678
2679 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
2680
2681         * cp-tree.h (scope_kind): New type.
2682         (tmpl_spec_kind): Likewise.
2683         (declare_pseudo_global_level): Remove.
2684         (pseudo_global_level_p): Rename to template_parm_scope_p.
2685         (pushlevel): Remove declaration.
2686         (begin_scope): New function.
2687         (finish_scope): Likewise.
2688         (current_tmpl_spec_kind): Likewise.
2689         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
2690         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
2691         Add template_spec_p.
2692         (toplevel_bindings_p): Adjust.
2693         (declare_pseudo_global_level): Remove.
2694         (pseudo_global_level_p): Rename to template_parm_scope_p.
2695         (current_tmpl_spec_kind): New function.
2696         (begin_scope): Likewise.
2697         (finish_scope): Likewise.
2698         (maybe_push_to_top_level): Adjust.
2699         (maybe_process_template_type_declaration): Likewise.
2700         (pushtag): Likewise.
2701         (pushdecl_nonclass_level): Likewise.
2702         (lookup_tag): Likewise.
2703         (grokfndecl): Handle member template specializations.  Share
2704         constructor and non-constructor code.
2705         * decl2.c (check_classfn): Handle member template specializations.
2706         * pt.c (begin_template_parm_list): Use begin_scope.
2707         (begin_specialization): Likewise.
2708         (end_specialization): Likewise.
2709         (check_explicit_specialization): Use current_tmpl_spec_kind.
2710         Handle member template specializations.
2711         (end_template_decl): Use finish_scope.  Remove call to
2712         get_pending_sizes.
2713         (push_template_decl_real): Remove bogus error message.
2714         (tsubst_decl): Fix typo in code contained in comment.
2715         (instantiate_template): Handle member template specializations.
2716         (most_general_template): Likewise.
2717         
2718 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
2719
2720         * lex.c (whitespace_cr): Compress consecutive calls to warning().
2721         (do_identifier): Ditto for error().
2722
2723         * pt.c (convert_nontype_argument): Ditto for cp_error().
2724         (convert_template_argument): Ditto for cp_pedwarn().
2725
2726 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
2727
2728         * exception.cc (__check_null_eh_spec): New fn.
2729         * except.c (expand_end_eh_spec): Call it if the spec is throw().
2730
2731 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
2732
2733         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
2734         * except.c (expand_end_eh_spec): Add the return type.
2735         * rtti.c (throw_bad_cast): Add the parmtypes.
2736         (throw_bad_typeid): Likewise.
2737
2738         * semantics.c (expand_stmt): Only leave out rtl for unused
2739         artificials, and set DECL_IGNORED_P on them as well.
2740         * decl.c (wrapup_globals_for_namespace): Likewise.
2741
2742 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
2743
2744         * decl.c (maybe_commonize_var): Skip all artificial decls.
2745         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
2746
2747 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
2748
2749         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
2750         * cp-tree.h: Declare flag_enforce_eh_specs.
2751         * decl.c (store_parm_decls, finish_function): Check it.
2752
2753         C library functions don't throw.
2754         * Makefile.in (cfns.h): New target.
2755         (except.o): Depend on it.
2756         * Make-lang.in (cc1plus): Depend on cfns.gperf.
2757         * cfns.gperf: New file.
2758         * cfns.h: Generated.
2759         * except.c: Include it.
2760         (nothrow_libfn_p): New fn.
2761         * decl.c (grokfndecl): Use it.
2762         * cp-tree.h: Declare it.
2763         
2764         * decl.c (push_overloaded_decl_1, auto_function, 
2765         define_function): Lose.
2766         (build_library_fn_1): New static fn.
2767         (builtin_function): Use it.
2768         (get_atexit_node): Use build_library_fn_ptr.
2769         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
2770         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
2771         push_void_library_fn, push_throw_library_fn): New fns.
2772         * cp-tree.h: Declare them.
2773         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
2774         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
2775         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
2776         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
2777         * rtti.c (build_runtime_decl): Lose.
2778         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 
2779         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
2780         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
2781
2782         * call.c (build_call): Remove result_type parm.
2783         Call mark_used on unused artificial fns.
2784         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
2785
2786 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
2787
2788         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
2789         appropriate.
2790         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
2791         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
2792         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
2793         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
2794         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
2795         expand_generic_desc): Likewise.
2796
2797 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2798
2799         * exception.cc (__cp_pop_exception): Cleanup the original object.
2800
2801 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2802
2803         * decl.c (grok_op_properties): Merge conversion to void warning
2804         with other silly op warnings.
2805
2806 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
2807
2808         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
2809         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
2810
2811 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2812
2813         * decl.c (cp_make_fname_decl): New function.
2814         (wrapup_globals_for_namespace): Don't emit unused static vars.
2815         (init_decl_processing): Remove comment about use of
2816         array_domain_type. Set make_fname_decl.
2817         (cp_finish_decl): Remove __FUNCTION__ nadgering.
2818         * semantics.c (begin_compound_stmt): Remove
2819         current_function_name_declared flagging.
2820         (expand_stmt): Don't emit unused local statics.
2821         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
2822         specially.
2823
2824 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2825
2826         * typeck.c (convert_for_assignment): Don't look at array
2827         initializer.
2828         * call.c (convert_like_real): Likewise. 
2829
2830 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
2831
2832         Add initial support for '\uNNNN' specifier.
2833         * lex.c (read_ucs): New fn.
2834         (readescape, skip_white_space): Call it.
2835         (is_extended_char, is_extended_char_1): New fns.
2836         (utf8_extend_token): New fn, #if 0'd out.
2837         (real_yylex): Treat extended chars like letters.
2838
2839         * search.c (note_debug_info_needed): Walk the bases even if we 
2840         weren't deferring the type itself.
2841
2842 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2843
2844         * decl2.c (finish_objects): Constify a char*.
2845
2846         * method.c (emit_thunk): Likewise.
2847
2848 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
2849
2850         * typeck.c (dubious_conversion_warnings): Look through
2851         REFERENCE_TYPE.
2852
2853 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2854
2855         * class.c (dfs_modify_vtables): I is now unsigned.
2856         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
2857         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
2858         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
2859         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
2860         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
2861         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
2862         Call integer_all_onesp.
2863         * typeck2.c (process_init_constructor): Use compare_tree_int.
2864
2865         * lang-specs.h (as): Don't call if -syntax-only.
2866
2867 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
2868
2869         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
2870         RTL_EXPR_HAS_NO_SCOPE after all.
2871
2872 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
2873
2874         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
2875         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
2876         RTL_EXPR_HAS_NO_SCOPE.
2877
2878         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
2879         later.
2880         
2881         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
2882
2883 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
2884
2885         * call.c (convert_like): Macrofy.
2886         (convert_like_with_context): New macro.
2887         (convert_like_real): Renamed from convert_like.  Add calling
2888         context parameters, for diagnostics. Add recursive flag.  Call 
2889         dubious_conversion_warnings for outer conversion.
2890         (build_user_type_conversion): Use convert_like_with_context.
2891         (build_over_call): Likewise. Don't warn about dubious
2892         conversions here. Adjust convert_default_arg calls.
2893         (convert_default_arg): Add context parameters for diagnostics.
2894         Pass throught to convert_like_with_context.
2895         * cp-tree.h (convert_default_arg): Add context parameters.
2896         (dubious_conversion_warnings): Prototype new function.
2897         * typeck.c (convert_arguments): Adjust convert_default_arg call.
2898         (dubious_conversion_warnings): New function, broken
2899         out of convert_for_assignment. 
2900         (convert_for_assignment): Adjust.
2901
2902 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
2903
2904         * decl2.c (key_method): Break out from...
2905         (import_export_vtable, import_export_class): ...here.
2906
2907         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
2908         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
2909
2910         * search.c (note_debug_info_needed, dfs_debug_mark, 
2911         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
2912         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
2913
2914 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
2915
2916         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
2917         typos.
2918
2919 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
2920
2921         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
2922         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
2923         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
2924         (lang_type): Split gets_new into has_new and has_array_new.
2925         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2926         (TYPE_GETS_NEW): Split into ...
2927         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
2928         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
2929         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
2930         (build_op_new_call): Don't declare.
2931         (build_new_1): Likewise.
2932         * call.c (build_op_new_call): Remove.
2933         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2934         instead of TYPE_NEEDS_DESTRUCTOR.
2935         (finish_struct_bits): Likewise.
2936         (add_implicitly_declared_members): Likewise.
2937         (check_field_decl): Likewise.
2938         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
2939         correctly under the new ABI.
2940         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2941         instead of TYPE_NEEDS_DESTRUCTOR.
2942         (initialize_local_var): Likewise.
2943         (destroy_local_var): Likewise.
2944         (cp_finish_decl): Likewise.
2945         (register_dtor_fn): Likewise.
2946         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
2947         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
2948         TYPE_VEC_DELETE_TAKES_SIZE here.
2949         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
2950         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
2951         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2952         (finish_destructor_body): Likewise.
2953         (maybe_build_cleanup_1): Likewise.
2954         * decl2.c (do_static_destruction): Likewise.
2955         * init.c (build_new_1): Make it static.
2956         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2957         (expand_cleanup_for_base): Likewise.
2958         (get_cookie_size): New function.
2959         (build_new_1): Handle array-new cookies correctly under the new
2960         ABI.
2961         (build_vec_delete_1): Likewise.
2962         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2963         (build_delete): Likewise.
2964         (build_vec_delete): Handle array-new cookies correctly under the new
2965         ABI.
2966         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2967         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
2968         TYPE_HAS_ARRAY_NEW_OPERATOR.
2969         * ptree.c (print_lang_type): Check them.
2970         * search.c (context_for_name_lookup): Fix typo in comment.
2971         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2972         * tree.c (break_out_cleanups): Likewise.
2973         (build_cplus_array_test_1): Likewise.
2974         (cp_build_qualified_type_real): Likewise.
2975         * typeck.c (complete_type): Likewise.
2976         
2977         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
2978         the command-line, not the end.
2979         
2980 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
2981
2982         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
2983
2984 2000-03-02  Tom Tromey  <tromey@cygnus.com>
2985
2986         * cp-tree.h (build_java_class_ref): Declare.
2987         * init.c (build_java_class_ref): No longer static.
2988         * except.c (expand_throw): Generate a Java-style `throw' if the
2989         thrown object is a "Java" object.
2990         (initialize_handler_parm): Generate a Java-style lookup of
2991         exception info if the caught object is a "Java" object.
2992         (catch_language, catch_language_init): New globals.
2993         (decl_is_java_type): New function.
2994         (expand_start_catch_block): Don't call push_eh_info() or
2995         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
2996         class reference to build_catch_block.
2997
2998 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2999
3000         * typeck.c (comptypes): Treat sizetype like its language equivalent.
3001
3002 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
3003
3004         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
3005         to merge reference/pointer code and fix incorrect warnings.
3006
3007 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
3008
3009         * search.c (protected_accessible_p): Use context_for_name_lookup.
3010
3011         * init.c (construct_virtual_bases): Fix thinko.
3012         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
3013
3014 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3015
3016         * decl.c (current_function_decl): Move to toplev.c.
3017
3018 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
3019
3020         * pt.c (fn_type_unification): Unify return type, whenever
3021         provided.
3022         (get_bindings_real): Only pass return type when necessary.
3023         Remove explicit return type check.
3024         * class.c (resolve_address_of_overloaded_function): Pass desired
3025         return type to fn_type_unification.
3026
3027 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3028
3029         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
3030         DECL_FIELD_SIZE.
3031         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
3032         DECL_FIELD_SIZE.
3033         * rtti.c (expand_class_desc): Likewise.
3034         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
3035         (THUNK_VCALL_OFFSET): Likewise.
3036         (THUNK_DELTA): Reflect changes in ../tree.h.
3037
3038 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
3039
3040         * search.c (protected_accessible_p): Also allow the access if
3041         the member is public in DERIVED.  Lose TYPE parm.
3042         (friend_accessible_p): Lose TYPE parm.
3043         (accessible_p): Adjust.
3044
3045 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3046
3047         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
3048         on things that are not sizes; ssize_binop deleted.
3049         Call size_diffop when appropriate.
3050         (dfs_build_vcall_offset_vtbl_entries): Likewise.
3051         (build_primary_vtable, build_secondary_vtable): Likewise.
3052         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
3053         Variable I is HOST_WIDE_INT.
3054         (get_vfield_offset): Pass proper types to size_binop.
3055         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
3056         (finish_struct_1): Likewise.
3057         (skip_rtti_stuff): Arg N is now pointer to signed.
3058         (layout_class_type): Use size_zero_node.
3059         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
3060         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
3061         * decl.c (complete_arry_type): Pass proper types to size_binop.
3062         (xref_basetypes): BINFO_OFFSET is sizetype.
3063         * error.c (dump_expr): Don't use size_binop non-sizes.
3064         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
3065         * init.c (construct_virtual_bases): Fix type error.
3066         (build_vec_delete_1): Pass proper type to size_binop and don't
3067         fold result.
3068         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
3069         * rtti.c (get_base_offset): Pass proper type to size_binop.
3070         * search.c (dfs_find_vbases): Fix type error.
3071         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
3072         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
3073         * tree.c (debug_binfo): Variable N is signed.
3074         Use HOST_WIDE_INT_PRINT_DEC.
3075         * typeck.c (comptypes): sizetype is same as equivalent integer type.
3076         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
3077         size_one_node and size_zero_node.
3078         (c_alignof): Use size_one_node.
3079         (build_component_addr): Pass proper types to size_binop.
3080         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
3081
3082 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
3083
3084         Implement class scope using-declarations for functions.
3085         * class.c (handle_using_decl): Call add_method for used functions.
3086         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
3087         (add_method): Used functions are hidden by local functions.
3088         (check_bases_and_members): Handle using-decls before finalizing
3089         CLASSTYPE_METHOD_VEC.
3090         * call.c (add_function_candidate): Add ctype parm; if non-zero,
3091         override the type of 'this' accordingly.
3092         (add_template_candidate, add_template_candidate_real): Add ctype parm.
3093         (convert_class_to_reference, build_user_type_conversion_1, 
3094         build_new_function_call, build_object_call, build_new_op,
3095         build_new_method_call): Pass ctype parm.
3096
3097         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
3098         the baselink.
3099         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
3100         build_new_function_call, build_object_call, build_new_op,
3101         build_new_method_call, build_op_delete_call): Don't get basetype_path
3102         from a baselink.
3103         * typeck.c (build_component_ref): Likewise.
3104         * init.c (build_offset_ref): Likewise.
3105         (resolve_offset_ref): Don't call enforce_access.  
3106         Call build_scoped_ref.
3107         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
3108         would cause an error or if -pedantic.
3109         * class.c (alter_access): Lose binfo parm.
3110
3111 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
3112
3113         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
3114         types.
3115
3116 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
3117
3118         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
3119         pseudo_type_info creation into the std namespace
3120
3121 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
3122
3123         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
3124         (import_export_class): Remove declaration.
3125         * decl2.c (import_export_class): Make it static.
3126         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
3127         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
3128         EXPR_WITH_FILE_LOCATION.
3129         * lex.c (check_newline): Tweak filename/lineno setting.
3130         * semantics.c (begin_while_stmt): Fix typo in comment.
3131         
3132 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3133
3134         * lang-options.h (-fmessage-length=): Add missing option.
3135
3136         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
3137
3138 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
3139
3140         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
3141
3142 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
3143
3144         * optimize.c (expand_call_inline): Emit the return label before
3145         evaluating the return value.
3146
3147 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
3148
3149         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
3150         than duplicating functionality here.
3151         * optimize.c: Include input.h.
3152         (expand_call_inline): Use push_srcloc and pop_srcloc.
3153         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
3154         * parse.c: Regenerated.
3155         * Makefile.in (lex.o): Depend on input.h.
3156         (optimize.o): Likewise.
3157         
3158 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
3159
3160         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
3161         function type, rather than ICE.
3162
3163 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
3164
3165         * decl.c (grokdeclarator): Call decl_type_access_control.
3166         * parse.y (parse_end_decl): Don't call decl_type_access_control if
3167         decl is null.
3168
3169 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
3170
3171         * decl.c (decls_match): Remove obsolete static member nadgering.
3172
3173 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3174
3175         * decl.c (grokdeclarator): Change ANSI to ISO.
3176         * lex.c (consume_string, readescape, do_identifier): Likewise.
3177         (parse_float, real_yylex): Likewise.
3178         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
3179         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
3180         new_type_id, maybe_label_decls, simple_stmt, 
3181         for.init.statement): Likewise.
3182         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
3183         * semantics.c (finish_named_return_value): Likewise.
3184         * parse.c: Regenerate.
3185
3186 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
3187
3188         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
3189         (CPTI_CLASS_STAR_TYPE): Remove.
3190         (vtable_index_type): Likewise.
3191         (class_star_type_node): Remove.
3192         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
3193         (build_binary_op_nodefault): Remove.
3194         * call.c (build_new_op): Use build_binary_op instead of
3195         build_binary_op_nodefault.
3196         * decl.c (init_decl_processing): Remove class_star_type_node
3197         initialization.  Make delta_type_node ptrdiff_type_node under the
3198         new ABI.  Initialize vtable_index_type.
3199         (build_ptrmemfunc_type): Build different structures for the new
3200         ABI.
3201         (build_enumerator): Use build_binary_op instead of
3202         build_binary_op_nodefault.
3203         * method.c (build_overload_value): Mangle pointers-to-members
3204         appropriately under the new ABI.
3205         * typeck.c (build_array_ref): Use build_binary_op instead of
3206         build_binary_op_nodefault.
3207         (get_member_function_from_ptrfunc): Adjust for the new ABI.
3208         (build_binary_op_nodefault): Rename to ...
3209         (build_binary_op): ... this.  Remove old version.  Adjust for
3210         pointer-to-member comparisons under the new ABI.
3211         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
3212         (build_ptrmemfunc): Adjust for the new ABI.
3213         (expand_ptrmemfunc_cst): Likewise.
3214         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
3215         (pfn_from_ptrmemfunc): Adjust for the new ABI.
3216         
3217 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
3218
3219         * call.c (build_object_call): Compress consecutive calls to
3220         cp_error.
3221         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
3222         (build_op_delete_call): Adjust message formatting.
3223
3224         * class.c (check_bases): Compress consecutive calls to
3225         cp_pedwarn. 
3226         (finish_struct_anon): Say 'ISO C++'.
3227
3228         * decl.c (start_decl): Same here.
3229         (grok_reference_init): Likewise.
3230         (grokfndecl): Correct message formatting.
3231         (grokfndecl): Improve diagnostic.
3232         (check_static_variable_definition): Likewise. Say 'ISO C++'
3233         (compute_array_index_type): Say 'ISO C++'
3234         (create_array_type_for_decl): Compress consecutive calls to
3235         cp_error. 
3236         (grokdeclarator): Say 'ISO C++'
3237         (grok_op_properties): Likewise.
3238
3239         * decl2.c (delete_sanity): Clairify diagnostic.
3240         (check_member_template): Same here.
3241         (grok_function_init): Use consistent terminology.
3242
3243         * expr.c (do_case): Say 'ISO C++'
3244
3245         * friend.c (do_friend): Compress consecutive calls to warning.
3246         
3247 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
3248
3249         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
3250         * class.c (build_secondary_vtable): Reorganize.  Don't create a
3251         new vtable under the new ABI.
3252         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
3253         computing the size.
3254         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
3255         the initializing elements.
3256         (initialize_vtable): New function.
3257         (dfs_finish_vtbls): Use it.
3258         (dfs_accumulate_vtbl_inits): New function.
3259         (finish_vtbls): Merge primary and secondary vtables under the new
3260         ABI.
3261         (finish_struct_1): Remove redundant call to layout_vtable_decl.
3262         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
3263         aren't VAR_DECLs.
3264
3265         * class.c (build_vtable): New function, split out from ...
3266         (get_vtable_decl): ... here, and ...
3267         (build_secondary_vtable): ... here.
3268
3269         * pt.c (tsubst_decl): Fix formatting.
3270         
3271 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3272
3273         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
3274         (avoid_overlap, build_base_field): Likewise.
3275         (build_base_field, build_base_fields, is_empty_class): 
3276         Test DECL_SIZE with integer_zero.
3277         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
3278         * cp-tree.h (struct lang_type): New field size_unit.
3279         (CLASSTYPE_SIZE_UNIT): New macro.
3280         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
3281         (cp_finish_decl): Delete -Wlarger-than processing.
3282         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
3283         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
3284         * tree.c (make_binfo): binfo vector is one entry longer.
3285         (walk_tree): Walk DECL_SIZE_UNIT.
3286
3287 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
3288
3289         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
3290         comment.
3291         (build_vtable_entry): Don't assume all vtable entries are
3292         functions.
3293         (build_vtbl_initializer): Adjust accordingly.
3294         (get_vtable_decl): Fix formatting.
3295         
3296 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
3297
3298         * semantics.c (deferred_type_access_control): Walk the entire
3299         type_lookups list.
3300         (save_type_access_control): Rename from 
3301         initial_deferred_type_access_control.  Just remember the value.
3302         (decl_type_access_control): New fn.
3303         (begin_function_definition): Use deferred_type_access_control, after
3304         we've started the function.  Set type_lookups to error_mark_node.
3305         * parse.y (frob_specs, fn.def1): Adjust.
3306         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
3307         (parse_end_decl, parse_bitfield0, parse_method): New fns.
3308         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
3309         (after_type_component_declarator0): Likewise.
3310         (after_type_component_declarator): Likewise.
3311         (notype_component_declarator): Likewise.
3312         * cp-tree.h: Adjust.
3313
3314         * decl.c (redeclaration_error_message): Allow redeclaration of 
3315         namespace-scope decls.
3316
3317 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3318
3319         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
3320
3321 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
3322
3323         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
3324         * decl2.c (grokclassfn): Likewise.
3325
3326         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
3327
3328         * decl2.c (lang_decode_option): Don't set default message length
3329         here.
3330         * lex.c (lang_init_options): Set it here.
3331
3332 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
3333
3334         Make DECL_CONTEXT mean the class in which a member function was
3335         declared, even for a virtual function.
3336         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
3337         (DECL_FRIEND_CONTEXT): New macro.
3338         (DECL_REAL_CONTEXT): Remove.
3339         (SET_DECL_FRIEND_CONTEXT): Likewise.
3340         (DECL_VIRTUAL_CONTEXT): Adjust.
3341         (DECL_CLASS_SCOPE_P): Use TYPE_P.
3342         (add_friends): Remove.
3343         (hack_decl_function_context): Likewise.
3344         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
3345         CP_DECL_CONTEXT.
3346         (build_over_call): Fix indentation.  Use DECL_CONTEXT
3347         instead of DECL_CLASS_CONTEXT.
3348         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
3349         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
3350         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3351         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
3352         (build_base_field): Likewise.
3353         (finish_struct_1): Likewise.
3354         (build_self_reference): Likewise.
3355         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
3356         DECL_REAL_CONTEXT.
3357         (pushtag): Use decl_function_context, not
3358         hack_decl_function_context.
3359         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3360         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
3361         (pushdecl): Remove bogus code.
3362         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
3363         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3364         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3365         Use decl_function_context, nothack_decl_function_context.
3366         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
3367         (grokdeclarator): Likewise.  Use decl_function_context, not
3368         hack_decl_function_context.
3369         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
3370         (start_function): Use DECL_FRIEND_CONTEXT, not
3371         DECL_CLASS_CONTEXT.  Use decl_function_context, not
3372         hack_decl_function_context.
3373         (finish_function): Use decl_function_context, not
3374         hack_decl_function_context.
3375         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
3376         DECL_CLASS_CONTEXT.
3377         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
3378         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
3379         (grokfield): Likewise.
3380         (finish_builtin_type): Likewise.
3381         (finish_vtable_vardec): Use decl_function_context, not
3382         hack_decl_function_context.
3383         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3384         (start_static_initialization_or_destruction): Likewise.
3385         (finish_static_initialization_or_destruction): Likewise.
3386         (mark_used): Adjust logic for deciding when to synthesize methods.
3387         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
3388         DECL_REAL_CONTEXT.
3389         * error.c (dump_function_decl): Use DECL_CONTEXT, not
3390         DECL_CLASS_CONTEXT.
3391         * friend.c (is_friend): Likewise.
3392         (add_friends): Remove.
3393         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
3394         * lex.c (begin_definition_of_inclass_inline): Use
3395         decl_function_context, not hack_decl_function_context.
3396         (process_next_inline): Likewise.
3397         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3398         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
3399         DECL_CLASSS_CONTEXT.
3400         (hack_identifier): Likewise.
3401         (synthesize_method):  Use decl_function_context, not
3402         hack_decl_function_context.
3403         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
3404         DECL_REAL_CONTEXT.
3405         (is_member_template): Use decl_function_context, not
3406         hack_decl_function_context.  Use DECL_CONTEXT, not
3407         DECL_CLASS_CONTEXT.
3408         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
3409         DECL_CLASS_CONTEXT.
3410         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
3411         DECL_REAL_CONTEXT.
3412         (push_template_decl_real): Likewise.
3413         (instantiate_class_template): Don't call add_friends.
3414         (tsubst_default_argument): Use DECL_CONTEXT, not
3415         DECL_REAL_CONTEXT.
3416         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
3417         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3418         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
3419         DECL_CLASS_CONTEXT.
3420         * repo.c (repo_inline_used): Likewise.
3421         * search.c (current_scope): Adjust for new _CONTEXT macros.
3422         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
3423         DECL_REAL_CONTEXT.
3424         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3425         (lookup_fnfields_here):Likewise.
3426         (check_final_overrider): Likewise.
3427         (init_vbase_pointers): Likewise.
3428         (virtual_context): Likewise.
3429         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
3430         (expand_body): Use decl_function_context, not
3431         hack_decl_function_context.
3432         * tree.c (hack_decl_function_context): Remove.
3433         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
3434         DECL_CLASS_CONTEXT.
3435         * typeck2.c (error_not_base_type): Likewise.
3436         
3437 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
3438
3439         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
3440
3441 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3442
3443         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
3444
3445 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
3446
3447         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
3448
3449 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
3450
3451         * decl2.c (lang_decode_option): Enable automatic line wrapping.
3452
3453 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
3454
3455         * parse.y (frob_specs): Split out...
3456         (parse_decl): From here.
3457         (fn.def2): Call initial_deferred_type_access_control.
3458         (after_type_component_declarator0): Call frob_specs.
3459         (notype_component_declarator0): Likewise.
3460         * search.c (friend_accessible_p): Nested classes are friends of their
3461         enclosing classes.
3462
3463 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
3464
3465         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
3466         used to create an implicit temporary.
3467
3468         * class.c (dfs_modify_vtables): Tweak calculation of functions to
3469         override.
3470
3471 2000-02-08  Nathan Sidwell  <nathan@acm.org>
3472
3473         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
3474         strip array element qualifiers too.
3475
3476 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
3477
3478         * decl.c (store_parm_decls): Don't build cleanups for parameters
3479         while processing_template_decl.
3480
3481 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
3482
3483         * cp-tree.h (struct saved_scope): Add incomplete field.
3484         (namespace_scope_incomplete): New macro.
3485         * decl.c (pushdecl): Use it.
3486         (hack_incomplete_structures): Use it.  See through artificial
3487         binding levels.
3488         (mark_saved_scope): Mark it.
3489
3490         Implement access control for nested types.
3491         * search.c (type_access_control): New fn.
3492         (accessible_p): Now we do perform access control for types.
3493         * semantics.c (deferred_type_access_control): New fn.
3494         (initial_deferred_type_access_control): New fn.
3495         (begin_function_definition): Call it.  Add lookups parm.
3496         * decl.c (struct binding_level): Add this_class field.
3497         (pushlevel_class): Set it.
3498         (mark_binding_level): Mark it.
3499         (lookup_name_real): Use it.  Call type_access_control.
3500         (mark_saved_scope): Mark lookups field.
3501         * cp-tree.h (flagged_type_tree): Add lookups field.
3502         (struct saved_scope): Add lookups field.
3503         (type_lookups): New macro.
3504         * parse.y (declmods): Now <ftype>.
3505         (parse_decl): Add lookups parm.  Call 
3506         initial_deferred_type_access_control.
3507         (lang_extdef): Clear type_lookups.
3508         (typed_declspecs, declmods, typespec): Set lookups field.
3509         (initdcl): Call deferred_type_access_control.
3510         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
3511         component_decl_1, named_parm): Adjust.
3512         * friend.c (is_friend): Nested classes are friends of their
3513         enclosing classes.
3514
3515         * class.c (currently_open_derived_class): New fn.
3516         * method.c (hack_identifier): Use it.
3517
3518         * lex.c (do_identifier): Remove obsolete code.
3519
3520         * parse.y (typed_typespecs): Propagate new_type_flag properly.
3521
3522 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
3523
3524         * tinfo.h: Remove apostrophes from C++ comment (xgettext
3525         thinks this file is plain C).
3526
3527 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3528
3529         * Makefile.in (call.o): Depend on $(EXPR_H).
3530
3531         * call.c: Include "expr.h".
3532
3533         * class.c (dump_class_hierarchy): Add prototype.
3534
3535         * search.c (dfs_get_pure_virtuals): Likewise.
3536
3537 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
3538
3539         * parse.y (simple_stmt): Allow :: token in asm parameter list.
3540         * parse.c: Rebuilt.
3541
3542 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
3543
3544         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
3545         Store it in DECL_FCONTEXT.
3546         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
3547
3548 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
3549
3550         * tinfo.h (old abi): #include "tconfig.h".
3551         * tinfo.cc (convert_to_base): Move into old abi section.
3552
3553 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
3554
3555         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
3556         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
3557         (BINFO_PRIMARY_BINFO): New macro.
3558         (BF_DELTA): Rename to ...
3559         (BV_DELTA): ... this.
3560         (BF_VCALL_INDEX): Rename to ...
3561         (BV_VCALL_INDEX): ... this.
3562         (BF_FN): Rename to ...
3563         (BV_FN): ... this.
3564         * class.c (build_vbase_path): Adjust for changes to reverse_path.
3565         (set_rtti_entry): Rename BF_ macros to BV_ variants.
3566         (modify_vtable_entry): Simplify.
3567         (add_virtual_function): Rename BF_ macros to BV_ variants.
3568         (build_vtable_initializer): Likewise.
3569         (get_class_offset_1): Remove.
3570         (dfs_get_class_offset): Likewise.
3571         (get_class_offset): Likewise.
3572         (dfs_find_final_overrider): New function.
3573         (find_final_overrider): Likewise.
3574         (modify_one_vtable): Remove.
3575         (dfs_find_base): New function.
3576         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
3577         find_final_overrider.
3578         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
3579         virtuals.
3580         (dfs_fixup_vtable_deltas): Remove.
3581         (override_one_vtable): Remove.
3582         (merge_overrides): Likewise.
3583         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
3584         unreal chilren of virtual bases.
3585         (finish_struct_1): Don't use merge_overrides.  Don't use
3586         dfs_fixup_vtable_deltas.
3587         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
3588         BINFOs.
3589         
3590 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3591             Jason Merrill  <jason@yorick.cygnus.com>
3592
3593         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
3594
3595 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
3596
3597         * exception.cc (__throw_bad_typeid): Add missing std::.
3598
3599 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3600
3601         * cp-tree.h (make_thunk): PROTO -> PARAMS.
3602
3603 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
3604
3605         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
3606
3607         Runtime support for new-abi rtti.
3608         * inc/typeinfo (type_info::operator!=): Define in class.
3609         (type_info::before, type_info::name, type_info::operator==,
3610         type_info::operator!=): Define new ABI implementations.
3611         (type_info::is_pointer_p, type_info::is_function_p): Declare
3612         new virtual functions.
3613         (type_info::do_catch, type_info::do_upcast): Likewise.
3614         
3615         * tinfo.h (__base_class_info): Define new class.
3616         (__class_type_info): Likewise.
3617         (__si_class_type_info): Likewise.
3618         (__vmi_class_type_info): Likewise.
3619         (__dynamic_cast): Prototype.
3620         
3621         * tinfo.cc: Conditionalize old and new rtti mechanisms.
3622         (type_info::is_pointer_p): Define new function.
3623         (type_info::is_function_p): Likewise.
3624         (type_info::do_catch): Likewise.
3625         (type_info::do_upcast): Likewise.
3626         (vtable_prefix): New structure for vtable access.
3627         (adjust_pointer): Define new template function.
3628         (contained_p, public_p, virtual_p, contained_public_p,
3629         contained_nonpublic_p, contained_nonvirtual_p): Define new
3630         functions.
3631         (nonvirtual_base_type): New local variable.
3632         (__class_type_info::~__class_type_info): Define.
3633         (__si_class_type_info::~__si_class_type_info): Likewise.
3634         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
3635         (__class_type_info::do_catch): Define new function.
3636         (__class_type_info::do_upcast): Likewise.
3637         (__class_type_info::find_public_src): Likewise.
3638         (__class_type_info::do_find_public_src): Likewise.
3639         (__si_class_type_info::do_find_public_src): Likewise.
3640         (__vmi_class_type_info::do_find_public_src): Likewise.
3641         (__class_type_info::do_dyncast): Likewise.
3642         (__si_class_type_info::do_dyncast): Likewise.
3643         (__vmi_class_type_info::do_dyncast): Likewise.
3644         (__class_type_info::do_upcast): Likewise.
3645         (__si_class_type_info::do_upcast): Likewise.
3646         (__vmi_class_type_info::do_upcast): Likewise.
3647         (__dynamic_cast): Likewise.
3648         
3649         * tinfo2.cc (__fundamental_type_info): Define new class.
3650         (__pointer_type_info): Likewise.
3651         (__reference_type_info): Likewise.
3652         (__array_type_info): Likewise.
3653         (__function_type_info): Likewise.
3654         (__enum_type_info): Likewise.
3655         (__ptr_to_member_type_info): Likewise.
3656         (__fundamental_type_info::~__fundamental_type_info): Define.
3657         (__pointer_type_info::~__pointer_type_info): Likewise.
3658         (__reference_type_info::~__reference_type_info): Likewise.
3659         (__array_type_info::~__array_type_info): Likewise.
3660         (__function_type_info::~__function_type_info): Likewise.
3661         (__enum_type_info::~__enum_type_info): Likewise.
3662         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
3663         (__pointer_type_info::do_catch): Define new function.
3664         (__ptr_to_member_type_info::do_catch): Define new function.
3665         
3666         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
3667         (__is_pointer): Likewise.
3668
3669         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
3670
3671 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
3672
3673         * cp/class.c (build_vtable): Rename to build_primary_vtable.
3674         (prepare_fresh_vtable): Rename to build_secondary_vtable.
3675         (make_new_vtable): New function.
3676         (modify_vtable_entry): Handle generation of new vtables correctly.
3677         (modify_one_vtable): Remove unused parameter.
3678         (dfs_fixup_vtable_deltas): Likewise.
3679         (override_one_vtable): Use build_secondary_vtable.
3680         (finish_struct_1): Use build_primary_vtable and
3681         build_secondary_vtable.
3682         
3683 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
3684
3685         * cp/decl.c: Adjust variable names, comments, help strings.
3686
3687 2000-01-29  Nathan Sidwell  <nathan@acm.org>
3688
3689         * new2.cc (operator delete[]): Use operator delete, don't assume
3690         implementation.
3691
3692 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
3693
3694         * class.c (build_vtbl_initializer): Add argument to
3695         build_vtable_entry call.
3696
3697 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
3698
3699         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
3700         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
3701         (BF_DELTA): New macro.
3702         (BF_VCALL_INDEX): Likewise.
3703         (BF_FN): Likewise.
3704         (THUNK_VCALL_OFFSET): Likewise.
3705         (make_thunk): Change prototype.
3706         * class.c (build_vtable_entry): Integrate
3707         build_vtable_entry_for_fn.  Handle vcall indices.
3708         (build_vtable_entry_for_fn): Remove.
3709         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
3710         BF_VCALL_INDEX, BF_FN.
3711         (modify_vtable_entry): Integrate common code from
3712         modify_one_vtable and dfs_fixup_vtable_deltas.
3713         (add_virtual_function): Set BF_VCALL_INDEX.
3714         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
3715         and BF_FN.
3716         (modify_one_vtable): Simplify.
3717         (dfs_fixup_vtable_deltas): Likewise.
3718         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
3719         * method.c (make_thunk): Handle vcall indices.
3720         
3721 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
3722
3723         Compiler side new abi rtti (not enabled).
3724         * cp-tree.h (new_abi_rtti_p): New macro.
3725         (emit_support_tinfos): Prototype new function.
3726         (tinfo_decl_p): Likewise.
3727         (emit_tinfo_decl): Likwise.
3728         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
3729         macros.
3730         (doing_runtime): New local static.
3731         (init_rtti_processing): Add new-abi initializer.
3732         (get_tinfo_decl): Add new-abi logic.
3733         (tinfo_from_decl): Likewise.
3734         (build_dynamic_cast_1): Likewise.
3735         (qualifier_flags): New static function.
3736         (tinfo_base_init): Likewise.
3737         (generic_initializer): Likewise.
3738         (ptr_ref_initializer): Likewise.
3739         (ptmd_initializer): Likewise.
3740         (class_hint_flags): Likewise.
3741         (class_initializer): Likewise.
3742         (synthesize_tinfo_var): Likewise.
3743         (create_real_tinfo_var): Likewise.
3744         (create_pseudo_type_info): Likewise.
3745         (get_vmi_pseudo_type_info): Likewise.
3746         (create_tinfo_types): Likewise.
3747         (emit_support_tinfos): New global function.
3748         (tinfo_decl_p): New global predicate.
3749         (emit_tinfo_decl): New global function.
3750         * class.c (set_rtti_entry): Generalize for old and new rtti.
3751         (build_vtbl_initializer): Likewise.
3752         * decl2.c (finish_file): Likewise.
3753
3754 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
3755
3756         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
3757         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
3758
3759 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
3760
3761         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
3762         for scopes.
3763
3764 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
3765
3766         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
3767
3768 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
3769
3770         * optimize.c (calls_setjmp_r): Supply new argument
3771         to special_function_p.
3772
3773 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3774
3775         * call.c: PROTO -> PARAMS.
3776         * class.c: Likewise.
3777         * cp-tree.h: Likewise.
3778         * cvt.c: Likewise.
3779         * decl.c: Likewise.
3780         * decl.h: Likewise.
3781         * decl2.c: Likewise.
3782         * dump.c: Likewise.
3783         * errfn.c: Likewise.
3784         * error.c: Likewise.
3785         * except.c: Likewise.
3786         * expr.c: Likewise.
3787         * init.c: Likewise.
3788         * input.c: Likewise.
3789         * lex.c: Likewise.
3790         * lex.h: Likewise.
3791         * method.c: Likewise.
3792         * optimize.c: Likewise.
3793         * parse.y: Likewise.
3794         * pt.c: Likewise.
3795         * repo.c: Likewise.
3796         * rtti.c: Likewise.
3797         * search.c: Likewise.
3798         * semantics.c: Likewise.
3799         * spew.c: Likewise.
3800         * tree.c: Likewise.
3801         * typeck.c: Likewise.
3802         * typeck2.c: Likewise.
3803         * xref.c: Likewise.
3804
3805 2000-01-25  Richard Henderson  <rth@cygnus.com>
3806
3807         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
3808
3809 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
3810
3811         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
3812         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
3813         (struct vcall_offset_data_s): New type.
3814         (dfs_vcall_offset_queue_p): New function.
3815         (dfs_build_vcall_offset_vtbl_entries): Likewise.
3816         (build_vcall_offset_vtbl_entries): Likewise.
3817         (layout_vtable_decl): Likewise.
3818         (num_vfun_entries): Likewise.
3819         (num_extra_vtbl_entries): Add the entries for vcall offsets.
3820         (build_vtbl_initializer): Likewise.
3821         (dfs_finish_vtabls): Use layout_vtable_decl.
3822         (modify_one_vtables): Always duplicate vtables under the new ABI.
3823         (finish_struct_1): Use layout_vtable_decl.
3824         
3825 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3826
3827         * decl.c (member_function_or_else): Change third arg from a format
3828         specifier to an `enum overload_flags'.  Callers changed.
3829
3830 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
3831
3832         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
3833         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
3834         build_const_cast, get_delta_difference, check_return_expr): Avoid
3835         ANSI string concatenation usage.  
3836
3837 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
3838
3839         * class.c (layout_class_type): Put the fields required to make a
3840         class non-empty at the end, not the beginning, of the TYPE_FIELDs
3841         list.
3842
3843 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
3844
3845         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
3846         template.
3847
3848         * decl2.c (mark_used): Do instantiate inlines that have been
3849         explicitly instantiated.
3850
3851 2000-01-24  Richard Henderson  <rth@cygnus.com>
3852
3853         * call.c (build_over_call): Use expand_tree_builtin.
3854         * typeck.c (build_function_call_real): Likewise.
3855         (build_binary_op_nodefault): Handle unordered compares.
3856
3857 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
3858
3859         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
3860         cp_tree_index values.
3861         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
3862         New global node #defines for them.
3863         * rtti.c (call_void_fn): Replace with ...
3864         (build_runtime_decl): ... new static function.
3865         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
3866         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
3867         (build_dynamic_cast_1): Always produce correctly typed result.
3868         Explicitly produce type_info addresses. Use dynamic_cast_node.
3869         * exception.cc (__throw_bad_cast): Return `void *'.
3870         (__throw_bad_typeid): Return `const type_info &'.
3871
3872 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
3873
3874         * cp-tree.h (get_vtable_decl): Prototype new function.
3875         * class.c (get_vtable_decl): New function. Broken out from ...
3876         (build_vtable): ... here. Use it.
3877         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
3878         by get_vtable_decl.
3879
3880 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
3881
3882         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
3883         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
3884         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
3885         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
3886         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
3887         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
3888         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
3889         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
3890         (CPTI_TINFO_VAR_ID): New enumeration.
3891         (__tp_desc_type_node, __access_mode_type_node,
3892         __bltn_desc_type_node, __user_desc_type_node,
3893         __class_desc_type_node, __ptr_desc_type_node,
3894         __attr_desc_type_node, __func_desc_type_node,
3895         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
3896         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
3897         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
3898         enum_desc_type_node, class_desc_type_node,
3899         si_class_desc_type_node, vmi_class_desc_type_node,
3900         ptmd_desc_type_node, base_desc_type_node): New #defines.
3901         (tinfo_fn_id, tinfo_fn_type): Rename to ...
3902         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
3903         (tinfo_var_id): New enumeration.
3904         (DECL_TINFO_FN_P): Augment comment.
3905         * decl.c (cp_global_trees): Adjust documentation.
3906         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
3907         tinfo_decl_type and tinfo_var_id.
3908         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
3909         (build_typeid): Remove unused variable.
3910         (get_tinfo_var): Use tinfo_var_id.
3911         (tinfo_name): New static function.
3912         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
3913         (tinfo_from_decl): Likewise.
3914         (get_base_offset): New static function, broken out of
3915         expand_class_desc.
3916         (expand_si_desc): Use tinfo_name.
3917         (expand_class_desc): Likewise. Lose local static variable.
3918         Use base_desc_type_node. Use get_base_offset.
3919         (expand_ptr_desc): Use tinfo_name.
3920         (expand_attr_desc): Likewise.
3921         (expand_generic_desc): Likewise.
3922
3923         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
3924         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
3925
3926 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
3927
3928         * cp-tree.h (__eprintf): Remove declaration.
3929         * tree.c (__eprintf): Remove definition.
3930
3931 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
3932             Mark Mitchell  <mark@codesourcery.com>
3933
3934         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3935         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
3936
3937 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
3938
3939         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
3940
3941 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
3942
3943         * cp-tree.h (register_dtor_fn): New function.
3944         * decl.c (destroy_local_static): Rename to ...
3945         (register_dtor_fn): ... this.  Give it external linkage.
3946         (expand_static_init): Use it.
3947         * decl2.c (do_static_initialization): Likewise, if using
3948         __cxa_atexit.
3949         (do_static_destruction): Check that __cxa_atexit is not in use.
3950         (finish_file): Don't call do_static_destruction if using
3951         __cxa_atexit.
3952
3953         * typeck.c (convert_arguments): Restore two-message error
3954         reporting.
3955         
3956 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
3957
3958         Remap dynamic cast hint values to be consistent across ABIs.
3959         * search.c (dynamic_cast_base_recurse): Remap generated value.
3960         (get_dynamic_cast_base_type): Adjust documentation.
3961         * tinfo.h (__user_type_info::dyncast): Likewise.
3962         (__user_type_info::find_public_subobj): Remap BOFF meaning.
3963         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
3964         (__class_type_info::do_dyncast): Likewise.
3965         (__class_type_info::do_find_public_subobj): Likewise.
3966         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
3967
3968 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
3969
3970         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
3971
3972         * typeck2.c (incomplete_type_error): Restore previous
3973         cp_error and cp_error_at call sequence.
3974         
3975 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
3976
3977         * class.c (dump_class_hierarchy): Make format agree with argument;
3978         cast pointer to unsigned long and print with %lx.
3979         
3980 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
3981
3982         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
3983         
3984         * typeck.c (composite_pointer_type, common_type,
3985         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
3986         build_function_call_real, convert_arguments,
3987         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
3988         build_unary_op, mark_addressable, build_compound_expr,
3989         build_static_cast, build_reinterpret_cast, build_const_cast,
3990         build_c_cast, build_modify_expr, get_delta_difference,
3991         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
3992         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
3993         into a single one.
3994         * typeck2.c (readonly_error, abstract_virtuals_error,
3995         process_init_constructor, check_for_new_type): Likewise.
3996
3997 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
3998
3999         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
4000         VAR_DECLs.
4001
4002 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
4003
4004         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
4005         (build_x_typeid): Likewise.
4006         (get_tinfo_fn): Likewise.
4007         (get_tinfo_fn_unused): Rename to ...
4008         (get_tinfo_decl): ... here.
4009         * rtti.c (build_headof): Replace logic error with assertion.
4010         (get_tinfo_fn_dynamic): Rename to ...
4011         (get_tinfo_decl_dynamic): ... here. Make static. Use
4012         complete_type_or_else.
4013         (build_x_typeid): Move into ...
4014         (build_typeid): ... here. Adjust call to
4015         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
4016         throw_bad_typeid expression.
4017         (get_tinfo_fn_unused): Rename to ...
4018         (get_tinfo_decl): ... here. Adjust comment.
4019         (get_tinfo_fn): Delete.
4020         (tinfo_from_decl): New static function.
4021         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
4022         (get_typeid): Use complete_type_or_else.
4023         (build_dynamic_cast_1): Adjust calls to
4024         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
4025         * parse.y (primary): Adjust call to build_typeid.
4026         * except.c (build_eh_type_type_ref): Adjust call to
4027         get_tinfo_decl. Mark as used.
4028         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
4029         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
4030         * parse.c: Regenerated.
4031
4032 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
4033
4034         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
4035         calling convention.
4036         (resolves_to_fixed_type_p): Document calling convention.
4037         * rtti.c (build_x_typeid): Initialize NONNULL.
4038
4039         * cp-tree.h (build_shared_int_cst): New function.
4040         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
4041         * class.c (modify_vtable_entry): Likewise.
4042         (add_virtual_function): Split out code to generated shared
4043         INTEGER_CSTs to build_share_int_cst.
4044         (modify_all_vtables): Handle all the overridden functions here.
4045         Add overridden functions from non-primary virtual bases to the
4046         primary vtable.
4047         (finish_struct_1): Adjust call to modify_all_vtables.  Add
4048         overridden functions from non-primary bases to the vtable.
4049         * tree.c (build_shared_int_cst): New function.
4050         
4051         * cp-tree.h (scratchalloc): Remove.
4052         (build_scratch_list): Likewise.
4053         * call.c (convert_class_to_reference): Replace build_scratch_list
4054         and build_expr_list with build_tree_list.
4055         (add_candidate): Replace scratchalloc with expralloc.  Note memory
4056         leak.
4057         (build_user_type_conversion_1):  Replace build_scratch_list
4058         and build_expr_list with build_tree_list.
4059         (build_new_op): Likewise.
4060         (build_op_delete_call): Likewise.
4061         (convert_like): Likewise.
4062         * cvt.c (ocp_convert): Likewise.
4063         * decl.c (start_decl): Likewise.
4064         (start_function): Likewise.
4065         (finish_destructor_body): Likewise.
4066         (maybe_build_cleanup_1): Likewise.
4067         * decl2.c (reparse_decl_as_expr): Likewise.
4068         * init.c (perform_member_init): Likewise.
4069         (expand_cleanup_for_base): Likewise.
4070         (build_builtin_delete_call): Likewise.
4071         (build_new_1): Likewise.
4072         (build_delete): Likewise.
4073         * method.c (do_build_assign_ref): Likewise.
4074         * parse.y (already_scoped_stmt): Likewise.
4075         (nontrivial_exprlist): Likewise.
4076         (net_initializer): Likewise.
4077         (initlist): Likewise.
4078         * parse.c: Regenerated.
4079         * rtti.c (build_x_typeid): Likewise.
4080         (build_dynamic_cast_1): Likewise.
4081         * typeck.c (build_x_compound_expr): Likewise.
4082         (build_static_cast): Likewise.
4083         (build_modify_expr): Likewise.
4084         
4085         * cp-tree.h (DECL_VINDEX): Add documentation.
4086         * class.c (build_vtable_entry): Likewise.
4087         (start_vtable): Add comment.
4088         (add_virtual_function): Replace pending_hard_virtuals with
4089         overridden_virtuals and pending_virtuals with new_virtuals.
4090         Replace redundant assignments with assertions.
4091         (check_for_override): Add comment.
4092         (check_bases_and_members): Replace pending_hard_virtuals with
4093         overridden_virtuals and pending_virtuals with new_virtuals.
4094         (create_vtbl_ptr): Likewise.
4095         (layout_class_type): Likewise.
4096         (finish_struct_1): Likewise.  Add comments.
4097         
4098 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
4099
4100         * class.c (finish_struct_1): Replace redundant code with
4101         assertions.
4102
4103         * cp-tree.h (flag_new_abi): Move.
4104         (flag_use_cxa_atexit): Likewise.
4105         (flag_honor_std): Likewise.
4106         (flag_rtti): Likewise.
4107         (vbase_offsets_in_vtable_p): Define.
4108         (vptrs_present_everywhere_p): Likewise.
4109         (TYPE_CONTAINS_VPTR_P): Likewise.
4110         (dfs_walk_real): Declare.
4111         * class.c (build_vbase_pointer_fields): Check
4112         vbase_offsets_in_vtable_p.
4113         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
4114         BINFO_VPTR_FIELD.
4115         (build_vbase_offset_vtbl_entries): Simplify.
4116         (build_vbase_offset_vtbl_entries): Adjust.
4117         (build_vbase_pointer): Add ability to look up vbase offsets in
4118         vtable. 
4119         (start_vtable): New function.
4120         (add_virtual_function): Use it.
4121         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
4122         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
4123         (build_vtbl_initializer): Take the type of the complete object as
4124         input.  Use it to correctly calculate vbase offsets.
4125         (dfs_finish_vtbls): Pass the complete type to
4126         build_vtbl_initializer.
4127         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
4128         (create_vtable_ptr): Create a vtable even if there are no
4129         new virtual functions, under the new ABI.
4130         (finish_struct_1): Likewise.
4131         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
4132         * decl.c (exapnd_static_init): Remove call to
4133         preserve_initializer.
4134         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
4135         vtables.
4136         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
4137         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
4138         (construct_virtual_bases): Don't initialize virtual base pointers
4139         under the new ABI.
4140         (build_aggr_init): Clean up comment.
4141         (expand_aggr_init_1): Likewise.
4142         * rtti.c (expand_class_desc): Store the virtual function table
4143         index where the vbase offset lives in the offset field.
4144         * search.c (dfs_walk_real): Make it global.
4145         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
4146         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
4147         
4148         * tinfo.h (USItype): Make it signed under the new ABI.
4149         * tinfo.cc (convert_to_base): New function.  Encapsulate base
4150         conversion logic here.
4151         (__class_type_info::do_upcast): Use it.
4152         (__class_type_info::do_dyncast): Likewise.
4153         (__class_type_info::do_find_public_subobj): Likewise.
4154         
4155         * init.c (construct_virtual_bases): Don't look up the addresses of
4156         virtual bases at run-time.
4157
4158         * class.c (build_vbase_pointer): Relocate.
4159         (build_vbase_pointer_fields): Likewise.
4160         (dfs_build_vbase_offset_vtbl_entries): Likewise.
4161         (build_vbase_offset_vtbl_entries): Likewise.
4162
4163         * decl.c (init_decl_processing): Complain if -fnew-abi
4164         -fno-vtable-thunks is used.
4165
4166         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
4167         flag_new_abi.
4168
4169 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
4170
4171         * cp-tree.h (num_extra_vtbl_entries): New function.
4172         (size_extra_vtbl_entries): Likewise.
4173         (dfs_vtable_path_unmark): Likewise.
4174         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
4175         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
4176         * class.c (num_extra_vtbl_entries): New function.
4177         (size_extra_vtbl_entries): Likewise.
4178         (dfs_build_vbase_offset_vtbl_entries): New function.
4179         (build_vbase_offset_vtbl_entries): Likewise.
4180         (build_vtbl_initializer): Use it.
4181         (finish_struct_1): Adjust vtable sizes (using
4182         num_extra_vtbl_entries).
4183         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
4184         THUNK_DECL is non-NULL before expanding it.
4185         * init.c (expand_virtual_init): Adjust the vtable pointer by
4186         size_extra_vtbl_entries before storing it.
4187         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
4188         Handle TREE_LIST parameters here, not in the dfs_* functions.
4189         (dfs_unmarked_real_bases_queue_p): Adjust.
4190         (dfs_marked_real_bases_queue_p): Likewise.
4191         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
4192         (dfs_vtable_path_marked_real_bases_queue_p): New function.
4193         (dfs_vtable_path_unmark): Likewise.
4194         
4195 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
4196
4197         * optimize.c (copy_body_r): Clear the operand three of a
4198         TARGET_EXPR when copying it.
4199
4200 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4201
4202         * method.c (build_decl_overload_real): Check whether we are in ::
4203         before returning __builtin_new/delete.
4204
4205 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
4206
4207         * pt.c (tsubst_friend_function): Improve comment.
4208         (instantiate_decl): Avoid crashing when a "nested" function is
4209         instantiated from the top level.
4210         
4211         * dump.c (dqeueue_and_dump): Dump
4212         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
4213
4214 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4215
4216         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
4217
4218 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
4219
4220         * g++spec.c (lang_specific_driver): Add -fnew-abi if
4221         ENABLE_NEW_GXX_ABI defined.
4222         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
4223         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
4224         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
4225
4226 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
4227
4228         * decl.c (start_cleanup_fn): Call pushdecl.
4229
4230         * call.c (convert_class_to_reference): Fix typos.
4231         (build_conditional_expr): Handle errors gracefully.
4232         * class.c (push_nested_class): Likewise.
4233         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
4234         (DECL_THIS_EXTERN): Use it.
4235         (DECL_THIS_STATIC): Likewise.
4236         * cvt.c (convert_to_void): Handle errors gracefully.
4237         (build_expr_type_conversion): Likewise.
4238         * decl.c (maybe_push_decl): Likewise.
4239         (start_decl_1): Likewise.
4240         (require_complete_types_for_parms): Likewise.
4241         * parse.y (structsp): Likewise.
4242         (base_class): Likewise.
4243         * parse.c: Regenerated.
4244         * pt.c (finish_member_template_decl): Likewise.
4245         * typeck.c (decay_conversion): Likewise.
4246         
4247         * cp-tree.h (dfs_skip_vbases): New function.
4248         (find_vbase_instance): Likewise.
4249         * class.c (determine_primary_base): Allow a nearly empty base to
4250         serve as a primary base class under the new ABI.
4251         (get_class_offset_1): Rename to ...
4252         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
4253         messages here.
4254         (get_class_offset): Use it.  Issue error messages here.
4255         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
4256         find the right copies of virtual bases.
4257         (fixup_vtable_deltas1): Rename to ...
4258         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
4259         bases as primary bases.
4260         (fixup_vtable_deltas): Remove.
4261         (override_one_vtable): Handle virtual bases as primary bases.
4262         (merge_overrides): Likewise.
4263         (finish_struct_1): Likewise.
4264         (dump_class_hierarchy): Dump primary-ness of bases as well.
4265         * search.c (mark_primary_bases): Use a pre-order traversal to
4266         handle primary virtual bases.
4267         (dfs_skip_vbases): New fiunction.
4268         (expand_upcast_fixups): Adjust to handle primary virtual bases.
4269         (fixup_virtual_upcast_offsets): Likewise.
4270         (fixup_all_virtual_upcast_offsets): Likewise.
4271         (dfs_find_vbase_instances): New function.
4272         (find_vbase_instance): Likewise.
4273         
4274 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
4275
4276         * lex.c (DIR_SEPARATOR): Delete macro.
4277
4278 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
4279  
4280        * decl2.c (lang_decode_option): Handle automatic line wrapping
4281        option.
4282         
4283 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
4284
4285         * friend.c (do_friend): Don't resolve scopes when processing
4286         template declarations, even if the qualifying scope doesn't
4287         involve template parameters.
4288
4289 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
4290
4291         * class.c (dfs_modify_vtables_queue_p): Remove.
4292         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
4293         and dfs_marked_real_bases_queue_p instead of
4294         dfs_modify_vtables_queue_p.
4295
4296         * class.c (build_vbase_path): Simplify.
4297         (dfs_propagate_binfo_offsets): New function.
4298         (propagate_binfo_offsets): Use it.
4299         (remove_base_field): Simplify.
4300         (dfs_set_offset_for_vbases): Remove.
4301         (dfs_set_offset_for_shared_vbases): New function.
4302         (dfs_set_offset_for_unshared_vbases): Likewise.
4303         (layout_virtual_bases): Use them.
4304         (layout_basetypes): Don't call propagate_binfo_offsets.
4305         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
4306         for the vbases.
4307         
4308         * class.c (build_base_field): New function, split out from ...
4309         (build_base_fields): ... here.  Use it.  Allocate primary bases
4310         first, under the new ABI.
4311         (get_vtable_entry): Remove.
4312         (remove_base_field): New function, split out from ...
4313         (remove_base_fields): ... here.  Adjust since primary bases come
4314         first under the new ABI.
4315         
4316         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
4317         (initialize_vtbl_ptrs): New function.
4318         (expand_indirect_vtbls_init): Change prototype.
4319         (convert_pointer_to_vbase): Declare.
4320         * init.c (expand_direct_vtbls_init): Remove.
4321         (dfs_initialize_vtbl_ptrs): New function.
4322         (initialize_vtbl_ptrs): Likewise.
4323         (emit_base_init): Use initialize_vtbl_ptrs.
4324         * search.c (convert_pointer_to_vbase): Make it global.
4325         (expand_indirect_vtbls_init): Remove vtable initialization code.
4326         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
4327         
4328         * class.c (dfs_finish_vtbls): New function.
4329         (finish_vtbls): Use it.
4330         (dump_class_hierarchy): New function.
4331         
4332         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
4333         (BINFO_VBASE_PRIMARY_P): New macro.
4334         (BINFO_VIRTUALS): Add to documentation.
4335         (SET_BINFO_PRIMARY_MARKED_P): Remove.
4336         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4337         (dfs_mark_primary_bases_queue_p): Likewise.
4338         (dfs_unmarked_real_bases_queue_p): New function.
4339         (dfs_marked_real_bases_queue_p): Likewise.
4340         * search.c (dfs_mark_primary_bases): Adjust.
4341         (mark_primary_bases): Likewise.
4342         (get_shared_vbase_if_not_primary): New function.
4343         (dfs_unmarked_real_bases_queue_p): Likewise.
4344         (dfs_marked_real_bases_queue_p): Likewise.
4345         (dfs_get_pure_virtuals): Simplify.
4346         (get_pure_virtuals): Likewise.
4347         
4348 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4349
4350         * lex.c: Include tm_p.h.
4351
4352 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
4353
4354         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
4355
4356 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
4357
4358         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
4359         * pt.c (instantiate_decl): Defer comdat templates that might not be
4360         needed.
4361         
4362         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
4363         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
4364         (finish_file): Likewise.
4365
4366         * decl2.c (import_export_class): Undo 12/14 change.
4367
4368         * error.c (dump_decl): operator new, not operatornew.
4369
4370         * class.c (field_decl_cmp): A nontype is "greater" than a type.
4371         * search.c (lookup_field_1): Look for the last field with the
4372         desired name.
4373
4374 2000-01-05  Nathan Sidwell  <nathan@acm.org>
4375
4376         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
4377         FUNCTION_DECL.
4378
4379 2000-01-05  Nathan Sidwell  <nathan@acm.org>
4380
4381         * typeck.c (build_static_cast): Don't strip target qualifiers
4382         when casting from a class.
4383
4384 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4385
4386         * class.c (warn_hidden): Initialize variable `fndecl'.
4387
4388 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
4389
4390         * decl.c (flag_isoc9x): New variable to be able to use code in
4391         c-common.c.  For now always zero.
4392
4393 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
4394
4395         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4396         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
4397         or unshare_base_binfos for virtual bases here.
4398         * search.c (dfs_get_vbase_types): Do it here.
4399         (get_vbase_types): Adjust.
4400         
4401 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
4402
4403         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
4404         (BINFO_PRIMARY_MARKED_P): Use flag 5.
4405         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4406         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4407         (unmark_primary_bases): Remove declaration.
4408         (unmarkedp): Declare.
4409         (dfs_vbase_unmark): Likewise.
4410         * class.c (determine_primary_base): Return immediately if there
4411         are no base classes.  Call mark_primary_bases here.
4412         (modify_all_direct_vtables): Remove.
4413         (modify_all_indirect_vtables): Remove.
4414         (dfs_modify_vtables_queue_p): New function.     
4415         (dfs_modify_vtables): New function.
4416         (modify_all_vtables): Use them.
4417         (build_base_fields): Build FIELD_DECLs for primary virtual base
4418         classes.
4419         (create_vtable_ptr): Don't call determine_primary_base here.
4420         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
4421         (dfs_set_offset_for_vbases): ... this.
4422         (layout_virtual_bases): Use it.
4423         (layout_class_type): Call determine_primary_base here.
4424         * search.c (unmarkedp): Make it global.
4425         (shared_marked_p): Simplify.
4426         (shared_unmarked_p): Likewise.
4427         (dfs_primary_bases_queue_p): Remove.
4428         (dfs_unmark_primary_bases): Likewise.
4429         (unmark_primary_bases): Likewise.
4430         (mark_primary_bases): Simplify.
4431         (get_pure_virtuals): Don't call mark_primary_bases here.
4432         (dfs_vbase_unmark): New function.
4433         (get_vbase_types): Simplify.
4434
4435         * class.c (struct base_info): Remove.
4436         (determine_primary_base): Take has_virtual_p rather than a
4437         base_info as input.  Don't calculate max_has_virtual.
4438         (finish_struct_bits): Remove max_has_virtual argument.
4439         (create_vtable_ptr): Remove max_has_virtual_p argument.
4440         (layout_virtual_bases): Remove max argument.
4441         (layout_basetypes): Likewise.
4442         (layout_class_type): Remove max_has_virtual_p argument.
4443         (finish_struct_1): Remove max_has_virtual.
4444
4445         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
4446         (layout_basetypes): Remove.
4447         * class.c (propagate_binfo_offsets): Moved here from tree.c.
4448         Update to handle primary virtual bases.
4449         (remove_base_fields): New function, split out from
4450         layout_basetypes.
4451         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
4452         (layout_virtual_bases): New function, split out from
4453         layout_basetypes.  Update to handle primary virtual bases.
4454         (layout_basetypes): Moved here from tree.c.  Use
4455         remove_base_fields and layout_virtual_bases.
4456         * search.c (dfs_mark_primary_bases_queue_p): New function.
4457         (mark_primary_bases): Use it.
4458         * tree.c (CEIL): Remove.
4459         (propagate_binfo_offsets): Remove.
4460         (layout_basetypes): Remove.
4461         
4462 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
4463
4464         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
4465         (BINFO_PRIMARY_MARKED_P): New macro.
4466         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4467         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4468         (mark_primary_bases): New function.
4469         (unmark_primary_bases): Likewise.
4470         * search.c (get_abstract_virtuals_1): Remove.
4471         (dfs_mark_primary_bases): New function.
4472         (mark_primary_bases): Likewise.
4473         (dfs_unmark_primary_bases): Likewise.
4474         (unmark_primary_bases): Likewise.
4475         (dfs_get_pure_virtuals): Likewise.
4476         
4477 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
4478
4479         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
4480         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
4481         (modify_one_vtable): Adjust.
4482         (fixup_vtable_deltas1): Likewise.
4483         (override_one_vtable): Likewise.
4484         * search.c (get_abstract_virtuals_1): Likewise.
4485         (get_pure_virtuals): Likewise.
4486         (expand_upcast_fixups): Likewise.
4487         * tree.c (debug_binfo): Likewise.
4488         
4489         * class.c (build_vtable): Don't return a value.  Don't rebuild
4490         vtables for bases that have already been handled.
4491         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
4492         already been handled.
4493         (modify_one_vtable): Adjust accordingly.
4494         (fixup_vtable_deltas1): Likewise.
4495         (finish_struct_1): Likewise.
4496
4497 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4498
4499         * call.c (build_new_method_call): Also check destructors.
4500
4501 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
4502
4503         * cp-tree.h (VF_NORMAL_VALUE): Remove.
4504         * class.c (struct base_info): Remove vfield, vfields, and rtti.
4505         (set_primary_base): New function, split out from ...
4506         (finish_base_struct): ... here.  Rename to ...
4507         (determine_primary_base): ... this.  Simplify.
4508         (create_vtable_ptr): Tweak accordingly.
4509         (finish_struct_1): Simplify.
4510         
4511         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
4512         (CLASSTYPE_N_BASECLASSES): Likewise.
4513         (BINFO_FOR_VBASE): New macro.
4514         (get_vbase_types): Change prototype.
4515         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
4516         (prepare_fresh_vtable): Likewise.
4517         (finish_vtbls): Likewise.
4518         (get_class_offset_1): Likewise.
4519         (modify_all_indirect_vtables): Likewise.
4520         (build_vbase_pointer_fields): Likewise.
4521         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
4522         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
4523         (expand_member_init): Likewise.
4524         * search.c (get_base_distance): Likewise.
4525         (lookup_field_queue_p): Likewise.
4526         (virtual_context): Likewise.
4527         (get_vbase_types): Don't return a value.  Set
4528         CLASSTYPE_VBASECLASSES here.
4529         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
4530         
4531 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
4532
4533         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
4534
4535 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
4536
4537         * class.c (create_vtable_ptr): Put the vtable at the beginning of
4538         the class, not the end, in the new ABI.
4539         * tree.c (propagate_binfo_offsets): Do the right thing for the new
4540         ABI.
4541
4542 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
4543
4544         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
4545         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
4546         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
4547         (check_field_decls): Likewise.
4548         (check_bases_and_members): Likewise.
4549
4550 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
4551
4552         * cp-tree.h (do_inline_function_hair): Remove.
4553         * class.c (layout_class_type): New function, split out from
4554         finish_struct_1.
4555         (fixup_pending_inline): Likewise.
4556         (fixup_inline_methods): New function.
4557         * method.c (fixup_pending_inline): Remove.
4558         (do_inline_function_hair): Likewise.
4559         
4560         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
4561         new ABI.
4562         
4563         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
4564         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
4565         (CLASSTYPE_PURE_VIRTUALS): ... this.
4566         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
4567         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
4568         (DECL_PURE_VIRTUAL_P): ... this.
4569         (get_abstract_virtuals): Rename to ...
4570         (get_pure_virtuals): ... this.
4571         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
4572         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
4573         CLASSTYPE_PURE_VIRTUALS.
4574         * class.c (build_vtable_entry): Likewise.
4575         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
4576         get_abstract_virtuals.
4577         (build_vtbl_initializer): Likewise.
4578         (override_one_vtable): Likewise.
4579         (check_methods): Likewise.
4580         * decl.c (duplicate_decls): Likewise.
4581         (redeclaration_error_message): Likewise.
4582         (lang_mark_tree): Likewise.
4583         * decl2.c (grok_function_init): Likewise.
4584         (import_export_vtable): Likewise.
4585         (import_expor_class): Likewise.
4586         * typeck2.c (abstract_virtuals_error): Likewise.
4587         * xref.c (GNU_xref_member): Likewise.
4588         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
4589         
4590 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
4591
4592         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
4593         throughout.
4594
4595 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
4596
4597         * decl.c (store_return_init): Use mode of old RTL generated for
4598         DECL_RESULT, not the mode of DECL_RESULT itself.
4599         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
4600         for functions that used named return values.
4601         
4602 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
4603
4604         * semantics.c (expand_body): Use
4605         note_deferral_of_defined_inline_function.
4606
4607 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
4608
4609         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
4610
4611 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
4612
4613         * error.c (dump_decl): Support named return values.
4614
4615 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
4616
4617         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
4618         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
4619         (CLASSTYPE_PRIMARY_BINFO): Likewise.
4620         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
4621         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
4622         (check_bases_and_members): Set them here instead.
4623         (create_vtable_ptr): New function, split out from ...
4624         (finish_struct_1): ... here.  Use it.  Tidy.  Use
4625         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
4626         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
4627         the first field in the class.
4628         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
4629         seeing TYPE_VFIELD as the first field in the class.
4630         
4631         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
4632         (TYPE_POLYMORPHIC_P): ... this.
4633         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
4634         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
4635         (TREE_CALLS_NEW): Remove.
4636         (TREE_MANGLED): Likewise.
4637         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
4638         and TYPE_POLYMORPHIC_P.
4639         * class.c (check_bases): Likewise.
4640         (finish_base_struct): Likewise.
4641         (finish_struct_bits): Likewise.
4642         (check_for_override): Likewise.
4643         (finish_struct_1): Likewise.
4644         (get_vfield_name): Likewise.
4645         * decl.c (xref_basetypes): Likewise.
4646         * decl2.c (import_export_class): Likewise.
4647         (import_export_decl): Likewise.
4648         * error.c (dump_function_decl): Likewise.
4649         * pt.c (instantiate_class_template): Likewise.
4650         * repo.c (repo_inline_used): Likewise.
4651         * rtti.c (build_headof): Likewise.
4652         (get_tinfo_fn_dynamic): Likewise.
4653         (build_x_typeid): Likewise.
4654         (get_tinfo_var): Likewise.
4655         (build_dynamic_cast_1): Likewise.
4656         (synthesize_tinfo_fn): Likewise.
4657         * search.c (lookup_field_1): Likewise.
4658         (dfs_debug_mark): Likewise.
4659         (maybe_suppress_debug_info): Likewise.
4660         * typeck.c (build_component_ref): Likewise.
4661         (build_component_addr): Likewise.
4662         * typeck2.c (process_init_constructor): Likewise.
4663         
4664 1999-12-20  Nathan Sidwell  <nathan@acm.org>
4665
4666         * typeck.c (strip_all_pointer_quals): New static function.
4667         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
4668
4669 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
4670
4671         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
4672         (dso_handle_node): New macro.
4673         (flag_use_cxa_atexit): New variable.
4674         (declare_global_var): New function.
4675         (start_anon_func): Remove declaration.
4676         (end_anon_func): Likewise.
4677         * decl.c (get_atexit_node): New function, split out from
4678         destroy_local_static.  Handle flag_use_cxa_atexit.
4679         (get_dso_handle_node): Likewise.
4680         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
4681         except.c.  Handle flag_use_cxa_atexit.
4682         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
4683         except.c.
4684         (declare_global_var): New variable.
4685         (destroy_local_static): Handle flag_use_cxa_atexit.
4686         * decl2.c (flag_use_cxa_atexit): New variable.
4687         (lang_f_options): Likewise.
4688         * except.c (start_anon_func): Remove.
4689         (end_anon_func): Liekwise.
4690         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
4691         * rtti.c (get_tinfo_var): Use declare_global_var.
4692
4693 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
4694
4695         * class.c (check_field_decls): Don't return a value.
4696         (avoid_overlap): Moved here from tree.c.
4697         (build_base_fields): Likewise.
4698         (check_bases): New function, split out from finish_base_struct.
4699         (check_bases_and_members): New function, split out from 
4700         finish_struct_1.
4701         (struct base_info): Remove cant_have_default_ctor,
4702         cant_have_const_ctor, cant_have_asn_ref.
4703         (finish_base_struct): Split semantic analysis into check_bases.
4704         (finish_struct_methods): Fix bogus assertion.
4705         (check_field_decls): Call finish_struct_anon here.
4706         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
4707         (finish_struct_1): Use check_bases_and_members.  Reorganize.
4708         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4709         (build_base_fields): Don't declare.
4710         * tree.c (avoid_overlap): Remove.
4711         (build_base_fields): Likewise.
4712         
4713         * optimize.c (struct inline_data): Remove scope_stmt.
4714         (remap_block): Don't use insert_block_after_note.  Don't update
4715         scope_stmt.
4716         (expand_call_inline): Don't update scope_stmt.
4717         (optimize_function): Don't initialize scope_stmt.
4718         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
4719         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
4720
4721 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
4722
4723         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
4724         out of the class, rather than taking them as parameters.
4725         (build_vbase_pointer_fields): Move here from tree.c.
4726         (build_vtbl_or_vbase_field): New function.
4727         (check_methods): Likewise.
4728         (remove_zero_width_bitfields): Likewise.
4729         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
4730         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
4731         USING_DECLs here.
4732         (finish_struct_methods): Handle the case where there are no
4733         methods here.
4734         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
4735         (check_field_decls): Call delete_duplicate_fields here.
4736         (finish_struct_1): Tidy.  Use check_methods and
4737         remove_zero_width_bitfields.
4738         * cp-tree.h (build_vbase_pointer_fields): Remove.
4739         * decl.c (grokdeclarator): Use tree_cons instead of
4740         temp_tree_cons.
4741         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
4742         instead of temp_tree_cons.
4743         * lex.c (cons_up_default_function): Remove dead code.
4744         * method.c (fixup_pending_inline): New function, split out from ...
4745         (do_inline_function_hair): ... here.
4746         * tree.c (build_vbase_pointer_fields): Remove.
4747         
4748 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
4749
4750         * tree.c (walk_tree): Walk operand subtrees in forward order.
4751         * optimize.c (expand_call_inline): Likewise.
4752         (optimize_function): Initialize id->scope_stmt to something useful.
4753         (remap_block): Assume id->scope_stmt has a useful value.
4754
4755 1999-12-15  Nathan Sidwell  <nathan@acm.org>
4756
4757         * typeck.c (build_c_cast): Expand warning message. Move pointer
4758         alignment warning to after the cast. Don't warn about pointer
4759         alignment when given a pointer to incomplete.
4760
4761 1999-12-15  Richard Henderson  <rth@cygnus.com>
4762
4763         * cp-tree.h (make_aggr_type): Declare.
4764         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
4765         (make_aggr_type): New.
4766
4767         * decl.c (build_typename_type, init_decl_processing): Use it.
4768         (build_ptrmemfunc_type, xref_tag): Likewise.
4769         * except.c (call_eh_info): Likewise.
4770         * init.c (init_init_processing): Likewise.
4771         * pt.c (process_template_parm, lookup_template_class): Likewise.
4772         * rtti.c (expand_class_desc): Likewise.
4773         * semantics.c (begin_class_definition, finish_typeof): Likewise.
4774         * tree.c (copy_template_template_parm): Likewise.
4775
4776 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
4777
4778         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
4779         sizeof (struct tree_common).
4780
4781 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
4782
4783         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
4784         outermost block to point to the inlined function decl.
4785
4786         * error.c (dump_decl): operator==, not operator ==.
4787         (op_to_string): Likewise.
4788
4789         * decl.c (compute_array_index_type): Handle null name.
4790
4791         * decl2.c (ambiguous_decl): Fix to match comment.
4792         (lookup_using_namespace): Adjust.
4793
4794         * decl2.c (import_export_class): Don't ignore dllimport.
4795
4796 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
4797
4798         * class.c (check_field_decls): Split out from ...
4799         (finish_struct_1): ... here.  Use it.  Tidy.
4800
4801         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
4802         * optimize.c (copy_body_r): Pass it.
4803         * tree.c (remap_save_expr): Clear walk_subtrees for an
4804         already-handled SAVE_EXPR.
4805         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
4806
4807         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
4808         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
4809
4810         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
4811
4812 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
4813
4814         * class.c (finish_base_struct): Allow multiple COM base classes
4815         as well as non-COM bases as long as it's not the leftmost.
4816
4817 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
4818
4819         * lex.c (saving_parse_to_obstack): New global.
4820         (reinit_parse_for_block): Use.
4821         (reinit_parse_for_expr): Use.
4822         (check_newline): Use.
4823
4824 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
4825
4826         * optimize.c (initialize_inlined_parameters): Take FN to which the
4827         parameters belong as an argument.
4828         (expand_call_inline): Expand calls into the parameter
4829         initializations before pushing the function onto the list of
4830         functions we are presently expanding.
4831
4832 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4833
4834         * class.c (get_vtable_name): Use a literal format string and
4835         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
4836         (prepare_fresh_vtable): Likewise.
4837
4838         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
4839         VTABLE_NAME_FORMAT.
4840
4841         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
4842
4843         * init.c (build_vec_init): Initialize variable `try_body'.
4844
4845         * lex.c (yyerror): Don't call a variadic function with a
4846         non-literal format string.
4847
4848         * optimize.c (optimize_function): Call memset, not bzero.
4849
4850         * pt.c (for_each_template_parm_r): Add static prototype.
4851
4852 1999-12-09  Andreas Jaeger  <aj@suse.de>
4853
4854         * except.c (expand_throw): Add static attribute to match
4855         prototype.
4856
4857         * Makefile.in (semantics.o): Add dependency on output.h.
4858         * semantics.c: Include output.h for declaration of
4859         make_function_rtl.
4860
4861 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
4862
4863         * decl.c (init_decl_processing): Reenable inlining on trees.
4864         (finish_function): Likewise.
4865         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
4866         * semantics.c (simplify_aggr_init_exprs): New function.
4867         (expand_body): Use it.
4868         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
4869         sometimes present the same sub-tree twice.
4870         
4871         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
4872         `csl'.
4873
4874         * semantics.c (finish_switch_cond): Do conversions here, not ...
4875         * typeck.c (c_expand_start_case): Here.
4876
4877         * semantics.c (do_poplevel): Remove unused variable.
4878         
4879 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
4880
4881         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
4882         unless we're declaring the variable in question.
4883
4884 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
4885
4886         * decl.c (init_decl_processing): #if 0 last patch.
4887         (finish_function): Likewise.
4888
4889 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
4890
4891         * decl.c (init_decl_processing): Set flag_inline_trees if
4892         !flag_no_inline.
4893
4894         * cp-tree.h (calls_setjmp_p): Declare.
4895         * decl.c (finish_function): Mark functions that call setjmp as
4896         uninlinable.
4897         * optimize.c (calls_setjmp_r): New function.
4898         (calls_setjmp_p): Likewise.
4899
4900 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
4901
4902         * optimize.c (expand_call_inline): Wrap the expanded call in an
4903         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
4904         inlined functions.
4905
4906         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
4907         in_target_cleanup_p.
4908         (remap_decl): New function.
4909         (remap_block): Likewise.
4910         (copy_scope_stmt): Likewise.
4911         (copy_body_r): Use remap_decl and copy_scope_stmt.
4912         (copy_body): Use VARRAY_TOP_TREE.
4913         (initialize_inlined_parameters): Likewise.
4914         (declare_return_variable): Likewise.
4915         (inlinable_function_p): Check flag_inline_trees.
4916         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
4917         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
4918         parameters of the inlined function.
4919         (optimize_function): Prevent recursion into partially complete
4920         functions.
4921         
4922         * cp-tree.def (SCOPE_STMT): Take one operand.
4923         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
4924         (SCOPE_NULLIFIED_P): Redefine.
4925         (SCOPE_NO_CLEANUPS_P): New macro.
4926         (add_scope_stmt): Change prototype.
4927         * decl.c (poplevel): Tidy.  Warn about unused variables here.
4928         Record SCOPE_STMT_BLOCKs.
4929         (finish_function): Keep DECL_INITIAL for functions that might be
4930         inlined.
4931         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
4932         * semantics.c: Include rtl.h.
4933         (add_scope_stmt): Return the new scope statement and, for an
4934         end-of-scope statement, its matching begin statement.  Don't set
4935         SCOPE_NULLIFIED_P.
4936         (do_pushlevel): Simplify, now that we are always
4937         function-at-a-time.
4938         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
4939         (expand_stmt): Don't call expand_start_bindings or
4940         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
4941         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
4942         SCOPE_NULLIFIED_P.
4943         * Makefile.in (semantics.o): Depend on RTL_H.
4944         
4945         * decl2.c (pending_statics_used): Make it a macro.
4946         (saved_inlines_used): Likewise.
4947         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
4948         (mark_inline_for_output): Likewise.
4949         (ssdf_decls_used): Remove.
4950         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
4951         (generate_ctor_or_dtor_function): Adjust accordingly.
4952         
4953 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
4954             Greg McGary  <gkm@gnu.org>
4955
4956         * decl.c (duplicate_decls): Merge
4957         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
4958         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
4959
4960 1999-12-02  Mike Stump  <mrs@wrs.com>
4961
4962         * init.c (perform_member_init): Handle parse errors better.
4963
4964 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
4965
4966         * cp-tree.h (min_tree_cons): Remove.
4967         (scratch_ovl_cons): Likewise.
4968         * decl.c (saveable_obstack): Don't declare.
4969         (duplicate_decls): Tweak error-message.
4970         (initialize_local_var): Explicitly mark the definition as static.
4971         (finish_function): Call permanent_allocation, just so
4972         that the middle-end sees the obstacks it expects.
4973         (mark_cp_function_context): Likewise.
4974         * init.c (build_new): Don't use min_tree_cons.
4975         * lex.c (permanent_obstack): Don't declare.
4976         (current_obstack, saveable_obstack): Likewise.
4977         * spew.c (current_obstack, saveable_obstack): Likewise.
4978         * tree.c (current_obstack, saveable_obstack): Likewise.
4979         (scratch_ovl_cons): Remove.
4980         (build_min_nt): Don't mess with obstacks.
4981         (build_min): Likewise.
4982         (min_tree_cons): Remove
4983         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
4984         (build_x_function_call): Likewise.
4985         (build_c_cast): Don't use min_tree_cons.
4986         
4987 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
4988
4989         * pt.c (tsubst_decl): Robustify.
4990
4991 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
4992
4993         * decl2.c (finish_file): Call expand_body for inline functions
4994         that will be written out but that do not yet have RTL.
4995         * semantics.c (expand_body): Do not generate RTL For inline
4996         functions that do not yet need to be written out.
4997
4998 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
4999
5000         * Make-lang.in (CXX_SRCS): Add optimize.c.  
5001         * Makefile.in (CXX_OBJS): Add optimize.o.
5002         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
5003         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
5004         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
5005         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
5006         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
5007         (dump.o): Likewise.
5008         (optimize.o): New target.  
5009         * class.c: Don't include splay-tree.h.
5010         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
5011         * cp-tree.h: Include splay-tree.h.
5012         (DECL_UNINLINABLE): New macro.
5013         (CTOR_BEGIN_P, CTOR_END_P): New macros.
5014         (flag_inline_trees): New variable.
5015         (local_variable_p): New function.
5016         (nonstatic_local_decl_p): Likewise.
5017         (optimize_function): Likewise.
5018         (cplus_unsave_expr_now): Remove.
5019         (copy_tree_r): Declare.
5020         (remap_save_expr): Likewise.  
5021         * decl.c (local_variable_p): Don't
5022         make it static.
5023         (local_variable_p_walkfn): New function.
5024         (make_rtl_for_local_static): Remove code to try to avoid writing
5025         out static constants.
5026         (emit_local_var): Fix indentation.
5027         (nonstatic_local_decl_p): New function.
5028         (check_default_argument): Use local_variable_p_walkfn, not
5029         local_variable_p, when walking the tree.
5030         (start_function): Set the DECL_CONTEXT for automatically generated
5031         labels.
5032         (finish_constructor_body): Use CTOR_STMT to mark the end of a
5033         constructor.  
5034         * decl2.c: Don't include splay-tree.h.
5035         (flag_inline_trees): Define.  
5036         * dump.c: Don't include
5037         splay-tree.h.  
5038         * except.c (expand_end_catch_block): Fix comment formatting.
5039         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
5040         (expand_throw): Tidy comment.  
5041         * init.c (build_vec_delete_1): Use create_temporary_var.  
5042         * lex.c (cplus_tree_code_type): Make it static.
5043         (cplus_tree_code_length): Likewise.
5044         (cplus_tree_code_name): Likewise.  
5045         * optimize.c: New file.  
5046         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
5047         with computed gotos.
5048         (setup_vtbl_ptr): Mark the beginnings of constructors with
5049         CTOR_STMT.
5050         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
5051         (expand_body): Call optimize_function.  Save bodies if we're doing
5052         inlining on trees.
5053         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
5054         integrate.h.
5055         (copy_tree_r): Make it public.
5056         (statement_code_p): New function.
5057         (mark_local_for_remap_r): Likewise.
5058         (cp_usave_r): Likewise.
5059         (cp_unsave): Likewise.
5060         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
5061         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
5062         (copy_tree_r): Handle 's' class nodes.  Restore chains for
5063         statements.  Nullify scopes.  Don't copy types.
5064         (init_tree): Set lang_unsave to cp_unsave.
5065         (remap_save_expr): Define.
5066         * ir.texi: Document CTOR_STMT.
5067         
5068 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
5069
5070         * search.c (note_debug_info_needed): Do perform this optimization
5071         for dwarf2.  
5072         (maybe_suppress_debug_info): Likewise.  Start by clearing
5073         TYPE_DECL_SUPPRESS_DEBUG.
5074
5075 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
5076
5077         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
5078
5079         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
5080
5081 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5082
5083         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
5084         function with a non-literal format string.
5085
5086         * lex.c (do_identifier): Likewise.
5087
5088         * typeck.c (build_unary_op): Likewise.
5089
5090 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
5091
5092         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
5093
5094 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
5095
5096         * cp-tree.def (CTOR_COMPLETE): New tree node.
5097         * decl.c (finish_constructor_body): Add it, to mark the end of the
5098         constructor.
5099         (finish_function): Don't call end_protect_partials here.
5100         * ir.texi (CTOR_COMPLETE): Document it.
5101         * semantics.c (expand_stmt): Handle it.
5102         
5103         * cp-tree.def (FUNCTION_NAME): New tree node.
5104         * cp-tree.h (current_function_name_declared): Tweak documentation.
5105         (lang_decl_flags): Add pretty_function_p, adjust dummy.
5106         (DECL_PRETTY_FUNCTION_P): New macro.
5107         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
5108         etc., in a template function.  Use at_function_scope_p instead of
5109         expanding it inline.
5110         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
5111         specially.
5112         (tsubst): Handle FUNCTION_NAME.
5113         (tsubst_copy): Likewise.
5114         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
5115         etc. in instantiation.
5116         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
5117         even in template functions.
5118         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
5119         conditional scope at the top of a destructor.
5120         
5121         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
5122         specializations too.
5123
5124 1999-11-22  Nathan Sidwell  <nathan@acm.org>
5125
5126         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
5127         when actually negative.
5128
5129         * typeck.c (convert_for_assignment): Expand comment about
5130         strange NULL check, moved from ...
5131         (convert_for_initialization): ... here. Remove unneeded
5132         code.
5133
5134 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
5135
5136         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
5137         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
5138         Always destruct virtual bases of array components, but never
5139         delete them.
5140         (build_vec_init): Adjust invocations.
5141         (build_delete): Likewise.
5142         * decl2.c (delete_sanity): Likewise.
5143
5144 1999-11-19  Nathan Sidwell  <nathan@acm.org>
5145
5146         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
5147         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
5148         * decl2.c (grok_method_quals): Accept `restrict' as applying to
5149         the object pointer. Return such qualifiers.
5150         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
5151         variables.
5152
5153 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
5154
5155         * except.c (expand_end_catch_block): Fix typo.
5156         (expand_exception_blocks): Simplify.  Don't call
5157         expand_leftover_cleanups.
5158
5159 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
5160
5161         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
5162         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
5163         Check uses_template_parms.
5164
5165         * class.c (finish_struct): If we're a local class in a template
5166         function, add a TAG_DEFN.
5167         * pt.c (lookup_template_class): If this is a local class in a
5168         template function, call pushtag.
5169         (tsubst_expr, case TAG_DEFN): Handle classes, too.
5170
5171         Emit debug info with the vtable.
5172         * search.c (maybe_suppress_debug_info): New function...
5173         * class.c (finish_struct_1): ...split out from here.
5174         * cp-tree.h: Declare it.
5175         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
5176         if we're writing out the vtable.
5177         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
5178         note_debug_info_needed): #if 0 out.
5179
5180 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
5181
5182         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
5183         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
5184         TREE_PERMANENT.
5185         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
5186         * decl2.c (lookup_arg_dependent): Use it.
5187         
5188         * cp-tree.h (cp_finish_decl): Change prototype.
5189         (finish_static_data_member_decl): Likewise.
5190         (push_permanent_obstack): Remove declaration.
5191         (push_expression_obstack): Likewise.
5192         (push_scratch_obstack): Likewise.
5193         (DECL_TEMPLATE_PARM_P): Robustify.
5194         (SET_DECL_TEMPLATE_PARM_P): New macro.
5195         * class.c (add_method): Don't manipulate obstacks.
5196         (finish_vtbls): Likewise.
5197         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
5198         * decl.c (binding_for_name): Don't manipulate obstacks.
5199         (maybe_push_to_top_level): Likewise.
5200         (pop_from_top_level): Likewise.
5201         (duplicate_decls): Likewise.
5202         (pushdecl): Likewise.
5203         (implicitly_declare): Likewise.
5204         (build_typename_type): Likewise.
5205         (start_decl): Likewise.
5206         (cp_finish_decl): Likewise.
5207         (finish_decl): Likewise.
5208         (destroy_local_static): Likewise.
5209         (expand_static_init): Likewise.
5210         (complete_array_type): Likewise.
5211         (grokvardecl): Likewise.
5212         (build_ptrmemfnc_type): Likewise.
5213         (grokdeclarator): Likewise.
5214         (xref_tag): Likewise.
5215         (xref_basetypes): Likewise.
5216         (start_enum): Likewise.
5217         (finish_enum): Likewise.
5218         (start_function): Likewise.
5219         (finish_function): Likewise.
5220         (start_method): Adjust call to cp_finish_decl.
5221         * decl2.c (finish_static_data_member_decl): Don't manipulate
5222         obstacks.
5223         (grokfield): Likewise.
5224         (grokbitfield): Likewise.
5225         (get_temp_name): Likewise.
5226         (get_sentry): Likewise.
5227         (fnish_file): Likewise.
5228         (lookup_arg_dependent): Likewise.
5229         * except.c (call_eh_info): Likewise.
5230         (push_eh_info): Likewise.
5231         (do_pop_exception): Likewise.
5232         (initialize_handler_parm): Likewise.
5233         (expand_end_eh_spec): Likewise.
5234         (alloc_eh_object): Likewise.
5235         (expand_throw): Likewise.
5236         * expr.c (extract_scalar_init): Likewise.
5237         * init.c (build_java_class_ref): Likewise.
5238         * lex.c (get_time_identifier): Likewise.
5239         (snarf_defarg): Likewise.
5240         (add_defarg_fn): Likewise.
5241         (is_global): Simplify.
5242         (do_identifier): Don't check TREE_PERMANENT.
5243         * method.c (emit_thunk): Don't manipulate obstacks.
5244         * parse.y (condition): Adjust call to cp_finish_decl.
5245         (primary): Likewise.
5246         (initdcl): Likewise.
5247         (initdcl0_innards): Likewise.
5248         (nomods_initdcl0): Likewise.
5249         * pt.c (push_inline_template_parms_recursive): Use
5250         SET_DECL_TEMPLATE_PARM_P.
5251         (process_template_parm): Likewise.
5252         (lookup_template_class): Don't manipulate obstacks.
5253         (instantiate_class_template): Adjust call to
5254         finish_static_data_member_decl.
5255         (tsubst_decl): Don't manipulate obstacks.
5256         (tsubst_expr): Likewise.
5257         (instantiate_template): Likewise.
5258         (instantiate_decl): Adjust calls to cp_finish_decl.
5259         * rtti.c (call_void_fn): Don't manipulate obstacks.
5260         (get_tinfo_var): Likewise.
5261         (get_tinfo_fn_unused): Likewise.
5262         (build_dynamic_cast_1): Likewise.
5263         (expand_si_desc): Likewise.
5264         (expand_class_desc): Likewise.
5265         (expand_ptr_desc): Likewise.
5266         (expand_attr_desc): Likewise.
5267         (expand_generic_desc): Likewise.
5268         (synthesize_tinfo_fn): Likewise.
5269         * search.c (expand_upcast_fixups): Likewise.
5270         * semantics.c (finish_asm_stmt): Likewise.
5271         (finish_named_return_value): Likewise.
5272         (begin_class_definition): Likewise.
5273         (finish_class_definition): Likewise.
5274         (finish_typeof): Likewise.
5275         * tree.c (build_cplus_method_type): Likewise.
5276         (reverse_path): Likewise.
5277         (copy_template_template_parm): Likewise.
5278         (build_expr_ptr_wrapper): Likewise.
5279         (push_expression_obstack): Remove.
5280         (push_permanent_obstack): Likewise.
5281         * typeck.c (mark_addressable): Likewise.
5282         
5283 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
5284
5285         * call.c (build_conditional_expr): Use build_target_expr_with_type.
5286         (convert_like): Likewise.
5287         (build_over_call): Likewise.
5288         * cp-tree.h (build_target_expr): Remove.
5289         (build_target_expr_with_type): New function.
5290         * cvt.c (build_up_reference): Use get_target_expr.
5291         * decl.c (build_target_expr): Move to ...
5292         * tree.c (build_target_expr): Here.  Make it static.
5293         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
5294         the temporary VAR_DECLs.
5295         (get_target_expr): Use it.
5296
5297 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
5298
5299         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
5300         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
5301         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
5302         * class.c (set_rtti_entry): Use it.
5303
5304 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
5305
5306         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
5307         here.
5308         * semantics.c (finish_expr_stmt): Call it here instead.  Move
5309         default_conversion logic to semantic-analysis time.
5310
5311 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
5312
5313         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
5314
5315 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
5316
5317         * init.c (init_init_processing): Re-instated Nov 11 patch after
5318         approval.
5319
5320 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
5321
5322         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
5323         Patch had not been approved yet.
5324
5325 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
5326
5327         * decl.c (compute_array_index_type): New function, split out from
5328         grokdeclarator.
5329         (create_array_type_for_decl): Likewise.
5330         (grokdeclarator): Use them.
5331
5332         * semantics.c (expand_stmt): Don't suspend_momentary or
5333         resume_momentary.
5334
5335 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
5336
5337         * init.c (init_init_processing): Header information for
5338         arrays allocated via `new' should have the same alignment used by
5339         malloc.
5340
5341 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
5342
5343         * error.c (dump_function_name): Don't crash if given a friend
5344         pseudo-instantiation.
5345
5346         * cp-tree.h (build_enumerator): Change prototype.
5347         * decl.c (enum_next_value): Remove.
5348         (enum_overflow): Likewise.
5349         (init_decl_processing): Don't register enum_next_value as a root.
5350         (start_enum): Clear TYPE_VALUES for a redefined enum.
5351         (finish_enum): Reset the type of enumeration constants.
5352         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
5353         we don't need to.  Maintain the TYPE_VALUES list and look there
5354         for the previously defined enumeration constant.  Let enumeration
5355         constants have the type of their values until the enumeration type
5356         is complete.
5357         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
5358         (structsp): Adjust.
5359         * parse.c: Regenerated.
5360         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
5361         
5362 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
5363                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5364
5365         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
5366
5367 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
5368
5369         * cp-tree.h (language_function): Remove x_last_dtor_insn and
5370         x_last_parm_cleanup_insn.
5371         * decl.c (last_dtor_insn): Remove.
5372         (last_parm_cleanup_insn): Likewise.
5373         (expand_start_early_try_stmts): Don't set them.
5374         (store_parm_decls): Likewise.
5375         (save_function_data): Or save them.
5376         (mark_lang_function): Or mark them.
5377
5378 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
5379
5380         * decl.c (store_parm_decls): Generate cleanup code at
5381         semantic-analysis time.  Destroy objects in the correct order.
5382
5383 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
5384
5385         * cp-tree.h (begin_new_placement): Remove.
5386         (finish_new_placement): Likewise.
5387         * class.c (finish_struct_1): Don't suspend_momentary or
5388         resume_momentary.
5389         * decl.c (grokdeclarator): Likewise.
5390         (maybe_build_cleanup_1): Likewise.
5391         * except.c (push_eh_cleanup): Likewise.
5392         (build_terminate_handler): Likewise.
5393         * init.c (build_new_1): Likewise.
5394         * parse.y (parse_decl): Change prototype.
5395         (initdecls, notype_initdecls, initdcl): Don't return int.
5396         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
5397         (.begin_new_placement): Remove.
5398         (.finish_new_placement): Likewise.
5399         (nonmomentary_expr): Likewise.
5400         (suspend_mom): Likewise.
5401         (condition): Don't suspend_momentary, resume_momentary, or keep
5402         track of need to resume.
5403         (unary_expr): Likewise.
5404         (new_placement): Likewise.
5405         (decl): Likewise.
5406         (structsp): Likewise.
5407         (new_type_id): Likewise.
5408         (maybe_parmlist): Likewise.
5409         (direct_after_type_declaration): Likewise.
5410         (direct_new_declarator): Likewise.
5411         (direct_abstract_declaration): Likewise.
5412         * parse.c: Regenerated.
5413         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
5414         * semantics.c (begin_new_placement): Remove.
5415         (finish_new_placement): Likewise.
5416         
5417 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5418
5419         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
5420         (DECL_TEMPLATE_INFO): Use it.
5421         * decl.c (warn_extern_redeclared_static): Do nothing for
5422         TEMPLATE_DECLs.
5423         * decl2.c (mark_used): Explicitly check for function or variable.
5424         * semantics.c (finish_unary_op_expr): Check whether result is also
5425         an INTEGER_CST.
5426
5427 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
5428
5429         * Makefile.in (typeck2.o): Depend on output.h.
5430         * typeck2.c: Include output.h.
5431
5432         * decl.c (flag_ansi): Remove declaration.
5433
5434         * pt.c (tinst_level_tick): Make it static.
5435         (last_template_error_tick): Likewise.
5436         
5437         * cp-tree.h (mapcar): Remove declaration.
5438         (search_tree): Likewise.
5439         (walk_tree_fn): New typedef.
5440         (walk_tree): New function.
5441         * tree.c (bot_manip): Change prototype.  Adjust to be called via
5442         walk_tree.
5443         (bot_replace): Likewise.
5444         (no_linkage_helper): Likewise.
5445         (copy_tree_r): New function.
5446         (search_tree): Rename, and adjust, to become ...
5447         (walk_tree): New function.
5448         (mapcar): Remove.
5449         (target_remap): Remove.
5450         (target_remap_count): Likewise.
5451         (break_out_target_exprs): Use walk_tree.
5452         * decl.c (local_variable_p): Change prototype.
5453         (check_default_argument): Use walk_tree.
5454         * pt.c (for_each_template_parm_r): New function, split out from ...
5455         (for_each_template_parm): Here.  Use it, via walk_tree.
5456         
5457 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
5458
5459         * class.c (check_bitfield_decl): New function, split out from
5460         finish_stuct_1.
5461         (check_field_decl): Likewise.  Recursively examine members of
5462         anonymous structs.
5463         (finish_struct_1): Use them.
5464         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
5465         
5466 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
5467
5468         * decl.c (grokfndecl): Remove dead code.
5469
5470         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
5471
5472 1999-11-02  Scott Snyder  <snyder@fnal.gov>
5473
5474         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
5475         IMAGPART_EXPR.
5476         * pt.c (tsubst_copy): Likewise.
5477
5478 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
5479
5480         * decl2.c (maybe_make_one_only): Always make things comdat on
5481         ELF targets, too.
5482
5483 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
5484
5485         * decl.c (finish_function): Call free_after_parsing for functions
5486         we are not immediately turning into RTL.
5487
5488 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
5489
5490         * cp-tree.h (flag_dump_translation_unit): Add decl.
5491
5492 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
5493
5494         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
5495
5496 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
5497
5498         * decl.c (pop_cp_function_context): Don't call free on a NULL
5499         pointer.
5500         * semantics.c: Include ggc.h.
5501         (expand_body): Do garbage-collection after processing a template
5502         function.  Clear DECL_SAVED_TREE after generating RTL for a
5503         function.
5504         * Makefile.in (semantics.o): Depend on ggc.h.
5505         
5506 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
5507
5508         * cp-tree.h (make_typename_type): Change prototype.
5509         * decl.c (make_typename_type): Only complain if so requested.
5510         * parse.y (nested_name_specifier): Adjust calls.
5511         (typename_sub0): Likewise.
5512         (typename_sub1): Likewise.
5513         * parse.c: Regenerated.
5514         * pt.c (convert_template_argument): Pass complain to
5515         make_typename_type.
5516         (tsubst): Likewise.
5517         
5518 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
5519
5520         * semantics.c (finish_handler): End the scope of the handler
5521         before attaching it to the statement-tree.
5522
5523 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
5524
5525         * rtti.c (build_dynamic_cast_1): Give a better error message for
5526         an attempt to dynamic_cast from a non-polymorphic type.
5527
5528 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
5529
5530         * cp-tree.h (make_temp_vec): Remove.
5531         (make_scratch_vec): Likewise.
5532         * call.c (add_function_candidate): Use make_tree_vec.
5533         (add_conv_candidate): Likewise.
5534         (build_builtin_candidate): Likewise.
5535         (add_template_candidate_real): Likewise.
5536         * class.c (resolve_address_of_overloaded_function): Likewise.
5537         * decl.c (start_function): Don't fool with the momentary obstack.
5538         (finish_function): Likewise.
5539         * init.c (expand_direct_vtbls_init): Likewise.
5540         (begin_init_stmts): Likewise.
5541         (finish_init_stmts): Likewise.
5542         * pt.c (add_to_template_args): Use make_tree_vec.
5543         (check_explicit_specialization): Likewise.
5544         (coerce_template_parms): Likewise.
5545         (lookup_template_class): Don't fool with the momentary obstack.
5546         (instantiate_class_template): Likewise.
5547         (tsubst_template_arg_vector): Use make_tree_vec.
5548         (tsubst_aggr_type): Don't fool with the momentary obstack.
5549         (tsubst_decl): Likewise.  Use make_tree_vec.
5550         (try_one_overload): Likewise.
5551         (try_class_unification):  Don't fool with the momentary obstack.
5552         (get_bindings_real): Use make_tree_vec.
5553         (set_mangled_name_for_template_decl): Likewise.
5554         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
5555         * semantics.c (finish_expr_stmt): Likewise.
5556         (finish_do_stmt): Likewise.
5557         (finish_for_expr): Likewise.
5558         (finish_switch_cond): Likewise.
5559         (do_pushlevel): Likewise.
5560         (do_poplevel): Likewise.
5561         * tree.c (make_temp_vec): Remove.
5562         
5563         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
5564         CLEANUP_P for a TRY_BLOCK.
5565         * ir.texi: Document SAVE_EXPR.
5566
5567 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
5568
5569         * call.c (build_over_call):  Check that the built-in function is
5570         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
5571         * typeck.c (build_function_call_real): Similarly. 
5572
5573 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
5574
5575         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
5576         remember_end_note.
5577
5578 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
5579
5580         * decl.c (push_overloaded_decl_1): Use pushdecl.
5581         
5582         * decl.c (auto_function): Replace #ifdef'd __inline with just
5583         plain inline.
5584         * lex.c (my_get_run_time): Likeise.
5585         (yyprint): Likewise.
5586         (identifier_type): Likewise.
5587         * method.c (start_squangling): Likewise.
5588         (end_squangling): Likewise.
5589         (icat): Likewise.
5590         (old_backref_index): Likewise.
5591         (flush_repeats): Likewise.
5592         (issue_ktype): Likewise.
5593         * parse.y (empty_parms): Likewise.
5594         * parse.c: Regenerated.
5595         
5596 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
5597
5598         * dump.c (dequeue_and_dump): Replace several uses of
5599         queue_and_dump_index with dump_child.
5600
5601 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5602
5603         * expr.c: Include tm_p.h.
5604
5605 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
5606
5607         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
5608         (pushlevel_temporary): Remove.
5609         (add_scope_stmt): New function.
5610         * decl.c (pushlevel_temporary): Remove.
5611         (poplevel): Use add_scope_stmt.
5612         (start_decl_1): Likewise.
5613         * semantics.c (add_scope_stmt): New function.
5614         (do_pushlevel): Use it.
5615         (do_poplevel): Use it.
5616         (expand_stmt): Check SCOPE_PARTIAL_P.
5617         
5618         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
5619         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
5620         * expr.c (cplus_expand_expr): Expand it.
5621         * ir.texi: Document EMPTY_CLASS_EXPR.
5622         
5623 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
5624
5625         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
5626         parameters as having namespace scope.
5627
5628 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
5629
5630         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
5631         (mangling_flags): New type.
5632         (build_overload_int): Change prototype.
5633         (build_overload_value): Likewise.
5634         (numeric_output_need_bar): Improve comment.
5635         (mangle_expression): New function, broken out from ...
5636         (build_overload_int): Here.
5637         (build_overload_value): Adjust for use of mangling flags.  Don't
5638         warn about real-valued template parameters here.  Do handle
5639         complex expressions involving real-valued template parameters.
5640         (build_template_parm_names): Encase non-type template parameters
5641         in underscores, if necessary.
5642         (process_overload_item): Remove conditional on
5643         PARM_CAN_BE_ARRAY_TYPE.
5644
5645 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
5646
5647         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
5648
5649         * ir.texi: Clean up documentation of RETURN_INIT.
5650         
5651 1999-10-15  Greg McGary  <gkm@gnu.org>
5652
5653         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
5654         (lang_init): Set default for flag_bounds_check if still "unspecified".
5655
5656 1999-10-13  Andrew Haley  <aph@cygnus.com>
5657
5658         * class.c (finish_struct_1): Force alignment of non-bitfields to
5659         BITS_PER_UNIT.
5660
5661 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5662
5663         * typeck2.c (process_init_constructor): Handle empty constructors.
5664
5665 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
5666
5667         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
5668
5669         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
5670         array error.
5671
5672 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
5673
5674         * decl.c (make_rtl_for_local_static): Don't create register RTL
5675         for addressable constants.
5676
5677 1999-10-13  Nathan Sidwell  <nathan@acm.org>
5678
5679         * cp-tree.h (build_x_va_arg): Prototype new function.
5680         * call.c (build_x_va_arg): Define it.
5681         * parse.y (unary_expr): Call build_x_va_arg.
5682         
5683         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
5684         * call.c (convert_type_from_ellipsis): Define it.
5685         * decl.c (init_decl_processing): Set lang_type_promotes_to.
5686
5687         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
5688
5689 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
5690
5691         * class.c (fixed_type_or_null): Always set *nonnull.
5692
5693 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5694
5695         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
5696         __GNUC__ and __GNUC_MINOR__.
5697
5698 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
5699
5700         * cp-tree.h (make_rtl_for_local_static): New function.  
5701         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
5702         local statics ...
5703         (make_rtl_for_local_static): Here.
5704         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
5705         
5706 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5707
5708         * method.c: Include tm_p.h.
5709
5710 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5711
5712         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
5713         * lex.c (cp_make_lake_type): Likewise.
5714         * tree.c (init_tree): Init make_lang_type_fn.
5715         
5716 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
5717
5718         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
5719         paramter.
5720         
5721         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
5722         local statics if we don't really have them.
5723
5724         * ir.texi: Improve documentation for STMT_EXPR.  Describe
5725         CLEANUP_POINT_EXPR.
5726
5727 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
5728
5729         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
5730
5731 1999-10-07  Greg McGary  <gkm@gnu.org>
5732
5733         * class.c (finish_struct_1): Use simpler method of
5734         removing elements of a singly-linked list which doesn't
5735         lose for classes without data members.
5736
5737 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
5738
5739         * friend.c (make_friend_class): Robustify.
5740
5741         * semantics.c (finish_object_call_expr): Reject calls to template
5742         types.
5743
5744 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
5745
5746         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
5747
5748         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
5749         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
5750         CLASSTYPE_VFIELD.
5751         * class.c (get_vfield_offset): Likewise.
5752         (finish_base_struct): Likewise.
5753         (modify_one_vtable): Likewise.
5754         (fixup_vtable_deltas): Likewise.
5755         (finish_struct_1): Likewise.
5756         * init.c (expand_virtual_init): Likewise.
5757         * search.c (lookup_field_1): Likewise.
5758         (expand_upcast_fixups): Likewise.
5759         * typeck.c (build_component_ref): Likewise.
5760         (build_binary_op_nodefault): Likewise.
5761         
5762         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
5763         * ir.texi: Document TYPE_VFIELD.
5764
5765 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
5766
5767         * decl.c (grokdeclarator): Only warn about non-zero arrays if
5768         !in_system_header (linux socketbits.h can give this for
5769         __cmsg_data, which is using a GNU extension).
5770
5771 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
5772
5773         * decl2.c (start_static_storage_duration_function): Push the
5774         function declaration so it ends up in namespace scope.
5775
5776         * dump.c (DUMP_CHILDREN): Remove.
5777         (DUMP_BINFO): Adjust.
5778         (struct dump_node_info): Remove dump_children_p.
5779         (queue_and_dump_type): Remove dump_children_p parameter.
5780         (queue): Don't set dump_children_p.
5781         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
5782         queue_and_dump_index.
5783         (dequeue_and_dump): Unconditionally print children.  Adjust calls
5784         to functions mentioned above.
5785         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
5786         
5787         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
5788         * dump.c (dequeue_and_dump): Dump them.
5789         
5790         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
5791
5792         * decl.c (start_function): Set current_in_charge_parm for
5793         constructors, too, where appropriate.
5794         * search.c (fixup_all_virtual_upcast_offsets): New function.
5795         (expand_indirect_vtbls_init): Use it.
5796         
5797 1999-10-04  Nathan Sidwell  <nathan@acm.org>
5798
5799         * decl2.c (grok_alignof): Don't decay lvalues.
5800         
5801         * init.c (build_new): Remove unused variable.
5802
5803 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
5804
5805         * cp-tree.h (struct language_function): Remove static_labelno.
5806         (static_labelno): Remove macro.
5807         * method.c (build_overload_nested_name): Make static_labelno
5808         static here.
5809         
5810         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
5811         to decide whether or not a function is defined.
5812
5813         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
5814         situations where make_node will do it automatically.
5815         * decl.c (grok_reference_init): Likewise.
5816         (expand_static_init): Likewise.
5817         (do_static_initialization): Likewise.
5818         * init.c (perform_member_init): Likewise.
5819         (expand_aggr_init_1): Likewise.
5820         (build_new_1): Likewise.
5821         * method.c (do_build_copy_constructor): Likewise.
5822         (do_build_assign_ref): Likewise.
5823         * search.c (expand_upcast_fixups): Likewise.
5824         * semantics.c (finish_stmt_expr): Likewise.
5825         * typeck.c (build_unary_op): Likewise.
5826         (check_return_expr): Likewise.
5827
5828 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
5829
5830         * init.c (build_vec_delete_1): Fold COND_EXPRs.
5831
5832 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
5833
5834         * cp-tree.def (VEC_INIT_EXPR): Remove.
5835         * cp-tree.h (struct stmt_tree): New type.
5836         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
5837         x_stmt_tree.
5838         (class_cache_firstobj): Remove.
5839         (struct language_function): Remove stmts_are_full_exprs_p,
5840         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
5841         (current_stmt_tree): New macro.
5842         (last_tree): Adjust.
5843         (last_expr_type): Likewise.
5844         (doing_semantic_analysis_p): Simplify.
5845         (stmts_are_full_exprs_p): Adjust.
5846         (begin_tree): Remove prototype.
5847         (end_tree): Likewise.
5848         (begin_stmt_tree): Change prototype.
5849         (finish_stmt_tree): Likewise.
5850         (building_stmt_tree): Simplify.
5851         * decl.c (mark_stmt_tree): New function.
5852         (mark_saved_scope): Use it.
5853         (start_function): Rearrange slightly to call begin_stmt_tree 
5854         earlier.
5855         (save_function_data): Tweak.
5856         (finish_function): Adjust call to finish_stmt_tree.
5857         (mark_lang_function): Use mark_stmt_tree.
5858         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
5859         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
5860         (build_vec_init): Remove creation of stand-in intializer.
5861         * pt.c (begin_tree): Remove.
5862         (end_tree): Likewise.
5863         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
5864         (begin_compound_stmt): Handle a compound-statement outside of a
5865         function.
5866         (begin_stmt_expr): Handle a statement-expression outsidef of a
5867         function.
5868         (finish_stmt_expr): Likewise.
5869         (begin_class_definition): Don't call begin_tree.
5870         (finish_inline_definitions): Don't call end_tree.
5871         (begin_stmt_tree): Take a pointer to tree, not a function as input.
5872         (finish_stmt_tree): Likewise.
5873         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
5874         (mapcar): Likewise.
5875         
5876         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
5877         * parse.c: Regenerated.
5878         
5879         * dump.c (dqueue_and_dump): Dump bitfieldness.
5880         
5881         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
5882         bitfields, rather than DECL_BIT_FIELD.
5883         * ir.texi: Document how to tell whether or not a field is a
5884         bitfield.
5885         
5886         * lex.c (make_lang_type): Fix typo in comment.
5887
5888 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
5889
5890         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
5891
5892 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
5893
5894         * pt.c (tsubst_decl): If the type of a template instantiation is
5895         bogus, so is the whole instantiation.
5896
5897 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
5898
5899         * decl.c (initialize_local_var): Handle static variables here.
5900         (cp_finish_decl): Tweak handling of function-scope static
5901         variables.
5902         * semantics.c (expand_stmt): Handle DECL_STMTs for static
5903         variables.
5904
5905         * method.c (emit_thunk): Don't crash when -fsyntax-only.
5906
5907         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
5908         global_dtor_p.  Add init_priority.
5909         (DECL_ACCESS): Adjust accordingly.
5910         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
5911         (GLOBAL_INIT_PRIORITY): Likewise.
5912         * decl.c (lang_mark_tree): Adjust accordingly.
5913         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
5914         and GLOBAL_INIT_PRIORITY.
5915         * dump.c (dequeue_and_dump): Print them.
5916         * ir.texi: Document them.
5917
5918         * decl2.c (struct priority_info_s): Remove initialization_sequence
5919         and destruction_sequence.
5920         (start_static_storage_duration_function): Return the body of the
5921         function.  Convert for function-at-a-time mode.
5922         (generate_inits_for_priority): Remove.
5923         (finish_static_storage_duration_function): Change prototype.
5924         Adjust for function-at-a-time mode.
5925         (do_static_initialization): Likewise.
5926         (do_static_destruction): Likewise.
5927         (do_static_initialization_and_destruction): Remove.
5928         (start_static_initialization_or_destruction): New function.
5929         (finish_static_initialization_or_destruction): Likewise.
5930         (get_priority_info): Don't manipulation initialization_sequence or
5931         destruction_sequence.
5932         (prune_vars_needing_no_initialization): New function.
5933         (write_out_vars): Likewise.
5934         (finish_file): Use the various new functions instead of the old.
5935         
5936 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
5937
5938         * cp-tree.h (warn_float_equal): Declare.
5939         * decl2.c (warn_float_equal): Define.
5940         (lang_decode_option): Recognize -W[no-]float-equal.
5941         * typeck.c (build_binary_op_nodefault): Conditionally warn
5942         about equality tests of floating point types.
5943
5944 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
5945
5946         Support normal type_info-based EH mechanisms with -fno-rtti.
5947         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
5948         (build_eh_type_type_ref): Likewise.
5949         (build_eh_type): Remove.
5950         (expand_throw): Call build_eh_type_type, not build_eh_type.
5951         * decl2.c (import_export_decl): Don't associate the tinfo fn with
5952         the vtable if -fno-rtti.
5953         * decl.c (init_decl_processing): Always init_rtti_processing.
5954
5955         * rtti.c (get_typeid): Don't complain about -fno-rtti.
5956
5957         * class.c (class_cache_obstack, class_obstack): Remove.
5958         (init_class_processing): Don't initialize class_obstack.
5959         (push_cache_obstack): Remove.
5960         (pushclass): Don't call it.
5961         * cp-tree.h: Remove prototype for push_cache_obstack.
5962         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
5963         (pushlevel_class): Don't push_decl_level.
5964         (poplevel_class): Don't pop_stack_level.
5965         (push_class_level_binding): Don't push_cache_obstack.
5966         (init_decl_processing): Don't intialize decl_obstack.
5967         * search.c (push_class_decls): Don't push_cache_obstack.
5968         * tree.c (list_hash_add): Put hash node on permanent_obstack.
5969         (hash_tree_cons): Don't mess with obstacks.
5970         (print_lang_statistics): Don't print stats for class_obstack and
5971         decl_obstack.
5972
5973 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
5974
5975         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
5976         * ir.texi: Document DECL_EXTERNAL.
5977
5978         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
5979         * ir.texi: Document THUNK_DECLs.
5980
5981         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
5982         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5983         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5984         * error.c (dump_template_bindings): Remove unused parameter.
5985         Handle multiple levels of template parameters.
5986         (dump_template_decl): Use `parms', not `args', for template
5987         parameters.  Fix thinko.
5988         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
5989         flags to dump_template_bindings.
5990         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
5991         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5992         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5993         (tsubst_copy): Clarify variable name.
5994         (most_general_template): Robustify.
5995         
5996 1999-09-29  Nathan Sidwell  <nathan@acm.org>
5997
5998         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
5999         to change primary template rendering.
6000
6001 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
6002
6003         * cp-tree.h (UPT_TEMPLATE): Remove.
6004         (UPT_PARMS): Likewise.
6005         (DECL_NEEDED_P): New macro.
6006         * decl2.c (finish_vtable_vardecl): Use it.
6007         (finish_objects): Don't crash with -fsyntax-only.
6008         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
6009         -fsyntax-only.
6010         * pt.c (tsubst_friend_function): Remove FIXME that talks about
6011         obstacks.
6012         (tsubst_expr): Correct handling of function try-blocks.
6013         * semantics.c: Include flags.h.
6014         (expand_body): Don't do RTL generation if -fsyntax-only.
6015         * Makefile.in (semantics.o): Depends on flags.h.
6016         
6017 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
6018
6019         * pt.c (most_general_template): Adjust declaration.
6020
6021         * cp-tree.h: (most_general_template): Declare.
6022
6023         * error.c (dump_template_value): Rename to ...
6024         (dump_template_argument): This.
6025         (dump_template_argument_list): New function.
6026         (dump_type): Use it.
6027         (dump_template_parameter): New function.
6028         (dump_template_decl): Use it.
6029         (dump_template_bindings): New function.
6030         (dump_function_decl): Use it. Pretty print function template
6031         instantiations.
6032
6033 1999-09-28  Nathan Sidwell  <nathan@acm.org>
6034
6035         * decl.c (grokdeclarator): Distinguish parameter context for
6036         diagnostics. Tidy up missing type diagnostic.
6037         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
6038
6039 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
6040
6041         * ir.texi: Improve documentation for TARGET_EXPR.
6042
6043 1999-09-27  Nathan Sidwell  <nathan@acm.org>
6044
6045         Augment stringification of trees.
6046         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
6047         (fndecl_as_string, type_as_string_real, args_as_string,
6048         code_as_string, language_as_string, parm_as_string,
6049         op_as_string, assop_as_string, cv_as_string): Remove.
6050         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
6051         (context_as_string): Declare new function.
6052         * error.c (cp_printers): Move definition.
6053         (OB_UNPUT): Remove.
6054         (OB_END_TEMPLATE_ID): Adjust.
6055         (interesting_scope_p): Remove.
6056         (dump_scope): New static function.
6057         (dump_qualifiers): Adjust prototype, reimplement.
6058         (dump_template_value): Use tree_string_flags.
6059         (dump_type_real): Move back to dump_type.
6060         (dump_type): Adjust prototype. Use tree_string_flags.
6061         (dump_aggr_type): Likewise. Use dump_template_parms.
6062         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
6063         Return pad flag.
6064         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
6065         (dump_simple_decl): Likewise.
6066         (dump_decl): Likewise. Use dump_template_decl.
6067         (dump_template_decl): New static function broken out of dump_decl.
6068         (dump_function_decl): Adjust prototype. Use tree_string_flags.
6069         (dump_parameters): Likewise. Prefix space.
6070         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
6071         (dump_function_name): Likewise. Use dump_template_parms.
6072         (dump_template_parms): New static function broken out of
6073         dump_function_name.
6074         (dump_expr_list): Adjust prototype. Use tree_string_flags.
6075         (dump_expr): Likewise.
6076         (fndecl_as_string): Removed
6077         (type_as_string_real): Removed
6078         (dump_binary_op): Adjust prototype. Use tree_string_flags.
6079         (dump_unary_op): Likewise.
6080         (type_as_string): Likewise.
6081         (expr_as_string): Likewise.
6082         (decl_as_string): Likewise.
6083         (context_as_string): New function.
6084         (lang_decl_name): Adjust.
6085         (decl_to_string): New static print callback.
6086         (expr_to_string): Likewise.
6087         (fndecl_to_string): Likewise.
6088         (code_as_string): Renamed to ...
6089         (code_to_string): ... here. Adjust.
6090         (language_as_string): Renamed to ...
6091         (language_to_string): ... here. Adjust.
6092         (parm_as_string): Renamed to ...
6093         (parm_to_string): ... here.
6094         (op_as_string): Renamed to ...
6095         (op_to_string): ... here.
6096         (assop_as_string): Renamed to ...
6097         (assop_to_string): ... here.
6098         (type_to_string): New static print callback.
6099         (args_as_string): Renamed to ...
6100         (args_to_string): ... here. Adjust.
6101         (cv_as_string): Renamed to ...
6102         (cv_to_string): ... here. Adjust.
6103         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
6104         (print_template_context): Likewise.
6105
6106 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
6107
6108         * cp-tree.h (expand_throw): Remove prototype.
6109         * except.c (expand_throw): Make it static.  Use tree-generation
6110         functions, rather than RTL-generation functions.
6111         (build_throw): Use it.
6112         * expr.c: Include except.h.
6113         (cplus_expand_expr): Don't call expand_throw here.
6114         * Makefile.in (expr.o): Depend on except.h.
6115         * ir.texi: Update documentation for THROW_EXPR.
6116         
6117         * decl.c (start_function): Set x_dont_save_pending_sizes rather
6118         than calling get_pending_sizes.
6119         * init.c (build_new): Don't save and restore
6120         immediate_size_expand; instead, assert that it has the expected
6121         value already.
6122
6123 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6124
6125         * lex.c (compiler_error): Add missing call to va_end().
6126
6127 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
6128
6129         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
6130         * ir.texi: Document RESULT_DECL and DECL_RESULT.
6131
6132         * cp-tree.h (check_return_expr): New function.
6133         * decl.c (finish_constructor_body): New function.
6134         (pushdecl): Put global friend functions in namespace binding
6135         level, not the class binding level.
6136         (finish_destructor_body): Make sure the dtor_label is always
6137         defined.  Fix typo in comment.
6138         (finish_function): Move generation of constructor-termination code
6139         to semantic-analysis time.  Move generation of implicit `main'
6140         return value to semantic-analysis time.
6141         * semantics.c (finish_return_stmt): Generate goto's to
6142         ctor_label/dtor_label here.  Use check_return_expr to do semantic
6143         analysis on the returned expression.
6144         * typeck.c (maybe_warn_about_returning_address_of_local): New
6145         function split out from c_expand_return.
6146         (check_return_expr): Likewise.
6147         (c_expand_return): Just generate the RTL for the return.
6148         
6149 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
6150
6151         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
6152         (cleanup_type): Likewise.
6153         (search_tree): Change prototype.
6154         * decl.c (local_variable_p): Adjust for new interface to
6155         search_tree.
6156         (check_default_argument): Likewise.
6157         * error.c (dump_expr): Handle INIT_EXPR.
6158         * except.c (expand_throw): Don't make cleanup_type a local static.
6159         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
6160         * init.c (build_new): Call build_new_1 directly, rather than
6161         building a NEW_EXPR.
6162         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
6163         processing file-scope initializers.
6164         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
6165         * tree.c: Include splay-tree.h
6166         (no_linkage_helper): Adjust for new interface to search_tree.
6167         (search_tree): Pass around pointers to tree nodes, rather than the
6168         nodes themselves.  Handle VEC_INIT_EXPR.
6169         (no_linkage_check): Adjust for new interface to search_tree.
6170         (mapcar): Handle VEC_INIT_EXPR.
6171         (target_remap): New variable.
6172         (bot_manip): Use it.
6173         (bot_replace): New function.
6174         (break_out_target_exprs): Use it to remap all variables used in a
6175         default argument expression.
6176         * typeck.c (build_modify_expr): Don't crash when outside a
6177         function and presented with an INIT_EXPR assignment
6178         * Makefile.in (tree.o): Depend on splay-tree.h.
6179
6180 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6181
6182         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
6183         DECL_BUILT_IN.
6184         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
6185         callers changed.
6186         Set the builtin's DECL_BUILT_IN_CLASS.
6187
6188 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
6189
6190         * decl.c (pushdecl): Don't make local declarations of extern
6191         variables give the variable a DECL_CONTEXT for the function.
6192         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
6193         Don't accidentally make RTL for local declarations.
6194         (emit_local_var): Handle declarations with asm-specifiers here.
6195         
6196 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
6197
6198         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
6199         STMT_IS_FULL_EXPR_P.
6200
6201         * cp-tree.h (language_function): Add cannot_inline.
6202         * decl.c (start_function): Restore current_function_cannot_inline
6203         from the saved value.
6204         (save_function_data): Save current_function_cannot_inline.
6205         * decl2.c (start_objects): Change prototype.  Build the function
6206         in function-at-a-time mode.
6207         (finish_objects): Likewise.
6208         (generate_ctor_or_dtor_function): Adjust accordingly.
6209         
6210         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
6211         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
6212         Don't call expand_anon_union_decl here
6213         * semantics.c (exapnd_stmt): Call it here, instead.
6214         * typeck.c (mark_addressable): Addressed variables are implicitly
6215         used.
6216         
6217 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6218
6219         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
6220         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
6221         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
6222         * cp-tree.h: Add tree checking macros to various tree access
6223         macros. 
6224         * ptree.c (print_lang_decl): Test for function or variable
6225         before accessing template info.
6226
6227 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
6228
6229         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
6230         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
6231         * decl2.c (lang_f_options): Add -fshort-wchar.
6232         * cp-tree.h: Declare flag_short_wchar.
6233         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
6234         int' for wchar_t.
6235
6236 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6237
6238         * ir.texi: Fix formatting errors and typos.
6239
6240 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
6241
6242         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
6243
6244         * decl.c (pushdecl): Do create a binding for extern "C" functions,
6245         but not for their DECL_ASSEMBLER_NAMEs.
6246         (lookup_name_current_level): Fix formatting.
6247         (xref_tag): Likewise.
6248         * decl2.c (start_objects): Mark static constructors and
6249         destructors as used.
6250
6251 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
6252
6253         * decl.c (define_case_label): Don't crash if we're not in a switch.
6254
6255         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
6256         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
6257         for unsupported flags.
6258
6259 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
6260
6261         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
6262         Accept and warn about -fthis-is-variable.
6263
6264 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
6265
6266         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
6267         CLEANUP_STMT, and SCOPE_STMT.
6268
6269         * decl2.c (lang_decode_option): Adjust, in the wake of recent
6270         changes to option processing.
6271
6272 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6273
6274         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
6275         function pointer from pmfs with no object given.
6276         (convert_for_assignment): Do not return error when converting
6277         pmfs.
6278
6279 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
6280
6281         * lex.c (internal_filename): New variable.
6282         (INTERNAL_FILENAME): New macro.
6283         (init_parse): Allocate internal_filename and mark as root.  Use it
6284         instead of a string constant.
6285
6286 1999-09-21  Nathan Sidwell  <nathan@acm.org>
6287
6288         Reimplement dynamic cast and catch matching.
6289         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
6290         * search.c (dynamic_cast_base_recurse): New function.
6291         (get_dynamic_cast_base_type): New function for dynamic cast.
6292         * rtti.c (build_dynamic_cast_1): Determine source and target
6293         class relationship. Call __dynamic_cast_2.
6294         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
6295         (__user_type_info::dyncast): New dynamic cast dispatcher.
6296         (__user_type_info::sub_kind): New nested enumeration.
6297         (__user_type_info::contained_p): sub_kind predicate.
6298         (__user_type_info::contained_public_p): Likewise.
6299         (__user_type_info::contained_nonpublic_p): Likewise.
6300         (__user_type_info::contained_nonvirtual_p: Likewise.
6301         (__user_type_info::upcast_result): New nested struct.
6302         (__user_type_info::dyncast_result): New nested struct.
6303         (*::do_upcast): New catch function.
6304         (*::do_dyncast): New dynamic cast function.
6305         (__user_type_info::find_public_subobj): New dynamic cast
6306         helper dispatcher.
6307         (*::do_find_public_subobj): New dynamic cast helper function.
6308         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
6309         (__user_type_info::dyncast): Define dynamic cast dispatcher.
6310         (*::do_upcast): Define catch function.
6311         (*::do_dyncast): Define dynamic cast function.
6312         (*::do_find_public_subobj): Define dynamic cast helper function.
6313         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
6314         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
6315         (__dynamic_cast_2): New dynamic cast runtime.
6316
6317 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
6318
6319         * cp-tree.h (finish_stmt_expr): Change prototype.
6320         * expr.c (cplus_expand_expr): Adjust call accordingly.
6321         * init.c (finish_init_stmts): Likewise.
6322         * parse.y (primary): Likewise.
6323         * pt.c (tsubst_copy): Likewise.
6324         * semantics.c (finish_stmt_expr): Don't take two parameters.
6325         Don't remove generated BLOCKs from the block-tree.
6326
6327         Remove support for assigning to `this'.
6328         * NEWS: Note that fact.
6329         * class.c (build_vbase_path): Don't check flag_this_is_variable.
6330         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
6331         (language_function): Remove assigns_this, just_assigned_this, and
6332         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
6333         (base_init_expr): Remove.
6334         (current_vcalls_possible_p): New macro.
6335         (vtbls_set_up_p): Likewise.
6336         (emit_base_init): Change prototype.
6337         * decl.c (finish_destructor_body): New function, split out from
6338         finish_function.
6339         (current_function_assigns_this): Remove.
6340         (current_function_just_assigned_this): Likewise.
6341         (start_function): Don't set them.
6342         (finish_function): Don't check them.  Don't emit
6343         base-initialization code here.  Generate code for destructors when
6344         doing semantic analysis.
6345         (finish_stmt): Don't check current_function_just_assigned_this.
6346         * decl2.c (lang_f_options): Remove this-is-variable.
6347         (lang_decode_option): Likewise.
6348         (grokclassfn): Don't check flag_this_is_variable.
6349         * init.c (emit_base_init): Return the expression generated.
6350         (construct_virtual_bases): Don't push/pop obstacks.  Fix
6351         typo.
6352         (build_new_1): Don't check flag_this_is_variable.
6353         (get_temp_regvar): Don't set DECL_REGISTER.
6354         (build_vec_init): Don't call use_variable.
6355         * lang-options.h: Remove "-fthis-is-variable" and
6356         "-fno-this-is-variable".
6357         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
6358         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
6359         expand_expr_stmt.
6360         * semantics.c (finish_expr_stmt_real): Rename to ...
6361         (finish_expr_stmt): This.  Remove assigned_this parameter.
6362         (begin_if_stmt): Call do_pushlevel before starting the statement.
6363         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
6364         blocks.
6365         (setup_vtbl_ptr): Emit initialization code for bases and members
6366         at semantic-analysis time.  Emit code to initialize vtables in
6367         destructors here.
6368         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
6369         Don't handle CTOR_INITIALIZER any more.
6370         * typeck.c (build_modify_expr): Don't check for assignments to
6371         this.
6372         (c_expand_return): Don't suggest assigning to `this'.
6373         
6374         * Makefile.in (decl.o): Depend on RTL_H.
6375         (decl2.o): Likewise.
6376         (class.o): Likewise.
6377         (call.o): Likewise.
6378         (method.o): Likewise.
6379         (search.o): Likewise.
6380         (tree.o): Likewise.
6381         (pt.o): Likewise.
6382
6383         * decl.c (duplicate_decls): When a builtin function is redeclared
6384         as static, make sure it is mangled correctly.
6385
6386         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
6387         detail about the statement-tree.
6388         
6389 1999-09-20  Nathan Sidwell  <nathan@acm.org>
6390
6391         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
6392
6393 1999-09-20  Nick Clifton  <nickc@cygnus.com>
6394
6395         * decl2.c (lang_decode_option): Extend comment.
6396
6397 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6398
6399         * typeck.c: Include "tm_p.h".
6400
6401 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
6402
6403         * ir.texi: New file.
6404
6405 1999-09-19  Paul Burchard <burchard@pobox.com>
6406
6407         * semantics.c (expand_stmt): Initialize return value.
6408
6409 1999-09-18  Paul Burchard <burchard@pobox.com>
6410
6411         * gxxint.texi: G++ now implements namespaces.
6412         
6413 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
6414
6415         * decl.c (pop_label): Don't warn about unused labels more than
6416         once.
6417         * semantics.c (finish_goto_stmt): Always marked used labels as
6418         used.
6419
6420         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
6421         even when the declaration is external.
6422         (cp_finish_decl): Adjust call to layout_var_decl.
6423         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
6424
6425 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6426
6427         * typeck.c (get_member_function_from_ptrfunc): Always consider
6428         virtuality inside member pointer.
6429
6430 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
6431
6432         Turn on function-at-a-time processing.  
6433         * cp-tree.h (doing_semantic_analysis_p): New macro.
6434         (SF_DEFAULT): Define to zero, not SF_EXPAND.
6435         (start_handler_parms): Change prototype.
6436         (expand_start_catch_block): Likewise.
6437         (expand_end_catch_block): Likewise.
6438         (expand_start_eh_spec): Likewise.
6439         (expand_end_eh_spec): Declare.
6440         (finish_handler_parms): Change prototype.
6441         (begin_catch_block): Declare.
6442         (finish_handler): Change prototype.
6443         (do_pushlevel): Declare.
6444         (do_poplevel): Likewise.  
6445         * decl.c (pushlevel): Don't create
6446         binding levels when not doing semantic analysis.
6447         (poplevel): Don't pop them.
6448         (pushdecl): Assert that we are never called when not doing
6449         semantic analysis.
6450         (pushdecl_top_level): Use push_to_top_level.
6451         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
6452         label when expanding.
6453         (cp_finish_decl): Only inject for-scope variables when doing
6454         semantic analysis.  Add comments.
6455         (start_handler_parms): Return the handler parm.
6456         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
6457         already set.  Reinitialize from saved function data if available.
6458         Don't pushlevel when not doing semantic analysis.
6459         (store_parm_decls): Only generate RTL when expanding.  Only
6460         pushdecl when doing semantic analysis.  Set
6461         current_eh_spec_try_block if appropriate.
6462         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
6463         Combine common code.  Don't poplevel when not doing semantic
6464         analysis.
6465         (push_cp_function_context): Don't expand functions without an
6466         explicit call to expand_body.
6467         (mark_lang_function): Make eh_spec_try_block and
6468         x_scope_stmt_stack.  
6469         * except.c (expand_end_eh_spec): Don't
6470         declare.
6471         (process_start_catch_block): Likewise.
6472         (push_eh_cleanup): Use finish_decl_cleanup.
6473         (initialize_handler_parm): New function.
6474         (expand_start_catch_block): Use it.
6475         (expand_end_catch_block): Use tree-generation functions, not
6476         RTL-generation functions.
6477         (expand_start_eh_spec): Likewise.
6478         (expand_end_eh_spec): Likewise.
6479         (expand_exception_blocks): Simplify.
6480         (start_anon_func): Use do_pushlevel.
6481         (end_anon_func): Use do_poplvel.  Call expand_body for the
6482         function.  
6483         * expr.c (do_case): Don't call define_case_label.  
6484         * init.c (create_temporary_var): Set DECL_CONTEXT for local
6485         variables.  
6486         * method.c (emit_thunk): Call expand_body for the
6487         thunk.
6488         (sythesize_method): Likewise.  
6489         * parse.y (handler_args): Give it ttype.
6490         (eat_saved_input): Call expand_body.
6491         (base_init): Use do_pushlevel.
6492         (pending_inline): Call expand_body.
6493         (handler): Adjust calls to finish_handler_parms and
6494         finish_handler.
6495         (handler_args): Don't call expand_start_catch_block.  Return the
6496         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
6497         * parse.c: Regenerated.
6498         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
6499         * semantics.c (do_pushlevel): Give it external linkage.  Build
6500         SCOPE_STMTs.
6501         (do_poplevel): Likewise.
6502         (finish_case_label): Call define_case_label when doing semantic
6503         analysis.
6504         (finish_goto_stmt): Create RTL for labels.
6505         (finish_function_try_block): Set in_function_try_handler
6506         unconditionally.
6507         (finish_function_handler_sequence): Unset it.
6508         (finish_handler_parms): Use expand_start_catch_block even when
6509         building a statement-tree.
6510         (begin_catch_block): New function.
6511         (finish_handler): Move a little RTL-generation logic here.
6512         (finish_decl_cleanup): Allow cleanups for empty declarations.
6513         (finish_named_return_value): Don't pushdecl when not doing
6514         semantic analysis.
6515         (expand_stmt): Don't do semantic analysis for variable
6516         declarations.  Handle START_CATCH_STMT.  Call expand_label
6517         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
6518         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
6519         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
6520         RETURN_INIT and function try blocks.
6521         
6522         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
6523         x_scope_stmt_stack.  Add x_in_charge_parm.
6524         (current_eh_spec_try_block): New macro.
6525         (current_scope_stmt_stack): Likewise.
6526         (current_in_charge_parm): Likewise.
6527         * decl.c (start_function): Initialize current_in_charge_parm.
6528         (finish_function): Use current_in_charge_parm rather than looking
6529         up __in_chrg.
6530         * search.c (expand_indirect_vtbls_init): Likewise.
6531
6532         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
6533         (TRY_BLOCK): Likewise.
6534         (HANDLER): Likewise.
6535         (START_CATCH_STMT): New tree node.
6536         (SCOPE_STMT): Likewise.
6537         * cp-tree.h (SCOPE_BEGIN_P): New macro.
6538         (SCOPE_NULLIFIED_P): Likewise.
6539         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
6540         (struct lang_decl): Add saved_language_function.
6541         (DECL_PENDING_INLINE_INFO): Adjust documentation.
6542         (DECL_PENDING_INLINE_P): New macro.
6543         (TYPE_TI_ARGS): Fix typo in comment.
6544         (DECL_SAVED_TREE): Add to documentation.
6545         (DECL_SAVED_FUNCTION_DATA): New macro.
6546         (START_CATCH_TYPE): Likewise.
6547         (SCOPE_END_P): New macro.
6548         (declare_parm_level): Don't declare.
6549         * decl.c (mark_lang_function): New function, split out from
6550         mark_cp_function_context.
6551         (save_function_data): New function.
6552         (declare_parm_level): Remove.
6553         (finish_function): Use save_function_data to squirrel away
6554         important stuff for later use.
6555         (mark_cp_function_context): Use mark_function_data.
6556         (lang_mark_tree): Likewise.
6557         * lex.c (begin_definition_of_inclass_inline): Set
6558         DECL_PENDING_INLINE_P.
6559         (store_pending_inline): Clear it.
6560         * pt.c (tsubst_decl): Likewise.
6561
6562 1999-09-17  Nathan Sidwell  <nathan@acm.org>
6563
6564         * call.c (perform_implicit_conversion): Deal with error_mark_node.
6565
6566 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
6567
6568         * decl.c (warn_extern_redeclared_static): Don't get confused by
6569         static member functions.
6570         (duplicate_decls): Merge DECL_THIS_STATIC.
6571
6572         * decl.c (expand_static_init): Make sure assignments to local
6573         statics actually occur.
6574
6575 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
6576
6577         * cp-tree.h (poplevel_class): Declare.
6578         * class.c (popclass): Use poplevel_class, not poplevel.
6579         * decl.c (poplevel_class): Don't make it static.  Don't return a
6580         value.
6581         (poplevel): Don't call poplevel_class; abort in a class
6582         binding level is seen.
6583         * semantics.c (finish_translation_unit): Use pop_everything.
6584         * parse.y (member_init): Allow errors.
6585         (pending_inline): Call finish_function.
6586         * parse.c: Regenerated.
6587         * Makefile.in (CONFLICTS): Adjust.
6588
6589 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
6590         
6591         * error.c: Reduce code duplication.
6592         (dump_template_value): New function.
6593         (dump_type_real): Use it.
6594         (dump_decl): Likewise.
6595         (dump_function_name): Likewise.
6596         (dump_function_decl): Don't be too talkative about function return
6597         type variety.
6598
6599 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6600
6601         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
6602
6603         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
6604
6605 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
6606
6607         * decl2.c (finish_file): Also call check_global_declarations for
6608         the pending_statics list.
6609
6610 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
6611
6612         * lex.c (cp_pragma_implementation): Allow #pragma implementation
6613         in header files.
6614
6615 1999-09-15  Richard Henderson  <rth@cygnus.com>
6616
6617         * lex.c (mark_impl_file_chain): Follow the next chain.
6618
6619 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
6620
6621         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
6622         problems with extern "C" functions redeclared as static.
6623         (duplicate_decls): When a builtin is redeclared static, make the
6624         new function have internal linkage.
6625         
6626 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
6627
6628         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
6629         * pt.c (tsubst_copy): Likewise.
6630         * tree.c (search_tree): Likewise.
6631         (mapcar): Likewise.
6632
6633 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6634
6635         * typeck2.c (ack): Don't declare progname.
6636
6637 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
6638
6639         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
6640         filenames with ggc_alloc_string.
6641
6642 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
6643
6644         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
6645         TARGET_EXPR.
6646         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
6647         the TARGET_EXPR.
6648         * cvt.c (build_up_reference): Likewise.
6649         * tree.c (build_cplus_new): Likewise.
6650         (get_target_expr): Likewise.
6651         
6652 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
6653
6654         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
6655
6656 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
6657
6658         * cp-tree.h (build_target_expr): New function.
6659         * call.c (build_conditional_expr): Use build_target_expr.
6660         (convert_like): Likewise.
6661         (build_over_call): Likewise.
6662         * cvt.c (build_up_reference): Likewise.
6663         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
6664         (destroy_local_var): Here.
6665         (build_target_expr): New function.
6666         * tree.c (build_cplus_new): Use it.
6667         (get_target_expr): Likewise.
6668
6669 1999-09-13  Nathan Sidwell  <nathan@acm.org>
6670
6671         * typeck.c (expr_sizeof): Don't decay arrays and functions.
6672         Remove misleading comment.
6673         (build_compound_expr): Don't decay arrays.
6674
6675 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
6676
6677         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
6678         class rvalues again.
6679
6680 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6681
6682         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
6683
6684         * g++spec.c: Include gcc.h.
6685         (lang_specific_driver): Constify a char*.  Call xcalloc, not
6686         xmalloc/bzero.  All calls to the function pointer parameter now
6687         explicitly call `fatal'.
6688
6689 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
6690
6691         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
6692         * cvt.c (ocp_convert): Complete the from and destination types.
6693         Adjust warning about functions always being `true' in conditionals.
6694         * decl.c (duplicate_decls): Don't play funny games with abort.
6695         * error.c (dump_expr): Handle OVERLOADs.
6696         * spew.c (probe_obstack): Remove.
6697         * typeck.c (condition_conversion): Use perform_implicit_conversion.
6698         
6699 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
6700
6701         * cp-tree.h (auto_function, define_function): Adjust prototypes.
6702         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
6703         changed.
6704         (auto_function): Likewise, for CODE arg.
6705         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
6706         (builtin_function): ... here.
6707
6708 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
6709
6710         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
6711         (init_decl_processing): Don't set TREE_PERMANENT for the
6712         error_mark_node.
6713         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
6714         (grokdeclarator): Likewise.
6715         (grokparms): Don't check TREE_PERMANENT when building up lists.
6716         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
6717         (mark_inline_for_output): Likewise.
6718         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
6719         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
6720         * lex.c (check_newline): Don't check ggc_p; it is always one.
6721         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
6722         * spew.c (yylex): Don't copy_node or probe_obstacks for
6723         non-permanent CONSTANTs and STRINGs.
6724         * tree.c (build_cplus_array_type_1): Don't fuss with
6725         TREE_PERMANENT on ARRAY_TYPEs.
6726         
6727         * cp-tree.def (CLEANUP_STMT): New node.
6728         * cp-tree.h (language_function): Add name_declared.
6729         (current_function_name_declared): New macro.
6730         (CLEANUP_DECL): New macro.
6731         (CLEANUP_EXPR): Likewise.
6732         (emit_local_var): Likewise.
6733         (finish_decl_cleanup): New function.
6734         * cvt.c (build_up_reference): Simplify.
6735         (ocp_convert): Remove dead code.
6736         * decl.c (start_decl): Remove call to add_decl_stmt.
6737         (grok_reference_init): Adjust, to handle bindings temporaries to
6738         references.  Remove dead code.
6739         (initialize_local_var): Don't generate RTL for
6740         declarations here, or build cleanups here.  Don't fuss with
6741         obstacks.  Replace expand_start_target_temps calls with explicit
6742         setting of stms_are_full_exprs_p.
6743         (destroy_local_var): New function.
6744         (emit_local_var): Likewise.
6745         (cp_finish_decl): Use them, as appropriate.
6746         (start_function): Announce template functions.
6747         (store_parm_decls): Don't call declare_function_name here.
6748         (finish_stmt): Don't start emit base-initialization code when just
6749         building the statement-tree.
6750         * init.c (create_temporary_var): Move add_decl_stmt call ...
6751         (get_temp_regvar): Here.
6752         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
6753         cp_finish_decl would expect.  Don't call add_decl_stmt.
6754         * semantics.c (begin_compound_stmt): Call declare_function_name,
6755         if appropriate.
6756         (finish_decl_cleanup): New function.
6757         (expand_stmt): Use emit_local_var to output variables.          
6758         (expand_body): Set current_funtion_name_declared.
6759         
6760 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
6761
6762         * cp-tree.h (finish_cleanup_try_block): New function.
6763         * semantics.c (finish_cleanup_try_block): Add comment.
6764
6765 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6766
6767         * cp-tree.h: Delete declarations for all tree nodes now moved to
6768         global_trees.
6769         * decl.c: Delete their definitions.
6770         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
6771         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
6772         provide defaults.
6773         (init_decl_processing): Call build_common_tree_nodes and
6774         build_common_tree_nodes_2 instead of building their nodes here.
6775         Don't add gc roots for them.
6776
6777 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
6778
6779         * cp-tree.h (language_function): Rename expanding_p to
6780         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
6781         (expanding_p): Adjust accordingly.
6782         (TREE_VIA_PRIVATE): Fix typo in comment.
6783         (DECL_REFERENCE_SLOT): Remove.
6784         (SET_DECL_REFERENCE_SLOT): Likewise.
6785         * decl.c (named_label_uses): Adjust. Remove chicken comment.
6786         (push_overloaded_decl): Don't truncate the chain of bindings when
6787         adding an overloaded function.
6788         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
6789         (initialize_local_var): Fix typo in comment.
6790         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
6791         * decl2.c (start_objects): Make the fact that we are expanding
6792         the generated function right away explicit.
6793         (start_static_storage_duration_function): Likewise.
6794         (finish_file): Fix typo in comment.
6795         * init.c (build_vec_init): Correct bugs in handling cleanups.
6796         * semantics.c (maybe_convert_cond): New function.
6797         (FINISH_COND): Always store the condition, even if there's
6798         a declaration.
6799         (finish_if_stmt_cond): Use maybe_convert_cond.
6800         (finish_while_stmt_cond): Likewise.
6801         (finish_do_stmt): Likewise.
6802         (finish_for_cond): Likewise.
6803         (expand_cond): Adjust.
6804         
6805         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
6806         * init.c (perform_member_init): Remove obstack machinations.
6807         (expand_cleanup_for_base): Likewise.
6808         (finish_init_stmts): Mark the statement-expression as used.
6809         * method.c (emit_thunk): Use tree-generating functions, not
6810         RTL.
6811         (do_build_copy_constructor): Likewise.
6812         (do_build_assign_ref): Likewise.
6813         (synthesize_method): Likewise.  Keep track of line numbers.
6814         * pt.c (tsubst_expr): Handle various kinds of try blocks.
6815         * semantics.c (expand_stmts): Remove.
6816         (begin_function_try_block): Set FN_TRY_BLOCK_P.
6817         (finish_function_try_block): Be careful rechaining 
6818         function try blocks.
6819         (expand_stmt): Loop through all the statements at a given level.
6820         (exapnd_body): Be careful with line-numbers here too.  Prepare for
6821         being called directly from the parser.
6822
6823         * cp-tree.h (finish_function): Adjust prototype.
6824         * decl.c (finish_function): Return the function compiled.
6825         * pt.c (instantiate_decl): Don't play games with obstacks.
6826         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
6827         (search_tree): Likewise.
6828         * typeck.c: Fix typo in comment.
6829         * typeck2.c (store_init_value): Add comment.
6830
6831         * cp-tree.h (CPTI_ATEXIT): New macro.
6832         (atexit_node): Likewise.
6833         * decl.c (destroy_local_static): New function, broken out from ...
6834         (expand_static_init): Here.
6835
6836         * rtti.c (get_tinfo_var): These should always be global
6837         (expand_si_desc): Use tree, not RTL, functions to generate code.
6838         (expand_class_desc): Likewise.
6839         (expand_ptr_desc): Likewise.
6840         (expand_attr_desc): Likewise.
6841         (expand_generic_desc): Likewise.
6842         (synthesize_tinfo_fn): Likewise.
6843
6844 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
6845
6846         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
6847         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
6848         RECHAIN_STMTS. 
6849         (RECHAIN_STMST_FROM_CHAIN): Likewise.
6850
6851         * parse.y (simple_stmt): Fix typo in last change.
6852
6853         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
6854         (STMT_IS_FULL_EXPR_P): Likewise.
6855         (STMT_LINENO_FOR_FN_P): Likewise.
6856         (prep_stmt): New function.
6857         (building_stmt_tree): Tweak for safety.
6858         * pt.c (tsubst_expr): Use prep_stmt throughout.
6859         (add_tree): Move it to semantics.c
6860         * semantics.c (add_tree): Move it here.
6861         (finish_expr_stmt_real): New function.
6862         (finish_expr_stmt): Use it.
6863         (finish_if_stmt_cond): Use FINISH_COND.
6864         (finish_while_stmt_cond): Likewise.
6865         (finish_for_cond): Likewise.
6866         (finish_stmt_tree): Tweak line-number handling.
6867         (prep_stmt): New function.
6868         (expand_stmt): Use it.
6869         
6870         * cp-tree.h (begin_switch_stmt): Adjust prototype.
6871         (finish_switch_cond): Likewise.
6872         * parse.y (simple_stmt): Adjust accordingly.
6873         * parse.c: Regenerated.
6874         * pt.c (tsubst_expr): Adjust accordingly.
6875         * semantics.c (expand_cond): New function.
6876         (FINISH_COND): New macro.
6877         (begin_switch_stmt): Build the SWITCH_STMT here.
6878         (finish_switch_stmt_cond): Not here.
6879         (expand_stmt): Adjust calls to begin_switch_stmt and
6880         finish_switch_cond.  Use expand_cond throughout.
6881
6882         * dump.c (dequeue_and_dump): Dump types for constants.
6883         Describe DECL_ARG_TYPE more intuitively.
6884         Handle ARRAY_REF.
6885
6886         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
6887         (lang_cleanup_tree): Remove.
6888         * lex.c (make_lang_type): Use ggc_alloc to allocate
6889         TYPE_LANG_SPECIFIC.
6890
6891         Reorganize per-function data.
6892         * cp-tree.h (saved_scope): Add function_decl, bindings.
6893         (language_function): Rename binding_level to bindings.
6894         (cp_function_chain): Use the current_function, not the
6895         outer_function_chain.
6896         (current_class_ptr): Make it work, even when there's no 
6897         current function.
6898         (current_class_ref): Likewise.
6899         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
6900         macros.
6901         (clear_temp_name): Remove.
6902         * decl.c (check_function_type): New function, broken out from
6903         start_function.
6904         (current_binding_level): Adjust definition.
6905         (pushlevel): Simplify.
6906         (poplevel): Don't use named_label_uses when we're outside
6907         a function scope.
6908         (mark_saved_scope): Mark function_decl and bindings.
6909         (maybe_push_to_top_level): Don't unconditionally push a new
6910         function context.  Save bindings and the current_function_decl.
6911         Don't clear named_labels.
6912         (pop_from_top_level): Pop function context if appropriate.
6913         (init_decl_processing): Set init_lang_status and free_lang_status,
6914         rather than save_lang_status and restore_lang_status.
6915         (start_function): Take SF_* flags.  Don't clear per-function data.
6916         Reorder and simplify to use new per-function data code.  Add
6917         asserts.
6918         (store_parm_decls): Don't call init_function_start here.
6919         (finish_function): Adjust for new handling of per-function data.
6920         (push_cp_function_context): Simplify.
6921         (mark_cp_function_context): Change binding_level to bindings.
6922         * decl2.c (clear_temp_name): Remove.
6923         (start_objects): Use SF flags to start_function.
6924         (start_static_storage_duration_function): Likewise.
6925         * except.c (start_anon_func): Remove redundant calls to 
6926         push_function_context_to.  Use SF flags to start function.
6927         (end_anon_func): Remove redundant call to pop_function_context
6928         from.
6929         * lex.c (reinit_parse_for_function): Don't initialize per-function 
6930         data.
6931         * method.c (emit_thunk): Clear current_function after calling
6932         assemble_end_function.  Use SF flags for start_function.
6933         (synthesize_method): Use SF flags for start_function.
6934         * parse.c: Regenerated.
6935         * parse.y (fn.defpen): Likewise.
6936         (pending_inline): Clear current_function, even if something goes
6937         wrong.
6938         * pt.c (instantiate_decl): Use SF flags to start_function.
6939         Don't save and restore expanding_p.
6940         (add_tree): Handle the case where we are outside any function.
6941         (end_tree): Likewise.
6942         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
6943         * semantics.c (begin_function_definition): Likewise.
6944         (expand_body): Likewise.
6945         
6946 1999-09-09  Nathan Sidwell  <nathan@acm.org>
6947
6948         * cp-tree.h (convert_to_void): Prototype new function.
6949         (require_complete_type_in_void): Remove prototype.
6950         * cvt.c (convert_to_void): New function.
6951         (ocp_convert): Use convert_to_void.
6952         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
6953         expressions.
6954         * typeck.c (require_complete_type_in_void): Remove function.
6955         (build_compound_expr): Use convert_to_void.
6956         (build_static_cast): Likewise.
6957         (build_c_cast): Likewise.
6958         * semantics.c (finish_expr_stmt): Do not decay full expressions.
6959         
6960         * typeck.c (build_x_compound_expr): Add FIXME.
6961
6962 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
6963
6964         * cp-tree.h (scratch_tree_cons): Remove.
6965         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
6966         and perm_tree_cons with plain tree_cons.
6967         * class.c: Likewise.
6968         * decl.c: Likewise.
6969         * decl2.c: Likewise.
6970         * except.c: Likewise.
6971         * expr.c: Likewise.
6972         * init.c: Likewise.
6973         * lex.c: Likewise.
6974         * method.c: Likewise.
6975         * parse.y: Likewise.
6976         * pt.c: Likewise.
6977         * repo.c: Likewise.
6978         * rtti.c: Likewise.
6979         * search.c: Likewise.
6980         * typeck.c: Likewise.
6981         * parse.c: Regenerated.
6982         * tree.c (build_srcloc): Simplify.
6983         
6984 1999-09-08  Bruce Korb  autogen@linuxbox.com
6985
6986         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
6987
6988 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
6989
6990         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
6991         Remove next.
6992         (LANG_DECL_PERMANENT): Remove.
6993         * decl.c (duplicate_decls): Don't mess about with obstacks trying
6994         to free memory.
6995         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
6996         * lex.c (free_lang_decl_chain): Remove.
6997         (build_lang_decl): Don't use obstacks.
6998         (retrofit_lang_decl): Likewise.
6999         (copy_lang_decl): Likewise.
7000
7001         * cp-tree.h (saved_scope): Remove old_binding_level and 
7002         function_decl.  Tidy up.
7003         * decl.c (mark_saved_scope): Don't set them.
7004         (maybe_push_to_top_level): Clear memory.
7005
7006         * decl.c (layout_var_decl): Change prototype.  Don't complete
7007         types for external objects.
7008         (check_initializer): Likewise.  Tidy.
7009         (initialize_local_var): Complete types here.
7010         (cp_finish_decl): Not here.  Reorganize a little.
7011         (grokvardecl): Don't complete types here.
7012
7013         * decl.c (start_function): Clear last_dtor_insn and
7014         last_parm_cleanup_insn. 
7015         (push_cp_function_context): Just copy over a little of
7016         the old context, not all of it.
7017
7018         * cp-tree.h (copy_to_permanent): Remove.
7019         (permanent_p): Likewise.
7020         * decl.c (building_typename_type): Don't use copy_to_permanent.
7021         (start_decl): Likewise.
7022         (grok_reference_init): Likewise.
7023         (cp_finish_decl): Likewise.
7024         * init.c (build_new_1): Don't use mapcar.
7025         (build_vec_delete_1): Don't use copy_to_permanent.
7026         (build_vec_init): Likewise.
7027         * parse.y (primary): Likewise.
7028         * parse.c: Regenerated.
7029         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
7030         (lookup_template_class): Likewise.
7031         (tsubst_friend_function): Likewise.
7032         (instantiate_class_template): Likewise.
7033         (tsubst_decl): Likewise.
7034         (tsubst): Likewise.
7035         (instantiate_template): Likewise.
7036         (unify): Likewise.
7037         * rtti.c (get_tinfo_fn): Likewise.
7038         (build_dynamic_cast): Likewise.
7039         * semantics.c (finish_if_stmt_cond): Likewise.
7040         (finish_while_stmt_cond): Likewise.
7041         (finish_do_stmt): Likewise.
7042         (finish_for_cond): Likewise.
7043         (finish_for_expr): Likewise.
7044         (finish_cleanup): Likewise.
7045         (add_decl_stmt): Likewise.
7046         (finish_named_return_value): Likewise.
7047         (finish_qualified_call_expr): Likewise.
7048         * tree.c (perm_manip): Remove.
7049         (build_exception_variant): Don't use copy_to_permanent.
7050         (permanent_p): Remove.
7051         (copy_to_permament): Remove.
7052         (build_min_nt): Don't use copy_to_permanent.
7053         (build_min): Likewise.
7054         (min_tree_cons): Likewise.
7055         * typeckc.c (build_static_cast): Likewise.
7056         (build_reinterpret_cast): Likewise.
7057         (build_const_cast): Likewise.
7058         
7059 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
7060
7061         * decl.c (ggc_p): Set it to 1.
7062         (mark_saved_scope): Add prototype.
7063
7064 1999-09-07  Richard Henderson  <rth@cygnus.com>
7065
7066         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
7067         * typeck.c (self_promoting_args_p): Delete.
7068
7069 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
7070
7071         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
7072         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
7073
7074 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
7075
7076         * Makefile.in (tree.o): Depend on ggc.h.
7077         * class.c (make_method_vec): Remove.
7078         (free_method_vec): Likewise.
7079         (free_method_vecs): Remove.
7080         (add_method): Don't use them.
7081         * cp-tree.def (PTRMEM_CST): Make it longer.
7082         (TEMPLATE_PARM_INDEX): Make it shorter.
7083         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
7084         (template_parm_index): Remove RTL field.
7085         (ptrmem_cst): Add RTL field.
7086         (finish_function): Removed parameter.
7087         (process_next_inline): Change prototype.
7088         (init_cplus_unsave): Rename to init_tree.
7089         (binding_init): Remove.
7090         * decl.c (free_binding_nodes): Remove.
7091         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
7092         (pop_binding): Don't use free_binding_nodes.
7093         (free_binding_vecs): Remove.
7094         (store_bindings): Don't use them.
7095         (pop_from_top_level): Likewise.
7096         (lookup_namespace_name): Simplify.
7097         (build_typename_type): Don't use obstack_free.
7098         (unqualified_namespace_lookup): Simplify.
7099         (lookup_name_real): Simplify.
7100         (start_function): Remove comment about leaks.
7101         (finish_function): Removed nested parameter.  Call
7102         expand_end_bindings even when building_stmt_tree.
7103         Call ggc_push_context and ggc_pop_context around
7104         rest_of_compilation, if necessary.
7105         (mark_cp_function_context): Handle a NULL language-context.
7106         (lang_mark_false_label_stack): Fix typo.
7107         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
7108         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
7109         pointer to method types.
7110         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
7111         * decl2.c (finish_objects): Adjust call to finish_function.
7112         (finish_static_store_duration_function): Likewise.
7113         (do_nonmember_using_decl): Remove call to binding_init.
7114         * except.c (end_anon_func): Adjust call to finish_function.
7115         * lex.c (mark_impl_file_chain): New function.
7116         (init_parse): Call init_tree, not init_cplus_unsave.
7117         Add GC roots.
7118         (cp_pramga_interface): Use xmalloc, not permalloc.
7119         (cp_pragma_implementation): Likewise.
7120         (begin_definition_of_inclass_inline): Simplify.
7121         (process_next_inline): Adjust prototype.
7122         (do_scoped_id): Don't call binding_init.
7123         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
7124         * method.c (emit_thunk): Adjust call to finish_function.
7125         (synthesize_method): Likewise.
7126         * parse.y (%union): Add a new `pi' variant.
7127         (PRE_PARSED_FUNCTION_DECL): Use it.
7128         (fn.defpen): Likewise.
7129         (fndef): Adjust call to finish_function.
7130         * pt.c (instantiate_decl): Likewise.
7131         * rtti.c (syntheisze_tinfo_fn): Likewise.
7132         * semantics.c (expand_body): Likewise.
7133         * tree.c: Include ggc.h.
7134         (mark_list_hash): New function.
7135         (binding_init): Remove.
7136         (init_cplus_unsave): Rename to ...
7137         (init_tree): This.  Add GC roots.
7138         
7139 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
7140
7141         Get ready for garbage collection.
7142         * Makefile.in (CXX_TREE_H): Add varray.h
7143         (lex.o): Depend on ggc.h.
7144         (decl.o): Likewise.
7145         (decl2.o): Likewise.
7146         (method.o): Likewise.
7147         (search.o): Likewise.
7148         (pt.o): Likewise.
7149         (repo.o): Likewise.
7150         * class.c: Include ggc.h.
7151         (current_class_name): Remove.
7152         (current_class_type): Likewise.
7153         (current_access_specifier): Likewise.
7154         (previous_class_type): Likewise.
7155         (previous_class_values): Likewise.
7156         (class_cache_firstobj): Likewise.
7157         (current_lang_base): Likewise.
7158         (current_lang_stack): Likewise.
7159         (current_lang_stacksize): Likewise.
7160         (lang_name_c): Likewise.
7161         (lang_name_cplusplus): Likewise.
7162         (lang_name_java): Likewise.
7163         (current_lang_name): Likewise.
7164         (base_layout_decl): Likewise.
7165         (access_default_node): Likewise.
7166         (access_public_node): Likewise.
7167         (access_protected_node): Likewise.
7168         (access_private_node): Likewise.
7169         (access_default_virtual_node): Likewise.
7170         (access_public_virtual_node): Likewise.
7171         (access_protected_virtual_node): Likewise.
7172         (access_private_virtual_node): Likewise.
7173         (signed_zero_node): Likewise.
7174         (init_class_processing): Don't build base_layout_decl.
7175         (push_lang_context): Adjust now that current_lang_base is a varray.
7176         (pop_lang_context): Likewise.
7177         * cp-tree.h: Include varray.h.
7178         (cp_global_trees): Add access_default, access_public,
7179         access_protected, access_private, access_default_virtual,
7180         access_public_virtual, access_protected_virtual,
7181         access_private_virtual, ctor_identifier, delta2_identifier, 
7182         delta_identifier, dtor_identifier, in_charge_identifier,
7183         index_identifier, nelts_identifier, this_identifier,
7184         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
7185         lang_name_c, lang_name_cplusplus, lang_name_java,
7186         empty_except_spec, null, jclass, minus_one, terminate.
7187         (saved_scope): Move here from decl.c.  Define globals in terms of
7188         saved_scope: current_namespace, current_class_name,
7189         current_class_type, current_access_specifier, current_lang_stack,
7190         current_lang_base, current_lang_name, current_function_parms,
7191         current_template_parms, processing_template_decl,
7192         processing_specialization, processing_explicit_instantiation,
7193         previous_class_type, previous_class_values, class_cache_firstobj.
7194         (scope_chain): New variable.
7195         (init_pt): New function.
7196         * decl.c (current_namespace): Remove.
7197         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
7198         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
7199         (delta_identifier, delta2_identifier): Likewise.
7200         (pfn_or_delta2_identifier, tag_identifier): Likewise
7201         (vt_off_identifier, empty_except_spec, null_node): Likewise.
7202         (current_function_parms, current_lang_base): Remove.
7203         (current_lang_stack, previous_class_values): Remove.
7204         (class_binding_level): Macroize.
7205         (saved_scope): Remove.
7206         (current_saved_scope): Rename to scope_chain.
7207         (mark_saved_scope): Adjust for new scope structure.
7208         (maybe_push_to_top_level): Likewise.
7209         (pop_from_top_level): Likewise.
7210         (duplicate_decls): Adjust now that current_lang_base is a varray.
7211         (build_typename_type): Call ggc_add_tree_hash_table_root.
7212         (init_decl_processing): Call init_pt.  Call push_to_top_level to
7213         set up globals.  Add GC roots.
7214         (xref_basetypes): Adjust now that current_lang_base is a varray.
7215         * decl.h (this_identifier): Remove.
7216         (in_charge_identifier): Likewise.
7217         * decl2.c: Don't include varray.h.
7218         (current_namespace): Remove.
7219         (init_decl2): Add GC roots.
7220         * except.c (Terminate): Remove. 
7221         (init_exception_processing): Use terminate_node instead.
7222         (build_terminate_handler): Likewise.
7223         * init.c (nc_nelts_field_id): Remove.
7224         (minus_one): Likewise.
7225         (init_init_processing): Use minus_one_node and nelts_identifier
7226         instead.  Add GC roots.
7227         (jclass_node): Remove.
7228         (build_new_1): Use nelts_identifier.
7229         (build_vec_init): Likewise.
7230         (build_vec_delete): Likewise.
7231         * lex.c: Include ggc.h.
7232         (defarg_fn): Move declaration early.
7233         (defarg_parms): Likewise.
7234         (init_parse): Add GC roots.
7235         (handle_cp_pragma): Remove redundant declaration of
7236         pending_vtables.
7237         * method.c: Include ggc.h.
7238         (btypelist): Make it a varray.  All uses changed.
7239         (ktypelist): Likewise.
7240         (init_method): Add GC roots.
7241         * pt.c: Don't include varray.h.  Include ggc.h.
7242         (current_template_parms): Remove.
7243         (processing_template_decl): Likewise.
7244         (processing_specialization): Likewise.
7245         (processing_explicit_instantiation): Likewise.
7246         (init_pt): New function.
7247         * repo.c: Include ggc.h.
7248         (init_repo): Add GC roots.
7249         * search.c: Don't include varray.h.
7250         (_vptr_name): Remove.
7251         (lookup_field_1): Use vtpr_identifier instead.
7252         (expand_indirect_vtbls_init): Remove redundant declaration of
7253         in_charge_identifier.
7254         (init_search_processing): Use vptr_identifier.
7255         
7256 1999-09-05  Richard Henderson  <rth@cygnus.com>
7257             Bernd Schmidt <bernds@cygnus.co.uk>
7258             Mark Mitchell  <mark@codesourcery.com>
7259
7260         * Makefile.in (parse.o): Depend on ggc.h.
7261         (decl2.o): Depend on ggc.h.
7262         (init.o): Depend on ggc.h.
7263         * cp-tree.h (init_decl2): Declare.
7264         (cp_parse_init): Likewise.
7265         * decl.c (ggc_p): Define to zero.
7266         (mark_saved_scope): New function.
7267         (init_decl_processing): Call cp_parse_init, and cp_decl2.
7268         Register GC roots.
7269         (expand_static_init): Add GC roots.
7270         * decl2.c: Include ggc.h.
7271         (init_decl2): New function.
7272         * init.c: Include ggc.h.
7273         (init_init_processing): Add GC roots.
7274         * parse.y: Include ggc.h.
7275         (cp_parse_init): New function.
7276         
7277 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
7278
7279         * decl.c (init_decl_processing): Set mark_lang_status.
7280         (lang_mark_false_label_stack): Adjust prototype.
7281         * decl2.c (grok_function_init): Remove extraneous declaration of
7282         abort_fndecl.
7283
7284         * Make-lang.in (cc1plus): Remove dependency on GGC.
7285         * Makefile.in (OBJS): Don't mention ggc-simple.o.
7286         (OBJDEPS): Don't mention ggc-simple.o.
7287
7288         * Make-lang.in (cc1plus): Depend on $(GGC).
7289         * Makefile.in (OBJS): Add ggc-simple.o.
7290         (OBJDEPS): Likewise.
7291         * cp-tree.h (language_function): Rename members to `x_' versions;
7292         we now have x_named_labels, x_ctor_label, x_dtor_label,
7293         x_base_init_list, x_member_init_list, x_base_init_expr,
7294         x_current_class_ptr, x_current_class_ref, x_last_tree,
7295         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
7296         x_result_rtx. 
7297         (dtor_label, ctor_label, current_base_init_list,
7298         current_member_init_list, base_init_expr, current_class_ptr,
7299         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
7300         * decl.c: Include ggc.h.
7301         (last_dtor_insn): Adjust to use x_ names.
7302         (last_parm_cleanup_insn): Likewise.
7303         (original_result_rtx): Likewise.
7304         (named_labels): Likewise.
7305         (mark_binding_level): New function.
7306         (mark_cp_function_context): Likewise.
7307         (mark_false_label_stack): Likewise.
7308         (lang_mark_tree): Likewise.
7309         (lang_cleanup_tree): Likewise.
7310         
7311 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
7312
7313         * Makefile.in (CXX_TREE_H): Include function.h.
7314         (decl.o): Don't depend on function.h.
7315         (decl2.o): Likewise.
7316         (typeck.o): Likewise.
7317         (init.o): Likewise.
7318         (method.o): Likewise.
7319         * cp-tree.h: Include function.h.
7320         (cp_function): Rename to language_function.  Remove next.
7321         (cp_function_chain): Make it a macro, not a variable.
7322         (push_cp_function_context): Don't declare.
7323         (pop_cp_function_context): Likewise.
7324         * decl.c: Don't include function.h.
7325         (push_cp_function_context): Make it static.  Make it suitable for
7326         a save_lang_status callback.
7327         (pop_cp_function_context): Likewise.
7328         (maybe_push_to_top_level): Call push_function_context_to, not
7329         push_cp_function_context.
7330         (pop_from_top_level): Call pop_function_context_from, not
7331         pop_cp_function_context.
7332         (init_decl_processing):  Set save_lang_status and
7333         restore_lang_status.  Call push_function_context_to, not
7334         push_cp_function_context.
7335         (cp_function_chain): Remove.
7336         * decl2.c: Don't include function.h.
7337         * except.c: Don't include function.h.
7338         (start_anon_func): Call push_function_context_to, not
7339         push_cp_function_context.
7340         (end_anon_func):  Call pop_function_context_from, not
7341         pop_cp_function_context.
7342         * init.c: Don't include function.h.
7343         * lex.c (begin_definition_of_inclass_inline): Call
7344         push_function_context_to, not push_cp_function_context. 
7345         (process_next_inline):  Call pop_function_context_from, not
7346         pop_cp_function_context.
7347         * method.c: Don't include function.h.
7348         (synthesize_method): Call push_function_context_to, not
7349         push_cp_function_context.  Call pop_function_context_from, not
7350         pop_cp_function_context.
7351         * typeck.c: Don't include function.h.
7352         
7353         * decl.c (expand_static_init): Tweak handling of static
7354         initializations for objects without constructors.
7355
7356 1999-09-03  Nathan Sidwell  <nathan@acm.org>
7357
7358         * typeck.c (build_indirect_ref): Reject dereference of pointer to
7359         void.
7360
7361 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
7362
7363         * cp-tree.h (cp_function): Move here, from decl.c.
7364         (cp_function_chain): Declare.
7365         (dtor_label): New macro, instead of variable.
7366         (ctor_label): Likewise.
7367         (current_base_init_list): Likewise.
7368         (current_member_init_list): Likewise.
7369         (base_init_expr): Likewise.
7370         (current_class_ptr): Likewise.
7371         (current_class_ref): Likewise.
7372         (last_tree): Likewise.
7373         (last_expr_type): Likewise.
7374         (current_function_returns_value): Likewise.
7375         (current_function_returns_null): Likewise.
7376         (current_function_just_assigned_this): Likewise.
7377         (current_function_parms_stored): Likewise.
7378         (temp_name_counter): Likewise.
7379         (static_labelno): Likewise.
7380         (expanding_p): Likewise.
7381         (stmts_are_full_exprs_p): Likewise.
7382         (in_function_try_handler): Likewise.
7383         (lang_type): Remove nested type_flags.  All uses changed.
7384         * call.c (ctor_label): Remove.
7385         (dtor_label): Likewise.
7386         * class.c (current_class_ptr): Remove.
7387         (current_class_ref): Likewise.
7388         * decl.c (static_labelno): Remove.
7389         (dtor_label): Likewise.
7390         (last_dtor_insn): New macro, instead of variable.
7391         (last_parm_cleanup_insn): Likewise.
7392         (original_result_rtx): Likewise.
7393         (in_function_try_handler): Remove.
7394         (named_label_uses): New macro, instead of variable.
7395         (named_labels): Likewise.
7396         (current_function_returns_value): Remove.
7397         (current_function_returns_null): Likewise.
7398         (current_function_assigns_this): New macro, instead of variable.
7399         (current_function_just_assigned_this): Likewise.
7400         (current_binding_level): Likewise.
7401         (init_decl_processing): Call push_cp_function_context.
7402         (cp_function): Move to cp-tree.h
7403         (cp_function_chain): Make it global.
7404         (temp_name_counter): Remove.
7405         (push_cp_function_context): Simplify.
7406         (pop_cp_function_context): Likewise.
7407         * decl2.c (temp_name_counter): Remove.
7408         * init_c (current_base_init_list): Likewise.
7409         (current_member_init_list): Likewise.
7410         (base_init_expr): Likewise.
7411         * method.c (static_labelno): Likewise.
7412         * pt.c (last_tree): Likewise.
7413         * semantics.c (expanding_p): Likewise.
7414         (stmts_are_full_exprs_p): Likewise.
7415         (last_expr_type): Likewise.
7416         * typeck.c (dtor_label): Likewise.
7417         (ctor_label): Likewise.
7418         
7419 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
7420
7421         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
7422         (arg_assoc_class): Use arg_assoc_template_arg for template
7423         arguments. 
7424         (arg_assoc): Likewise.
7425         * pt.c (mangle_class_name_for_template): Allow member template
7426         template arguments.
7427
7428 1999-09-02  Nathan Sidwell  <nathan@acm.org>
7429
7430         * call.c (build_conditional_expr): Warn on enum mismatches.
7431         (convert_arg_to_ellipsis): Move non-pod check to after
7432         conversion.
7433
7434 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7435
7436         * gxx.gperf (hash, is_reserved_word): Add prototypes.
7437
7438         * init.c (build_vec_init): Initialize variable `try_block'.
7439
7440         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
7441         Likewise for bzero/memset.
7442         (token_getch, token_put_back): Add static prototypes.  Remove
7443         `inline' from the definitions.
7444         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
7445
7446 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
7447
7448         * cp-tree.h (lang_type): Move align into type_flags.
7449         (CLASSTYPE_ALIGN): Adjust accordingly.
7450         * call.c (direct_reference_binding): Remove misleading comment.
7451
7452 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7453
7454         * parse.y (language_string): Constify.
7455
7456 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7457
7458         * repo.c (getpwd): Don't prototype.
7459         * xref.c (getpwd): Likewise
7460
7461 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7462
7463         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
7464         Remove hacks for stuff which now comes from libiberty.
7465
7466 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
7467
7468         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
7469
7470 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
7471
7472         * cp-tree.h (begin_init_stmts): Declare.
7473         (finish_init_stmts): Likewise.
7474         * cvt.c (build_up_reference): Wrap the declaration of a temporary
7475         in a statement-expression so that we will see it when expanding
7476         tree structure later.
7477         * init.c (begin_init_stmts): Don't make it static.
7478         (finish_init_stmts): Likewise.
7479
7480         * cp-tree.h (start_handler_parms): New function.
7481         (expand_start_catch_block): Take only one parameter.
7482         (start_handler_parms): New function.
7483         * decl.c (start_handler_parms): Define it.
7484         * except.c (process_start_catch_block): Take only one parameter.
7485         Don't call grokdeclarator here.
7486         (expand_start_catch_block): Don't call grokdeclarator here,
7487         either.
7488         * parse.y (handler_args): Adjust call to
7489         expand_start_catch_block.  Use start_handler_parms.
7490         * pt.c (push_template_decl_real): Make permanent lists have
7491         permanent elements.
7492         (tsubst_expr): Adjust calls to expand_start_catch_block
7493         appropriately.
7494         * semantics.c (expand_stmt): Likewise.
7495         
7496 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
7497
7498         * pt.c (push_template_decl_real): Use template declaration from
7499         class type if it exists.
7500
7501 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
7502
7503         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
7504         (maybe_inject_for_scope_var): Declare it.
7505         (initialize_local_var): Likewise.
7506         * decl.c (maybe_inject_for_scope_var): Make it global.
7507         (initialize_local_var): Likewise.  Move cleanup handling here,
7508         from cp_finish_decl.
7509         (make_rtl_for_nonlocal_decl): Use
7510         push_obstacks_nochange/pop_obstacks, rather than
7511         end_temporary_allocation/resume_temporary_allocation.
7512         (cp_finish_decl): Try to complete the type of a variable when it
7513         is declared.  Move cleanup-handling to initialize_local_var.
7514         (expand_static_init): Use tree-building code, rather than
7515         RTL-building code.
7516         * decl2.c (get_temp_name): Assert non-initializedness of
7517         temporaries.
7518         * init.c (create_temporary_var): Move RTL-assigning code to ...
7519         (get_temp_regvar): Here.
7520         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
7521         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
7522         call initialize_local_var to generate initialization code.
7523         
7524 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7525
7526         * cp-tree.h (fndecl_as_string, type_as_string,
7527         type_as_string_real, args_as_string, decl_as_string,
7528         expr_as_string, code_as_string, language_as_string,
7529         parm_as_string, op_as_string, assop_as_string, cv_as_string,
7530         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
7531
7532         * errfn.c (cp_printer): Likewise.
7533
7534         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
7535         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
7536         cp_file_of, code_as_string, language_as_string, parm_as_string,
7537         op_as_string, assop_as_string, args_as_string, cv_as_string):
7538         Likewise.
7539
7540         * tree.c (lang_printable_name): Likewise.
7541
7542 1999-08-28  Richard Henderson  <rth@cygnus.com>
7543
7544         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
7545
7546 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
7547
7548         * cp-tree.h (strip_array_types): New function.
7549         * decl.c (maybe_deduce_size_from_array_init): New function, split
7550         out from cp_finish_decl.
7551         (layout_var_decl): Likewise.
7552         (maybe_commonize_var): Likewise.
7553         (maybe_inject_for_scope_var): Likewise.
7554         (initialize_local_var): Likewise.
7555         (build_cleanup_on_safe_obstack): Likewise.
7556         (check_initializer): Likewise.
7557         (make_rtl_for_nonlocal_decl): Likewise.
7558         (cp_finish_decl): Use them.
7559         * typeck.c (strip_array_types): New function.
7560         
7561         * cp-tree.def (LABEL_STMT): New tree node.
7562         * cp-tree.h (LABEL_STMT_LABEL): New macro.
7563         (shadow_label): Remove.
7564         (declare_local_label): New function.
7565         (finish_label_decl): Likewise.
7566         * decl.c (make_label_decl): New function, split out from
7567         lookup_label.
7568         (shadowed_labels): Remove.
7569         (binding_level): Add shadowed_labels.
7570         (clear_binding_level): Remove.
7571         (push_binding_level): Just bzero the new binding level.
7572         (pushlevel): Fix indentation.
7573         (pop_label): New function.
7574         (pop_labels): Likewise, split out from poplevel.
7575         (poplevel): Pop local labels.  Use pop_labels.
7576         (maybe_push_to_top_level): Don't clear shadowed_labels.
7577         (lookup_label): Use make_label_decl.
7578         (shadow_label): Remove.
7579         (declare_local_label): New function.
7580         (define_label): Simplify.
7581         (start_function): Don't clear shadowed_labels.
7582         (cp_function): Remove shadowed_labels.
7583         (push_cp_function_context): Don't save shadowed_labels.
7584         (pop_cp_function_context): Don't restore it.
7585         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
7586         * parse.y (label_decl): Use finish_label_decl.
7587         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
7588         declarations.
7589         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
7590         building_stmt_tree.
7591         (finish_label_decl): New function.
7592         (expand_stmt): Handle LABEL_STMTs and local label declarations.
7593         
7594 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
7595
7596         * decl.c (lookup_label): Build labels on the permanent obstack
7597         when building statement trees.  Don't build RTL for labels when
7598         building statement trees.
7599         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
7600         building statement trees.
7601         (finish_label_stmt): Likewise.
7602         (expand_stmt): Adjust accordingly.
7603         * pt.c (tsubst_expr); Likewise.
7604         (do_decl_instantiation): Robustify.
7605         
7606         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
7607         * tree.c (build_cplus_new): Set it.
7608         * expr.c (cplus_expand_expr): Use it.
7609         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
7610         
7611         * decl.c (store_parm_decls): Reset immediate_size_expand.
7612         (finish_function): Likewise.
7613         
7614         * tree.c (cplus_unsave_expr_now): Don't return a value.
7615
7616         * semantics.c (do_poplevel): Always initialize the return value.
7617
7618 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
7619
7620         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
7621         * tree.h (cplus_unsave_expr_now) : Same.
7622
7623 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
7624
7625         * decl.c (grokdeclarator): Amend comment.
7626         * except.c (expand_start_catch_block): Call push_template_decl for
7627         catch-block parameters.
7628         * method.c (synthesize_method): Build an empty compound statement
7629         for the body of a constructor.
7630
7631 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7632
7633         * tree.c (cp_build_qualified_type_real): If we're asking for the
7634         same quals we already have, just return.
7635
7636 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
7637
7638         * cp-tree.def (SUBOBJECT): New tree node.
7639         * cp-tree.h (CLEANUP_P): New macro.
7640         (SUBOBJECT_CLEANUP): Likewise.
7641         (keep_next_level): Add parameter.
7642         (get_temp_regvar): Don't declare.
7643         (emit_base_init): Remove parameter.
7644         (expand_aggr_init): Rename to build_aggr_init.
7645         (expand_vec_init): Rename to build_vec_init.
7646         (do_pushlevel): Remove.
7647         (do_poplevel): Likewise.
7648         (finish_cleanup): New function.
7649         (finish_subobject): Likewise.
7650         (stmts_are_full_exprs_p): New variable.
7651         * decl.c (keep_next_level): Add parameter.
7652         (cp_finish_decl): Use build_aggr_init, not
7653         expand_aggr_init.  Use finish_expr_stmt to expand the code.
7654         (expand_static_init): Use tree-generating, not RTL-generating,
7655         functions to handle the initialization.
7656         (start_function): Remove dead code.  Always have a momentary
7657         obstack inside the function, even before hitting the first curly
7658         brace.
7659         (cplus_expand_expr_stmt): Move calls to
7660         expand_{start,end}_target_temps into semantics.c.
7661         (cp_function): Add stmts_are_full_exprs_p.
7662         (push_cp_function_context): Save it.
7663         (pop_cp_function_context): Restore it.
7664         * decl2.c (get_temp_regvar): Move to init.c.
7665         (do_static_initialization): Use build_{aggr,vec}_init.
7666         (do_static_destruction): Fix typo in comment.
7667         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
7668         * except.c (expand_throw): Use create_temporary_var.
7669         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
7670         * init.c (expand_vec_init_try_block): Remove.
7671         (expand_vec_init_catch_clause): Likewise.
7672         (get_temp_regvar): New function.
7673         (begin_init_stmts): Likewise.
7674         (finish_init_stmts): Likewise.
7675         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
7676         structure here.
7677         (emit_base_init): Likewise.  Remove unused parameter.
7678         (expand_virtual_init): Likewise.
7679         (expand_cleanup_for_base): Use finish_subobject.
7680         (expand_aggr_vbase_init_1): Simplify.
7681         (construct_virtual_bases): Use tree-generating functions to build
7682         up initialization.
7683         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
7684         (expand_default_init): Likewise.
7685         (expand_aggr_init_1): Likewise.
7686         (expand_vec_init): Rename to build_vec_init.
7687         * method.c (do_build_copy_constructor): Use tree-generating
7688         functions.  Don't call clear_last_expr.
7689         (do_build_assign_ref): Likewise.
7690         (synthesize_method): Call clear_last_expr here.
7691         * parse.y (base_init): Don't call clear_last_expr here.
7692         (nodecls): Likewise.
7693         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
7694         * semantics.c (do_pushlevel): Move to here.
7695         (do_poplevel): Likewise.
7696         (stmts_are_full_exprs_p): New variable.
7697         (finish_expr_stmt): Handle logic for temoprary cleanup here.
7698         (finish_for_stmt): Use finish_expr_stmt.
7699         (finish_cleanup): New function.
7700         (finish_function_try_block): Fix indentation.
7701         (finish_subobject): New function.
7702         (setup_vtbl_ptr): Call keep_next_level here.
7703         (finish_stmt_expr): Handle a block with no scope inside the
7704         statement-expression.
7705         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
7706         SUBOBJECT.
7707         * tree.c (search_tree): Handle INIT_EXPR.
7708         (mapcar): Likewise.
7709         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
7710         * typeck2.c (store_init_value): Change expand_aggr_init to
7711         build_aggr_init in comment.
7712         
7713 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
7714
7715         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
7716
7717 1999-08-25  Nathan Sidwell  <nathan@acm.org>
7718
7719         * decl2.c (handle_class_head): Be graceful about additional
7720         scope qualifiers. Adjust comments to reflect reality.
7721
7722 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7723
7724         * call.c (build_conditional_expr): Fix typo.
7725         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
7726         lvalue before trying to mess with the sides.
7727
7728         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
7729
7730 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
7731
7732         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
7733
7734 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
7735
7736         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
7737         Return arbitrary pointer or NULL.
7738         (check_eh_spec): Call __throw_type_match_rtti_2.
7739         * tinfo.h (*::dcast): Return int.  Add valp parm.
7740         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
7741         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
7742         (__throw_type_match_rtti): Now just a wrapper.
7743
7744         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
7745         (init_exception_processing): Don't initialize them.
7746
7747 1999-08-23  Paul Burchard <burchard@pobox.com>
7748
7749         * decl.c (check_default_argument): Fix typo.
7750
7751 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
7752
7753         * cp-tree.def (STMT_EXPR): Fix typo in node name.
7754
7755         * dump.c (dump_next_stmt): New function.
7756         (dequeue_and_dump): Use it.
7757         
7758         * pt.c (tsubst_copy): Make sure to initialize return value for a
7759         STMT_EXPR, even when processing_template_decl.
7760         * semantics.c (finish_stmt_expr): A statement-expression whose
7761         last statement is not an expression-statement has type `void'.  
7762         
7763 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
7764
7765         * semantics.c (finish_stmt_expr): Fix typo in comment.
7766         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
7767         (mapcar): Likewise.
7768         * init.c (build_vec_delete_1): Make the children of a permanent
7769         BIND_EXPR permanent.
7770         * pt.c (register_specialization): Don't register a specialization
7771         more than once.
7772         
7773 1999-08-18  Andrew Haley  <aph@cygnus.com>
7774
7775         * method.c (process_overload_item): Call build_mangled_C9x_name ()
7776         for all integer parameter types larger than long long.
7777
7778 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
7779
7780         * pt.c (redeclare_class_template): Merge default template
7781         arguments in both directions.
7782
7783         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
7784         compiler_error message.
7785
7786 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
7787
7788         * cp-tree.h: Declare flag_use_repository.
7789         * pt.c (do_decl_instantiation): Don't complain about duplicate
7790         instantiation with -frepo.
7791         (do_type_instantiation): Likewise.
7792
7793         * pt.c (push_template_decl_real): Complain about everything
7794         that isn't a valid template.
7795
7796         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
7797         affect inlines.
7798
7799 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
7800
7801         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
7802         * decl2.c (build_expr_from_tree): Handle it.
7803         * error.c (dump_expr): Likewise.
7804         * pt.c (for_each_template_parm): Likewise.
7805         (tsubst_copy): Likewise.
7806         * tree.c (search_tree): Likewise.
7807         * semantics.c (finish_pseudo_destructor_call): Create it.
7808         
7809 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
7810
7811         * search.c (setup_class_bindings): Robustify.
7812         * typeck.c (common_type): Use same_type_p, not pointer equality,
7813         to compare types.
7814
7815         * cp-tree.h (build_lang_field_decl): Remove.
7816         * class.c (build_vtable): Replace calls to build_lang_field_decl
7817         with build_lang_decl.
7818         (prepare_fresh_vtable): Likewise.
7819         (finish_struct_1): Likewise.
7820         (init_class_processing): Likewise.
7821         * decl.c (push_using_decl): Likewise.
7822         (init_decl_processsing): Likewise.
7823         (grokvardecl): Likewise.
7824         (build_ptrmemfunc_type): Likewise.
7825         (grokdeclarator): Likewise.
7826         (build_enumerator): Likewise.
7827         * decl2.c (grok_x_components): Likewise.
7828         (do_class_using_decl): Likewise.
7829         * except.c (call_eh_info): Likewise.
7830         * init.c (init_init_processing): Likewise.
7831         * rtti.c (expand_class_decl): Likewise.
7832         * tree.c (build_base_fields): Likewise.
7833         (build_vbase_pointer_fields): Likewise.
7834         * lex.c (build_lang_decl): Build declarations on the permanent
7835         obstack if we're building statmeent trees.
7836         (retrofit_lang_decl): Handle both the full lang_decl and also the
7837         smaller lang_decl_flags here.
7838         (build_lang_field_decl): Remove.
7839         * pt.c (push_template_decl_real): Issue errors for variable
7840         declarations that are not static members.
7841
7842 1999-08-18  Richard Henderson  <rth@cygnus.com>
7843
7844         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
7845         (mapcar): Likewise.
7846
7847 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
7848
7849         * cp-tree.h (back_end_hook): New variable.
7850         * decl2.c (back_end_hook): Define it.
7851         (finish_file): If it's non-NULL, call it.
7852
7853         * decl.c (add_decl_to_level): New function.
7854         (push_local_binding): Use it.
7855         (find_binding): Fix typo in comment.
7856         (pushdecl): Use add_decl_to_level.  Put templates on the
7857         corresponding namespace-scope binding levels.
7858         * dump.c (dequeue_and_dump): Print the specializations of a
7859         template.
7860         * pt.c (push_template_decl_real): Don't push a template multiple
7861         times.
7862
7863 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
7864
7865         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
7866         (CALL_DECLARATOR_QUALS): Likewise.
7867         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
7868         * decl.c (grokdeclarator): Adjust to use them.
7869         * decl2.c (grokfield): Likewise.
7870         (reparse_absdcl_as_casts): Likewise.
7871         * lex.c (make_call_declarator): Likewise.
7872         (set_quals_and_spec): Likewise.
7873         * pt.c (tsubst): Likewise.
7874         * tree.c (mapcar): Remove special hack to handle third operand of
7875         a CALL_EXPR.
7876
7877 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
7878
7879         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
7880         * class.c (build_vtable): Use build_lang_field_decl to build the
7881         VAR_DECLs for vtables.
7882         (prepare_fresh_vtable): Likewise.
7883         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
7884         CAN_HAVE_FULL_LANG_DECL_P.
7885         (push_using_decl): Use build_lang_decl to build USING_DECLs.
7886         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
7887         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
7888         (build_lang_field_decl): Likewise.
7889         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
7890         to copy.
7891         
7892         * cp-tree.def (STMT_EXPR): New tree node.
7893         * cp-tree.h (STMT_EXPR_STMT): New macro.
7894         (store_return_init): Change prototype.
7895         (finish_named_return_value): New function.
7896         (expand_stmt): Likewise.
7897         (expand_body): Likewise.
7898         (begin_stmt_tree): Likewise.
7899         (finish_stmt_tree): Likewise.
7900         (expanding_p): New variable.
7901         (last_expr_type): Likewise.
7902         (building_stmt_tree): New macro.
7903         * decl.c (start_function): Use building_stmt_tree, not
7904         processing_template_decl, where appropriate.
7905         (store_parm_decls): Likewise.
7906         (store_return_init): Move most of the body to semantics.c.
7907         (finish_function): Use building_stmt_tree.
7908         (finish_stmt): Clear last_expr_type here.
7909         (cp_function): Add expanding_p, last_tree, last_expr_type.
7910         (push_cp_function_context): Save them.
7911         (pop_cp_function_context): Restore them.
7912         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
7913         * error.c (dump_expr): Handle STMT_EXPR.
7914         * except.c (expand_start_catch_block): Use building_stmt_tree.
7915         Use add_decl_stmt.
7916         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
7917         (do_case): Move add_tree call to semantics.c.
7918         * parse.y (return_init): Use finish_named_return_value.
7919         (for.init.statement): Use finish_expr_stmt.
7920         * parse.c: Regenerated.
7921         * pt.c (do_pushlevel): Move to semantics.c.
7922         (do_poplevel): Likewise.
7923         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
7924         (tsubst_expr): Don't expand all the way to RTL here.  Handle
7925         RETURN_INIT and CTOR_INITIALIZER.
7926         (instantiate_decl): Call expand_body after tsubst'ing into
7927         DECL_SAVED_TREE.
7928         * semantics.c (expand_stmts): New function.
7929         (expanding_p): New variable.
7930         (last_expr_type): Likewise.
7931         (finish_expr_stmt): Use building_stmt_tree.
7932         (begin_if_stmt): Likewise.
7933         (finish_if_stmt_cond): Likewise.
7934         (finish_then_clause): Likewise.
7935         (begin_else_clause): Likewise.
7936         (finish_else_clause): Likewise.
7937         (begin_while_stmt): Likewise.
7938         (finish_while_stmt_cond): Likewise.
7939         (finish_while_stmt): Likewise.
7940         (finish_do_body): Likewise.
7941         (finish_do_stmt): Likewise.
7942         (finish_return_stmt): Likewise.
7943         (begin_for_stmt): Likewise.
7944         (fnish_for_init_stmt): Likewise.
7945         (finish_for_cond): Likewise.
7946         (finish_for_expr): Likewise.
7947         (finish_for_stmt): Likewise.
7948         (finish_break_stmt): Likewise.
7949         (finish_continue_stmt): Likewise.
7950         (finish_switch_cond): Likewise.
7951         (finish_switch_stmt): Likewise.
7952         (finish_case_label): Call add_tree here if necessary.
7953         (finish_goto_statement): Use building_stmt_tree.
7954         (begin_try_block): Likewise.
7955         (begin_function_try_block): Likewise.
7956         (finish_try_block): Likewise.
7957         (finish_function_try_block): Likewise.
7958         (finish_handler_sequence): Likewise.
7959         (finish_function_handler_sequence): Likewise.
7960         (begin_handler): Likewise.
7961         (finish_handler_parms): Likewise.
7962         (finish_handler): Likewise.
7963         (begin_compound_stmt): Likewise.
7964         (finish_compound_stmt): Likewise.
7965         (finish_asm_stmt): Likewise.
7966         (finish_label_stmt): Likewise.
7967         (finish_named_return_value): New function.
7968         (setup_vtbl_ptr): Moved here from decl2.c.
7969         (do_pushlevel): Moved here from pt.c.
7970         (do_poplevel): Likewise.
7971         (begin_stmt_expr): Use building_stmt_tree.
7972         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
7973         when building_stmt_tree.
7974         (begin_stmt_tree): New function.
7975         (finish_stmt_tree): Likewise.
7976         (expand_stmt): Likewise.
7977         (expand_body): Likewise.
7978         * tree.c (build_cplus_method_type): Make sure the argument types
7979         end up on the same obstack as the METHOD_TYPE.
7980         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
7981         THROW_EXPR, STMT_EXPR.
7982         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
7983         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
7984         sorry, if an unsupported node is encountered.
7985         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
7986         (c_expand_return): Don't call add_tree here.
7987         
7988 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
7989
7990         * pt.c (check_default_tmpl_args): Don't check in local scopes.
7991         (tsubst_decl): Make sure the declaration is on a saveable
7992         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
7993         variable.
7994         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
7995         
7996 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
7997
7998         Speed up Koenig lookup.
7999         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
8000         to return namespaces we've looked at.
8001         * decl2.c (lookup_using_namespace): Likewise.
8002         (add_function): Don't call ovl_member.
8003         (lookup_arg_dependent): Initialize k.namespaces to the list of 
8004         namespaces seen in unqualified lookup.
8005         * call.c (equal_functions): Move here from tree.c.
8006         (joust): Use it to handle duplicate candidates.
8007         * tree.c (ovl_member): Use ==.
8008
8009 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
8010
8011         * cp-tree.def (DECL_STMT): Make it smaller.
8012         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
8013         (lang_decl): ... here.  Add next.
8014         (DECL_SAVED_TREE): Adjust accordingly.
8015         (DECL_IMPLICIT_TYPEDEF_P): New macro.
8016         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8017         (DECL_STMT_DECL): Likewise.
8018         (create_implicit_typedef): New function.
8019         (maybe_push_decl): Likewise.
8020         (tsubst_default_argument): New function.
8021         (at_function_scope_p): Likewise.
8022         (add_decl_stmt): Likewise.
8023         (push_permanent_obstack): Likewise.
8024         * call.c (convert_default_arg): Use tsubst_default_argument.
8025         * class.c (add_method): Use push_permanent_obstack.
8026         (build_self_reference): Create a TEMPLATE_DECL for the
8027         self-reference, if necessary.
8028         * decl.c (pseudo_global_level_p): Only look at the current binding
8029         level.
8030         (push_binding): Use push_permanent_obstack.
8031         (create_implicit_typedef): New function.
8032         (pushtag): Use it.
8033         (duplicate_decls): Use push_permanent_obstack.
8034         (maybe_push_decl): New function.
8035         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
8036         (start_decl_1): Remove dead code.
8037         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
8038         pseudo_global_level_p.
8039         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
8040         template.
8041         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
8042         pseudo_global_level_p.
8043         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
8044         a template.
8045         (get_sentry): Use push_permanent_obstack.
8046         * dump.c (dequeue_and_dump): Enable DECL_STMT.
8047         * except.c (call_eh_info): Use push_permanent_obstack.
8048         (build_eh_type_ref): Likewise.
8049         (do_pop_exception): Likewise.
8050         (expand_eh_spec): Likewise.
8051         (alloc_eh_object): Likewise.
8052         (expand_throw): Likewise.
8053         * init.c (build_java_class_ref): Likewise.
8054         * lex.c (get_time_identifier): Likewise.
8055         (free_lang_decl_chain): Correct type.
8056         (retrofit_lang_decl): Adjust accordingly.
8057         (build_lang_field_decl): Likewise.
8058         * lex.h (free_lang_decl_chain): Likewise.
8059         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
8060         * parse.c: Regenerated.
8061         * pt.c (tsubst_default_arguments): New function.
8062         (retrieve_local_specialization): Likewise.
8063         (register_local_specialization): Likewise.
8064         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
8065         pseudo_global_level_p to determine whether or not a template is
8066         primary.
8067         (lookup_template_class): Likewise.  Use create_implicit_typedef.
8068         (instantiate_class_template): Call tsubst_default_arguments for
8069         member functions, if appropriate.
8070         (tsubst_default_argument): New function.
8071         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
8072         * search.c (at_function_scope_p): New function.
8073         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
8074         (finish_label_stmt): Likewise.
8075         (add_decl_stmt): New function.
8076         (begin_class_definition): Likewise.
8077         (finish_typeof): Likewise.
8078         * tree.c (copy_template_template_parm): Likewise.
8079         (copy_to_permanent): Likewise.
8080         (push_permanent_obstack): Define.
8081         (mark_addressable): Use it.
8082         * typeck.c (mark_addressable): Likewise.
8083         
8084 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
8085
8086         * cp-tree.h (init_cplus_unsave): New.
8087         (cplus_unsave_expr_now): New.
8088         * lex.c (init_parse): Call init_cplus_unsave.
8089         * tree.c (init_cplus_unsave): New.
8090         (cplus_unsave_expr_now): New.
8091
8092 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
8093
8094         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
8095         decl_constant_value to simplify array bounds.
8096
8097 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
8098
8099         * lang-options.h: Add -fms-extensions.
8100         * cp-tree.h: Declare flag_ms_extensions.
8101         * decl2.c: Define it.
8102         * class.c (instantiate_type): Don't complain about taking the address
8103         of a bound member function if -fms-extensions.
8104         * typeck.c (build_unary_op): Likewise.
8105         * decl.c (grokdeclarator): Or about implicit int.
8106         * init.c (resolve_offset_ref): Or about implicit '&'.
8107
8108 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
8109
8110         * cp-tree.h (minimal_parse_mode): Remove.
8111         (finish_label_stmt): New function.
8112         * decl.c (saved_scope): Remove minimal parse mode.
8113         (maybe_push_to_top_level): Don't save it.
8114         (pop_from_top_level): Don't restore it.
8115         (define_label): Split out template-handling code to semantics.c.
8116         (start_decl): Don't use minimal_parse_mode.
8117         (cp_finish_decl): Likewise.
8118         (start_function): Don't increment it.
8119         (store_return_init): Don't use it.
8120         (finish_function): Don't decrement it.
8121         * parse.y (label_colon): Use finish_label_stmt throughout.
8122         * parse.c: Regenerated.
8123         * pt.c (minimal_parse_mode): Don't define it.
8124         (tsubst_expr): Use finish_label_stmt.
8125         * semantics.c (finish_label_stmt): New function.
8126
8127         * dump.c (queue): Be careful when computing bitmasks.
8128         (dequeue_and_dump): Describe binfos as binfos, not as
8129         vectors.
8130         
8131         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
8132         throughout.     
8133         * parse.c: Regenerated.
8134         
8135         * Make-lang.in (CXX_SRCS): Remove sig.c.
8136         * Makefile.in (CXX_OBJS): Remove sig.o.
8137         (sig.o): Remove.
8138         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
8139         (CPTI_SIGNATURE_TYPE): Likewise.
8140         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
8141         (opaque_type_node): Likewise.
8142         (signature_type_node): Likewise.
8143         (sigtable_entry_type): Likewise.
8144         (flag_handle_signatures): Likewise.
8145         (lang_type): Remove is_signature, is_signature_pointer,
8146         is_signature_reference, has_opaque_typedecls,
8147         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
8148         signature_pointer_to, signature_reference_to.
8149         (IS_SIGNATURE): Remove.
8150         (SET_SIGNATURE): Remove.
8151         (CLEAR_SIGNATURE): Remove.
8152         (IS_SIGNATURE_POINTER): Remove.
8153         (IS_SIGNATURE_REFERENCE): Remove.
8154         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
8155         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
8156         (CLASSTYPE_SIGNATURE): Remove.
8157         (SIGNATURE_TYPE): Remove.
8158         (SIGNATURE_METHOD_VEC): Remove.
8159         (SIGNATURE_POINTER_TO): Remove.
8160         (SIGNATURE_REFERENCE_TO): Remove.
8161         (lang_decl_flags): Remove is_default_implementation.  Rename
8162         memfunc_pointer_to to saved_tree.
8163         (IS_DEFAULT_IMPLEMENTATION): Remove.
8164         (DECL_MEMFUNC_POINTER_TO): Remove.
8165         (DECL_MEMFUNC_POINTING_TO): Remove.
8166         (DECL_SAVED_TREE): Adjust definition.
8167         (tag_types): Remove signature_type_node.
8168         (SIGNATURE_FIELD_NAME): Remove.
8169         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
8170         (SIGNATURE_OPTR_NAME): Likewise.
8171         (SIGNATURE_SPTR_NAME): Likewise.
8172         (SIGNATURE_POINTER_NAME): Likewise.
8173         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
8174         (SIGNATURE_REFERENCE_NAME): Likewise.
8175         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
8176         (SIGTABLE_PTR_TYPE): Likewise.
8177         (SIGTABLE_NAME_FORMAT): Likewise.
8178         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
8179         (SIGTABLE_TAG_NAME): Likewise.
8180         (SIGTABLE_VB_OFF_NAME): Likewise.
8181         (SIGTABLE_VT_OFF_NAME): Likewise.
8182         (finish_base_specifiers): Change prototype.
8183         (build_signature_pointer_type): Remove.
8184         (build_signature_reference_type): Remove.
8185         (build_signature_pointer_constructor): Remove.
8186         (build_signature_method_call): Remove.
8187         (build_optr_ref): Likewise.
8188         (append_signature_fields): Likewise.
8189         (signature_error): Likewise.
8190         * call.c (build_this): Remove signature support.
8191         (build_over_call): Likewise.
8192         (build_new_method_call): Likewise.
8193         * class.c (add_implicitly_declared_members): Likewise.
8194         (finish_struct_1): Likewise.
8195         (finish_struct): Likewise.
8196         * cvt.c (cp_convert_to_pointer): Likewise.
8197         (convert_to_pointer_force): Likewise.
8198         (ocp_convert): Likewise.
8199         * decl.c (sigtable_decl_p): Remove.
8200         (init_decl_processing): Remove support for signatures.
8201         (cp_finish_decl): Likewise.
8202         (grokdeclarator): Likewise.
8203         (grokparms): Likewise.
8204         (xref_tag): Likewise.
8205         (start_function): Likewise.
8206         (start_method): Likewise.
8207         * decl2.c (finish_sigtable_vardecl): Remove.
8208         (flag_handle_signatures): Remove.
8209         (lang_f_options): Remove handle-signatures.
8210         (grokfield): Remove support for signatures.
8211         (grokbitfield): Likewise.
8212         (finish_file): Likewise.
8213         (reparse_absdcl_as_casts): Likewise.
8214         * error.c (dump_type_real): Likewise.
8215         (dump_function_decl): Likewise.
8216         * friend.c (make_friend_class): Likewise.
8217         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
8218         * hash.h: Regenerated.
8219         * init.c (build_new_1): Remove support for signatures.
8220         * lang-options.h: Remove -fhandle-signatures,
8221         -fno-handle-signatures. 
8222         * lex.c (init_parse): Remove support for signatures.
8223         (yyprint): Likewise.
8224         * lex.h (rid): Remove RID_SIGNATURE.
8225         * method.c (build_decl_overload_real): Remove support for
8226         signatures. 
8227         (hack_identifier): Likewise.
8228         * parse.y (base_class): Likewise.
8229         (base_class.1): Likewise.
8230         (access_specifier): Likewise.
8231         * search.c (lookup_member): Likewise.
8232         * semantics.c (finish_qualified_object_call_expr): Likewise.
8233         (finish_template_type_parm): Likewise.
8234         (begin_class_definition): Likewise.
8235         (finish_base_specifier): Likewise.
8236         * sig.c: Remove.
8237         * tree.c (build_cplus_method_type): Remove support for signatures.
8238         * typeck.c (require_complete_type): Likewise.
8239         (c_sizeof): Likewise.
8240         (c_alignof): Likewise.
8241         (build_object_ref): Likewise.
8242         (build_component_ref): Likewise.
8243         (build_indirect_ref): Likewise.
8244         (build_c_cast): Likewise.
8245         (build_modify_expr): Likewise.
8246         (convert_for_initialization): Likewise.
8247         * typeck2.c (signature_error): Remove.
8248         (store_init_value): Remove support for signatures.
8249         (digest_init): Likewise.
8250         (build_x_arrow): Likewise.
8251         (build_functional_cast): Likewise.
8252         * xref.c (GNU_xref_decl): Likewise.
8253         
8254 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
8255
8256         * lex.c (do_identifier): Remove unnecessary lookup of class field.
8257
8258 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
8259
8260         * decl2.c (set_decl_namespace): Do not complain about non-matching
8261         decls if processing a template.
8262
8263 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
8264
8265         * decl.c (build_ptrmemfunc_type): Handle qualified
8266         pointer-to-member types here.
8267         * tree.c (cp_build_qualified_type_real): Simplify handling here.
8268
8269 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8270
8271         * lex.c (lang_identify): Likewise.
8272
8273 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
8274
8275         * Makefile.in: Update dependencies.
8276         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
8277         NULL_RTX.
8278         * decl.c: Include "function.h"
8279         (cleanup_label, return_label): Delete declarations.
8280         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
8281         (finish_function): Rename last_parm_insn variable to
8282         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
8283         * decl2.c: Include "function.h".
8284         (rtl_expr_chain): Delete declaration.
8285         * method.c: Include "function.h"
8286         * tree.c (build_vbase_pointer_fields): Don't initialize
8287         DECL_SAVED_INSNS with NULL_RTX.
8288         * typeck.c: Include "function.h"
8289
8290 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
8291
8292         * semantics.c (begin_function_try_block, finish_function_try_block,
8293         finish_function_handler_sequence): New fns.
8294         * parse.y (function_try_block): Use them.
8295         * pt.c (instantiate_decl): Likewise.
8296
8297         * cp-tree.h: Declare in_function_try_handler.
8298         * decl.c: Define it.
8299         (start_function): Clear it.
8300         (struct cp_function, push_cp_function_context): Save it.
8301         (pop_cp_function_context): Restore it.
8302         * parse.y (function_try_block): Set and clear it.
8303         * except.c (expand_end_catch_block): Rethrow if we reach the end
8304         of a function-try-block handler in a ctor or dtor.
8305         * typeck.c (c_expand_return): Complain about returning from a
8306         function-try-block handler of a ctor.
8307
8308         * parse.y (function_try_block): Call end_protect_partials
8309         before expand_start_all_catch.
8310
8311 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
8312
8313         * decl.c (struct binding_level): Add eh_region field.
8314         (push_binding_level): Set it.
8315         (define_label): Complain about jumping into an EH block.
8316
8317         * ptree.c (print_lang_type): Print the real type of a PMF.
8318         Print what exceptions a fn type throws.
8319
8320 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8321
8322         * class.c (count_fields, add_fields_to_vec): Add static prototype.
8323
8324         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
8325         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
8326         char*.
8327
8328         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
8329         Constify a char*.
8330
8331         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
8332         char*.
8333
8334         * dump.c (queue_and_dump_index, dump_int, dump_string,
8335         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
8336         a char*.
8337         (dump_stmt): Add static prototype.
8338
8339         * errfn.c (cp_thing): Constify a char*.
8340
8341         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
8342         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
8343         dump_expr): Constify a char*.
8344
8345         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
8346         read_line_number): Add static prototype.
8347         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
8348         (real_yylex): Move label `letter' into the scope where it is used.
8349
8350         * method.c (build_mangled_template_parm_index, build_overload_int,
8351         build_decl_overload_real, get_id_2): Constify a char*.
8352
8353         * search.c (check_final_overrider): Make static.
8354
8355         * typeck.c (composite_pointer_type): Constify a char*.
8356
8357 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
8358
8359         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
8360         we're looking at a class.
8361
8362         * decl.c (lookup_name_real): Set the complain flag if we're
8363         looking for a namespace member.
8364
8365         * lex.c (real_yylex): We can have a number with no digits.
8366
8367         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
8368
8369         * search.c (binfo_from_vbase): New fn.
8370         * cp-tree.h: Declare it.
8371         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
8372         from pointer to member of virtual base.  
8373         * typeck.c (get_delta_difference): Likewise.
8374
8375 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
8376
8377         * pt.c (tsubst): Use build_index_type to build in-template array
8378         index type.  Fixes g++.oliva/dwarf1.C.
8379         * decl.c (grokdeclarator): Likewise, just for consistency, as it
8380         doesn't seem to trigger the bug without it.
8381
8382 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
8383
8384         * typeck2.c (add_exception_specifier): Use complete_type.
8385
8386 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
8387
8388         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
8389         (dump_binary_op): Bulletproof.
8390         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
8391         * tree.c (search_tree): Don't enumerate all the nodes of classes
8392         `1', `2', and `<'; handle them generically.  Don't be sorry about
8393         "unrecognized tree codes"; just abort.
8394         (no_linkage_check): Don't do linkage checks for templates.
8395         
8396         * tree.c (cp_build_qualified_type_real): Handle
8397         pointer-to-member-function types correctly.
8398
8399 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
8400
8401         * decl.c (pushdecl): Only give an error for shadowing a parm 
8402         from *this* function.
8403
8404 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
8405
8406         * typeck2.c: Update URLs and mail addresses.
8407
8408 1999-08-04  Nathan Sidwell  <nathan@acm.org>
8409
8410         * cp-tree.h (empty_except_spec): New global var.
8411         (compexcepttypes): Remove prototype.
8412         (comp_except_specs): Prototype new global function.
8413         (add_exception_specifier): Prototype new global function.
8414         * decl.c (empty_except_spec): Define new global var.
8415         (duplicate_decls): Use comp_except_specs, reword error message.
8416         (init_decl_processing): Initialize empty_except_spec.
8417         Adjust build_exception_variant calls.
8418         * parse.y (exception_specification_opt): Use empty_except_spec.
8419         (ansi_raise_identifier): Call check_for_new_type.
8420         (ansi_raise_identifiers): Use add_exception_specifier.
8421         * pt.c (tsubst): Use add_exception_specifier to build exception
8422         specifier.
8423         * search.c (check_final_overrider): New static function, broken
8424         out of get_matching_virtual. Check throw specifiers, reword
8425         diagnostics.
8426         (get_matching_virtual): Use check_final_overrider.
8427         * tree.c (build_exception_variant): Use comp_except_specs.
8428         * typeck.c (compexcepttypes): Remove.
8429         (comp_except_types): New static function, helper for
8430         comp_except_specs. Compare two types as exception specifiers.
8431         (comp_except_specs): New global function, compare two exception
8432         specifiers.
8433         (comptypes): Adjust for comp_except_specs.
8434         * typeck2.c (add_exception_specifier): New global function.
8435         
8436         * class.c (check_for_override): Reword error message.
8437
8438 1999-08-03  Nathan Sidwell  <nathan@acm.org>
8439
8440         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
8441         * cp-tree.h (struct lang_type): Added non_pod_class flag.
8442         (CLASSTYPE_NON_POD_P): New macro to access it.
8443         * class.c (finish_struct_1): Determine non-PODness.
8444         Check for arrays of pointers (-Weffc++).
8445         Remove array inspection duplicated code.
8446         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
8447         Use CLASSTYPE_NON_POD_P.
8448
8449 1999-08-03  Nathan Sidwell  <nathan@acm.org>
8450
8451         * class.c (duplicate_tag_error): Preserve template information.
8452
8453 1999-08-03  Nathan Sidwell  <nathan@acm.org>
8454
8455         * decl.c (start_enum): Show location of previous definition.
8456         * parse.y (enumlist_opt): New reduction.
8457         (structsp): Simplify enum rules to use enumlist_opt.
8458
8459 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
8460
8461         * lex.c (yyprint): Handle PFUNCNAME.
8462
8463         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
8464         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
8465
8466 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
8467
8468         * decl.c (start_decl): Set attributes before duplicate_decls call.
8469
8470 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
8471
8472         * Make-lang.in (CXX_SRCS): Add dump.c.
8473         * Makefile.in (CXX_OBJS): Add dump.o.
8474         (dump.o): New target.
8475         * cp-tree.h (DECL_CONV_FN_P): Document.
8476         (DECL_OVERLOADED_OPERATOR_P): New function.
8477         (TYPE_PTRMEM_CLASS_TYPE): New macro.
8478         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8479         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
8480         (ASM_VOLATILE_P): New macro.
8481         (STMT_LINENO): Likewise.
8482         (cp_namespace_decls): New function.
8483         (dump_node_to_file): New function.
8484         * decl.c (cp_namespace_decls): New function.
8485         (walk_namespaces_r): Use it.
8486         (wrapup_globals_for_namespace): Likewise.
8487         * decl2.c (flag_dump_translation_unit): New variable.
8488         (lang_decode_option): Handle -fdump-translation-unit.
8489         (finish_file): If flag_dump_translation_unit is set, dump the
8490         translation unit.
8491         * dump.c: New file.
8492         * lang-options.h: Add -fdump-translation-unit.
8493         * pt.c (tsubst_template_parms): Robustify.
8494         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
8495         (tsubst_expr): Use STMT_LINENO.
8496         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
8497         for invalid cv-qualifiers even while building templates.
8498         
8499 1999-08-02  Richard Henderson  <rth@cygnus.com>
8500
8501         * call.c: Include defaults.h instead of expr.h.
8502         * decl.c: Likewise.
8503         * pt.c: Likewise.
8504         * typeck.c: Include defaults.h.
8505
8506 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
8507
8508         * lex.c (errorcount, sorrycount): Don't declare.
8509         * repo.c (errorcount, sorrycount): Likewise.
8510         * typeck2.c (errorcount, sorrycount): Likewise.
8511
8512 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
8513
8514         * call.c (convert_default_arg, build_over_call): Change all uses of
8515         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
8516         Ensure expr.h is included.
8517         * decl.c (grokparams): Ditto.
8518         * pt.c (tsubst_decl): Ditto.
8519         * typeck.c (convert_arguments): Ditto.
8520
8521 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
8522
8523         * class.c (mark_overriders): Fix order of args to overrides.
8524         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
8525         functions with the same name.
8526
8527 1999-08-02  Richard Henderson  <rth@cygnus.com>
8528
8529         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
8530
8531 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
8532
8533         * call.c (build_conditional_expr): Fix typo in comment.
8534
8535 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
8536
8537         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
8538         case_stack; use in_control_zone_p.
8539         * typeck.c (c_expand_return): Likewise.
8540
8541 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
8542
8543         * except.c (catch_clauses): Delete declaration.
8544
8545 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
8546
8547         * call.c (build_conditional_expr): Call convert_from_reference to
8548         avoid reference/non-reference type confusion.  Fix typo.
8549
8550 1999-07-30  Richard Henderson  <rth@cygnus.com>
8551
8552         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
8553         * cp-tree.h (initializer_constant_valid_p): Remove.
8554
8555 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
8556
8557         * call.c (conditional_conversion): Don't build BASE_CONVs for
8558         conversions between things that have the same type.
8559         (build_conditional_expr): Tweak.
8560         (convert_like): Some BASE_CONVs really do require the generation
8561         of code.
8562         
8563         * init.c (perform_member_init): Don't go through build_modify_expr
8564         for simple initializations.
8565
8566 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
8567
8568         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
8569         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
8570         virtual functions and MI.  Simplify.
8571
8572         * method.c: Remove prototype for largest_union_member.
8573         * pt.c (determine_specialization): Fix uninitialized warning.
8574         * lex.c (real_yylex): Likewise.
8575
8576 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
8577
8578         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
8579         here too.
8580
8581         * cp-tree.h (BINFO_VIRTUALS): Document new format.
8582         * class.c (modify_one_vtable): Change prototype accordingly.
8583         (modify_all_vtables): Likewise.
8584         (modify_all_direct_vtables): Likewise.
8585         (modify_all_indirect_vtables): Likewise.
8586         (build_vtable_entry_for_fn): New function.
8587         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
8588         (modify_vtable_entry): Likewise.
8589         (add_virtual_function): Likewise.
8590         (build_vtbl_initializer): New function.
8591         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
8592         (fixup_vtable_deltas1): Likewise.
8593         (fixup_vtable_deltas): Likewise.
8594         (override_one_vtable): Likewise.
8595         (finish_struct_1): Likewise.
8596
8597         * error.c (dump_expr): Likewise.
8598         * search.c (get_abstract_virtuals_1): Likewise.
8599         (get_abstract_virtuals): Likewise.
8600         (expand_upcast_fixups): Likewise.
8601         * tree.c (debug_binfo): Likewise.
8602         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
8603         __pure_virtual here.
8604         
8605 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
8606
8607         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
8608         as per 1999-07-26 change.
8609
8610         * typeck.c (c_sizeof): Don't allow non-static data members.
8611         (expr_sizeof): Likewise.
8612
8613 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
8614
8615         * input.c (feed_input): Only touch lineno and input_filename
8616         if !USE_CPPLIB.  Save the old values before setting the new ones.
8617
8618         * input.c (feed_input): Add file, line parms.
8619         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
8620         (real_yylex): Check linemode before input_redirected().
8621
8622         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
8623         from op new to warning.
8624
8625 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
8626
8627         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
8628         * call.c: All uses changed.
8629         * typeck.c: Likewise.
8630
8631 1999-07-26  Nathan Sidwell  <nathan@acm.org>
8632
8633         * exception.cc (__cplus_type_matcher): Match __eh_matcher
8634         prototype.
8635
8636 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
8637
8638         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
8639         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
8640         (strip_top_quals): Declare.
8641         (ncp_convert): Likewise.
8642         (type_after_usual_arithmetic_converions): Likewise.
8643         (composite_pointer_type): Likewise.
8644         * call.c (strip_top_quals): Don't make it static.
8645         (promoted_arithmetic_type_p): New function.
8646         (conditional_conversion): Likewise.
8647         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
8648         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
8649         for converting a type to itself.
8650         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
8651         (implicit_conversion): Make sure the from and to types are
8652         complete.
8653         (add_builtin_candidate): Correct handling of ?: operator.
8654         (add_builtin_candidates): Improve documentation.
8655         (build_conditional_expr): New function.
8656         (can_convert): Implement in terms of can_convert_arg.
8657         (ncp_convert): New function.
8658         * typeck.c (type_after_usual_arithmetic_conversions): New
8659         function, split out from common_type.
8660         (composite_pointer_type): New function, split out from
8661         build_conditional_expr.
8662         (common_type): Use type_after_usual_arithmetic_conversions.
8663         Remove redundant attribute merging.
8664         (comptypes): Tidy.  Handle COMPLEX_TYPE.
8665         (build_binary_op_nodefault): Use null_ptr_cst_p.
8666         (build_conditional_expr): Remove.
8667         (convert_for_assignment): Use new conversion functions.
8668         
8669         * cp-tree.h (abstract_virtuals_error): Change declaration.
8670         * typeck2.c (abstract_virtuals_error): Check to see if an error
8671         ocurred, and return a boolean value accordingly.
8672         (build_functional_cast): Adjust accordingly.
8673         * class.c (finish_struct_1): Likewise.
8674         * cvt.c (ocp_convert): Likewise.
8675         * decl.c (cp_finish_decl): Likewise.
8676         (grokparams): Likewise.
8677         (grok_op_properties): Likewise.
8678         (start_function): Likewise.
8679         * init.c (build_new_1): Likewise.
8680
8681         * pt.c (unify): Don't get confused by pointers-to-member functions.
8682
8683         * search.c (build_cplus_new): Robustify.
8684         
8685 1999-07-24  Richard Henderson  <rth@cygnus.com>
8686
8687         * gxx.gperf (__builtin_va_arg): New.
8688         * parse.y (VA_ARG): New token.
8689         (unary_expr): Recognize it.
8690
8691 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
8692
8693         * g++FAQ.texi: Deleted per Joe Buck's request.
8694         * Makefile.in: Corresponding changes.
8695
8696 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8697
8698         * lex.c: Sync with C frontend.
8699         (whitespace_cr): New fn.
8700         (skip_white_space): Use it.
8701         (init_parse): Reorder.
8702         (yyprint): Support CONSTANT.
8703         (pragma_getc, pragma_ungetc): Bring back.
8704         (read_line_number): Change in_system_header directly.
8705         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
8706         (parse_float): Update to C version.
8707         (yylex): Handle '$' under the letter case.
8708         Remove looking_for_typename handling.
8709         Support hex floating point constants.
8710         Follow C's lead for choosing type of integer constants.
8711         Rearrange stuff to match C frontend.
8712         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
8713         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
8714
8715 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
8716
8717         * call.c (reference_binding): Tweak.
8718         (mayble_handle_implicit_object): Use direct_reference_binding to
8719         create the right implicit conversion sequence.
8720
8721 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
8722
8723         * pt.c (convert_nontype_argument): Don't call decl_constant_value
8724         if we're converting to a reference type.
8725
8726         * call.c (NEED_TEMPORARY_P): New macro.
8727         (standard_conversion): Set it, for derived-to-base conversions.
8728         (reference_related_p): New function.
8729         (reference_compatible_p): Likewise.
8730         (convert_class_to_reference): Likewise.
8731         (direct_reference_binding): Likewise.
8732         (reference_binding): Rework for standards-compliance.
8733         (convert_like): Adjust accordingly.
8734         (maybe_handle_ref_bind): Simplify; the right conversion sequences
8735         are now built up in reference_binding.
8736         (initialize_reference): New function.
8737         * cp-tree.h (ICS_USER_FLAG): Document.
8738         (ICS_THIS_FLAG): Likewise.
8739         (ICS_BAD_FLAG): Likewise.
8740         (NEED_TEMPORARY_P): Likewise.
8741         (cp_lvalue_kind): New type.
8742         (real_lvalue_p): Return it.
8743         * error.c (dump_expr): Provide more accurate representation for
8744         AGGR_INIT_EXPRs.
8745         * init.c (expand_default_init): Do not try to perform implicit
8746         conversions for a brace-enclosed initializer.
8747         * search.c (lookup_conversions): Document.
8748         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
8749         appropriately.
8750         (real_lvalue_p): Adjust accordingly.
8751         (lvalue_p): Likewise.
8752         (build_cplus_new): Don't allow the creation of an abstract class.
8753         * typeck.c (convert_for_initialization): Use initialize_reference.
8754         
8755 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
8756
8757         * lex.c (real_yylex) : Correct the test for overflow when lexing
8758         integer literals.
8759
8760 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
8761
8762         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
8763         not DECL_BUILT_IN, to determine if a function is internally declared.
8764         (duplicate_decls): Likewise.  Improve handling of builtins.
8765         (push_overloaded_decl): Remove special handling of builtins.
8766
8767         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
8768
8769         * decl.c (grokdeclarator): Pull out decl_constant_value in
8770         templates, too.
8771
8772         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
8773         * cp-tree.h, pt.c, semantics.c: Adjust.
8774         * method.c (largest_union_member): Remove.
8775
8776         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
8777
8778         * lex.c (token_getch, token_put_back): New fns.
8779         (real_yylex): Use them.
8780
8781         * lex.c (lang_init): Generalize.
8782         (lang_init_options): Tell cpplib this is C++.
8783         (nextchar): Remove.  Replace uses with put_back.
8784         (skip_white_space): Handle linemode here.  Optimize for cpplib.
8785         (extend_token_buffer_to): New fn.
8786         (extend_token_buffer): Use it.
8787         (read_line_number, check_newline): Just deal with tokens.
8788         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
8789         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
8790         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
8791         * parse.y (PAREN_STAR_PAREN): Remove.
8792         * input.c: Don't use the putback machinery with cpplib.
8793         (sub_getch): Fold back into getch.
8794         (getch): Don't handle linemode here.
8795         (feed_input): Unget any text in the token buffer.
8796
8797         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
8798         nextyychar, nextyylval): Remove.
8799
8800 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
8801             Jason Merrill  <jason@yorick.cygnus.com>
8802
8803         * lex.c (indent_level): New variable.
8804         (init_parse): Set cpp_token to CPP_DIRECTIVE.
8805         (consume_string): Make this smart about USE_CPPLIB.
8806         (yyungetc): Use put_back function.
8807         (pragma_getc, pragma_ungetc): Functions deleted.
8808         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
8809         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
8810         pragma_ungetc.
8811         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
8812         Also, clean up cases where we redundantly set token_buffer[0].
8813         (read_line_number): New fn.
8814         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
8815         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
8816         (sub_getch): Conditionalize out code that's not appropriate if
8817         USE_CPPLIB.
8818         (put_back): Rewrite in case USE_CPPLIB is defined.
8819         (input_redirected): Ditto.
8820
8821 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
8822
8823         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
8824         c_global_trees and accessor macros defined in c-common.h.
8825         (cp_tree_index): New enumeration.
8826         (cp_global_trees): Declare new array.  Add accessor macros for it, and
8827         delete declarations of tree nodes replaced by it.
8828         (builtin_function): Delete macro, add declaration for new function.
8829         Include c-common.h.
8830         * decl.c: Delete definitions for tree nodes that were replaced by
8831         cp_global_trees and c_global_trees.
8832         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
8833         to generate the common builtins here.
8834         (builtin_function): New function.
8835         * decl2.c (abort_fndecl): Delete declaration.
8836         * except.c (expand_builtin_return_address): Delete declaration.
8837         (builtin_return_address_fndecl): Delete variable.
8838         (const_ptr_type_node): Delete declaration.
8839         * lex.c (cons_up_default_function): Delete declaration of
8840         void_list_node.
8841         * parse.y (void_list_node): Delete declaration.
8842         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
8843         Delete variables.
8844         (const_string_type_node): Delete declaration.
8845         * search.c (abort_fndecl): Delete declaration.
8846         * Makefile.in: Update dependencies.
8847
8848 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
8849
8850         * pt.c (check_default_tmpl_args): Move test for missing default
8851         arguments here, from ...
8852         (end_template_parm_list): Here.
8853
8854 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
8855
8856         * decl.c (lookup_nested_type): Remove.
8857         (pushtag): Don't call it.
8858
8859 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
8860
8861         * Makefile.in (INTERFACE): Bump to 2.
8862
8863 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
8864         
8865         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
8866         instructions to gcc.gnu.org.  Removed e-mail address.
8867
8868 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
8869
8870         * pt.c (determine_specialization): Tighten error-checking.
8871         (end_template_parm_list): Likewise.
8872
8873 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
8874
8875         * pt.c (check_default_tmpl_args): Handle friends defined in the
8876         class just like member functions defined in the class.
8877
8878 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
8879             Jason Merrill  <jason@yorick.cygnus.com>
8880
8881         * cp-tree.h (struct lang_decl): Added field for storing sorted
8882         FIELD_DECLs (used in TYPE_DECLs).
8883         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
8884         (DECL_SORTED_FIELDS): New macro.
8885         * class.c (method_name_cmp): New function.
8886         (finish_struct_methods): Modified to support sorting and searching
8887         methods.
8888         (finish_struct_anon): Changed code in inner loop to use ELT rather 
8889         than UELT (which required an extra indirection for every reference).
8890         (field_decl_cmp): New function to support sorting FIELD_DECLs.
8891         (finish_struct_1): Sort fields.
8892         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
8893         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
8894         Also, switch to using array indexing rather than a changing pointer.
8895         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
8896         DECL_SORTED_FIELDS.
8897
8898 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
8899
8900         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
8901         casts in system headers or extern "C" blocks.
8902
8903         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
8904         errors to pedwarn.
8905
8906 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
8907
8908         * decl2.c (write_virtuals): Deleted declaration.
8909         * cp-tree.h (write_virtuals): Deleted extern declaration.
8910         * class.c (finish_struct_1): Removed #if 0'd code that mentions
8911         write_virtuals.
8912         * semantics.c (begin_class_definition): Rewrite code to not depend
8913         on write_virtuals.
8914
8915         * lex.c (cp_pragma_interface): New function.
8916         (cp_pragma_implementation): Likewise.
8917         (handle_cp_pragma): Call them.
8918
8919         * typeck.c (comptypes): Simplify C code in look_hard.
8920
8921         * xref.c (PALLOC): Use xcalloc, not calloc.
8922         (SALLOC): Use xmalloc, not malloc.
8923
8924         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
8925
8926         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
8927         is NO_DEBUG.
8928
8929         * decl.c (duplicate_decls): If a redeclaration doesn't match the
8930         initial declaration, then don't save the inline info and by all
8931         means don't mark the function as a builtin function.
8932
8933         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
8934         CURRENT_CLASS_TYPE is 0.
8935
8936         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
8937         NULL_TREE.
8938
8939         * ptree.c (print_lang_type): Added vtable-needs-writing.
8940
8941 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
8942
8943         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
8944
8945 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
8946
8947         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8948         Merged into c-common.
8949
8950 1999-07-05  Dave Brolley  <brolley@cygnus.com>
8951
8952         * lex.c (errorcount): Declare it.
8953         (finish_parse): Update errorcount for when using CPPLIB.
8954
8955 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
8956
8957         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
8958         parameters.
8959         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
8960         * decl.c (push_class_binding): Use it.
8961         (lookup_name_real): Likewise.
8962
8963 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
8964
8965         * cp-tree.h (widest_integer_literal_type_node,
8966         widest_unsigned_literal_type) : New.
8967         * decl.c (widest_integer_literal_type_node,
8968         widest_unsigned_literal_type) : New.
8969         (init_decl_processing): Handle/use the two new types.
8970         * lex.c (real_yylex): Same.
8971         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8972         Same. 
8973
8974 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
8975
8976         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
8977         to anonymous cv-qualified types.
8978
8979 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
8980
8981         * lex.c (real_yylex) : Change integer literal overflow handling to
8982         be like c-lex.c.
8983
8984         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
8985
8986 1999-06-28  Richard Henderson  <rth@cygnus.com>
8987
8988         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
8989
8990 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
8991
8992         * error.c (dump_type_real): Handle TREE_LIST again.
8993
8994         * typeck.c (comp_target_parms): Don't complain about 
8995         converting from () to (...) if !flag_strict_prototype.
8996
8997         * decl.c (grokdeclarator): Update the names of all variants when
8998         de-anonymizing.
8999
9000 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
9001
9002         * init.c (expand_aggr_vbase_init): Rename to
9003         construct_virtual_bases.  Conditionalize construction here, 
9004         rather than ...
9005         (emit_base_init): Here.
9006
9007 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
9008
9009         * semantics.c (finish_asm_stmt): Apply decay conversions to
9010         input operands.
9011
9012         * decl.c (expand_static_init): When building an anonymous function
9013         for use with atexit, compute its body before and after entering
9014         the function.
9015
9016         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
9017         EXIT_EXPR.
9018         
9019 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
9020
9021         * init.c (expand_aggr_vbase_init): Add flag parameter.
9022         (build_partial_cleanup_for): Remove, inlining into ..
9023         (expand_cleanup_for_base): ... here.  Take flag parameter.
9024         (emit_base_init): Pass the in_chrg parameter to
9025         emit_aggr_vbase_init. 
9026         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
9027         
9028 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
9029
9030         * decl2.c (import_export_decl): Use same_type_p, rather than
9031         relying on pointer-equality for types.
9032
9033         * method.c (do_build_copy_constructor): Simplify.
9034
9035         * call.c (build_method_call): Remove bogus code for two-argument
9036         delete.
9037         * init.c (build_new_1): Expand on comment, and remove dead code.
9038
9039         * init.c (expand_cleanup_for_base): New function, split out
9040         from ...
9041         (emit_base_init): Here.
9042         (expand_aggr_vbase_init): Use it.
9043
9044 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
9045
9046         * cp-tree.h (class_cache_firstobj): Declare.
9047         (maybe_push_cache_obstack): Rename to push_cache_obstack.
9048         * class.c (permanent_obstack): Remove declaration.
9049         (class_cache_firstobj): Make it global.
9050         (add_method): Don't use permanent_obstack directly.
9051         (pushclass): Only free the class_cache_obstack if we know how far
9052         back to free it.
9053         (maybe_push_cache_obstack): Rename to push_cache_obstack.
9054         * decl.c: Remove dead comment.
9055         (saved_scope): Add class_cache_firstobj.
9056         (push_to_top_level): Save it.
9057         (pop_from_top_level): Restore it.
9058         (push_class_level_binding): Use push_cache_obstack, not
9059         maybe_push_cache_obstack.
9060         * search.c (push_class_decls): Likewise.
9061         
9062 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9063
9064         * pt.c (tsubst_friend_function): Push into namespace of friend
9065         function before pushdecl'ing it.
9066
9067 1999-06-14  Nathan Sidwell  <nathan@acm.org>
9068
9069         * call.c (build_new_op): Remove REF_BIND from all operands.
9070
9071 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
9072
9073         * init.c (build_new_1): Look up operator delete even if there was
9074         no explicit new placement.
9075
9076 1999-06-08  Nathan Sidwell  <nathan@acm.org>
9077
9078         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
9079         of ...
9080         (build_throw): ... here. Call it.
9081         (process_start_catch_block): Call it.
9082
9083 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
9084
9085         * search.c (convert_pointer_to_single_level): Reimplement without
9086         using get_binfo.
9087
9088 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
9089
9090         * method.c (is_back_referenceable_type): Back-reference bools when
9091         not squangling.
9092
9093 1999-06-07  Dave Brolley  <brolley@cygnus.com>
9094
9095         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
9096         * input.c (putback_buffer): New structure type.
9097         (putback): Replaces putback_char member.
9098         (putback): Replaces putback_char static variable.
9099         (feed_input): Use putback.
9100         (end_input): Use putback.
9101         (sub_getch): Use putback.
9102         (put_back): Use putback.
9103
9104 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
9105
9106         * decl.c (grokdeclarator): Fix typo in last change.
9107
9108 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
9109
9110         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
9111         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
9112
9113 1999-06-04  Nathan Sidwell  <nathan@acm.org>
9114
9115         * except.c (build_throw): Check throw expression validity.
9116
9117 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
9118
9119         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
9120         just because flag_signed_bitfields is false.
9121
9122 1999-06-03  Nathan Sidwell  <nathan@acm.org>
9123
9124         * semantics.c (begin_class_definition): Update the struct's
9125         location here ...
9126         * class.c (finish_struct): ... rather than here.
9127
9128         * decl.c (make_typename_type): Don't rely on uninitialized
9129         variable.
9130
9131 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9132
9133         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
9134
9135 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
9136
9137         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
9138         and friends rather than messing with current_obstack directly.
9139         (cp_build_qualified_type_real): Rework ARRAY_TYPE
9140         allocation to match practice throughout the rest of the 
9141         compiler.
9142
9143 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
9144
9145         * lex.c (make_lang_type): Create TYPE_BINFO for
9146         TEMPLATE_TYPE_PARMs just like for non-template types.
9147
9148         * decl.c (start_decl): Move checks on initialization to ...
9149         (cp_finish_decl): Here.  Tidy formatting slightly.
9150
9151 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
9152
9153         * decl.c (add_binding): Don't complain about a redeclaration of a
9154         semantically identical typedef in a local scope.
9155
9156 1999-05-28  Nathan Sidwell  <nathan@acm.org>
9157
9158         * decl.c (complete_array_type): Allocate off same obstack. Fix
9159         DO_DEFAULT comment to match reality.
9160
9161         * friend.c (make_friend_class): Fix diagnostic typo.
9162
9163 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
9164
9165         * decl.c (lookup_namespace_name): Handle getting a
9166         TEMPLATE_ID_EXPR.
9167         (expand_static_init): Don't call pushdecl for implicitly declared
9168         `atexit' used to register destructors.
9169
9170 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
9171
9172         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
9173         intialize a vtable.
9174
9175         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
9176         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
9177         by combining TEMPLATE_INFO and LEVEL into a single union.
9178         (DECL_TEMPLATE_INFO): Reformat.
9179         (DECL_SAVED_TREE): Document.
9180         (DECL_TEMPLATE_INJECT): Remove.
9181         * class.c (finish_struct): Remove code to deal with
9182         DECL_TEMPLATE_INJECT. 
9183
9184         * decl.c (maybe_process_template_type_declaration): Handle all new
9185         types in templates uniformly.
9186         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
9187         DECL_CONTEXT.
9188         * pt.c (lookup_template_class): Inject template instantiations of
9189         forward-declarations.
9190         (instantiate_class_template): Remove code processing
9191         DECL_TEMPLATE_INJECT.
9192         
9193         * pt.c (lookup_template_class): Tweak lookup to find member
9194         templates.
9195
9196         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
9197         ASM_CV_QUAL.
9198         * semantics.c (finish_asm_stmt): Make strings permanent if they're
9199         used in a template.
9200         
9201 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
9202
9203         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
9204         parts of pointer to data member types.
9205
9206 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
9207
9208         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
9209         and then make it look like `abort'.  Just use `abort' instead.
9210         
9211         * typeck.c (build_static_cast): Don't allow static_casts that cast
9212         away constness.
9213         (casts_away_constness_r): New function.
9214         (casts_away_constness): Likewise.
9215
9216         * decl.c (lookup_tag): Remove code no longer needed after
9217         name-lookup improvements.
9218         * decl2.c (handle_class_head): Make error-recovery more robust.
9219         * friend.c (make_friend_class): Reject templated typename types.
9220         * lex.c (is_global): A template parameter isn't global.
9221         * parse.y (class_head): Robustify.
9222         * parse.c: Regenerated.
9223         
9224 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
9225
9226         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
9227         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
9228         
9229         * cp-tree.h (push_nested_namespace): Declare.
9230         (pop_nested_namespace): Likewise.
9231         * decl.c (push_nested_namespace): New function.
9232         (pop_nested_namespace): Likewise.
9233         * pt.c (instantiate_class_template): Use them.
9234
9235         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
9236
9237         * cp-tree.h (cplus_expand_constant): Declare.
9238         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
9239         converted from one pointer-to-object type to another.
9240         * expr.c (cplus_expand_constant): Don't make it static.
9241         * typeck.c (build_component_ref): Don't crash when presented with
9242         a component which is a TEMPLATE_DECL.
9243         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
9244         cast from a pointer-to-member constant to its own type does not
9245         result in a valid non-type template argument.
9246
9247 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
9248             Nathan Sidwell  <nathan@acm.org>
9249         
9250         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
9251         * cp-tree.h: Fix typo in documentation on pointers-to-members.
9252         (cp_build_qualified_type): Make it a macro.
9253         (cp_build_qualified_type_real): Declare.
9254         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
9255         problem with template parameters and restrict-qualification.
9256         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
9257         * hash.h: Regenerated.
9258         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
9259         the enumeration.
9260         (NORID): Remove definition.
9261         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
9262         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
9263         (fn_type_unification): Check that the function type resulting from
9264         the deduction is legal.
9265         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
9266         (unify): Use cp_build_qualified_type_real.
9267         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
9268         (cp_build_qualified_type): Rename to ...
9269         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
9270         and modify appropriately.
9271         
9272         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
9273         reveal optimization opportunities.
9274
9275         * pt.c (tsubst): Don't issue error messages when we're not
9276         complaining, even if we see a qualified function type.
9277         (check_cv_quals_for_unify): Don't allow a qualified function
9278         type.
9279
9280 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9281
9282         * class.c (instantiate_type): Downgrade errors for object-dependent
9283         memfn refs to pedwarn.
9284
9285 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
9286
9287         * decl.c (grokdeclarator): Don't treat [] as indicating a
9288         zero-sized array in a typedef.
9289
9290         * call.c (build_object_call): Don't look at DECL_NAME for a type.
9291         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
9292         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
9293
9294         * pt.c (for_each_template_parm): Rework to match documentation.
9295         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
9296
9297 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9298
9299         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
9300
9301         * class.c (finish_base_struct): Allow non-COM bases for COM classes
9302         except at the leftmost position.
9303         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
9304         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
9305         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
9306
9307         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
9308         (build_cplus_new): Make sure that what we return is of the right type.
9309
9310 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
9311
9312         * cp-tree.h (make_ptrmem_cst): New function.
9313         * expr.c (cplus_expand_constant): Split out from ...
9314         (cplus_expand_expr): Here.  Use cplus_expand_constant.
9315         (init_cplus_expand): Set lang_expand_constant.
9316         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
9317
9318         * tree.c (make_ptrmem_cst): Define.
9319         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
9320         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
9321
9322 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
9323
9324         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
9325
9326         * decl2.c (start_static_storage_duration_function): Fix comment.
9327         (finish_file): Create static storage duration functions lazily.
9328
9329 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
9330
9331         Implement anonymous structs.
9332         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
9333         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
9334         * class.c (finish_struct_1): Remove redundant check for anon struct.
9335         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
9336         (check_tag_decl): Check for anonymous struct here.
9337         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
9338         * init.c (sort_member_init, emit_base_init): Handle getting fields
9339         as well as names in current_member_init_list.
9340         (perform_member_init): Handle getting an anon aggr.
9341         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
9342         (do_build_copy_constructor): Likewise.
9343
9344 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
9345
9346         * tree.c (cp_build_qualified_type): Don't allow qualified function
9347         types.
9348
9349 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
9350
9351         * gxxint.texi: Fix typo.
9352
9353 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
9354
9355         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
9356         * class.c (finish_struct_1): Use CLASS_TYPE_P.
9357         * ptree.c (print_lang_type): Likewise.
9358         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
9359         IS_AGGR_TYPE_CODE.
9360         * typeck2.c (digest_init): Likewise.
9361
9362 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
9363
9364         * call.c (joust): Compare the types of the conv ops, not the
9365         target types of the conversions.
9366
9367 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9368
9369         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
9370         was not given.
9371
9372 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
9373
9374         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
9375         * decl.c (grokfndecl): Don't allow inline declarations of friend
9376         template specializations, or friend template specializations with
9377         default arguments.
9378         * pt.c (tsubst): Handle substitution into array types that does
9379         not yield a fixed upper bound, even when not processing a
9380         template.
9381         (tsubst_copy): Deal with the fact that the second operand to a
9382         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
9383         * search.c (marked_pushdecls_p): Don't descend into
9384         TEMPLATE_TYPE_PARMs and the like.
9385         (unmarked_pushdecls_p): Likewise.
9386         
9387         * call.c (build_over_call): Don't throw away
9388         initializations/copies of empty classes; use MODIFY_EXPR and
9389         INIT_EXPR as for non-empty classes.
9390         * class.c (finish_struct_1): Put the padding byte for an empty
9391         class on the TYPE_NONCOPIED_PARTS list for the class.
9392
9393 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
9394
9395         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
9396         indicate a reference to a field that is a qualified name.
9397
9398 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
9399
9400         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
9401         ASM_OUTPUT_CONSTRUCTOR.
9402
9403         * friend.c (do_friend): Add attrlist arg.  Remove support for
9404         getting a non-decl as 'decl'.
9405         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
9406         rtl.
9407         (grokdeclarator): Adjust.
9408         * cp-tree.h: Adjust.
9409
9410 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
9411
9412         * cp-tree.h (permanent_p): New function.
9413         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
9414         possibly complex tree node.
9415         * tree.c (mapcar): Adjust comments, and follow coding standards in
9416         conditional.
9417         (permanent_p): New function.
9418
9419 1999-05-13  Per Bothner  <bothner@cygnus.com>
9420
9421         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
9422         primitive Java types, if we actually see `extern "Java"'.
9423
9424 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9425
9426         * lang-specs.h: Pass -$ to the preprocessor.
9427
9428 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
9429
9430         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
9431         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
9432         (resolve_offset_ref): Don't handle a raw baselink.
9433         * cvt.c (build_expr_type_conversion): Likewise.
9434         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
9435         convert_for_initialization): Likewise.
9436         * class.c (instantiate_type): Handle seeing a baselink under an
9437         OFFSET_REF.
9438         * error.c (dump_expr): Likewise.        
9439         * pt.c (for_each_template_parm): Likewise.
9440         (resolve_overloaded_unification): Likewise.
9441         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
9442         * typeck.c (expr_sizeof): Also complain about other permutations
9443         of overloaded functions.
9444
9445 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
9446
9447         * init.c (resolve_offset_ref): Don't return a raw method.
9448         Use BASELINK_P.
9449         * typeck.c (decay_conversion): Don't handle a raw method.
9450         Resolve all OFFSET_REFs.
9451         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
9452         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
9453         same_type_p for pmf bits.  Don't use build_binary_op to compare
9454         raw pointers to methods.
9455         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
9456         to decide when to call resolve_offset_ref.
9457         (build_c_cast, convert_for_initialization): Likewise.
9458         * cvt.c (build_expr_type_conversion): Likewise.
9459
9460 1999-05-06  Nathan Sidwell  <nathan@acm.org>
9461
9462         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
9463
9464 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
9465
9466         * decl2.c (start_objects): Don't let static constructors and
9467         destructors get inlined.
9468
9469         * parse.y (nested_name_specifier): Make sure ordinary types are
9470         complete, just like template types.
9471         * parse.c: Regenerated.
9472
9473         * pt.c (check_explicit_specialization): Improve error messages.
9474
9475 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9476
9477         * typeck.c (string_conv_p): Use same_type_p to check whether we
9478         try to convert between char and wchar_t.
9479
9480 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
9481
9482         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
9483         lookup to error_mark_node here.
9484         (lookup_member): Revise documentation.  Add comments.  Don't set
9485         the TREE_TYPE to error_mark_node here, and don't build up an extra
9486         TREE_LIST for ambiguous lookups.
9487         (setup_class_bindings): Adjust accordingly.
9488         (push_class_decls): Revise out-of-date comments.
9489         
9490         * typeck.c (build_const_cast): Tighten checks for legality.
9491
9492 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9493
9494         * init.c (build_member_call): Lookup names coming from
9495         namespace-scoped LOOKUP_EXPR.
9496
9497 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
9498
9499         * gxxint.texi: Add documentation for 'I'.
9500
9501 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9502
9503         * tinfo.cc (operator==): Qualify type_info with std::.
9504
9505 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
9506
9507         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
9508         (DECL_COMDAT): Remove definition.
9509
9510 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
9511
9512         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
9513         change.
9514
9515 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
9516
9517         * class.c (build_vtable): Use build_lang_decl when building
9518         vtables, not just build_decl.
9519         (prepare_fresh_vtable): Likewise.
9520         * decl.c (wrapup_globals_for_namespace): Mark vtables as
9521         DECL_EXTERNAL when calling wrapup_global_declarations.
9522         * decl2.c (priority_info_s): Add initializations_p and
9523         destructions_p members.
9524         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
9525         when deciding what vtables to write out.
9526         (ssdf_decls): New variable.
9527         (ssdf_decls_used): Likewise.
9528         (start_static_storage_duration_function): Deal with being called
9529         multiple times.  Avoid inlining this function.
9530         (generate_inits_for_priority): Deal with reuse of priority map.
9531         (get_priority_info): Clear initializations_p and destructions_p.
9532         (do_static_initialization): Tweak comment.
9533         (do_static_destruction): Likewise.  Fix condition on sentries for
9534         destruction.
9535         (generate_ctor_or_dtor_function): Call all of the static storage
9536         duration functions.
9537         (generate_ctor_or_dtor_function_for_priority): Check
9538         initializations_p and destructions_p to see what priorities need
9539         initialization functions.
9540         (finish_file): Rework to generate multiple static storage duration
9541         functions, rather than just one.
9542
9543         * typeck.c (build_const_cast): Tweak last change to handle
9544         templates correctly.
9545
9546         * typeck.c (build_const_cast): Disallow use of const_cast to
9547         anything but a pointer or reference type.
9548
9549 1999-04-30  Nathan Sidwell  <nathan@acm.org>
9550
9551         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
9552         signature type.
9553
9554 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
9555
9556         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
9557         (finish_file): Indent comments properly.
9558
9559 1999-04-29  Richard Henderson  <rth@cygnus.com>
9560
9561         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
9562         (do_static_destruction): Likewise.
9563
9564 1999-04-29  Nathan Sidwell  <nathan@acm.org>
9565
9566         * cp-tree.h (TYPE_NOTHROW_P): New macro.
9567         * decl2.c (delete_sanity): Warn on deleting void *.
9568         * init.c (build_new_1): Use TYPE_NOTHROW_P.
9569         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
9570         throwing operator new.
9571
9572 1999-04-28  Nathan Sidwell  <nathan@acm.org>
9573
9574         * cp-tree.h (build_component_addr): Remove prototype.
9575         * typeck.c (build_component_addr): Make static. Remove MSG
9576         argument.
9577         (build_component_addr): Remove MSG parameter, clean up
9578         comment.
9579         (build_x_function_call): Use cp_error.
9580         (build_unary_op): Adjust call of build_component_addr.
9581
9582 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
9583
9584         * pt.c (tsubst_friend_class): Check for NULL.
9585
9586 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
9587
9588         * search.c (binfo_for_vtable): Initialize bfvi.var.
9589
9590 1999-04-27  Nathan Sidwell  <nathan@acm.org>
9591
9592         * rtti.c (build_x_typeid): Check rtti is enabled.
9593
9594 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
9595
9596         * search.c (is_subobject_of_p): Make sure we're looking at the
9597         right baseclasses.
9598
9599 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
9600
9601         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
9602
9603 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
9604
9605         * decl2.c (finish_file): Tweak handling of extern inlines so that
9606         they are not unnecessarily put out.
9607
9608         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
9609         such as base classes.
9610
9611 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
9612
9613         * tree.c (build_exception_variant): Fix typo: use the chain of U,
9614         not trying V, while cycling through U.
9615
9616 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
9617
9618         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
9619         preserves_first_arg.  Enlarge dummy accordingly.
9620         (DECL_TINFO_FN_P): New macro.
9621         (SET_DECL_TINFO_FN_P): Likeiwse.
9622         (DECL_RETURNS_FIRST_ARG): Remove.
9623         (DECL_PRESERVES_THIS): Likewise.
9624         (DECL_INIT_PRIORITY): New macro.
9625         (finish_struct_1): Change prototype.
9626         (cat_namespace_levels): Remove prototype.
9627         (vtable_decl_p): New prototype.
9628         (vtype_decl_p): Likewise.
9629         (sigtable_decl_p): Likewise.
9630         (walk_globals_pred): New typedef.
9631         (walk_globals_fn): Likewise.
9632         (walk_globals): New prototype.
9633         (walk_namespaces_fn): New typedef.
9634         (walk_namespaces): New prototype.
9635         (wrapup_globals_for_namespace): Likewise.
9636         (walk_vtables): Remove prototype.
9637         (walk_sigtables): Likewise.
9638         (instantiate_pending_templates): New prototype.
9639         * class.c (finish_struct_1): Don't return a value.
9640         * decl.h (pending_statics): Remove declaration.
9641         * decl.c (walk_namespaces_r): New function.
9642         (walk_globals_r): Likewise.
9643         (vtable_decl_p): Likewise.
9644         (vtype_decl_p): Likewise.
9645         (sigtable_decl_p): Likewise.
9646         (walk_namespaces): Likewise.
9647         (walk_globals_data): New type.
9648         (walk_globals): New function.
9649         (wrapup_globals_for_namespace): Likewise.
9650         (expand_static_init): Remove assertion.  Remove redundancy in
9651         conditional.  Don't put static data members in static_aggregates
9652         Tidy.
9653         (finish_function): Remove redundancy in conditional.  Don't set
9654         DECL_RETURNS_FIRST_ARG.
9655         (cat_namespace_levels): Remove.
9656         * decl2.c: Include splay-tree.h and varray.h.
9657         (priority_info_s): New structure.
9658         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
9659         conventions.
9660         (prune_vtable_vardecl): Likewise.
9661         (finish_sigtable_vardecl): Likewise.
9662         (setup_initp): Remove.
9663         (do_dtors): Remove.
9664         (do_ctors): Remove.
9665         (start_static_storage_duration_function): New function.
9666         (generate_inits_for_priority): Likewise.
9667         (finish_static_storage_duration_function): Likewise.
9668         (get_priority_info): Likewise.
9669         (do_static_initialization): Likewise.
9670         (do_static_destruction): Likewise.
9671         (do_static_initialization_and_destruction): Likewise.
9672         (generate_ctor_or_dtor_function): Likewise.
9673         (generate_ctor_and_dtor_functions_for_priority): Likewise.
9674         (pending_statics): Make it a varray.
9675         (pending_statics_used): New variable.
9676         (saved_inlines): Make it a varray.
9677         (saved_inlines_used): New variable.
9678         (finish_static_data_member): Change method of updating
9679         pending_statics.
9680         (mark_inline_for_output): Remove #if 0'd code.  Change method of
9681         updating saved_inlines.
9682         (walk_vtables): Remove.
9683         (walk_sigtables): Likewise.
9684         (import_export_decl): Use DECL_TINFO_FN_P.
9685         (pending_templates): Remove declaration.
9686         (maybe_templates): Likewise.
9687         (static_aggregates_initp): Likewise.
9688         (setup_initp): Likewise.
9689         (finish_objects): Simplify.
9690         (INITIALIZE_P_IDENTIFIER): New macro.
9691         (PRIORITY_IDENTIFIER): New macro.
9692         (SSDF_IDENTIFIER): New macro.
9693         (initialize_p_decl): New variable.
9694         (priority_decl): Likewise.
9695         (ssdf_decl): Likewise.
9696         (priority_info_map): Likewise.
9697         (finish_file): Recode output of static intializers and other
9698         file-scope finalization tasks.
9699         * error.c (OB_END_TEMPLATE_ID): New macro.
9700         (dump_type_real): Use it.
9701         (dump_decl): Likewise.
9702         (dump_function_name): Likewise.
9703         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
9704         interface.
9705         (check_newline): Use walk_globals, not walk_vtables.
9706         * pt.c (pending_tempalte_expansions): Remove.
9707         (set_vardecl_interface_info): Likewise.
9708         (pending_templates): Make static.
9709         (maybe_templates): Likewise.
9710         (instantiate_class_template): Adjust call to finish_struct_1.
9711         (instantiate_pending_templates): New function.
9712         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
9713         * tree.c (static_aggregates_initp): Remove.
9714         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
9715         instead.
9716         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
9717
9718         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
9719         with the RTL code RETURN.
9720         * hash.h: Regenerated.
9721         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
9722         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
9723         * parse.c: Regenerated.
9724         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
9725         it.
9726         (inline_parm_levels): New variable.
9727         (inline_parm_levels_used): Likewise.
9728         (maybe_begin_member_template_processing): Update them.
9729         (maybe_end_member_template_processing): Use them, rather than
9730         guessing how many levels to pop.
9731
9732         * decl.c (make_typename_type): Tighten error-checking.
9733
9734 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
9735
9736         * cp-tree.h (build_binary_op): Remove unneeded parameter.
9737         * class.c (build_vrable_entry_ref): Adjust call to
9738         build_binary_op.
9739         * decl.c (expand_static_init): Likewise.
9740         (grokdeclarator): Likewise.
9741         (finish_function): Likewise.
9742         * decl2.c (delete_sanity): Likewise.
9743         (do_dtors): Likewise.
9744         (do_ctors): Likewise.
9745         * error.c (dump_type_suffix): Likewise.
9746         * expr.c (cplus_expand_expr): Likewise.
9747         * init.c (resolve_offset_ref): Likewise.
9748         (build_new): Likewise.
9749         (build_new_1): Likewise.
9750         (build_vec_delete_1): Likewise.
9751         (expand_vec_init_catch_clause): Likewise.
9752         (build_delete): Likewise.
9753         * pt.c (tsubst): Likewise.
9754         * rtti.c (synthesize_tinfo_fn): Likewise.
9755         * search.c (expand_upcast_fixups): Likewise.
9756         (expand_direct_vtbls_init): Likewise.
9757         * typeck.c (get_member_function_from_ptrfunc): Likewise.
9758         (build_binary_op_nodefault): Likewise.
9759         (point_int_sum): Likewise.
9760         (pointer_diff): Likewise.
9761         (build_unary_op): Likewise.
9762         (build_modify_expr): Likewise.
9763         (get_delta_difference): Likewise.
9764         (build_ptrmemfunc): Likewise.
9765         (expand_ptrmemfunc_cst): Likewise.
9766
9767 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
9768
9769         * decl.c (grokfndecl): Always call cplus_decl_attributes.
9770         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
9771
9772 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
9773
9774         * cp-tree.h (finish_static_data_member_decl): New function.
9775         * decl2.c (finish_static_data_member_decl): Split out from ...
9776         (grokfield): Here.
9777         * pt.c (instantiate_class_template): Use it here instead of
9778         trying to fake it.
9779         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
9780         finish_static_data_member_decl will do that.  Explicit set
9781         DECL_EXTERNAL to match non-template processing.
9782
9783 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
9784
9785         * cp-tree.h (finish_class_definition): Add parameter.
9786         * parse.y (structsp): Use it.  Don't call pop_scope here.
9787         * parse.c: Regenerated.
9788         * semantics.c (finish_class_definition): Pop it here.
9789
9790 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
9791
9792         * decl.c (xref_tag): Revise handling of nested template
9793         declarations.
9794         * pt.c (check_explicit_specialization): Tweak handling of friend
9795         templates in template classes.
9796         (tsubst_friend_class): Handle friend declarations for nested
9797         member template classes.
9798
9799 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
9800
9801         * class.c (finish_struct): Remove unused variable.
9802         (pushclass): Likewise.
9803         (invalidate_class_lookup_cache): Likewise.
9804         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
9805         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
9806         doesn't get obliterated.
9807         (make_typename_type): Handle template classes correctly.
9808
9809         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
9810         (storetags): Declare.
9811         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
9812         (pushclass): Likewise.  Use storetags to install tag declarations,
9813         not pushtag.
9814         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
9815         * decl.c (storetags): Make it global.
9816         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
9817         implicit typename declaration.
9818         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
9819         * method.c (hack_identifier): Likewise.
9820         * search.c (lookup_member): Likewise.
9821
9822         * decl.c (warn_about_implicit_typename_lookup): New function.
9823         (lookup_name_real): Use it.  Rework handling of implicit typename
9824         extension.
9825
9826 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
9827
9828         * cp-tree.h (lookup_nested_field): Remove.
9829         * class.c (push_nested_class): Handle UNION_TYPEs.
9830         (pop_nested_class): Likewise.
9831         * decl.c (lookup_name_real): Don't call lookup_nested_field.
9832         (start_decl): Use push_nested_class, not just pushclass.
9833         (cp_finish_decl): Use pop_nested_class, not just popclass.
9834         * search.c (lookup_nested_field): Remove.
9835
9836         * cp-tree.h (lang_type): Add documentation.
9837         * decl2.c (handle_class_head): Create template declarations here,
9838         as appropriate.
9839         * parse.y (class_head): Return whether or not we entered a new
9840         scope, as well as the type named.
9841         (named_class_head): Likewise.
9842         (named_complex_class_head_sans_basetype): Likewise.
9843         (structsp): Adjust accordingly.  Pop scope when required.
9844         * parse.c: Regenerated.
9845         * pt.c (check_default_tmpl_args): Robustify.
9846         (redeclare_class_template): Likewise.
9847         (instantiate_class_template): An instantiation of an
9848         anonymous union is itself an anonymous union.
9849         * semantics.c (begin_class_definition): Don't create template
9850         declarations here.
9851
9852 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
9853
9854         * parse.y (after_type_declarator_intern): New nonterminal.
9855         (after_type_declarator): Use it.
9856         (direct_after_type_declarator): Likewise.  Move above
9857         nonnested_type to fix reduce/reduce conflict resolution.
9858         (declmods): Reducing from just 'attributes' has EMPTY precedence.
9859         * Makefile.in (CONFLICTS): Update.
9860
9861         * decl.c (define_label): Downgrade error for jumping over a
9862         non-POD decl to pedwarn.
9863
9864 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
9865
9866         * cp-tree.h (popclass): Change declaration.
9867         (pop_nested_class): Likewise.
9868         (poplevel_class): Remove declaration.
9869         * call.c (convert_default_argument): Pass no arguments to
9870         popclass.
9871         * class.c (finish_struct_1): Likewise.
9872         (finish_struct): Likewise.
9873         (popclass): Remove argument.  Simplify code accordingly.
9874         (pop_nested_class): Likewise.
9875         * decl.c (poplevel_class): Declare it here, and make it static.
9876         (poplevel): Handle class scopes.
9877         (poplevel_class): Don't take an rgument.  Simplify.
9878         (pop_everything): Pass no arguments to pop_nested_class.
9879         (cp_finish_decl): Pass no arguments to popclass.
9880         (grokdeclarator): Pass no arguments to pop_nested_class.
9881         (finish_function): Likewise.
9882         * decl2.c (grokfield): Likewise.
9883         (pop_scope): Pass no arguments to popclass.
9884         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
9885         * pt.c (instantiate_class_template): Move call to pushclass, and
9886         document.  Pass no arguments to popclass.
9887         (regenerate_decl_from_template): Likewise.
9888
9889 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
9890
9891         * typeck.c (build_unary_op): Handle taking the address of a unique
9892         bound non-static member function.
9893
9894 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9895
9896         * lang-options.h (-Wdeprecated): New flag.
9897         * decl2.c (warn_deprecated): New flag.
9898         (lang_decode_option): Deprecated this-is-variable,
9899         external-templates, alt-external-templates.
9900         Support -Wdeprecated.
9901         * errfn.c (cp_deprecated): New function.
9902
9903 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
9904
9905         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
9906         of the decls themselves.
9907
9908         * pt.c (tsubst_function_type): Copy attributes over.
9909
9910         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
9911         and com_interface.
9912         * cp-tree.h: Add prototype.
9913         * decl.c (init_decl_processing): Set valid_lang_attribute.
9914
9915 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
9916
9917         * class.c (finish_struct_1): Look at the const-ness of the field's
9918         type, not the TREE_READONLY-ness of the declaration.
9919         * method.c (synthesize_method): Likewise.
9920         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
9921         creating new declarations.
9922
9923 1999-04-13  Mike Stump  <mrs@wrs.com>
9924
9925         * decl2.c (import_export_decl): Because vtables always reference
9926         virtual functions, even if they are inlined, don't allow
9927         -fno-implement-inlines to not emit them, instead, emit them with
9928         the vtable.
9929         * decl.c (start_function): Likewise.
9930
9931 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
9932
9933         * cp-tree.h (struct lang_type): Add com_interface.
9934         (CLASSTYPE_COM_INTERFACE): New macro.
9935         * class.c (set_rtti_entry): COM interface classes have no RTTI
9936         entries in their vtables; adjust.
9937         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
9938         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
9939         finish_struct_1): Likewise.
9940         * decl2.c (mark_vtable_entries): Likewise.
9941         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
9942         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
9943         expand_upcast_fixups): Likewise.
9944         * tree.c (debug_binfo): Likewise.
9945
9946         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
9947         * typeck.c (comptypes): If we get it, ignore attributes.
9948         * class.c (instantiate_type): Use BASELINK_P.  Change complain
9949         parameter to flags; 2 means ignore attributes.
9950         * call.c (build_op_delete_call): Pass it.
9951
9952         * decl.c (xref_tag): Only complain once about using a typedef-name
9953         with 'struct'.  Downgrade to pedwarn.
9954
9955         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
9956
9957         * parse.y (absdcl_intern): New nonterminal.
9958         (absdcl, direct_abstract_declarator): Use it.
9959
9960         * pt.c (lookup_template_class): Look through implict typename.
9961
9962 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
9963
9964         * friend.c (add_friend): Deal gracefully with error_mark_node.
9965         * method.c (build_overload_value): Handle pointers-to-members as
9966         template parameters.
9967
9968         * decl.c (push_binding): Fix typo in comment.
9969
9970 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
9971
9972         * error.c (dump_type_real): If a typename is a template-id, put
9973         out the template arguments.
9974         (dump_expr): Handle TEMPLATE_ID_EXPR.
9975         * pt.c (lookup_template_class): Now that full arguments are
9976         available everywhere, remove code that tried to guess them.
9977
9978 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
9979
9980         * decl.c (make_typename_type): Complain if we don't find a type
9981         when trying to make a typename type for a non-template type.
9982
9983 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
9984
9985         * decl.c (start_decl): Pass attributes to grokdeclarator.
9986         (grokdeclarator): Handle attributes on constructor-syntax
9987         initializers.
9988
9989 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
9990
9991         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
9992         don't have types.
9993
9994         * search.c (template_self_reference_p): Tweak.
9995
9996 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
9997
9998         * init.c (build_offset_ref): Don't build yet another weird data
9999         structure to describe overloaded functions.
10000
10001 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
10002
10003         * cp-tree.h (BASELINK_P): New macro.
10004         (SET_BASELINK_P): Likewise.
10005         * init.c (build_member_call): Remove needless assignment in if
10006         statement.
10007         * search.c (lookup_field_r): Fix handling when we are looking
10008         specifically for a type; these are not hidden by functions and
10009         variables.
10010         (lookup_member): Use SET_BASELINK_P.
10011         * tree.c (is_overloaded_fn): Use BASELINK_P.
10012         (really_overloaed_fn): Likewise.
10013         (get_first_fn): Likewise.
10014
10015 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
10016
10017         * decl.c (lookup_name_current_level): Tweak, and improve
10018         documentation.
10019
10020         * class.c (maybe_fixup_vptrs): Remove declaration.
10021         (build_class_init_list): Likewise.
10022         * decl.c (pushdecl_class_level): Call check_template_shadow here
10023         ...
10024         (push_class_level_binding): ... not here.
10025         * search.c (dfs_push_type_decls): Only avoid
10026         template-self-reference TYPE_DECLs if they are from base classes.
10027
10028 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
10029
10030         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
10031         nodes.  Tidy.
10032
10033 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
10034
10035         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
10036         (finish_struct_1): Don't call build_class_init_list.
10037
10038 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
10039
10040         * tinfo.h (__class_type_info): Fix illegal declaration.
10041
10042         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
10043         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
10044         (IDENTIFIER_CLASS_VALUE): Improve documentation.
10045         (is_properly_derived_from): Declare.
10046         (invalidate_class_lookup_cache): Likewise.
10047         (maybe_maybe_note_name_used_in_class): Likewise.
10048         (note_name_declared_in_class): Likewise.
10049         (push_using_decl): Remove duplicate declaration.
10050         (id_in_current_class): Remove declaration.
10051         (push_class_binding): Change prototype.
10052         (clear_identitifer_class_values): Declare.
10053         * call.c (is_properly_derived_from): Make it global.
10054         (build_new_function_call): Be careful about updating candidates.
10055         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
10056         asked to make illegal calls.
10057         * class.c: Include splay-tree.h.
10058         (class_stack_node): Add names_used slot.
10059         (check_member_decl_is_same_in_complete_scope): Remove.
10060         (add_method): Fix comment.  Push the declaration into class
10061         scope.
10062         (finish_struct_1): When popping the class, pop the bindings too.
10063         Remove check for data member/function member conflict.
10064         (finish_struct): Remove calls to
10065         check_member_decl_is_same_in_complete_scope.  Change calls to
10066         popclass.
10067         (pushclass): Clear names_used in the class stack entry.
10068         Use invalidate_class_lookup_cache to remove cached entries, rather
10069         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
10070         before entering a new class.  Remove dead code.  Don't mess with
10071         current_function_decl when pushing declarations.
10072         (invalidate_class_lookup_cache): New function, split out from ...
10073         (popclass): Here.  Clean up names_used on our way out.
10074         (instantiate_type): Adjust.
10075         (build_self_reference): Don't push the declaration here.
10076         (maybe_note_name_used_in_class): New function.
10077         (note_name_declared_in_class): Likewise.
10078         * decl.c (add_binding): Change prototype.
10079         (find_class_binding_level): New function.
10080         (innermost_nonclass_level): Likewise.
10081         (current_binding_level): Update documentation.
10082         (inner_binding_level): Remove.  Replace with current_binding_level
10083         throughout.
10084         (push_binding_level): Remove special handling of
10085         class_binding_level.
10086         (pop_binding_level): Likewise.  Use find_class_binding_level.
10087         (suspend_binding_level): Likewise.
10088         (global_bindings_p): Use innermost_nonclass_level.
10089         (toplevel_bindings_p): Likewise.
10090         (namespace_bindings_p): Likewise.
10091         (pseudo_global_level_p): Likewise.
10092         (push_binding): Clear INHERITED_VALUE_BINDING_P.
10093         (add_binding): Check for illegal multiple declarations.  Return a
10094         value indicating whether or not the new binding was legal.
10095         (push_local_binding): Skip over class binding levels.  Check
10096         return value from add_binding.
10097         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
10098         note_name_declared_in_class.
10099         (pushlevel_class): Remove "fake out the rest of the compiler"
10100         code.
10101         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
10102         (clear_identifier_class_values): New function.
10103         (pop_from_top_level): Use it.
10104         (pop_everything): Tweak.
10105         (maybe_process_template_type_declaration): Don't push the
10106         declaration for the template here.
10107         (pushtag): Don't push tag declarations into class scope here.
10108         (pushdecl): Apply DeMorgan's law for readability.
10109         (pushdecl_class_level): Remove special-case code for
10110         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
10111         (push_class_level_bindng): Deal with inherited bindings.
10112         (lookup_name_real): Remove special-case code for
10113         TYPE_BEING_DEFINED, and some implicit typename magic.
10114         (grokdeclarator): Handle COMPONENT_REF for a template function.
10115         (build_enumerator): Don't call pushdecl_class_level here.
10116         (id_in_current_class): Remove.
10117         * decl2.c (grokfield): Don't call pushdecl_class_level or
10118         check_template_shadow.
10119         * errfn.c (cp_file_of): Don't declare.
10120         (cp_line_of): Likewise.
10121         * error.c (dump_decl): Handle an OVERLOAD.
10122         (cp_file_of): Likewise.
10123         (cp_line_of): Likewise.
10124         * init.c (build_member_call): Handle a COMPONENT_REF.
10125         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
10126         pushdecl_class_level.
10127         * method.c (hack_identifier): Build COMPONENT_REFs for references
10128         to member templates as well as member functions.  Remove dead
10129         code.
10130         * parse.y (left_curly): Remove.
10131         (nonnested_type): Call maybe_note_name_used_in_class, not
10132         pushdecl_class_level.
10133         * parse.c: Regenerated.
10134         (nested_name_specifier_1): Likewise.
10135         * pt.c (check_explicit_specialization): Adjust, for robustness.
10136         (check_template_shadow): Handle OVERLOADs.
10137         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
10138         TEMPLATE_DECL, if appropriate.
10139         * search.c (envelope_add_decl): Remove.
10140         (dfs_pushdecls): Likewise.
10141         (dfs_compress_decls): Likewise.
10142         (dfs_push_decls): New function.
10143         (dfs_push_type_decls): Likewise.
10144         (setup_class_bindings): Likewise.
10145         (template_self_reference_p): Likewise.
10146         (lookup_field_r): Use it.
10147         (looup_member): Remove old comment.  Deal with ambiguity.
10148         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
10149         and remove envelope processing.
10150         * semantics.c (begin_class_definition): Let pushclass push
10151         declarations for base classes.
10152         (finish_member_declaration): Push declarations into class scope.
10153         * typeck.c (build_component_ref): Just put an OVERLOAD into the
10154         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
10155         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
10156         * Makefile.in (class.o): Depend on splay-tree.h.
10157
10158 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
10159
10160         * cvt.c (convert_pointer_to_real): Use same_type_p.
10161         * typeck.c (comp_target_types): Use same_type_p.
10162
10163 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
10164
10165         * semantics.c (begin_inline_definitions,
10166         finish_inline_definitions): Rename from finish_default_args and
10167         begin_inline_definitions, respectively, to something that isn't a
10168         total lie.  :)
10169         * parse.y (structsp): Adjust.
10170
10171         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
10172         (list_hash_lookup): Likewise.
10173         (hash_tree_chain): Adjust.
10174         * pt.c (tsubst): Adjust.
10175         (tsubst_arg_types): Use plain hash_tree_cons.
10176         * cp-tree.h (hash_tree_cons_simple): Lose.
10177         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
10178
10179 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10180
10181         * Makefile.in (hash.h): Generate using gperf language 'C', not
10182         'KR-C', so gperf uses the `const' keyword on strings.
10183
10184         * gxx.gperf (resword): Const-ify a char*.
10185
10186 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
10187
10188         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
10189         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
10190         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
10191         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
10192         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
10193         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
10194         tree.c: Adjust.
10195
10196 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
10197
10198         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
10199
10200 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
10201
10202         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
10203
10204 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
10205
10206         * cp-tree.h (add_friend): Declare.
10207         (add_friends): Likewise.
10208         * friend.c (add_friend): Make it global.  Don't add to
10209         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
10210         (add_friends): Make it global.
10211         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
10212         befriending class is a template.
10213         * parse.y (component_decl_1): Fix typo in comment.
10214         * parse.c: Regenerated.
10215         * pt.c (instantiate_class_template): Use add_friend and
10216         add_friends rather that duplicating some of their functionality
10217         here.
10218
10219 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
10220
10221         * call.c (build_field_call): Unify 'this' and non-'this' cases.
10222
10223         * typeck.c (build_indirect_ref): Check for 'this' sooner.
10224
10225 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10226
10227         * call.c (op_error): Const-ify a char*.
10228         (add_candidate, source_type, add_warning): Add static prototype.
10229         (print_z_candidates): Const-ify a char*.
10230
10231         * class.c (resolve_address_of_overloaded_function,
10232         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
10233         (get_vtable_name, finish_struct_1): Const-ify a char*.
10234
10235         * cvt.c (convert_to_reference): Likewise.
10236
10237         * decl.c (redeclaration_error_message, record_builtin_type,
10238         record_unknown_type, member_function_or_else, bad_specifiers):
10239         Likewise.
10240         (find_binding, select_decl, unqualified_namespace_lookup,
10241         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
10242         Add static prototype.
10243         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
10244         implicitly_declare, record_builtin_java_type, define_function,
10245         grok_op_properties, tag_name): Const-ify a char*.
10246
10247         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
10248         (define_function, finish_builtin_type): Const-ify a char*.
10249         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
10250         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
10251         (file_name_nondirectory): Const-ify a char*.
10252         (init_filename_times): Don't prototype.
10253         (compiler_error): Prototype.
10254         (yyerror, init_repo): Const-ify a char*.
10255         (build_srcloc): Don't prototype.
10256         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
10257         Const-ify a char*.
10258         (warn_for_assignment): Don't prototype.
10259         (convert_for_initialization, readonly_error, check_for_new_type,
10260         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
10261         Const-ify a char*.
10262
10263         * decl2.c (acceptable_java_type, output_vtable_inherit,
10264         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
10265         merge_functions, decl_namespace, validate_nonmember_using_decl,
10266         do_nonmember_using_decl): Add static prototype.
10267         (lang_f_options): Const-ify a char*.
10268         (finish_builtin_type): Likewise.
10269         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
10270         prototype.
10271
10272         * errfn.c: Include cp-tree.h.
10273         (cp_thing): Add static prototype.
10274         (compiler_error): Don't protoptype.
10275         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
10276         passing it to `cp_thing'.
10277
10278         * error.c (interesting_scope_p): Add static prototype.
10279
10280         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
10281         a char*.
10282
10283         * init.c (compiler_error): Don't prototype.
10284         (member_init_ok_or_else): Const-ify a char*.
10285         (build_java_class_ref): Add static prototype.
10286
10287         * lex.c (compiler_error): Don't prototype.
10288         (get_time_identifier, interface_strcmp, extend_token_buffer,
10289         handle_cp_pragma): Const-ify a char*.
10290         (is_global, init_filename_times): Add static prototype.
10291         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
10292         (compiler_error): Change from fixed args to variable args.
10293         (yyerror): Const-ify a char*.
10294
10295         * parse.y (cond_stmt_keyword): Const-ify a char*.
10296         (parse_decl): Add static prototype.
10297
10298         * pt.c (template_args_equal, print_template_context): Likewise.
10299         (print_candidates, check_default_tmpl_args): Const-ify a char*.
10300         (instantiate_class_template): Likewise.
10301
10302         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
10303
10304         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
10305         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
10306
10307         * search.c (lookup_field_info, lookup_member): Likewise.
10308         (lookup_member): Cast the first argument of `bzero' to a PTR.
10309
10310         * sig.c (compiler_error): Don't prototype.
10311         (build_signature_pointer_or_reference_nam): Const-ify a char*.
10312         (get_sigtable_name, build_member_function_pointer): Likewise.
10313
10314         * tree.c (compiler_error): Don't prototype.
10315         (no_linkage_helper, build_srcloc): Add static prototype.
10316         (build_vbase_pointer_fields): Const-ify a char*.
10317         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
10318
10319         * typeck.c (compiler_error): Don't prototype.
10320         (convert_for_assignment): Const-ify a char*.
10321         (comp_cv_target_types): Add static prototype.
10322         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
10323         build_component_addr, build_unary_op, convert_for_initialization):
10324         Const-ify a char*.
10325
10326         * typeck2.c (ack): Add static prototype and change from fixed args
10327         to variable args.
10328         (readonly_error, check_for_new_type): Const-ify a char*.
10329
10330         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
10331         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
10332         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
10333         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
10334         gen_assign, GNU_xref_member): Const-ify a char*.
10335
10336 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10337
10338         * gxxint.texi: Remove old discussion on copying virtual bases.
10339
10340 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
10341
10342         * Make-lang.in: Remove all references to g++.o/g++.c.
10343         Link g++ from gcc.o.
10344
10345 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
10346
10347         * decl2.c (comdat_linkage): Treat vtables like functions.
10348
10349 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
10350
10351         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
10352
10353 1999-03-25  Nathan Sidwell  <nathan@acm.org>
10354
10355         * decl.c (init_decl_processing): Add `signed' type as a synonym
10356         for `int'.
10357
10358 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
10359
10360         * typeck.c (common_type): Handle cv-qual unification for pointers
10361         to members.
10362
10363         * decl.c (unqualified_namespace_lookup): Return error_mark_node
10364         on error.
10365         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
10366         * lex.c (do_identifier): If we got error_mark_node, call
10367         lookup_name again.
10368
10369 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10370
10371         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
10372         classes.
10373
10374 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
10375
10376         * decl.c (lookup_name_real): Do nested field lookup regardless of
10377         TYPE_BEING_DEFINED.
10378
10379 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
10380
10381         * cp-tree.h (lang_type): Remove has_assignment and
10382         has_real_assignment.  Add befriending_classes.
10383         (TYPE_HAS_ASSIGNMENT): Remove.
10384         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
10385         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
10386         (lang_decl): Document.
10387         (DECL_BEFRIENDING_CLASSES): New macro.
10388         (FRIEND_NAME): Move declaration to more obvious location.
10389         (FRIEND_DECLS): Likewise.
10390         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
10391         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
10392         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
10393         (grok_op_properties): Likewise.
10394         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
10395         (add_friend): Likewise.  Don't do weird things with assignment
10396         operators.  Update DECL_BEFRIENDING_CLASSES.
10397         (add_friends): Don't do weird things with assignment operators.
10398         (make_friend_class): Likewise.  Update
10399         CLASSTYPE_BEFRIENDING_CLASSES.
10400         * pt.c (instantiate_class_template): Don't set
10401         TYPE_HAS_ASSIGNMENT.
10402         (tsubst_copy): Substitute the TREE_TYPE for more unary
10403         expressions.
10404         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
10405         * search.c (protected_accessible_p): New function.
10406         (friend_accessible_p): Likewise.
10407         (accessible_p): Use them.
10408
10409 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
10410
10411         * pt.c (convert_nontype_argument): Don't create things that aren't
10412         PTRMEM_CSTs when applying a qualification conversion to a
10413         PTRMEM_CST.
10414
10415 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
10416
10417         * Makefile.in (OBJS): Don't mention hash.o.
10418         (OBJDEPS): Likewise.
10419
10420 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
10421
10422         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
10423         * decl.c (expand_static_init): Make sure we don't add any after
10424         then.
10425
10426         * decl.c (cp_finish_decl): Move intelligence about handling
10427         DECL_COMDAT for variables from here...
10428         * decl2.c (comdat_linkage): ...to here.
10429         (maybe_make_one_only): Tweak.
10430         (import_export_decl): Call comdat_linkage for variables, too.
10431         (finish_file): Handle template statics properly.
10432
10433 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
10434
10435         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
10436         Document internals of pointer-to-member-functions.
10437         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
10438         (PFN_FROM_PTRMEMFUNC): Likewise.
10439         (build_type_conversion): Remove unused parameter.
10440         (build_ptrmemfunc1): Declare.
10441         (expand_ptrmemfunc_cst): New function.
10442         (delta2_from_ptrmemfunc): Likewise.
10443         (pfn_from_ptrmemfunc): Likewise.
10444         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
10445         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
10446         (convert_to_reference): Remove unused parameter to
10447         build_type_conversion.
10448         (ocp_convert): Likewise.
10449         (build_user_type_conversion): Likewise.
10450         * error.c (dump_expr): Handle NULL pointer-to-member functions.
10451         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
10452         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
10453         open when handling pointer-to-member functions.
10454         * pt.c (convert_nontype_argument): Clean up error messages.  Be
10455         more stringent with pointers-to-members.
10456         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
10457         (build_unary_op): Tidy ever-so-slightly.
10458         (build_conditional_expr): Remove extra parameter to
10459         build_type_conversion.
10460         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
10461         we're using.
10462         (expand_ptrmemfunc_cst): Define.
10463         (delta2_from_ptrmemfunc): Likewise.
10464         (pfn_from_ptrmemfunc): Likewise.
10465
10466 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
10467
10468         * init.c (build_member_call): Handle template-id expressions
10469         correctly.
10470         * typeck.c (build_x_function_call): Likewise.
10471
10472 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
10473
10474         * friend.c (make_friend_class): Avoid core dump when
10475         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
10476
10477 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
10478
10479         * decl.c (start_function): Suppress normal linkage heuristics
10480         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
10481
10482 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
10483
10484         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
10485         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
10486
10487 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10488
10489         * parse.y (named_complex_class_head_sans_basetype):
10490         Do not push a scope for error_mark_node.
10491         (maybe_base_class_list): Likewise.
10492
10493         * decl.c (start_decl): Check for error_mark_node as a type.
10494         Detected by g++.brendan/array-refs.C.
10495         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
10496         (maybe_build_cleanup_1): Likewise.  Detected by
10497         g++.jason/incomplete1.C.
10498
10499         * tree.c (build_dummy_object): Use void_zero_node instead of the
10500         error_mark_node.
10501         (is_dummy_object): Check for such a node.
10502         Detected by g++.bob/inherit1.C
10503
10504 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
10505
10506         * method.c (old_backref_index): Split out...
10507         (flush_repeats): From here.  Rename back from try_old_backref.
10508         (build_mangled_name): Put back some old-style repeat handling.
10509
10510 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10511
10512         * lex.c: Don't include setjmp.h.
10513         (parse_float): New static function.
10514         (pf_args): New struct.
10515         (real_yylex): Use them in call to `do_float_handler'.
10516
10517 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
10518
10519         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
10520         * tree.c (layout_basetypes): Not here.
10521         * search.c (dfs_search): Remove; no longer used.
10522
10523 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
10524
10525         * decl2.c (validate_nonmember_using_decl): Issue sensible
10526         error-messages on bogus qualifiers.
10527
10528 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
10529
10530         * call.c (add_function_candidate): Fix uninitialized variable.
10531
10532         * Makefile.in (search.o): Add dependency on varray.h.
10533
10534 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
10535
10536         * decl.c (duplicate_decls): Use same_type_p.
10537         * method.c (try_old_backref): Renamed from flush_repeats.  Use
10538         same_type_p.  Don't try to handle repeats.  Return success.
10539         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
10540         calls from old-style code, too.
10541         (check_ktype): Use same_type_p.
10542         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
10543         (build_qualified_name): Simplify logic.
10544         (process_overload_item): Strip typedefs and quals at the top.
10545         (build_mangled_name_for_type_with_Gcode): Remove call to
10546         type_canonical_variant.
10547         (build_mangled_name): Likewise.  Remove support for old-style
10548         repeats, which have been disabled since 2.7.2.  Don't mess with
10549         TREE_USED.
10550         (build_decl_overload_real): Don't mess with TREE_USED.
10551
10552 1999-03-13  Nathan Sidwell  <nathan@acm.org>
10553
10554         * error.c (cp_printers): Add 'F' escape character.
10555         (dump_type_real): Remove TREE_LIST (fnargs) printing.
10556         Functionality moved to dump_parameters.
10557         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
10558         (dump_function_decl): Extend meaning of V parameter.  Use
10559         dump_parameters and dump_exception_spec.
10560         (dump_parameters): New static function.
10561         (dump_exception_spec): New static function.
10562         (fndecl_as_string): Change argument semantics.  Use
10563         dump_function_decl directly.
10564
10565         * sig.c (build_signature_table_constructor): Use cp_error.
10566
10567 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10568
10569         * semantics.c (finish_switch_cond): Handle error cases gracefully.
10570         Detected by g++.law/enum5.C.
10571
10572         * typeck.c (build_modify_expr): Check for errors after resolving
10573         offsets.  Detected by g++.brendan/static1.C.
10574
10575         * decl.c (complete_array_type): Ignore initial_value if it is an
10576         error.  Detected by g++.benjamin/17930.C.
10577
10578         * typeck2.c (process_init_constructor): Return error if one argument
10579         is in error.  Detected by g++.benjamin/13478.C.
10580
10581 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10582
10583         * decl.c (select_decl): Allow class templates when we need types.
10584         * decl2.c (ambiguous_decl): Likewise.
10585
10586 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
10587
10588         * lex.c (do_identifier): Correct call to enforce_access.
10589         * search.c (accessible_p): Tweak comment.
10590
10591 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
10592
10593         * semantics.c (begin_class_definition): Call build_self_reference.
10594         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
10595
10596         * search.c (assert_canonical_unmarked): Fix typo in prototype.
10597
10598         * search.c (dfs_canonical_queue): New function.
10599         (dfs_assert_unmarked_p): Likewise.
10600         (assert_canonical_unmarked): Likewise.
10601         (access_in_type): Use it.
10602         (accessible_p): Likewise.  Walk the whole tree when umarking.
10603
10604         * sig.c (build_signature_table_constructor): Use accessible_p
10605         instead of compute_access.
10606
10607 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
10608
10609         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
10610
10611 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
10612
10613         * cp-tree.h (flag_access_control): Declare.
10614         (TREE_VIA_PPUBLIC): Document.
10615         (DECL_NONSTATIC_MEMBER_P): New macro.
10616         (enforce_access): Return an indication of whether or not access
10617         was permitted.
10618         (build_self_reference): Change prototype.
10619         (compute_access): Replace with ...
10620         (accessible_p): New function.
10621         (dfs_walk): Change prototype.
10622         (dfs_unmark): Likewise.
10623         (markedp): Likewise.
10624         * call.c (enforce_access): Use accessible_p.
10625         * class.c (build_self_reference): Insert the declaration into the
10626         list of members for this type, and make it public.
10627         * decl.c (xref_basetypes): Avoid ill-timed recursion.
10628         * init.c (build_offset_ref): Use lookup_member, not three separate
10629         name-lookups.  Call enforce_access rather than checking for
10630         illegal accesses here.
10631         (resolve_offset_ref): Likewise.
10632         * lex.c (do_identifier): Likewise.
10633         * method.c (hack_identifier): Likewise.
10634         * parse.y (self_reference): Remove.
10635         (opt_component_decl_list): Don't use it.
10636         * parse.c: Regenerated.
10637         * pt.c (print_candidates): Generalize to handle lists of
10638         overloaded functions.
10639         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
10640         not set.
10641         (get_template_base): Use new calling convention for dfs_walk.
10642         * search.c: Include varray.h.  Add prototypes.
10643         (dfs_walk): Accept a data pointer to pass to the work functions.
10644         All callers changed.  All work functions changed.
10645         (breadth_first_search): Rename to bfs_walk, and make consistent
10646         with dfs_walk.
10647         (dfs_walk_real): New function.
10648         (canonical_binfo): New function.
10649         (context_for_name_lookup): Likewise.
10650         (shared_marked_p): Likewise.
10651         (shared_unmarked_p): Likewise.
10652         (lokup_field_queue_p): Likewise.
10653         (lookup_field_r): Generalize to handle both functions and fields.
10654         (lookup_field): Just call lookup_member.
10655         (lookup_fnfields): Likewise.
10656         (lookup_member): Move body of lookup_field here and generalize.
10657         (dfs_accessible_queue_p): Likewise.
10658         (dfs_accessible_p): Likewise.
10659         (dfs_access_in_type): Likewise.
10660         (access_in_type): Likewise.
10661         (compute_access): Remove, and replace with ...
10662         (accessible_p): New function.
10663         (vbase_types): Remove.
10664         (vbase_decl_ptr_intermediate): Likewise.
10665         (vbase_decl_ptr): Likewise.
10666         (vbase_init_result): Likewise.
10667         (closed_envelopes): Likewise.
10668         (bvtable): Likewise.
10669
10670 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
10671
10672         * call.c (add_function_candidate): Check for proper number of args
10673         before checking the validity of those args.
10674
10675 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
10676
10677         * cp-tree.h (struct lang_type): Add anon_union field.
10678         (ANON_UNION_TYPE_P): Use it instead of examining type.
10679         (SET_ANON_UNION_TYPE_P): New macro.
10680         * decl.c (check_tag_decl): Use it.
10681
10682         * search.c (compute_access): Handle non-type contexts earlier, and
10683         handle NULL_TREE.
10684
10685         * tree.c (build_exception_variant): Use copy_to_permanent.
10686
10687         * decl2.c (setup_initp): Give statics with no priority the default
10688         priority here.
10689         (do_dtors, do_ctors, finish_file): Remove special handling of
10690         non-prioritized statics.
10691
10692 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
10693
10694         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
10695         * decl.c (make_typename_type): Don't issue an error if an
10696         immediate lookup fails; it migt be resolved later.
10697         * friend.c (is_friend): Add comment.
10698         * search.c (breadth_first_search): Add POSTFN and DATA
10699         parameters.  Tidy.  All callers changed.
10700         (lookup_field_queue_p): New function.
10701         (lookup_field_r): Likewise.
10702         (lookup_field_post): Likewise.
10703         (lookup_field): Use them, via breadth_first_search, instead of
10704         duplicating logic.
10705         (compute_access): Robustify.
10706         (lookup_fnfield_info): New structure.
10707
10708 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
10709
10710         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
10711
10712 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
10713
10714         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
10715         cc happy.
10716
10717         * decl2.c (import_export_class): Also return if
10718         CLASSTYPE_INTERFACE_ONLY is set.
10719
10720 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10721
10722         * decl.c (push_overloaded_decl): Only overwrite the old binding if
10723         there was one.
10724         * decl2.c (do_local_using_decl): Fix loop termination.
10725
10726 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
10727
10728         * cp-tree.h (determine_specialization): Don't declare.
10729         * pt.c (determine_specialization): Make it static.  Eliminate
10730         complain parameter.  Note that decl is always non-NULL now, and
10731         simplify accordingly.
10732
10733         * decl.c (maybe_push_to_top_level): Always call
10734         push_cp_function_context.
10735         (pop_from_top_level): Always call pop_cp_function_context.
10736
10737 1999-02-26  Nathan Sidwell  <nathan@acm.org>
10738
10739         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
10740         diagnostics.
10741         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
10742         * init.c (build_new_1): Extra arg to complete_type_or_else.
10743         (build_delete): Likewise.
10744         * typeck.c (require_complete_type): Likewise.
10745         (pointer_int_sum): Likewise.
10746         (pointer_diff): Likewise.
10747         (build_component_ref): Likewise.
10748
10749         * typeck2.c (incomplete_type_error): Always use cp_error.
10750         Show declaration of undefined type, if appropriate.
10751         Deal with UNKNOWN_TYPE nodes.
10752
10753         * typeck.c (require_complete_type): Use TYPE_SIZE as
10754         size_zero_node to mean incomplete type.
10755         (require_complete_type_in_void): New function.
10756         (build_compound_expr): Call complete_type_in_void for LHS.
10757         (build_c_cast): Call complete_type_in_void for void cast.
10758         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
10759         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
10760         require_complete_type_in_void.  Call it.
10761         * cp-tree.h (require_complete_type_in_void): Prototype new function.
10762
10763         * typeck.c (convert_arguments): Use alternative format for
10764         function decls.  Don't require_complete_type here.  Simplify
10765         diagnostic printing.
10766         (convert_for_initialization): Don't require_complete_type on RHS yet.
10767         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
10768
10769         * call.c (build_over_call): Cope with qualified void return type.
10770         * semantics.c (finish_call_expr): Likewise.
10771         * typeck.c (build_function_call_real): Likewise.
10772         (c_expand_return): Likewise.
10773         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
10774
10775         * call.c (print_z_candidates): Use alternate print format, to be
10776         consistent with (pt.c) print_candidates.
10777         * method.c (hack_identifier): List candidate members.
10778         * search.c (lookup_field): Build ambiguous list, and show it, if
10779         ambiguous.
10780
10781 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
10782
10783         * typeck.c (decay_conversion): Don't confuse constant array
10784         variables with their initializers.
10785
10786         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
10787         merging decls.
10788         * pt.c (regenerate_decl_from_template): Tweak for clarity.
10789         (instantiate_decl): Mark a decl instantiated before regenerating
10790         it to avoid recursion.
10791         * tree.c (mapcar): Don't call decl_constant_value unless we know
10792         something is TREE_READONLY_DECL_P.
10793
10794         * class.c (check_for_override): Don't stop checking when we find
10795         the first overridden function.  Delete #if 0'd code.
10796         * search.c (get_matching_virtual): Likewise.
10797
10798 1999-02-25  Richard Henderson  <rth@cygnus.com>
10799
10800         * lang-specs.h: Define __FAST_MATH__ when appropriate.
10801
10802 1999-02-24  Mike Stump  <mrs@wrs.com>
10803
10804         * typeck.c (convert_for_assignment): Allow boolean integral constant
10805         expressions to convert to null pointer.
10806
10807 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10808
10809         * decl.c (lookup_namespace_name): Resolve namespace aliases.
10810
10811         * class.c (push_nested_class): Allow namespaces.
10812
10813         * decl2.c (set_decl_namespace): Add friendp parameter.
10814         * decl.c (grokfndecl): Pass it.
10815         (grokvardecl): Likewise.
10816         * cp-tree.h: Change declaration.
10817
10818 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
10819
10820         * pt.c (tsubst): Allow an array of explicit size zero.
10821
10822 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
10823
10824         * errfn.c: Change varargs code to look like toplev.c.
10825
10826         * method.c (process_modifiers): Don't prepend 'U' for char or
10827         wchar_t.
10828
10829 1999-02-20  Craig Burley  <craig@jcb-sc.com>
10830
10831         * Make-lang.in (cplib2.ready): Don't consider updating
10832         cplib2 stuff if the current directory isn't writable, as
10833         it won't work (such as during a `make install').
10834
10835 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
10836
10837         * decl2.c (start_objects): Make file scope constructors and
10838         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
10839         ASM_OUTPUT_DESTRUCTOR are defined.
10840
10841 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
10842
10843         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
10844         (fn_type_unification): Adjust prototype.
10845         (lookup_fnfields_1): Declare.
10846         * call.c (add_template_candidate_real): Adjust call to
10847         fn_type_unification.
10848         * class.c (add_method): Don't allow duplicate declarations of
10849         constructors or destructors.
10850         (resolve_address_of_overloaded_function): Remove unused variable.
10851         Adjust call to fn_type_unification.
10852         * decl.c (grokfndecl): Be more robust in the face of illegal
10853         specializations.
10854         * decl2.c (check_classfn): Remove hokey handling of member
10855         templates.
10856         * pt.c (determine_specialization): Improve comments.  Adjust to
10857         handle template argument deduction as per the standard.
10858         (check_explicit_specialization): Fix comment spacing.  Handle
10859         type-conversion operators correctly.  Improve error-recovery.
10860         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
10861         (get_bindings_real): Simplify handling of static members.
10862         * search.c (lookup_fnfields_1): Make it have external linkage.
10863         * typeck.c (compparms): Fix comment.
10864         (build_unary_op): Don't try to figure out which template
10865         specialization is being referred to when when the address-of
10866         operator is used with a template function.
10867
10868 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10869
10870         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
10871         keyword to match an analogous change at the top level.
10872
10873         * tree.c (lvalue_or_else): Likewise.
10874
10875 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
10876
10877         * decl.c (xref_basetypes): Comment.
10878         * pt.c (instantiate_class_template): Use xref_basetypes.
10879
10880 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
10881
10882         * cp-tree.h (tsubst): Change prototype.
10883         (tsubst_expr): Likewise.
10884         (tsubst_copy): Likewise.
10885         (type_unification): Remove prototype.
10886         * call.c (convert_default_arg): Adjust call to tsubst_expr.
10887         * class.c (resolve_address_of_overloaded_function): Just use
10888         fn_type_unification.
10889         * decl.c (grokdeclarator): Adjust call to tsubst.
10890         * method.c (build_template_parm_names): Likewise.
10891         * pt.c (GTB_VIA_VIRTUAL): New macro.
10892         (GTB_IGNORE_TYPE): Likewise.
10893         (resolve_overloaded_unification): Add `complain' parameter.
10894         (try_one_overload): Likewise.
10895         (tsubst_template_arg_vector): Likewise.
10896         (tsubst_template_parms): Likewise.
10897         (tsubst_aggr_type): Likewise.
10898         (tsubst_arg_types): Likewise.
10899         (tsubst_call_declarator_parms): Likewise.
10900         (unify): Remove explicit_mask.
10901         (type_unification_real): Likewise.
10902         (get_template_base_recursive): Likewise.
10903         (coerce_template_template_parms): Provide prototype.
10904         (tsubst_function_type): Likewise.
10905         (try_class_unification): New function.
10906         All callers changed to use new complain parameter.
10907         (get_template_base): Use try_class_unification.
10908         (unify): Adjust handling of classes derived from template types.
10909         (fn_type_unification): Substitute explicit arguments before
10910         unification.
10911
10912 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10913
10914         * decl.c (pushdecl): Remove dead code.
10915
10916 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
10917
10918         * decl2.c (finish_objects): Fix code I missed in previous change.
10919
10920 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
10921
10922         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
10923         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
10924
10925         * pt.c (maybe_process_partial_specialization): Complain about
10926         'template <>' on non-specialization.
10927
10928 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
10929
10930         * decl.c (grokdeclarator): Catch wierd declarators.
10931         * decl2.c (finish_file): Don't abort because of namespace parsing
10932         failure.
10933         (check_decl_namespace): Remove.
10934
10935 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
10936
10937         * cp-tree.h (get_template_base): Don't declare.
10938         (dfs_walk): Declare.
10939         (dfs_unmark): Likewise.
10940         (markedp): Likewise.
10941         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
10942         targs to get_template_base.
10943         (get_template_base_recursive): Move here from search.c.  Check to
10944         see that the base found can be instantiated to form the desired
10945         type.
10946         (get_template_base): Likewise.
10947         (get_class_bindings): Simplify.
10948         * search.c (get_template_base_recursive): Move to pt.c.
10949         (get_template_base): Likewise.
10950         (markedp): Make it global.
10951         (dfs_walk): Likewise.
10952         (dfs_unmark): Likewise.
10953
10954 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
10955
10956         * pt.c (maybe_process_partial_specialization): Complain about
10957         specialization in wrong namespace.
10958         * tree.c (decl_namespace_context): New fn.
10959
10960 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10961
10962         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
10963         * pt.c (coerce_template_template_parms): Handle nested
10964         template template parameters.
10965
10966 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
10967
10968         * typeck2.c: Update email addresses.
10969
10970 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10971
10972         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
10973         turned off.
10974
10975 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
10976
10977         * lex.c (retrofit_lang_decl): Split out...
10978         (build_lang_decl): From here.
10979         * decl.c (pushdecl): Call it for functions generated by the middle
10980         end that don't have DECL_LANG_SPECIFIC.
10981         * cp-tree.h: Declare it.
10982
10983         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
10984         (start_objects, finish_objects): Only use special
10985         init_priority code if the user specified a priority.
10986         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
10987         objects.
10988
10989 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
10990
10991         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
10992         mkstemp.o.  Get them from libiberty now.
10993         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
10994
10995 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10996
10997         * decl2.c (lang_decode_option): Use read_integral_parameter.
10998
10999 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
11000
11001         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
11002         before calling complete_type_or_else.
11003
11004 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11005
11006         * input.c (inline): Don't define, its handled by system.h.
11007
11008 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
11009
11010         * decl2.c: Don't define flag_no_ident here.  Don't process
11011         -f(no-)ident here.
11012         * cp-tree.h: Don't declare flag_no_ident here.
11013         * lang-specs.h: Map -Qn to -fno-ident.
11014
11015 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
11016
11017         * cp-tree.h (struct tree_binding): Replace scope field with a union.
11018         (BINDING_SCOPE): Adjust.
11019         * decl.c (BINDING_LEVEL): Adjust.
11020
11021 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
11022
11023         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
11024         member constants.
11025
11026         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
11027         a ctor initializer.
11028
11029         * tree.c (equal_functions): Fix name in prototype.
11030
11031         * decl.c (push_local_binding): Add FLAGS argument.
11032         (pushdecl, push_overloaded_decl): Pass it.
11033         * decl2.c (do_local_using_decl): Likewise.
11034         * cp-tree.h: Adjust prototype.
11035         * decl.c (poplevel): Fix logic.
11036
11037         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
11038         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
11039         (cat_namespace_levels): Don't loop forever.
11040
11041 1999-01-25  Richard Henderson  <rth@cygnus.com>
11042
11043         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
11044
11045 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
11046
11047         * class.c (resolve_address_of_overloaded_function): Mark the
11048         chosen function used.
11049
11050         * call.c (build_call): Make sure that a function coming in has
11051         been marked used already.
11052         * decl.c (expand_static_init): Call mark_used instead of
11053         assemble_external.
11054         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
11055         alloc_eh_object, expand_throw): Likewise.
11056         * init.c (build_builtin_delete_call): Likewise.
11057         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
11058         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
11059         expand_generic_desc): Likewise.
11060
11061 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11062
11063         * tree.c (equal_functions): New function.
11064         (ovl_member): Call it.
11065
11066 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
11067
11068         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
11069
11070 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11071
11072         * decl.c (decls_match): Return 1 if old and new are identical.
11073         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
11074
11075 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
11076
11077         * decl.c (start_function): Make member functions one_only on windows.
11078         * decl2.c (import_export_decl): Likewise.
11079
11080         * decl.c (grokdeclarator): Don't complain about implicit int in
11081         a system header.  Change same-name field check to not complain in
11082         a system header instead of within extern "C".
11083
11084 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
11085
11086         * cp-tree.h (PUSH_GLOBAL): New macro.
11087         (PUSH_LOCAL): Likewise.
11088         (PUSH_USING): Likewise.
11089         (namespace_bindings_p): Declare.
11090         (push_overloaded_decl): Likewise.
11091         * decl.c (push_overloaded_decl): Don't make it static.  Check for
11092         illegal declarations after using declarations here.
11093         (namespace_bindings_p): Likewise.
11094         (duplicate_decls): Don't consider declarations from different
11095         namespaces to be the same.
11096         (pushdecl): Use symbolic PUSH_ constants in calls to
11097         push_overloaded_decl.
11098         (push_overloaded_decl_1): Likewise.
11099         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
11100         (do_nonmember_using_decl): Check for illegal using declarations
11101         after ordinary declarations here.
11102         (do_local_using_decl): Call pushdecl to insert declarations.
11103
11104 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
11105
11106         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
11107
11108 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
11109
11110         * tree.c (build_cplus_array_type_1): Don't call build_array_type
11111         for types involving template parameters.
11112
11113         * cp-tree.h (PARM_DECL_EXPR): Delete.
11114         (convert_default_arg): Change prototype.
11115         (check_default_argument): Declare.
11116         (search_tree): Likewise.
11117         * call.c (convert_default_arg): Take the function to which the
11118         default argument belongs as a parameter, and do any necessary
11119         instantiation here, instead of ...
11120         (build_over_call): Here.
11121         * decl.c (local_variable_p): New function.
11122         (check_default_argument): Likewise, split out and tidied from ...
11123         (grokparms): Here.
11124         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
11125         * pt.c (tsubst_call_declarator_parms): New function.
11126         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
11127         with CALL_EXPRs, rather than trying to be clever.
11128         (tsubst): Use tsubst_call_declarator_parms.
11129         * tree.c (search_tree): Don't make it static.
11130         * typeck.c (convert_arguments): Use new interface to
11131         convert_default_arg.
11132
11133 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
11134
11135         * error.c (dump_function_decl): Don't print the argument types for
11136         a function when the verbosity level is negative.
11137
11138         * call.c (build_over_call): Check format attributes at call-time.
11139
11140         * pt.c (tsubst_copy): Fix comment.
11141         (unify): Don't allow unification with variable-sized arrays.
11142
11143         * semantics.c (finish_stmt_expr): When processing a template make
11144         the BIND_EXPR long-lived.
11145
11146 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
11147
11148         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
11149         (import_export_vtable): Not here.
11150
11151 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
11152
11153         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
11154         non-static member function.
11155
11156 1999-01-18  Nathan Sidwell  <nathan@acm.org>
11157
11158         * class.c (instantiate_type): Only diagnose illegal address of member
11159         function if complaining.
11160
11161         * decl.c (lookup_name_real): Remove duplicate code.
11162
11163 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
11164
11165         * tree.c (copy_template_template_parm): Use permanent_obstack.
11166
11167 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11168
11169         * pt.c (unify): Remove restrictions on deduction of argument
11170         of template template parameters.
11171
11172 1999-01-18  Nathan Sidwell  <nathan@acm.org>
11173
11174         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
11175
11176         * class.c (resolve_address_of_overloaded_function): Show list of
11177         all candidates, when none of them match.
11178
11179 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
11180
11181         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
11182         definition of 'casting away const' in reinterpret_cast<>.
11183
11184 1999-01-18  Graham  <grahams@rcp.co.uk>
11185
11186         * cvt.c: Add include for decl.h, remove extern for
11187         static_aggregates which is now provided by decl.h.
11188
11189         * Makefile.in (cvt.o): Add dependency for decl.h and missing
11190         dependencies for convert.h and flags.h.
11191
11192 1999-01-18  Nathan Sidwell  <nathan@acm.org>
11193
11194         * decl2.c (do_dtors): Set current location to that of the
11195         decl, for sensible diagnostics and debugging.
11196         (check_classfn): Issue `incomplete type' error, if
11197         class is not defined.
11198
11199 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
11200
11201         * cp-tree.h: Add prototype for bound_pmf_p.
11202
11203 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
11204             Manfred Hollstein <manfred@s-direktnet.de>
11205
11206         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
11207         -Wreturn-type.
11208
11209 1999-01-16  Nathan Sidwell  <nathan@acm.org>
11210
11211         * cp-tree.h (struct lang_type): Added has_mutable flag.
11212         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
11213         (TYPE_HAS_MUTABLE_P): New macro to read it.
11214         (cp_has_mutable_p): Prototype for new function.
11215         * class.c (finish_struct_1): Set has_mutable from members.
11216         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
11217         it contains a mutable.
11218         * typeck.c (cp_has_mutable_p): New function.
11219
11220 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
11221
11222         * pt.c (process_template_parm): Ignore top-level qualifiers on
11223         non-type parameters.
11224
11225         * decl.c (start_function): Use current_function_parms in the call
11226         to require_complete_type_for_parms, not the probably empty
11227         DECL_ARGUMENTS.
11228
11229 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
11230
11231         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
11232
11233         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
11234         that we don't suppress the other copies.
11235         * lex.c (handle_cp_pragma): Likewise.
11236
11237 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
11238
11239         * decl.c (grokdeclarator): Undo 1998-12-14 change.
11240         * tree.c (build_cplus_array_type_1): Likewise.
11241         * pt.c (instantiate_class_template): Remove misleading comment.
11242         (tsubst_aggr_type): Substitute if there are template parameters,
11243         regardless of whether or not they use template arguments.
11244         (unify): Likewise, but for unification.
11245
11246 1999-01-12  Richard Henderson  <rth@cygnus.com>
11247
11248         * cp-tree.h (flag_permissive): Declare extern.
11249
11250 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
11251
11252         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
11253         here.
11254         (lang_type): Add is_partial_instantiation.  Decrease width of
11255         dummy.
11256         (PARTIAL_INSTANTIATION_P): New macro.
11257         (OPERATOR_TYPENAME_P): Remove.
11258         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
11259         OPERATOR_TYPENAME_P.
11260         (grok_op_properties): Likewise.
11261         * friend.c (do_friend): Handle friends that are member functions
11262         correctly.
11263         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
11264         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
11265         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
11266         any more partial instantiation than is absolutely necessary for
11267         implicit typename.  Set PARTIAL_INSTANTIATION_P.
11268         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
11269         * semantics.c (begin_class_definition): Handle partial
11270         specializations of a type that was previously partially
11271         instantiated.
11272
11273 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
11274
11275         * g++spec.c (LIBSTDCXX): Provide default definition.
11276         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
11277
11278 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11279
11280         * Make-lang.in (g++.o): Depend on prefix.h.
11281
11282 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
11283
11284         * tree.c (bound_pmf_p): New fn.
11285         * typeck.c (build_c_cast): Use it.
11286
11287         * decl.c (grok_op_properties): Use same_type_p.
11288
11289 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11290
11291         * Makefile.in (cvt.o): Depend on toplev.h.
11292
11293         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
11294
11295         * cvt.c: Include toplev.h.
11296
11297         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
11298         definitions.
11299
11300         * init.c (expand_vec_init): Initialize variable `itype'.
11301
11302         * lex.c (yyerror): Cast the argument passed to a ctype function to
11303         an unsigned char.
11304
11305         * method.c (build_mangled_C9x_name): Wrap prototype and definition
11306         in "HOST_BITS_PER_WIDE_INT >= 64".
11307
11308         * typeck.c (build_binary_op): Mark parameter `convert_p' with
11309         ATTRIBUTE_UNUSED.
11310
11311 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
11312
11313         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
11314         * tree.c (build_exception_variant): Don't crash on empty throw
11315         specs.
11316
11317 1998-12-18  DJ Delorie  <dj@cygnus.com>
11318
11319         * cvt.c (convert_to_reference): Check for both error_mark_node
11320         and NULL_NODE after call to convert_for_initialization.
11321
11322 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
11323
11324         * error.c (interesting_scope_p): New fn.
11325         (dump_simple_decl): Use it.
11326         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
11327         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
11328
11329 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
11330
11331         * class.c (resolve_address_of_overloaded_function): Do conversion
11332         to correct type here, rather than ...
11333         (instantiate_type): Here.
11334
11335         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
11336         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
11337         (decl_template_parm_p): Remove.
11338         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
11339         parameter.
11340         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
11341         * pt.c (push_inline_template_parms_recursive): Set it.
11342         (decl_template_parm_p): Remove.
11343         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
11344         (process_template_parm): Set it.
11345
11346 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
11347
11348         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
11349         if configured with cpplib.
11350
11351 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
11352
11353         * decl.c (poplevel): Make sure ns_binding is initialized.
11354
11355         * decl.c (finish_function): Undo inadvertent change in previous
11356         patch.
11357
11358 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
11359
11360         * class.c (pushclass): Tweak handling of class-level bindings.
11361         (resolve_address_of_overloaded_function): Update pointer-to-member
11362         handling.
11363         (instantiate_type): Likewise.
11364         * cvt.c (cp_convert_to_pointer): Likewise.
11365         * decl.c (pop_binding): Take the DECL to pop, not just the name.
11366         Deal with `struct stat' hack.
11367         (binding_level): Add to documentation.
11368         (push_binding): Clear BINDING_TYPE.
11369         (add_binding): New function.
11370         (push_local_binding): Use it.
11371         (push_class_binding): Likewise.
11372         (poplevel): Adjust calls to pop_binding.
11373         (poplevel_class): Likewise.
11374         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
11375         declarations to current binding level.
11376         (push_class_level_binding): Likewise.
11377         (push_overloaded_decl): Adjust handling of OVERLOADs in local
11378         bindings.
11379         (lookup_namespace_name): Don't crash when confronted with a
11380         TEMPLATE_DECL.
11381         (lookup_name_real): Do `struct stat' hack in local binding
11382         contexts.
11383         (build_ptrmemfunc_type): Adjust documentation.
11384         (grokdeclarator): Don't avoid building real array types when
11385         processing templates unless really necessary.
11386         (finish_method): Adjust calls to pop_binding.
11387         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
11388         not reparse_decl_as_expr.
11389         (build_expr_from_tree): Deal with a template-id as the function to
11390         call in a METHOD_CALL_EXPR.
11391         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
11392         (maybe_adjust_types_For_deduction): Don't do peculiar things with
11393         METHOD_TYPEs here.
11394         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
11395         pointer-to-member types where necessary.
11396         * tree.c (build_cplus_array_type_1): Don't avoid building real
11397         array types when processing templates unless really necessary.
11398         (build_exception_variant): Compare the exception lists correctly.
11399
11400 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
11401
11402         * cp-tree.def (CPLUS_BINDING): Update documentation.
11403         * cp-tree.h (LOCAL_BINDING_P): New macro.
11404         (lang_identifier): Rename local_value to bindings.
11405         (tree_binding): Make `scope' of type `void*', not `tree'.
11406         (BINDING_SCOPE): Update documentation.
11407         (IDENTIFIER_LOCAL_VALUE): Remove.
11408         (IDENTIFIER_CLASS_VALUE): Document.
11409         (IDENTIFIER_BINDING): New macro.
11410         (IDENTIFIER_VALUE): Likewise.
11411         (TIME_IDENTIFIER_TIME): Likewise.
11412         (TIME_IDENTIFIER_FILEINFO): Likewise.
11413         (IMPLICIT_TYPENAME_P): Likewise.
11414         (set_identifier_local_value): Remove.
11415         (push_local_binding): New function.
11416         (push_class_binding): Likewise.
11417         * class.c (pushclass): Update comments; use push_class_binding.
11418         * decl.c (set_identifier_local_value_with_scope): Remove.
11419         (set_identifier_local_value): Likewise.
11420         (push_binding): New function.
11421         (pop_binding): Likewise.
11422         (binding_level): Update documentation.  Remove shadowed.
11423         (BINDING_LEVEL): New macro.
11424         (free_binding_nodes): New variable.
11425         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
11426         BLOCK_VARs when doing for-scope extension.  Remove effectively
11427         dead code.
11428         (pushlevel_class): Tweak formatting.
11429         (poplevel_class): Adjust for new name-lookup scheme.
11430         (print_binding_level): Likewise.
11431         (store_bindings): Likewise.
11432         (pushdecl): Likewise.
11433         (pushdecl_class_level): Likewise.
11434         (push_class_level_binding): Likewise.
11435         (push_overloaded_decl): Update comments.  Adjust for new
11436         name-lookup scheme.
11437         (lookup_name_real): Likewise.
11438         (lookup_name_current_level): Likewise.
11439         (cp_finish_decl): Likewise.
11440         (require_complete_types_for_parms): Likewise.  Remove misleading
11441         #if 0'd code.
11442         (grok_parms): Likewise.  Don't call
11443         require_complete_types_for_parms here.
11444         (grok_ctor_properties): Don't treat templates as copy
11445         constructors.
11446         (grop_op_properties): Or as assignment operators.
11447         (start_function): Document.  Adjust for new name-lookup scheme.
11448         (finish_function): Likewise.
11449         * decl2.c (do_local_using_decl): Use push_local_binding.
11450         * lex.c (begin_definition_of_inclass_inline): New function, split
11451         out from ...
11452         (do_pending_inlines): Here, and ...
11453         (process_next_inline): Here.
11454         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
11455         (init_filename_times): Likewise.
11456         (extract_interface_info): Likewise.
11457         (ste_typedecl_interface_info): Likewise.
11458         (check_newline): Likewise.
11459         (dump_time_statistics): Likewise.
11460         (handle_cp_pragma): Likewise.
11461         (do_identifier): Adjust for new name-lookup scheme.
11462         * parse.y (function_try_block): Return ctor_initializer_opt value.
11463         (fndef): Use it.
11464         (fn.defpen): Pass appropriate values to start_function.
11465         (pending_inline): Use functor_try_block value, and pass
11466         appropriate values to finish_function.
11467         * pt.c (is_member_template): Update documentation; remove handling
11468         of FUNCTION_DECLs.  As per name, this function should deal only in
11469         TEMPLATE_DECLs.
11470         (decl_template_parm_p): Change name of olddecl parameter to decl.
11471         (check_template_shadow): Adjust for new name-lookup scheme.
11472         (lookup_template_class): Likewise.
11473         (tsubst_decl): Tweak so as not to confuse member templates with
11474         copy constructors and assignment operators.
11475         (unify): Handle UNION_TYPEs.
11476         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
11477         (lang_print_xnode): Adjust for new name-lookup scheme.
11478         * typeck.c (mark_addressable): Likewise.
11479         (c_expand_return): Likewise.
11480
11481 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
11482
11483         * decl.c (grokdeclarator): Allow field with same name as class
11484         in extern "C".
11485
11486         * decl.c (lookup_name_real): Don't limit field lookup to types.
11487         * class.c (check_member_decl_is_same_in_complete_scope): No error
11488         if icv and x are the same.
11489         * lex.c (do_identifier): Tweak error message.
11490
11491 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
11492
11493         * decl.c (start_enum): Use push_obstacks, not
11494         end_temporary_allocation.
11495         (finish_enum): Call pop_obstacks.
11496
11497 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
11498
11499         * class.c (instantiate_type): Return error_mark_node rather than
11500         junk.
11501
11502 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
11503
11504         * cp-tree.h (most_specialized_instantiation): New function.
11505         (print_candidates): Likewise.
11506         * class.c (validate_lhs): Remove.
11507         (resolve_address_of_overloaded_function): New function, split out
11508         and then substantially reworked, from ...
11509         (instantiate_type): Use it.  Simplify.
11510         * cvt.c (convert_to_reference): Complain when caller has indicated
11511         that's the right thing to do.  Don't crash if instantiate_type
11512         fails.
11513         * pt.c: Substitute `parameters' for `paramters' throughout.
11514         (print_candidates): Don't make it static.
11515         (most_specialized_instantiation): Split out from ...
11516         (most_specialized): Here.
11517
11518 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
11519
11520         * lex.c (lang_init_options): Initialize cpplib.
11521         * decl2.c (parse_options,cpp_initialized): Removed.
11522         (lang_decode_option): Move initialization of cpplib to
11523         lang_init_options.
11524
11525 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
11526
11527         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
11528         well as the TYPE_DECL, when a typedef name is assigned to a
11529         previously anonymous type.
11530
11531 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
11532
11533         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
11534         __cp_eh_info for getting the eh info pointer.  Add table_index to
11535         field list.
11536         (push_eh_cleanup): Don't increment 'handlers' data field.
11537         (process_start_catch_block): Don't set the 'caught' field.
11538
11539         * cp/exception.cc (CP_EH_INFO): New macro for getting the
11540         exception info pointer within library routines.
11541         (__cp_eh_info): Use CP_EH_INFO.
11542         (__start_cp_handler): Get exception info pointer, set caught field,
11543         and increment the handlers field.  Avoids this being done by handlers.
11544         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
11545         (uncaught_exception): Use CP_EH_INFO macro.
11546
11547 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
11548
11549         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
11550
11551 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
11552
11553         * lex.c (check_newline): Add support for \ as `natural'
11554         characters in file names in #line to be consistent with #include
11555         handling.  We support escape processing in the # 1 "..." version of
11556         the command.  See also support in cp/lex.c.
11557
11558 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
11559
11560         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
11561         structure.
11562
11563 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
11564
11565         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
11566
11567         * error.c (dump_simple_decl): Also print namespace context.
11568         (dump_function_decl): Likewise.
11569
11570         * decl2.c (ambiguous_decl): Don't print old value if it's
11571         error_mark_node.
11572
11573         * decl.c (lookup_name_real): Fix handling of local types shadowed
11574         by a non-type decl.  Remove obsolete code.
11575         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
11576
11577         * lang-options.h: Add -fpermissive.
11578         * decl2.c: Likewise.
11579         * cp-tree.h: Add flag_permissive.
11580         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
11581         were specified, set flag_pedantic_errors.
11582         * call.c (build_over_call): Turn dropped qualifier messages
11583         back into pedwarns.
11584         * cvt.c (convert_to_reference): Likewise.
11585         * typeck.c (convert_for_assignment): Likewise.
11586
11587 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
11588
11589         * decl2.c (coerce_new_type): Use same_type_p.
11590         (coerce_delete_type): Likewise.
11591
11592         * call.c (check_dtor_name): Return 1, not error_mark_node.
11593
11594 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
11595
11596         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
11597         if MULTIPLE_SYMBOL_SPACES.
11598
11599         * pt.c (check_template_shadow): New fn.
11600         * decl2.c (grokfield): Use it.
11601         * decl.c (pushdecl): Likewise.
11602         (pushdecl_class_level): Likewise.
11603         (start_method): Likewise.
11604         (xref_tag): Don't try to use 't' if we're defining.
11605
11606         * call.c (check_dtor_name): Just return an error_mark_node.
11607         * pt.c (lookup_template_class): Complain about using non-template here.
11608         * parse.y (apparent_template_type): Not here.
11609
11610         * pt.c (check_explicit_specialization): Complain about specialization
11611         with C linkage.
11612
11613         * lang-options.h: Add -f{no-,}implicit-inline-templates.
11614
11615         * pt.c (convert_nontype_argument): Don't assume that any integer
11616         argument is intended to be a constant-expression.
11617
11618 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
11619
11620         * class.c (handle_using_decl): Fix comment.  Don't lookup
11621         constructors in base classes.
11622         (validate_lhs): Fix typo in comment.
11623         * search.c (lookup_field_1): Don't return a USING_DECL.
11624
11625         * cp-tree.h (DECL_ACCESS): Improve documentation.
11626
11627         * decl.c (expand_static_init): Don't set the initialization-done
11628         flag until the initialization is done.
11629
11630 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
11631
11632         * decl2.c (validate_nonmember_using_decl): Complain about using
11633         declarations for class members.
11634
11635 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
11636
11637         * typeck2.c (process_init_constructor): Use same_type_p.
11638
11639         * decl.c (check_tag_decl): Don't warn about null decl inside a
11640         class.
11641
11642         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
11643         UNIFY_ALLOW_NONE.
11644         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
11645         (resolve_overloaded_unification): Strip baselinks.
11646
11647 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11648
11649         * g++spec.c: Don't prototype xmalloc.
11650
11651 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
11652
11653         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
11654
11655         * decl.c (check_tag_decl): Do complain about null friend decl at
11656         file scope.
11657
11658 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
11659
11660         * lex.c (make_lang_type): Clear the whole struct lang_type, not
11661         only the first multiple of sizeof (int).
11662
11663 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
11664
11665         * decl.c (start_decl): An explicit specialization of a static data
11666         member is only a definition if it has an initializer.
11667
11668         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
11669         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
11670         cp_finish_decl.
11671         * init.c (expand_default_init): Check for DIRECT_BIND instead of
11672         DECL_ARTIFICIAL.
11673
11674         * call.c (build_over_call): Use build_decl.
11675
11676         * except.c (expand_throw): Just use convert, not
11677         build_reinterpret_cast.
11678
11679         * lex.c (handle_generic_pragma): Use token_buffer.
11680
11681         * decl.c (check_tag_decl): Don't complain about null friend decl.
11682
11683 1998-11-24  Dave Pitts  <dpitts@cozx.com>
11684
11685         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
11686         first position.
11687         * lex.c (check_newline): Use ISALPHA.
11688         (readescape): Use ISGRAPH.
11689         (yyerror): Use ISGRAPH.
11690
11691 1998-11-24  Nathan Sidwell  <nathan@acm.org>
11692
11693         * search.c (get_abstract_virtuals): Do not use initial
11694         CLASSTYPE_ABSTRACT_VIRTUALS.
11695         * typeck2.c (abstract_virtuals_error): Show location of abstract
11696         declaration.
11697         * call.c (build_new_method_call): Use
11698         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
11699         * class.c (finish_struct_bits): Don't bother working out whether
11700         get_abstract_virtuals will do anything, just do it.
11701
11702 1998-11-24  Graham  <grahams@rcp.co.uk>
11703
11704         * typeck.c (build_component_ref): Remove unused statement.
11705
11706 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
11707
11708         * class.c (add_method): Catch invalid overloads.
11709
11710         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
11711         * search.c (lookup_conversions): Handle getting real OVERLOADs.
11712         (add_conversions): Likewise.  Revert last change.
11713         * call.c (add_conv_candidate): Pass totype to add_candidate instead
11714         of fn.  Don't add a new candidate if the last one was for the same
11715         type.
11716         (print_z_candidates): Handle getting a type as a function.
11717         (joust): If we got two conversion candidates to the same type,
11718         just pick one.
11719         (build_object_call): Lose 'templates'.
11720         (build_user_type_conversion_1): Handle getting real OVERLOADs.
11721
11722 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
11723
11724         * typeck2.c (process_init_constructor): If there are elements
11725         that don't have initializers and they need to have constructors
11726         run, supply them with initializers.
11727
11728         * class.c (finish_struct_1): A class with a 0-width bitfield is
11729         still empty.
11730
11731 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
11732
11733         * pt.c (instantiate_class_template): Don't try to figure out what
11734         specialization to use for a partial instantiation.  Correct
11735         typos in a couple of comments.  Avoid calling uses_template_parms
11736         multiple times.
11737
11738 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
11739
11740         * method.c (process_overload_item): Add call to
11741         build_mangled_C9x_name for intTI_type_nodes.
11742         (build_mangled_C9x_name): Add prototype, define.
11743         * decl.c (init_decl_processing): Add names for
11744         TImode_type_node.
11745
11746 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
11747
11748         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
11749
11750         * class.c (finish_struct_1): Set things up for 0-width bitfields
11751         like we do for others.
11752
11753         * decl.c (check_tag_decl): New fn.
11754         (shadow_tag): Split out from here.
11755         * decl2.c (grok_x_components): Call it.
11756
11757 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
11758
11759         * decl.c: Lose warn_about_return_type.
11760         (grokdeclarator): Always complain about implicit int, except for
11761         `main () { ... }'.
11762
11763         * decl.c (tag_name): New fn.
11764         (xref_tag): Complain about using typedef-name after class-key.
11765
11766         * init.c (expand_vec_init): Also keep going if from_array.
11767
11768         * tree.c (is_overloaded_fn): Also handle the output of
11769         build_offset_ref.
11770
11771         * decl.c (grokdeclarator): Use constructor_name when comparing
11772         field name against enclosing class.
11773         * class.c (finish_struct_anon): Likewise.
11774
11775 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
11776
11777         * decl.c (poplevel): Remove code to handle KEEP == 2.
11778         (finish_function): Don't confuse BLOCK-order when
11779         processing a destructor.
11780
11781 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
11782
11783         * decl.c (require_complete_types_for_parms): Call layout_decl
11784         after we've completed the type.
11785
11786 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11787
11788         * decl2.c (validate_nonmember_using_decl): Allow using templates
11789         from the global namespace.
11790
11791 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
11792
11793         Handle specifying template args to member function templates.
11794         * tree.c (build_overload): Always create an OVERLOAD for a template.
11795         * search.c (add_conversions): Handle finding an OVERLOAD.
11796         * decl2.c (check_classfn): Likewise.
11797         * lex.c (identifier_type): See through a baselink.
11798         * parse.y (do_id): Don't call do_identifier if we got a baselink.
11799         * class.c (instantiate_type, case TREE_LIST): Recurse.
11800
11801         * decl.c (grokdeclarator): Allow a boolean constant for array
11802         bounds, odd as that sounds.
11803
11804         * pt.c (unify): Be more strict about non-type parms, except for
11805         array bounds.
11806         (UNIFY_ALLOW_INTEGER): New macro.
11807
11808 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
11809
11810         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
11811
11812 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
11813
11814         * semantics.c (begin_class_definition): Call
11815         maybe_process_partial_specialization before push_template_decl.
11816         Don't call push_template_decl for a specialization.
11817         * search.c (lookup_field): Do return a member template class.
11818         * decl2.c (handle_class_head): Handle member template classes.
11819
11820         * decl.c (grokdeclarator): A parm type need not be complete.
11821
11822         * pt.c (convert_nontype_argument): Fix thinko.
11823
11824 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
11825
11826         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
11827         (global_delete_fndecl): New variable.
11828         * decl.c (global_delete_fndecl): Define it.
11829         (init_decl_processing): Set it.
11830         * init.c (build_builtin_delete_call): Use it.
11831         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
11832         nodes.
11833
11834 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
11835
11836         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
11837         type.
11838
11839         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
11840         * call.c (build_object_call): Also support references to functions.
11841         * typeck.c (convert_for_initialization): Don't decay a function
11842         if the target is a reference to function.
11843
11844         * search.c (add_conversions): Get all the overloads from a class.
11845
11846         * decl.c (grok_ctor_properties): Complain about any constructor
11847         that will take a single arg of the class type by value.
11848
11849         * typeck2.c (build_functional_cast): Can't create objects of
11850         abstract classes this way.
11851         * cvt.c (ocp_convert): Likewise.
11852
11853         * decl.c (grokfndecl): Member functions of local classes are not
11854         public.
11855
11856 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
11857
11858         * Make-lang.in (cc1plus): Add dependency on hash.o.
11859
11860 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
11861
11862         * search.c (get_abstract_virtuals): Complain about virtuals with
11863         no final overrider.
11864         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
11865         with no final overrider.
11866         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
11867         on virtuals with no final overrider.
11868
11869         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
11870
11871         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
11872         after layout_type.
11873
11874         * friend.c (do_friend): Don't set_mangled_name_for_decl.
11875
11876         * class.c (finish_struct_anon): Complain about non-fields.
11877         * decl2.c (build_anon_union_vars): Likewise.
11878
11879         * decl.c (grokdeclarator): Normal data members can't have the same
11880         name as the class, either.
11881         * class.c (finish_struct_anon): Neither can members of an
11882         anonymous union.
11883
11884 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
11885
11886         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
11887         (TYPE_BINFO): Likewise.
11888         (IS_AGGR_TYPE): Tweak.
11889         (SET_IS_AGGR_TYPE): New macro.
11890         (CLASS_TYPE_P): Tweak.
11891         (lang_type): Group mark bitfields together.  Remove linenum.
11892         (CLASSTYPE_SOURCE_LINE): Remove macro.
11893         (CLASSTYPE_MARKED_N): New macro.
11894         (SET_CLASSTYPE_MARKED_N): Likewise.
11895         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
11896         (CLASS_TYPE_MARKED_*): Use them.
11897         (SET_CLASSTYPE_MARKED_*): Likewise.
11898         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
11899         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11900         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
11901         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
11902         * class.c (class_cache_obstack): New variable.
11903         (class_cache_firstobj): Likewise.
11904         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
11905         (pushclass): Free the cache, when appropriate.
11906         (popclass): Tidy.
11907         (maybe_push_cache_obstack): Use class_cache_obstack.
11908         * decl.c (include hash.h).
11909         (typename_hash): New function.
11910         (typename_compare): Likewise.
11911         (build_typename_type): Check the hash table to avoid creating
11912         duplicates.
11913         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
11914         (grokdeclarator): Use CLASS_TYPE_P.
11915         (xref_basetypes): Likewise.
11916         (start_function): Likewise.  Don't put current_class_ref on the
11917         permanent obstack.
11918         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
11919         and TYPE_TI_ARGS.
11920         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
11921         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
11922         fields for types other than class types.  Do clear TYPE_ALIAS_SET
11923         for types other than class types, though.
11924         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
11925         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11926         * pt.c (process_template_parm): Don't set
11927         CLASSTYPE_GOT_SEMICOLON.
11928         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11929         Coerce arguments on the momentary obstack.
11930         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11931         (instantiate_class_template): Calculate template arguments on the
11932         momentary obstack.  Tidy.
11933         (tsubst_template_arg_vector): Use make_temp_vec.
11934         (tsubst_aggr_type): Put template arguments on the momentary
11935         obstack.
11936         (tsubst_decl): Likewise.
11937         (tsubst): Copy the array bounds index to the permanent obstack
11938         before building index types.  Use new macros.
11939         (unify): Use new macros.
11940         (do_type_instantiation): Likewise.
11941         * search.c (lookup_fnfields_1): Use new macros.
11942         (dfs_pushdecls): Build envelopes on the cache obstack.
11943         (dfs_compress_decls): Use new macros.
11944         (push_class_decls): Build on the cache obstack.
11945         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
11946         * sign.c (build_signature_pointer_or_reference_type): Use
11947         SET_IS_AGGR_TYPE.
11948         * tree.c (make_binfo): Check CLASS_TYPE_P.
11949         (copy_template_template_parm): Adjust.
11950         (make_temp_vec): Use push_expression_obstack.
11951         * typeck.c (complete_type): Use new macros.
11952         (comptypes): Likewise.
11953
11954 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
11955
11956         * pt.c (tsubst): Add diagnostics for invalid array, reference
11957         and pointer to member types.
11958
11959 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
11960
11961         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
11962
11963         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
11964         Simplify.
11965
11966         * parse.y (structsp): Fix cut-and-paste error.
11967
11968         * init.c (build_new): Complain about non-integral size.
11969
11970         * parse.y (unary_expr): Complain about defining types in sizeof.
11971
11972         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
11973
11974         * rtti.c (build_x_typeid): Complain about typeid without
11975         including <typeinfo>.
11976         (get_typeid): Likewise.  Complain about typeid of incomplete type.
11977         (get_tinfo_fn_dynamic): Likewise.
11978         (get_typeid_1): Not static anymore.
11979         * except.c (build_eh_type_type): Use get_typeid_1.
11980
11981         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
11982         ambiguous or private bases.  Fix warning for reference cast.
11983
11984 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
11985
11986         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
11987         * decl.c (duplicate_decls): Remove special-case code to deal with
11988         template friends, and just do the obvious thing.
11989         * pt.c (register_specialization): Tweak for clarity, and also to
11990         clear DECL_INITIAL for an instantiation before it is merged with a
11991         specialization.
11992         (check_explicit_specialization): Fix indentation.
11993         (tsubst_friend_function): Handle both definitions in friend
11994         declaration and outside friend declarations.
11995         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
11996         (regenerate_decl_from_template): Tweak accordingly.
11997         (instantiate_decl): Likewise.
11998
11999 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
12000
12001         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
12002         member function reference to error.
12003         * cvt.c (ocp_convert): Complain about converting an overloaded
12004         function to void.
12005
12006         * init.c (build_offset_ref): Just return a lone static member
12007         function.
12008
12009         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
12010         not internal ones.
12011
12012         * typeck.c (build_binary_op_nodefault): Improve error handling.
12013
12014         * decl.c (grokfndecl): Complain about making 'main' a template.
12015
12016         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
12017
12018         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
12019         TYPE_DECL in a template.
12020
12021 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
12022
12023         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
12024
12025         * decl.c (struct cp_function): Add named_label_uses.
12026         (push_cp_function_context): Save it.
12027         (pop_cp_function_context): Restore it.
12028         (define_label): Also complain about jumping into the scope of
12029         non-POD objects that don't have constructors.
12030         * tree.c (pod_type_p): New fn.
12031
12032         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
12033         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
12034         (get_tinfo_fn): Not here.
12035         * repo.c (repo_get_id): Abort if we get called for an incomplete
12036         type.
12037
12038 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
12039
12040         * except.c (expand_throw): Make sure first argument to
12041         __cp_push_exception is of type `void*' to avoid spurious error
12042         messages.
12043
12044 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
12045
12046         * pt.c (try_one_overload): Take orig_targs again.  Only check for
12047         mismatches against them; we don't care what a previous call found.
12048         (resolve_overloaded_unification): Adjust.
12049
12050         * search.c (lookup_field): Don't return anything for a non-type
12051         field from a dependent type.
12052         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
12053         in an array declarator.
12054         (start_decl): Push into the class before looking for the field.
12055
12056 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
12057
12058         * method.c (build_overload_value): Handle REFERENCE_TYPE.
12059
12060 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12061
12062         * decl.c (grokdeclarator): Allow namespace-scoped members if they
12063         are friends.
12064
12065 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
12066
12067         * pt.c (tsubst_decl): Don't mess with the global value of an
12068         un-mangled DECL_ASSEMBLER_NAME.
12069
12070 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
12071
12072         * decl.c (init_decl_processing): Remove CYGWIN conditional
12073         since CYGWIN is now able to deal with trapping signals.
12074
12075 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12076
12077         * cp-tree.h: Don't include gansidecl.h.
12078         * exception.cc: Include gansidecl.h (since we don't include config.h)
12079         * g++spec.c: Don't include gansidecl.h.
12080
12081 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
12082
12083         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
12084         size of dummy.
12085         (DECL_DEFINED_IN_CLASS_P): New macro.
12086         (TEMPLATE_PARMS_FOR_INLINE): Document.
12087         (check_static_variable_definition): New function.
12088         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
12089         appropriate.
12090         (check_static_variable_definition): Split out from ...
12091         (grokdeclarator): Here.
12092         * pt.c (check_default_tmpl_args): New function, split out from ...
12093         (push_template_decl_real): Here.
12094         (instantiate_template): Fix comment.
12095
12096 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
12097
12098         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
12099         (CP_TYPE_VOLATILE_P): Likewise.
12100         (CP_TYPE_RESTRICT_P): Likewise.
12101
12102 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
12103
12104         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
12105
12106 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
12107
12108         * class.c (instantiate_type): Be more helpful.
12109
12110         * decl2.c (import_export_decl): Call import_export_class.
12111
12112         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
12113         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
12114         * pt.c (tsubst_copy): Likewise.
12115
12116 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
12117
12118         * init.c (expand_vec_init): Fix off-by-one error.
12119
12120 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
12121
12122         * parse.y (apparent_template_type): New type.
12123         (named_complex_class_head_sans_basetype): Use it.
12124         * Makefile.in (CONFLICTS): One new conflict.
12125         * parse.c: Regenerated.
12126
12127 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
12128
12129         * cp-tree.h (COMPARE_STRICT): New macro.
12130         (COMPARE_BASE): Likewise.
12131         (COMPARE_RELAXED): Likewise.
12132         (COMPARE_REDECLARATION): Likewise.
12133         (same_type_p): Likewise.
12134         (same_or_base_type_p): Likewise.
12135         * call.c (standard_conversion): Use them, in place of comptypes
12136         with numeric arguments.
12137         (reference_binding): Likewise.
12138         (convert_like): Likewise.
12139         (build_over_call): Likewise.
12140         (is_subseq): Likewise.
12141         (is_properly_derived_from): Likewise.
12142         (compare_ics): Likewise.
12143         (joust): Likewise.
12144         * class.c (delete_duplicate_fields_1): Likewise.
12145         (resolves_to_fixed_type_p): Likewise.
12146         (instantiate_type): Likewise.  Remove #if 0'd code.
12147         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
12148         (pushdecl): Likewise.
12149         (lookup_name_real): Likewise.
12150         (grokdeclarator): Likewise.  Check for illegal array declarations.
12151         (grokparms): Likewise.
12152         (grok_op_properties): Likewise.
12153         * decl2.c (check_classfn): Likewise.
12154         * friend.c (is_friend): Likewise.
12155         (make_friend_class): Likewise.
12156         * init.c (expand_aggr_init): Likewise.
12157         (expand_vec_init): Likewise.
12158         * pt.c (is_member_template_class): Remove declaration.
12159         (is_specialization_of): Use COMPARE_* and new macros.
12160         (comp_template_parms): Likewise.
12161         (convert_nontype_argument): Likewise.
12162         (coerce_template_template_parms): Likewise.
12163         (template_args_equal): Likewise.
12164         (lookup_template_class): Likewise.
12165         (type_unification_real): Likewise.
12166         (unify): Likewise.
12167         (get_bindings_real): Likewise.
12168         * search.c (covariant_return_p): Likewise.
12169         (get_matching_virtual): Likewise.
12170         * sig.c (match_method_types): Likewise.
12171         * tree.c (vec_binfo_member): Likewise.
12172         (cp_tree_equal): Likewise.
12173         * typeck.c (common_type): Likewise.
12174         (comp_array_types): Likewise.  Get issues involving unknown array
12175         bounds right.
12176         (comptypes): Update comments.  Use new flags.
12177         (comp_target_types): Use new macros.
12178         (compparms): Likewise.
12179         (comp_target_parms): Likewise.
12180         (string_conv_p): Likewise.
12181         (build_component_ref): Likewise.
12182         (build_indirect_ref): Likewise.
12183         (build_conditional_expr): Likewise.
12184         (build_static_cast): Likewise.
12185         (build_reinterpret_cast): Likewise.
12186         (build_const_cast): Likewise.
12187         (build_modify_expr): Likewise.
12188         (convert_for_assignment): Likewise.
12189         (comp_ptr_ttypes_real): Likewise.
12190         (ptr_reasonably_similar): Likewise.
12191         (comp_ptr_ttypes_const): Likewise.
12192
12193 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
12194
12195         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
12196
12197 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
12198
12199         * decl2.c (delete_sanity): Pass integer_zero_node, not
12200         integer_two_node, to build_vec_delete.
12201         * init.c (build_array_eh_cleanup): Remove.
12202         (expand_vec_init_try_block): New function.
12203         (expand_vec_init_catch_clause): Likewise.
12204         (build_vec_delete_1): Don't deal with case that auto_delete_vec
12205         might be integer_two_node anymore.
12206         (expand_vec_init): Rework for initialization-correctness and
12207         exception-correctness.
12208         * typeck2.c (process_init_constructor): Make mutual exclusivity
12209         of cases more obvious.
12210
12211 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
12212
12213         * decl.c (lookup_name_real): OK, only warn if not lexing.
12214         Simplify suggested fix.
12215
12216         * cp-tree.h (IDENTIFIER_MARKED): New macro.
12217         * search.c (lookup_conversions): Use breadth_first_search.
12218         (add_conversions): Avoid adding two conversions to the same type.
12219         (breadth_first_search): Work with base binfos, rather
12220         than binfos and base indices.
12221         (get_virtual_destructor): Adjust.
12222         (tree_has_any_destructor_p): Adjust.
12223         (get_matching_virtual): Adjust.
12224
12225         * pt.c (push_template_decl_real): Generalize check for incorrect
12226         number of template parms.
12227         (is_member_template_class): #if 0.
12228
12229 1998-10-29  Richard Henderson  <rth@cygnus.com>
12230
12231         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
12232         last.
12233
12234 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
12235
12236         * lex.c: Call check_newline from lang_init always.  After
12237         calling cpp_start_read, set yy_cur and yy_lim to read from the
12238         cpplib token buffer.
12239
12240 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
12241
12242         * class.c (instantiate_type): Don't consider templates for a normal
12243         match.
12244
12245         * class.c (finish_struct_1): Don't complain about non-copy
12246         assignment ops in union members.
12247
12248         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
12249         (prepare_fresh_vtable): Likewise.
12250         (finish_struct_1): Don't call import_export_class.
12251         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
12252         (finish_prevtable_vardecl): Lose.
12253         (finish_file): Don't call it.
12254         * pt.c (instantiate_class_template): Likewise.
12255         * cp-tree.h: Remove it.
12256
12257         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
12258         * decl.c (finish_function): Not here.
12259         (start_function): Do set DECL_INITIAL.
12260
12261         * pt.c (push_template_decl_real): Complain about default template
12262         args for enclosing classes.
12263
12264         * call.c (add_function_candidate): Treat conversion functions
12265         as coming from the argument's class.
12266         * cp-tree.h (DECL_CONV_FN_P): New fn.
12267         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
12268         * class.c (add_method): Use DECL_CONV_FN_P.
12269         * decl2.c (check_classfn): Likewise.
12270         * error.c (dump_function_name): Likewise.
12271         (dump_function_decl): Likewise.
12272         * pt.c (fn_type_unification): Likewise.
12273         * search.c (add_conversions): Likewise.
12274
12275 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
12276
12277         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
12278         * method.c (hack_identifier): Also check for using RESULT_DECL
12279         from outer context.
12280
12281 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
12282
12283         * decl.c (grokdeclarator): Use type_quals, rather than constp,
12284         consistently.
12285
12286 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
12287
12288         * call.c (standard_conversion): instantiate_type here.
12289         (reference_binding): And here.
12290         (implicit_conversion): Not here.
12291         (build_op_delete_call): No need to cons up an OVERLOAD.
12292         * cvt.c (cp_convert_to_pointer): instantiate_type here.
12293         (convert_to_reference): And here.
12294         * decl.c (grok_reference_init): Not here.
12295         (grokparms): Or here.
12296         * typeck2.c (digest_init): Or here.
12297         * typeck.c (decay_conversion): Take the address of overloaded
12298         functions, too.
12299         (require_instantiated_type): Lose.
12300         (convert_arguments): Don't handle unknown types here.
12301         (build_c_cast): Likewise.
12302         (build_binary_op): Gut.
12303         (build_conditional_expr): Don't require_instantiated_type.
12304         (build_modify_expr): Likewise.
12305         (build_static_cast): Don't instantiate_type.
12306         (build_reinterpret_cast): Likewise.
12307         (build_const_cast): Likewise.
12308         (convert_for_initialization): Likewise.
12309         (build_ptrmemfunc): Use type_unknown_p.
12310         (convert_for_assignment): Also do default_conversion on overloaded
12311         functions.  Hand them off to ocp_convert.
12312
12313 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
12314
12315         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
12316         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
12317
12318         * class.c (finish_struct_1): Use build_cplus_array_type to build
12319         array types.
12320         * decl.c (init_decl_processing): Likewise.
12321         * except.c (expand_end_eh_spec): Likewise.
12322         * search.c (expand_upcast_fixups): Simplify very slightly.
12323
12324 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
12325
12326         * decl.c (grokdeclarator): Complain about a variable using
12327         constructor syntax coming back null from start_decl.
12328
12329         * friend.c (make_friend_class): Complain about trying to make
12330         a non-class type a friend.
12331
12332         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
12333         (start_function): Not here.
12334
12335 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
12336
12337         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
12338
12339 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
12340
12341         * typeck2.c (process_init_constructor): Only skip anonymous fields
12342         if they are bitfields.
12343
12344         * cp-tree.def (TYPEOF_TYPE): New code.
12345         * error.c (dump_type_real): Handle it.
12346         * pt.c (tsubst): Likewise.
12347         * tree.c (search_tree): Likewise.
12348         * semantics.c (finish_typeof): New fn.
12349         * parse.y (typespec): Use it.
12350         * cp-tree.h: Declare it.
12351
12352 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
12353
12354         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
12355
12356 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
12357
12358         * typeck.c (convert_arguments): Don't handle pmf references
12359         specially.
12360
12361         * init.c (build_member_call): Don't try to convert to the base type
12362         if it's ambiguous or pedantic.
12363
12364         * typeck2.c (check_for_new_type): Only depend on pedantic for
12365         C-style casts.
12366
12367 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
12368
12369         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
12370         non-converting constructors.
12371
12372 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12373
12374         * gxxint.texi: Correct documentation for n, N, Q, and B.
12375
12376 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12377
12378         * parse.y (condition): Convert VAR_DECL from reference to indirect
12379         reference.
12380
12381 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
12382
12383         * exception.cc (__cp_pop_exception): Free the original exception
12384         value, not the potentially coerced one.
12385
12386 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
12387
12388         * Makefile.in (hash.h): Run gperf when necessary.
12389
12390         * cp-tree.h (CP_TYPE_READONLY): Remove.
12391         (CP_TYPE_VOLATILE): Likewise.
12392         (CP_TYPE_QUALS): New macro.
12393         (CP_TYPE_CONST_P): Likewise.
12394         (CP_TYPE_VOLATILE_P): Likewise.
12395         (CP_TYPE_RESTRICT_P): Likewise.
12396         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
12397         (cp_build_type_variant): Rename to ...
12398         (cp_build_qualified_type): New function.
12399         (c_apply_type_quals_to_decl): Declare.
12400         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
12401         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
12402         (cp_type_qual_from_rid): New function.
12403         (compparms): Remove unused parameter.  All callers changed.
12404         (cp_type_quals): New function.
12405         (at_least_as_qualified_p): Likewise.
12406         (more_qualified_p): Likewise.
12407
12408         * call.c (standard_conversion): Replace calls to
12409         cp_build_type_variant with cp_build_qualified_type.  Use
12410         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
12411         compare them.  Use CP_TYPE_* macros to check qualifiers.
12412         (reference_binding): Likewise.
12413         (implicit_conversion): Likewise.
12414         (add_builtin_candidates): Likewise.
12415         (build_over_call): Likewise.
12416         * class.c (overrides): Compare all qualifiers, not just `const',
12417         on method declarations.
12418         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
12419         (convert_pointer_to_real): Likewise.
12420         (type_promotes_to): Likewise.
12421         * decl.c (check_for_uninitialized_const_var): New function.
12422         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
12423         (cp_finish_decl): Use check_for_uninitialized_const_var.
12424         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
12425         handle `restrict'.
12426         (grok_ctor_properties): Likewise.
12427         (grok_op_properties): Likewise.
12428         (start_function): Likewise.
12429         (rever_static_member_fn): Likewise.
12430         * decl2.c (grok_method_quals): Likewise.
12431         (grokfield): Likewise.
12432         * error.c (dump_readonly_or_volatile): Rename to ...
12433         (dump_qualifiers): New function.  Handle `restrict'.
12434         (dump_type_real): Use it.
12435         (dump_aggr_type): Likewise.
12436         (dump_type_prefix): Likewise.
12437         (dump_type_suffix): Likewise.
12438         (dump_function_decl): Likewise.
12439         (cv_as_string): Likewise.
12440         * gxx.gperf: Add __restrict and __restrict__.
12441         * gxxint.texi: Document `u' as used for `__restrict', and a few
12442         other previously undocumented codes.
12443         * hash.h: Regenerated.
12444         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
12445         (build_member_call): Likewise.
12446         (build_new_1): Likewise.
12447         * lex.c (init_parse): Add entry for RID_RESTRICT.
12448         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
12449         (cp_type_qual_from_rid): Define.
12450         * lex.h (enum rid): Add RID_RESTRICT.
12451         * method.c (process_modifiers): Deal with `restrict'.
12452         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
12453         * parse.c: Regenerated.
12454         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
12455         (tsubst_aggr_type): Likewise.
12456         (tsubst): Likewise.
12457         (check_cv_quals_for_unify): Likewise.
12458         (unify): Likewise.
12459         * rtti.c (init_rtti_processing): Likewise.
12460         (build_headof): Likewise.
12461         (get_tinfo_var): Likewise.
12462         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
12463         (expand_class_desc): Likewise.
12464         (expand_attr_desc): Likewise.
12465         (synthesize_tinfo_fn): Likewise.
12466         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
12467         (get_matching_virtual): Likewise.
12468         (expand_upcast_fixups): Likewise.
12469         * sig.c (build_signature_pointer_or_reference_name): Take
12470         type_quals, not constp and volatilep.
12471         (build_signature_pointer_or_reference_type): Likewise.
12472         (match_method_types): More CP_TYPE_QUALS conversion, etc.
12473         (build_signature_pointer_constructor): Likewise.
12474         (build_signature_method_call): Likewise.
12475         * tree.c (build_cplus_array_type): Likewise.
12476         (cp_build_type_variant): Rename to ...
12477         (cp_build_qualified_type): New function.  Deal with `__restrict'.
12478         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
12479         (build_exception_variant): Likewise.
12480         (mapcar): Likewise.
12481         * typeck.c (qualif_type): Likewise.
12482         (common_type): Likewise.
12483         (comptypes): Likewise.
12484         (comp_cv_target_types): Likewise.
12485         (at_least_as_qualified_p): Define.
12486         (more_qualified_p): Likewise.
12487         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
12488         (compparms): Likewise.
12489         (inline_conversion): Likewise.
12490         (string_conv_p): Likewise.
12491         (build_component_ref): Likewise.
12492         (build_indirect_ref): Likewise.
12493         (build_array_ref): Likewise.
12494         (build_unary_op): Likewise.
12495         (build_conditional_expr): Likewise.
12496         (build_static_cast): Likewise.
12497         (build_c_cast): Likewise.
12498         (build_modify_expr): Likewise.
12499         (convert_For_assignment): Likewise.
12500         (comp_ptr_ttypes_real): Likewise.
12501         (cp_type_quals): New function.
12502
12503 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
12504
12505         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
12506         (CP_TYPE_VOLATILE): Likewise.
12507         * decl.c (grokdeclarator): Use them.
12508         * tree.c (canonical_type_variant): Likewise.
12509
12510 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12511
12512         * parse.y (named_class_head): Push into class while parsing the
12513         base class list.
12514         * decl2.c (push_scope, pop_scope): New functions.
12515         * cp-tree.h: Declare them.
12516         * init.c (build_new_1): Delay cleanup until end of full expression.
12517
12518 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
12519
12520         * typeck.c (build_component_ref): Use of a type here is an error.
12521
12522 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
12523
12524         Revamp references to member functions.
12525         * method.c (hack_identifier): Call build_component_ref for a
12526         reference to a member function.
12527         * typeck.c (build_component_ref): Only return a single function
12528         if it's static.  Otherwise, return a COMPONENT_REF.
12529         (build_x_function_call): Handle a COMPONENT_REF.
12530         (build_unary_op): Handle all unknown-type things.
12531         * decl2.c (arg_assoc): Handle COMPONENT_REF.
12532         * class.c (instantiate_type): Complain if the function we get is a
12533         nonstatic member function.  Remove code for finding "compatible"
12534         functions.
12535         * pt.c (tsubst_copy): Handle NOP_EXPR.
12536         * tree.c (build_dummy_object): New fn.
12537         (maybe_dummy_object): New fn.
12538         (is_dummy_object): New fn.
12539         * cp-tree.h: Declare them.
12540         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
12541         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
12542         * init.c (build_member_call): Use maybe_dummy_object and
12543         is_dummy_object.
12544         (build_offset_ref): Use maybe_dummy_object.
12545         (resolve_offset_ref): Use is_dummy_object.
12546         * typeck.c (build_x_function_call): Call build_dummy_object.
12547         (unary_complex_lvalue): Call is_dummy_object.
12548
12549         * typeck.c (build_component_addr): Make sure field is a field.
12550
12551         * call.c (build_new_op): Delete obsolete code.
12552
12553         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
12554
12555 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12556
12557         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
12558         std if std is ignored.
12559
12560 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
12561
12562         * decl.c (grokvardecl): Fix thinko.
12563
12564         * decl.c (grokdeclarator): Embedded attrs bind to the right,
12565         not the left.
12566
12567         * parse.y (fn.def2): Fix 'attrs' format.
12568
12569 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
12570
12571         * Makefile.in (CONFLICTS): Update.
12572         * parse.y (expr_or_declarator_intern): New rule.
12573         (expr_or_declarator, direct_notype_declarator, primary,
12574         functional_cast): Use it.
12575         (notype_declarator_intern): New rule.
12576         (notype_declarator, complex_notype_declarator): Use it.
12577
12578 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
12579
12580         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
12581         (grokvardecl): Likewise.
12582
12583 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12584
12585         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
12586         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
12587
12588         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
12589
12590         * pt.c (process_partial_specialization): Cast 1st argument of
12591         `bzero' to (PTR).
12592
12593         * tree.c (build_base_fields): Cast `base_align' to (int) when
12594         comparing against one.
12595
12596 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
12597
12598         * decl.c (lookup_name_real): Handle template parameters for member
12599         templates where said parameters have the same name as the
12600         surrounding class.
12601
12602         * decl.c (expand_static_init): Build cleanups before entering the
12603         anonymous function used to do them to avoid access-checking
12604         confusion.
12605
12606         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
12607         accidentally removed by previous change, and make DECL_RTL here.
12608         * class.c (add_method): Don't make DECL_RTL here.
12609
12610         * pt.c (for_each_template_parm): Don't examine uninstantiated
12611         default arguments.
12612
12613 1998-10-16  Dave Brolley  <brolley@cygnus.com>
12614
12615         * lex.c (real_yylex): Fix unaligned access of wchar_t.
12616
12617 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
12618
12619         * class.c (add_method): Fix documentation to reflect previous
12620         changes.  Check for duplicate method declarations here.
12621         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
12622         correctly; such things never match.
12623         (grokfndecl): Don't look for duplicate methods here.
12624         * decl2.c (check_classfn): Don't assume names are mangled.
12625         Don't add bogus member function declarations to a class before the
12626         class type is complete.
12627         (grokfield): Reformat error message.
12628         * method.c (set_mangled_name_for_decl): Don't mangle names while
12629         processing_template_decl.
12630
12631 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
12632
12633         * typeck.c (build_indirect_ref): Complain about a pointer to data
12634         member, too.
12635         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
12636         data member.
12637         * init.c (resolve_offset_ref): Don't undo the above.
12638
12639         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
12640         (struct lang_decl_flags): Add `bitfield'.
12641         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
12642         DECL_BIT_FIELD.
12643         * decl2.c (grokbitfield, grok_alignof): Likewise.
12644         * init.c (build_offset_ref): Likewise.
12645         * typeck.c (build_component_addr, expr_sizeof): Likewise.
12646         * cvt.c (build_up_reference): Don't crash if taking the address
12647         returns error_mark_node.
12648
12649         * decl.c (grokfndecl): Also check ctype when checking for ::main().
12650
12651 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
12652
12653         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
12654         Do mangling here.
12655         (grokdeclarator): Instead of here.
12656         * friend.c (do_friend): Lose special handling of ::main and
12657         __builtin_*.
12658         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
12659
12660         * spew.c (yylex): Clear looking_for_typename if we got
12661         'enum { ... };'.
12662
12663 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
12664
12665         * class.c (maybe_warn_about_overly_private_class): Improve error
12666         messages for class with only private constructors.
12667
12668         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
12669         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
12670         (build_typename_type): New function.
12671         * decl.c (build_typename_type): Broken out from ...
12672         (make_typename_type): Use it.
12673         * search.c (lookup_field): Likewise.
12674
12675 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12676
12677         * pt.c (convert_nontype_argument): Check against type_referred_to.
12678         * decl.c (grokvardecl): Check for declarator name before building
12679         DECL_ASSEMBLER_NAME.
12680
12681 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
12682
12683         * pt.c (lookup_template_class): Add comment.
12684         (instantiate_class_template): Don't mark the _TYPE node for
12685         member class templates as an instantiation.
12686
12687 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
12688
12689         * decl.c (grokfndecl): Fix my thinko.
12690
12691 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
12692
12693         * tinfo2.cc (fast_compare): Remove.
12694         (before): Just use strcmp.
12695         * tinfo.cc (operator==): Just use strcmp.
12696
12697 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
12698
12699         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
12700         declarations.
12701
12702 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
12703
12704         * cp-tree.h (specializations_of_same_template_p): Remove.
12705         * search.c (get_template_base): Don't use it.
12706         (get_template_base_recursive): Likewise.
12707         * pt.c (specializations_of_same_template_p): Remove.
12708         (unify): Don't use it.
12709         (lookup_template_class): Find the correct parent when setting
12710         CLASSTYPE_TI_TEMPLATE.
12711
12712 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
12713
12714         * tinfo.cc (operator==): Always compare names.
12715
12716 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
12717
12718         * decl.c (start_function): Fix cut-and-paste error.
12719
12720 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
12721
12722         * inc/typeinfo: Add #pragma interface.
12723         (operator!=): Just call operator==.
12724         * tinfo.cc: Add #pragma implementation.
12725         (operator==): Move from inc/typeinfo and tinfo2.cc.
12726         Check __COMMON_UNRELIABLE instead of _WIN32.
12727
12728         * typeck2.c (my_friendly_abort): Add URL.
12729
12730 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
12731
12732         * decl.c (start_method): Added extra parameter for attributes.
12733         * cp-tree.h (start_method): Update prototype.
12734         * parse.y (fn.def2): Update start_method parameter list.
12735
12736 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
12737
12738         * cp-tree.h (specializations_of_same_template_p): Declare.
12739         * pt.c (specializations_of_same_template_p): New function.
12740         (unify): Use it.
12741         * search.c (get_template_base): Use it.
12742         (get_template_base_recursive): Likewise.
12743
12744 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
12745
12746         * decl2.c (start_objects): Add new variable `joiner' and
12747         initialize it properly.
12748
12749 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
12750
12751         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
12752         change to vtable types.
12753
12754         * cvt.c (ocp_convert): Avoid infinite recursion caused by
12755         1998-10-03 change.
12756
12757 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
12758
12759         * pt.c (resolve_overloaded_unification): New fn.
12760         (try_one_overload): Likewise.
12761         (unify): Don't fail on unknown type.
12762         (type_unification_real): Likewise.  Use resolve_overloaded_unification
12763         to handle an overloaded argument.
12764         (template_args_equal): Split out...
12765         (comp_template_args): From here.
12766         (determine_specialization): Also allow a template with more
12767         parms than were explicitly specified.
12768         * cp-tree.h: Add template_args_equal.
12769         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
12770
12771 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
12772
12773         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
12774         change.
12775
12776 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
12777
12778         * typeck.c (unsigned_type): Only return TItype nodes when
12779         HOST_BITS_PER_WIDE_INT is >= 64 bits.
12780         (signed_type): Likewise.
12781         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
12782         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12783         (init_decl_processing): Only create TItype nodes when
12784         HOST_BITS_PER_WIDE_INT is >= 64 bits.
12785         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
12786         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12787
12788 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12789
12790         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
12791         (gxx.gperf): Update comments describing invocation flags.
12792         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12793
12794 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
12795
12796         * class.c (finish_struct_1): Add commentary on previous change.
12797
12798         * cp-tree.h (vtbl_ptr_type_node): New variable.
12799         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
12800         already of the right type.
12801         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
12802         Simplify code to grow vtable.
12803         * decl.c (vtbl_ptr_type_node): Define.
12804         (init_decl_processing): Initialize it.
12805
12806 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
12807
12808         * cp-tree.def (PTRMEM_CST): New tree node.
12809         * cp-tree.h (ptrmem_cst): New type.
12810         (lang_type): Remove local_typedecls.
12811         (dummy): Increase to 12 bits from 11.
12812         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
12813         (PTRMEM_CST_CLASS): New macro.
12814         (PTRMEM_CST_MEMBER): Likewise.
12815         (current_access_specifier): New variable.
12816         (current_class_type): Remove duplicate declaration.
12817         (finish_struct): Change prototype.
12818         (unreverse_member_declarations): New function.
12819         (pushdecl_class_level): Change prototype.
12820         (grok_enum_decls): Remove.
12821         (fixup_anonymous_union): New function.
12822         (grok_x_components): Change prototype.
12823         (tsubst_chain): Remove.
12824         (finish_member_template_decl): Likewise.
12825         (check_explicit_specialization): Fix indentation.
12826         (finish_class_definition): Change prototype.
12827         (finish_member_class_template): Likewise.
12828         (finish_member_declaration): New function.
12829         (check_multiple_declarators): Likewise.
12830         * class.c (class_stack_node_t): New type.
12831         (current_class_base): Remove.
12832         (current_class_stack): Change type.
12833         (current_access_specifier): New variable.
12834         (grow_method): Remove.
12835         (check_member_decl_is_same_in_complete_scope): Break out from
12836         finish_struct.
12837         (make_method_vec): New function.
12838         (free_method_vec): Likewise.
12839         (add_implicitly_declared_members): Break out from finish_struct_1.
12840         (free_method_vecs): New variable.
12841         (add_method): Rework for direct use from parser.
12842         (handle_using_decl): Watch for NULL_TREE while iterating through
12843         CLASSTYPE_METHOD_VEC.
12844         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
12845         just do some error-checking.
12846         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
12847         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
12848         (finish_struct): Change prototype.  Simplify; fields and methods
12849         are already set up at this point.
12850         (init_class_processing): Set up current_class_stack.
12851         (pushclass): Save current_access_specifier.
12852         (popclass): Restore it.
12853         (currently_open_class): Simplify.
12854         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
12855         * decl.c (saved_scope): Add access_specifier.
12856         (maybe_push_to_top_level): Save it.
12857         (pop_from_top_level): Restore it.
12858         (maybe_process_template_type_declaration): Use
12859         finish_member_declaration.
12860         (pushtag): Likewise.
12861         (pushdecl_class_level): Don't return a value.
12862         (fixup_anonymous_union): Break out from grok_x_components.
12863         (shadow_tag): Use it.
12864         (xref_tag): Complain about using an elaborated type specifier to
12865         reference a template type parameter or typedef name.
12866         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12867         (current_local_enum): Remove.
12868         (build_enumerator): Call finish_member_declaration.
12869         (grok_enum_decls): Remove.
12870         * decl2.c (grok_x_components): Simplify.
12871         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
12872         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12873         (merge_functions): Add to comment.
12874         (arg_assoc_type): Prototype.
12875         (arg_assoc): Pass as many arguments as there are parameters.
12876         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
12877         OFFSET_REF.
12878         * expr.c (cpls_expand_expr): Remove dead code.  Handle
12879         PTRMEM_CST.
12880         * friend.c (do_friend): Lookup friends when in nested classes.
12881         Change comments.
12882         * init.c (build_offset_ref): Do lookup even for classes that are
12883         only partially defined.
12884         (decl_constant_value): Remove dead code.
12885         * method.c (build_overload_value): Remove hack where by TYPE was
12886         not a TYPE.  Handle PTRMEM_CST.
12887         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
12888         should go.
12889         * parse.y (components, notype_components, component_decl,
12890         component_decl_1, component_declarator, component_declarator0):
12891         Now all are itype rather than ttype.  Rework to add members to
12892         classes on the fly.
12893         (typesqpecqual_reserved): Use check_multiple_declarators.
12894         (structsp): Update class to finish_class_definition.
12895         (do_xref_defn): Unsplit into named_class_head.
12896         (access_specifier): Set current_access_specifier.
12897         * pt.c (set_current_access_from_decl): New function.
12898         (finish_member_template_decl): Don't take the parameters.
12899         (comp_template_args): Make more robust.
12900         (lookup_template_class): Don't use current_local_enum.
12901         (for_each_template_parm): Handle PTRMEM_CST.
12902         (instantiate_class_template): Use set_current_access_from_decl,
12903         finish_member_declaration and unreverse_member_declarations.  Set
12904         lineno/input_filename before generating implicit member functions.
12905         (type_unification_real): Don't assume back-unification happens
12906         only for the last argument.
12907         (regenerate_decl_from_template): Call pushclass a bit earlier.
12908         (tsubst_chain): Remove.
12909         (tsubst_enum): Use set_current_access_from_decl.
12910         (set_mangled_name_for_template_decl): Fix indentation.
12911         * search.c (lookup_fnfields_1): Change iteration through
12912         CLASSTYPE_METHOD_VEC.
12913         (dfs_pushdecls): Likewise.
12914         (dfs_compress_decls): Likewise.
12915         (add_conversions): Likewise.
12916         * semantics.c (finish_class_definition): Don't take components.
12917         Change call to finish_struct.
12918         (finish_member_declaration): New function.
12919         (finish_member_class_template): Don't take template parameters.
12920         Change call to grok_x_components.  Call finish_member_template_decl.
12921         (check_multiple_declarators): New function.
12922         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
12923         a passed in fieldlist.
12924         * tree.c (search_tree): Handle PTRMEM_CST.
12925         (mapcar): Likewise.
12926         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
12927         INTEGER_CSTs, for pointer-to-data members.
12928
12929         * call.c (resolve_args): Resolve template specializations, if
12930         possible.
12931
12932 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12933
12934         * Makefile.in (spew.o): Depend on toplev.h.
12935
12936         * call.c (compare_ics): Initialize variables `deref_from_type2',
12937         `deref_to_type1' and `deref_to_type2'.
12938
12939         * except.c (get_eh_type): Hide prototype and definition.
12940         (process_start_catch_block_old): Remove unused static prototype.
12941
12942         * pt.c (tsubst_decl): Initialize variable `argvec'.
12943
12944         * spew.c: Include toplev.h.
12945
12946 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
12947
12948         * pt.c (instantiate_decl): Do save and restore file position.
12949
12950 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12951
12952         * method.c (build_decl_overload_real): Clear
12953         numeric_output_need_bar after __.
12954
12955 1998-10-05  Nathan Sidwell  <nathan@acm.org>
12956
12957         * call.c (build_new_method_call): Issue 'incomplete type' error,
12958         if class is not defined.
12959
12960 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12961
12962         * call.c (build_object_call): Move declaration of variable
12963         `fn' into the scope where it is used.  Don't access variable
12964         `fn' when it is uninitialized, instead use `fns'.
12965
12966 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12967
12968         * errfn.c (cp_thing): Print buf as a string not as a printf format
12969         to avoid problems with the operator%.  Consequently, `%%' sequences
12970         in format are copied as `%' in buf.
12971
12972 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
12973
12974         * pt.c (pop_tinst_level): Call extract_interface_info.
12975         (instantiate_decl): Don't save and restore file position.
12976
12977         * decl.c (cp_finish_decl): Make statics in extern inlines and
12978         templates common, if possible and the target doesn't support weak
12979         symbols.
12980
12981         * decl.c (grokdeclarator): Remove redundant calls to
12982         build_type_variant and some duplicated code.
12983         * sig.c (build_signature_reference_type): Only take the type parm.
12984         (build_signature_pointer_type): Likewise.
12985         * tree.c (build_cplus_method_type): Adjust.
12986         * cp-tree.h: Update.
12987
12988 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
12989
12990         * call.c (build_over_call): Make pedwarns about dropped qualifiers
12991         into full-fledged errors.
12992         * cvt.c (convert_to_reference): Likewise.
12993         * typeck.c (convert_for_assignment): Likewise.
12994
12995         * search.c (expand_upcast_vtables): In addition to unsetting
12996         TREE_READONLY, remove top-level const type qualifier.
12997
12998 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
12999
13000         * class.c (current_class_ptr, current_class_ref): Clarify
13001         documentation.
13002         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
13003         NOP type conversions.
13004         * decl.c (decls_match): Use comptypes directly; ignore
13005         qualifiers on the DECL.
13006         (duplicate_decls): Remove qualifier checks on DECL.
13007         (grokdeclarator): Make the type built up include top-level
13008         qualifiers.
13009         * decl2.c (do_dtors): Fix spelling error.
13010         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
13011         when printing type information.
13012         * init.c (build_new_1): Add documentation.  Deal with the fact
13013         that type of allocated memory now contains qualifiers.
13014         * lex.c (is_global): Improve error-recovery.
13015         * sig.c (build_member_function_pointer): Don't cast away const
13016         on fields of sigtable_entry_type.
13017         * tree.c (lvalue_type): Don't look at top-level qualifiers on
13018         expressions.
13019         * typeck.c (decay_conversion): Likewise.
13020         (build_component_ref): Make sure the type of the COMPONENT_REF
13021         contains top-level qualifiers, as appropriate.  Improve
13022         error-handling.
13023         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
13024         (build_array_ref): Likewise.
13025         (build_unary_op): Improve error-recovery.
13026         (unary_complex_lvalue): Make taking the address a bound member
13027         function an error, not a sorry.
13028         (build_conditional_expr): Look at the type qualifiers, not the
13029         qualifiers on the expression itself.
13030
13031 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
13032
13033         * decl2.c (merge_functions): Remove duplicates.
13034
13035         * decl2.c: Add -f{no-,}implicit-inline-templates.
13036         (import_export_decl): Check it.
13037
13038         * decl.c (lookup_name_real): Template parms also take precedence
13039         over implicit typename.  Only warn if yylex.
13040
13041         * typeck.c (build_conditional_expr): Only fold if ifexp is an
13042         INTEGER_CST.
13043
13044         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
13045         instead of linkage.
13046
13047 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
13048
13049         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
13050         * class.c (build_vbase_pointer): Use it.
13051         * rtti.c (expand_class_desc): Likewise.
13052         * tree.c (build_vbase_pointer_fields): Likewise.
13053
13054 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
13055
13056         * decl.c (start_decl): Add invocation of
13057         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
13058         (start_function): Add invocation of
13059         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
13060
13061         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
13062         HANDLE_GENERIC_PRAGMAS.
13063
13064 1998-09-28  Anthony Green  <green@cygnus.com>
13065
13066         * semantics.c (finish_asm_stmt): Always permit volatile asms.
13067
13068 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
13069
13070         * decl.c (grokdeclarator): Tighten checks for invalid
13071         destructors.  Improve error-messages and error-recovery.
13072         * decl2.c (check_classfn): Don't assume that mangled destructor
13073         names contain type information.
13074
13075 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
13076
13077         * search.c (get_base_distance): Remove assert.
13078
13079         * decl2.c (build_anon_union_vars): Don't process a field with no
13080         name.
13081         (finish_anon_union): Also complain about local anon unions with no
13082         members.
13083
13084 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13085
13086         * decl.c (lookup_namespace_name): If the name is a namespace,
13087         return it immediately.
13088
13089 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13090
13091         * cp-tree.h (define_case_label): Remove unused parameter.
13092         (check_java_method): Likewise.
13093         (grokclassfn): Likewise.
13094         (expand_aggr_init): Likewise.
13095         (build_x_delete): Likewise.
13096         (maybe_end_member_template_processing): Likewise.
13097         (unshare_base_binfos): Add prototype.
13098         (string_conv_p): Likewise.
13099         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
13100
13101         * cvt.c (build_up_reference): Remove unused parameter
13102         `checkconst', all callers changed.
13103         (build_type_conversion): Mark parameter `code' with
13104         ATTRIBUTE_UNUSED.
13105         (build_expr_type_conversion): Initialize variable `conv'.
13106
13107         * decl.c (push_namespace): Initialize variable `d'.
13108         (define_case_label): Remove unused parameter `decl', all callers
13109         changed.
13110
13111         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
13112         `argc' with ATTRIBUTE_UNUSED.
13113         (grokclassfn): Remove unused parameter `cname', all callers
13114         changed.
13115         (check_java_method): Likewise for parameter `ctype'.
13116         (copy_assignment_arg_p): Mark parameter `virtualp' with
13117         ATTRIBUTE_UNUSED.
13118         (finish_prevtable_vardecl): Likewise for parameter `prev'.
13119
13120         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
13121
13122         * init.c (expand_aggr_init_1): Remove unused parameter
13123         `alias_this', all callers changed.
13124         (expand_aggr_init): Likewise.
13125         (expand_default_init): Likewise.
13126         (build_new_1): Initialize variable `susp'.
13127         (build_x_delete): Remove unused parameter `type', all callers
13128         changed.
13129
13130         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
13131         ATTRIBUTE_UNUSED.
13132         (readescape): Use (unsigned) value in shift.
13133         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
13134         comparing to a signed quantity.
13135
13136         * pt.c (maybe_end_member_template_processing): Remove unused
13137         parameter `decl', all callers changed.
13138         (check_explicit_specialization): Add braces around empty body in
13139         an else-statement.
13140         (current_template_args): Initialize variable `args'.
13141         (lookup_template_class): Likewise for variable `prev_local_enum'.
13142         (tsubst_decl): Likewise for variable `r'.
13143         (set_mangled_name_for_template_decl): Initialize variable
13144         `context'.
13145
13146         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
13147         Likewise for variable `i'.
13148         (yylex): Initialize variable `trrr'.
13149
13150         * typeck.c (compparms): Mark variable `strict' with
13151         ATTRIBUTE_UNUSED.
13152
13153         * xref.c (simplify_type): Cast argument of ctype function to
13154         `unsigned char'.
13155
13156 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
13157
13158         * cp-tree.h (language_lvalue_valid): Remove.
13159         * decl.c (grokdeclarator): Don't disallow references to functions.
13160         * tree.c (lvalue_p_1): New function, combining duplicated
13161         code from ...
13162         (lvalue_p): Use it.
13163         (real_lvalue_p): Likewise.
13164         * typeck.c (language_lvalue_valid): Remove.
13165         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
13166         they don't have TREE_READONLY set.
13167         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
13168
13169 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13170
13171         * spew.c (yylex): Give diagnostic.
13172         * hash.h (is_reserved_word): Add export.
13173         * gxx.gperf: Likewise.
13174         * lex.h (rid): Add RID_EXPORT.
13175         * lex.c (init_parse): Likewise.
13176
13177 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
13178
13179         * friend.c (do_friend): Make warning a full sentence.
13180
13181 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
13182
13183         * parse.y (component_decl_list): Improve error-recovery.
13184
13185 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13186
13187         * decl.c (make_typename_type): Move error to point where name
13188         variable can be used by dump_type.
13189
13190 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
13191
13192         * decl.c (grokfndecl): Improve error-recovery.
13193         * decl2.c (grokfield): Likewise.
13194         * pt.c (finish_member_template_decl): Likewise.
13195
13196 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13197
13198         * method.c (hack_identifier): Finding multiple members is always
13199         an error.
13200
13201 1998-09-21  Per Bothner  <bothner@cygnus.com>
13202
13203         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
13204
13205 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
13206
13207         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
13208
13209 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
13210
13211         * class.c (maybe_warn_about_overly_private_class): Reformat.
13212
13213 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
13214
13215         * exception.cc (__cplus_type_matcher): Realign some code.
13216
13217 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
13218
13219         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
13220         (tinfo2.o): Likewise.
13221         (exception.o): Likewise.
13222         (new.o): Likewise.
13223         (opnew.o): Likewise.
13224         (opnewnt.o): Likewise.
13225         (opvnew.o): Likewise.
13226         (opvnewnt.o): Likewise.
13227         (opdel.o): Likewise.
13228         (opdelnt.o): Likewise.
13229         (opvdel.o): Likewise.
13230         (opvdelnt.o): Likewise.
13231
13232 1998-09-16  Richard Henderson  <rth@cygnus.com>
13233
13234         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
13235
13236 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
13237
13238         * call.c (build_field_call): Handle static data members too.
13239
13240         * typeck.c (comptypes): When comparing pointer types, check
13241         whether referred types match even in strictest modes.
13242
13243 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
13244
13245         * cp-tree.h: Revert previous change.
13246         (finish_struct_methods): Remove declaration.
13247         * class.c: Revert previous change.
13248         (maybe_warn_about_overly_private_class): New function.
13249         (finish_struct_methods): Declare here, and make static.  Remove
13250         unnecessary parameters.  Tidy slightly.  Use
13251         maybe_warn_about_overly_private_class.
13252         (finish_struct_1): Adjust.  Remove check for private constructors,
13253         now done elsewhere.
13254         (finish_struct): Adjust.
13255
13256 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
13257
13258         * except.c (expand_start_catch_block): No need to check for new
13259         exception model.
13260         (process_start_catch_block_old): Deleted.
13261         (process_start_catch_block): Add call to start_decl_1().
13262         (expand_end_catch_block): Add call to end_catch_handler().
13263         * exception.cc (__cplus_type_matcher): Only check the exception
13264         language if there is an exception table.
13265
13266 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
13267
13268         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
13269         as used to prevent conflicts with virtual function tables.
13270
13271 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
13272
13273         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
13274         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
13275         * class.c (maybe_class_too_private_p): New function.
13276         (finish_struct_methods): Use it.
13277         (finish_struct_1): Likewise.
13278         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
13279         appropriate.
13280
13281         * pt.c (check_specialization_scope): Fix spelling error.
13282         (check_explicit_specialization): Remove code to handle explicit
13283         specializations in class scope; they are now correctly diagnosed
13284         as errors.
13285
13286 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
13287
13288         * decl.c (pushdecl): Don't copy types if the
13289         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
13290         type.
13291
13292 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
13293
13294         * class.c (get_enclosing_class): New function.
13295         (is_base_of_enclosing_class): Likewise.
13296         * cp-tree.h (get_enclosing_class): Declare.
13297         (is_base_of_enclosing_class): Likewise.
13298         * pt.c (coerce_template_parms): Use them.
13299
13300 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
13301
13302         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
13303         null to decide whether to use it.
13304
13305         * error.c (dump_type_real): Handle NAMESPACE_DECL.
13306         * parse.y (base_class.1): Avoid crash on error.
13307
13308 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13309
13310         * decl.c (make_typename_type): If context is a namespace, the code
13311         is in error.
13312
13313 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
13314
13315         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
13316
13317 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
13318
13319         * cp-tree.h (anonymous_namespace_name): Declare.
13320         * decl.c: Define it.
13321         (push_namespace): Use anonymous_namespace_name, rather than local
13322         static anon_name.
13323         * error.c (dump_decl): If a namespace is named
13324         anonymous_namespace_name, call it {anonymous}.
13325
13326         * decl.c (grokparms): Distinguish between references and pointers
13327         in error message.
13328
13329 1998-09-08  Richard Henderson  <rth@cygnus.com>
13330             Mark Mitchell  <mark@markmitchell.com>
13331
13332         * pt.c (process_partial_specialization): Consistently allocate
13333         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
13334         tpd.parms, where appropriate.
13335
13336 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
13337
13338         * Makefile.in (INCLUDES): Update after recent toplevel gcc
13339         reorganizations.
13340
13341 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
13342
13343         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
13344         * class.c (finish_struct): Remove hackery to deal with explicit
13345         specializations in class scope.
13346         * decl.c (grokfndecl): Improve error-recovery.
13347         * decl2.c (grokfield): Likewise.
13348         * pt.c (check_specialization_scope): New function.
13349         (begin_specialization): Call it.
13350         (process_partial_specialization): New function, split out from
13351         push_template_decl.  Check partial specializations more
13352         stringently.
13353         (push_template_decl): Call it.
13354         (check_explicit_specialization): Don't attempt to handle explicit
13355         specializations in class scope.
13356         (template_parm_data): Document.  Add current_arg and
13357         arg_uses_template_parms.
13358         (mark_template_parm): Set it.
13359         (tsubst_arg_types): Remove unused variable.
13360         * semantics.c (begin_class_definition): Tweak.
13361
13362 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
13363
13364         * inc/typeinfo (type_info::type_info(const char*)): Make
13365         `explicit'.
13366
13367         * cp-tree.h (hash_tree_cons_simple): New macro.
13368         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
13369         (coerce_template_parms): Use make_temp_vec, instead of
13370         make_tree_vec.  Document this behavior.
13371         (lookup_template_class): Likewise.
13372         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
13373         Remove dead code (and add assertion to check its deadness).  Fix
13374         bug w.r.t. exception specifications.
13375
13376 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
13377
13378         * decl2.c (import_export_vtable): Always make artificials comdat.
13379         (import_export_decl): Likewise.
13380         * pt.c (mark_decl_instantiated): Likewise.
13381
13382 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
13383
13384         * cp-tree.h (finish_globally_qualified_member_call_expr):
13385         Rename to ...
13386         (finish_qualified_call_expr).
13387         * semantics.c: Likewise.
13388         * parse.y (primary): Use it.
13389         * method.c (hack_identifier): Remove redundant code.
13390
13391         * init.c (resolve_offset_ref): Call convert_from_reference to
13392         handle members of reference type.  Improve error recovery.
13393
13394 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
13395
13396         * cp-tree.h: Declare warn_nontemplate_friend.
13397         * decl2.c (lang_decode_option): Set.
13398         * lang-options.h: Add -Wnon-template-friend.
13399         * friend.c (do_friend): Use to toggle non-template function warning.
13400
13401 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
13402
13403         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
13404         corresponding INTEGER_CSTs when processing_template_decl.
13405         * pt.c (tsubst_enum): Tweak accordingly.
13406
13407 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13408
13409         * decl.c (pushdecl_class_level): Add warning here.
13410         (pushdecl): Tweak.
13411
13412 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
13413
13414         * cvt.c (convert_pointer_to_real): Tidy.
13415         * search.c (get_base_distance_recursive): Simplify.
13416         (get_base_distance): Likewise.
13417
13418         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
13419         parms.
13420
13421 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
13422
13423         * lex.c (check_newline):  Call HANDLE_PRAGMA before
13424         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
13425         if unknown pragmas are encountered.
13426         (handle_sysv_pragma): Interpret return code from
13427         handle_pragma_token ().  Return success/failure indication rather
13428         than next unprocessed character.
13429         (pragma_getc): New function: retrieves characters from the
13430         input stream.  Defined when HANDLE_PRAGMA is defined.
13431         (pragma_ungetc): New function: replaces characters back into the
13432         input stream.  Defined when HANDLE_PRAGMA is defined.
13433
13434 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
13435
13436         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
13437         * class.c (build_vtable_entry_ref): Likewise.
13438
13439 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
13440
13441         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
13442         * decl2.c (import_export_decl): Likewise.
13443         * pt.c (instantiate_decl): Use it.
13444
13445 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
13446
13447         * decl.c (lookup_name_real): Also do implicit typename thing for
13448         artificial TYPE_DECLs.
13449         * search.c (lookup_field): Likewise.
13450         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
13451         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
13452         (enter_scope_of): Extract type from implicit typename.
13453         (begin_class_definition): Likewise.
13454         * lex.c (identifier_type): Handle implicit typename when checking
13455         for SELFNAME.
13456
13457         * cp-tree.h: Declare flag_strict_prototype.
13458         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
13459         -fstrict-prototype.
13460         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
13461         specified, set it to the value of pedantic.
13462
13463 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
13464
13465         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
13466
13467 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
13468
13469         * decl.c (finish_enum): Handle member enums of classes declared in
13470         template functions.
13471
13472         * decl2.c (grok_x_components): Strip attributes before calling
13473         groktypename.
13474
13475 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
13476
13477         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
13478         -fenum-int-equivalence and -fno-nonnull-objects.
13479         * class.c (check_for_override): Remove support for -fall-virtual.
13480         (finish_struct_1): Likewise.
13481         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
13482         * typeck.c (build_binary_op_nodefault): Likewise.
13483         * cvt.c (ocp_convert): Likewise.
13484         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
13485         * class.c (build_vbase_path): Likewise.
13486
13487 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
13488
13489         * Makefile.in (INTERFACE): New, set to 1.
13490
13491 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
13492
13493         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
13494         comparing with global_namespace.
13495         (dump_aggr_type): Likewise.
13496
13497         * decl.c (grokfndecl): Issue error on declaration of friend
13498         templates with explicit template arguments.
13499
13500         * pt.c (convert_template_argument): New function, split out
13501         from...
13502         (coerce_template_parms): Here.
13503         (tsubst): Attempt better error-recovery.
13504
13505 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13506
13507         * pt.c (decl_template_parm_p): Add checks for
13508         TEMPLATE_TEMPLATE_PARM.
13509
13510 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
13511
13512         * lex.c (do_identifier): Fix thinko in previous change.
13513
13514 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
13515
13516         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
13517         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
13518
13519 1998-08-28  Richard Henderson  <rth@cygnus.com>
13520
13521         Add support for discarding unused virtual functions.
13522         * lang-options.h: Add -fvtable-gc.
13523         * cp-tree.h: Add flag_vtable_gc.
13524         * decl2.c (output_vtable_inherit): New fn.
13525         (finish_vtable_vardecl): Call it.
13526         * class.c (build_vtable_entry_ref): New fn.
13527         (build_vtbl_ref): Call it.
13528
13529 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
13530
13531         * cp-tree.h (build_enumerator): Take the enumeration type as a
13532         parameter.
13533         * decl.c (finish_enum): Don't set the TREE_TYPE for the
13534         enumeration constant values if we're processing_template_decls.
13535         Don't set the type for the CONST_DECLs either; that's done in
13536         build_enumerator.
13537         (build_enumerator): Take the enumeration type as a
13538         parameter.
13539         * lex.c (do_identifier): Don't resolve enumeration constants while
13540         processing template declarations, even if they happen to be
13541         TEMPLATE_PARM_INDEXs.
13542
13543         * parse.y (current_enum_type): New variable.
13544         (primary): Don't allow statement-expression in local classes just
13545         as we don't in global classes.
13546         (structsp): Use current_enum_type.
13547         (enum_list): Likewise.
13548         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
13549         finish_enum; they no longer occur.
13550
13551         * cp-tree.h (finish_base_specifier): New function.
13552         * parse.y (base_class): Use it.
13553         * semantics.c (finish_base_specifier): Define it.
13554
13555         * parse.y (structsp): Warn on use of typename outside of template
13556         declarations.
13557
13558 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
13559
13560         * lex.c (handle_cp_pragma): Remove #pragma vtable.
13561         * lang-options.h: Remove +e options.
13562         * decl2.c (lang_decode_option): Likewise.
13563         (import_export_vtable): Don't check write_virtuals.
13564         (finish_vtable_vardecl, finish_file): Likewise.
13565         * search.c (dfs_debug_mark): Likewise.
13566         * semantics.c (begin_class_definition): Likewise.
13567         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
13568
13569         * call.c (build_over_call): Check flag_elide_constructors.
13570         * decl2.c: flag_elide_constructors defaults to 1.
13571         * typeck.c (convert_arguments): Remove return_loc parm.
13572         (build_function_call_real): Adjust.
13573
13574         * search.c: Tear out all mi_matrix and memoize code.
13575         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
13576         * lang-options.h: Remove documentation for -fhandle-exceptions,
13577         -fmemoize-lookups and -fsave-memoized.
13578         * cp-tree.h: Lose mi_matrix and memoize support.
13579         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
13580         * class.c: Lose struct class_level.
13581         (pushclass, popclass): Lose memoize support.
13582         * init.c (build_offset_ref): Likewise.
13583
13584         Never change BINFO_INHERITANCE_CHAIN.
13585         * init.c (emit_base_init): Change modification of
13586         BINFO_INHERITANCE_CHAIN to an assert.
13587         * search.c (get_base_distance_recursive): Likewise.
13588         (get_base_distance): Likewise.
13589         (lookup_member): Likewise.
13590         (convert_pointer_to_single_level): Likewise.
13591         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
13592         (lookup_fnfields): Likewise.
13593         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
13594         (unshare_base_binfos): Don't call propagate_binfo_offsets.
13595         (layout_basetypes): Call propagate_binfo_offsets instead of
13596         unshare_base_binfos.
13597         * decl.c (xref_basetypes): Call unshare_base_binfos.
13598         * pt.c (instantiate_class_template): Likewise.
13599         * tree.c (reverse_path): Remove 'copy' parm; always make a
13600         temporary copy.
13601         * class.c (build_vbase_path): Just call it.
13602         * search.c (compute_access): Likewise.  Don't re-reverse.
13603
13604 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
13605
13606         * class.c (build_vbase_path): Use reverse_path.
13607         (finish_base_struct): Move warnings for inaccessible bases to
13608         layout_basetypes.
13609         (modify_one_vtable): Remove check of TREE_USED (binfo).
13610         (fixup_vtable_deltas1): Likewise.
13611         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
13612         (xref_tag): Remove binfos parameter.
13613         (make_binfo): Remove chain parameter.
13614         (reverse_path): Add copy parameter.
13615         * decl.c (init_decl_processing): Change calls to xref_tag.
13616         (xref_tag): Remove binfos parameter.
13617         (xref_basetypes): Change calls to make_binfo.
13618         * decl2.c (grok_x_components): Change calls to xref_tag.
13619         (handle_class_head): Likewise.
13620         * friend.c (do_friend): Likewise.
13621         * lex.c (make_lang_type): Change calls to make_binfo.
13622         * parse.y (structsp): Change calls to xref_tag.
13623         (named_complex_class_head_sans_basetype): Likewise.
13624         (named_class_head): Likewise.
13625         * rtti.c (init_rtti_processing): Likewise.
13626         * search.c (compute_access): Change calls to reverse_path.
13627         (dfs_get_vbase_types): Change calls to make_binfo.
13628         (get_vbase_types): Remove dead code.
13629         * tree.c (unshare_base_binfos): Change calls to make_binfo.
13630         (layout_basetypes): Warn here about inaccessible bases.
13631         (make_binfo): Remove chain parameter.
13632         (reverse_path): Add copy parameter.
13633
13634 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
13635
13636         * class.c: #if 0 complete_type_p.
13637         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
13638         * method.c (process_overload_item): Likewise.
13639         * typeck.c (comp_target_types): Likewise.
13640
13641         Stop sharing binfos for indirect virtual bases.
13642         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
13643         (layout_basetypes): Likewise.
13644         (unshare_base_binfos): Copy vbases, too.
13645         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
13646         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
13647         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
13648         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
13649         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
13650         reference to BINFO_VIA_PUBLIC.
13651         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
13652         (push_class_decls): Use them.
13653         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
13654         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
13655
13656 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
13657
13658         * decl.c (build_enumerator): Set DECL_CONTEXT for the
13659         CONST_DECLs.
13660
13661 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
13662
13663         * cp-tree.h (finish_enum): Change prototype.
13664         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
13665         VALUES parameter.  Don't try to compute mins/maxs if
13666         processing_template_decl.
13667         * parse.y (structsp): Use new calling sequence for finish_enum.
13668         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
13669         (lookup_template_class): Remove unused variables.  Tweak.
13670         Register enums on instantiation list before substituting
13671         enumeration constants.
13672         (tsubst_decl): Remove unused variables.
13673         (regenerate_decl_from_template): Likewise.
13674
13675         * decl.c (duplicate_decls): Don't obliterate the
13676         DECL_TEMPLATE_INFO for a template if we're not replacing it with
13677         anything.
13678
13679         * lex.c (do_identifier): Fix typo in comment.
13680
13681 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13682
13683         * errfn.c: Remove stdarg.h/varargs.h.
13684         * tree.c: Likewise.
13685
13686 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
13687
13688         * pt.c (tsubst_copy): Only do typename overloading on an
13689         IDENTIFIER_NODE that happens to look like a typename if it actually
13690         has a type for us to use.
13691
13692 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
13693
13694         * typeck.c (comp_cv_target_types): Split out...
13695         (comp_target_types): From here.  Don't allow cv-qual changes under
13696         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
13697         (build_ptrmemfunc): Pass 1 to nptrs.
13698         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13699
13700 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
13701
13702         * search.c (dependent_base_p): Don't compare a binfo to
13703         current_class_type; use the TREE_TYPE of the binfo instead.
13704
13705         * cp-tree.h (CLASS_TYPE_P): Revise definition.
13706
13707 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
13708
13709         * decl.c (duplicate_decls): Don't complain about different
13710         exceptions from an internal decl even if pedantic.
13711
13712         * typeck.c (convert_for_assignment): Converting from pm of vbase
13713         to derived is an error, not a sorry.
13714
13715         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
13716         * class.c (fixed_type_or_null): Rename from
13717         resolves_to_fixed_type_p.  Return the dynamic type of the
13718         expression, if fixed, or null.
13719         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
13720         does not match the static type.
13721         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
13722         resolves_to_fixed_type_p again.
13723
13724 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
13725
13726         * pt.c (tsubst_decl): Move special case code for dealing with
13727         tricky friend templates here from ...
13728         (regenerate_decl_from_template): Here.
13729
13730 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
13731
13732         * decl.c (start_decl): Remove redundant linkage check.
13733
13734 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
13735
13736         * typeck.c (c_expand_return): Handle the case that valtype
13737         is wider than the functions return type.
13738
13739 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
13740
13741         * cp-tree.h (CLASS_TYPE_P): New macro.
13742         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
13743         * pt.c (process_template_parm): Undo previous change.
13744
13745 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
13746
13747         * cp-tree.h: Declare.
13748         * pt.c (decl_template_parm_p): New function.
13749         * decl.c (pushdecl): Check decls for redeclaring template parms.
13750         (xref_tag): Make redeclaration an error, print decl.
13751         * decl2.c (grokfield): Check field_decls for redeclaration as well.
13752
13753 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
13754
13755         * parse.y (primary): Fix up the type of string constants.
13756
13757 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
13758
13759         * typeck.c (convert_for_initialization): Move check for odd uses
13760         of NULL to avoid duplicate warnings.
13761
13762 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
13763
13764         * tree.c (lvalue_type): Fix for arrays.
13765         * typeck.c (string_conv_p): New fn.
13766         (convert_for_assignment): Use it.
13767         (build_unary_op): Use lvalue_type.
13768         * call.c (standard_conversion, convert_like): Use string_conv_p.
13769         (add_function_candidate): Use lvalue_type.
13770         * cvt.c (convert_to_reference): Likewise.
13771         * decl2.c (lang_decode_option): Ignore -traditional.
13772         * decl.c (init_decl_processing): flag_writable_strings inhibits
13773         flag_const_strings.
13774
13775 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
13776
13777         * lang-options.h (lang_options): Add fconst-strings to the list
13778         of valid options.
13779         * decl2.c (lang_f_options, lang_decode_option): Likewise.
13780
13781 1998-08-24  Nathan Sidwell  <nathan@acm.org>
13782
13783         * lex.c (real_yylex): Don't warn about long long constants if
13784         we're allowing long long.
13785
13786 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13787
13788         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
13789         accessing bindings directly.
13790
13791         * search.c (my_tree_cons): Reimplement.
13792
13793         * lang-specs.h: Remove __HONOR_STD.
13794         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
13795
13796 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
13797
13798         * decl.c (grokdeclarator): Complain about in-class initialization
13799         of aggregates and/or references.
13800         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
13801         TEMPLATE_TYPE_PARMs.
13802
13803         * decl2.c (grok_array_decl): Add comment.
13804         (mark_used): Don't instantiate an explicit instantiation.
13805         * friend.c (make_friend_class): Remove bogus comment.  Fix check
13806         for partial specializations.
13807         * pt.c (check_explicit_specialization): Don't
13808         SET_DECL_EXPLICIT_INSTANTIATION here.
13809         (mark_decl_instantiated): Or here.
13810         (do_decl_instantiation): Do it here, instead.  Add checks for
13811         duplicate explicit instantiations, etc.  Tidy.
13812         (do_type_instantiation): Likewise.
13813         (instantiate_decl): Improve comments.  Complain about explicit
13814         instantiations where no definition is available.
13815
13816         * cp-tree.h (ansi_null_node): Remove.
13817         * call.c (build_over_call): Warn about converting NULL to an
13818         arithmetic type.
13819         * cvt.c (build_expr_type_conversion): Likewise.  Use
13820         null_ptr_cst_p instead of expanding it inline.
13821         * decl.c (ansi_null_node): Remove.
13822         (init_decl_processing): Make null_node always have integral type.
13823         * except.c (build_throw): Warn about converting NULL to an
13824         arithmetic type.
13825         * lex.c (init_parse): Remove handling of ansi_null_node.
13826         * pt.c (type_unification_real): Don't convert NULL to void* type.
13827         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
13828         (convert_for_assignment): Warn about converting NULL to an
13829         arithmetic type.
13830         (convert_for_initialization): Likewise.
13831
13832 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
13833
13834         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
13835         * pt.c (coerce_template_parms): Use no_linkage_check.
13836         * decl.c (grokvardecl): Likewise.
13837         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
13838
13839         * method.c (process_overload_item): Remove useless code.
13840
13841 1998-08-20  Per Bothner  <bothner@cygnus.com>
13842
13843         Handle new'ing of Java classes.
13844         * init.c (build_class_classref):  New function.
13845         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
13846         constructor does not return this;  don't need to exception-protect.
13847
13848         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
13849         * decl2.c (acceptable_java_type):  Handle template-derived types.
13850
13851 1998-08-20  Per Bothner  <bothner@cygnus.com>
13852
13853         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
13854
13855 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
13856
13857         * decl.c (duplicate_decls): Always merge the old and new patterns
13858         for templates, regardless of whether or not the new one has
13859         DECL_INITIAL.  Don't throw away specializations.  Merge
13860         DECL_SAVED_TREE.
13861         * pt.c (tsubst_decl): Use the right pattern when calculating the
13862         complete args for a new template instance.
13863         (do_decl_instantiation): Fix typo in comment.
13864         (regenerate_decl_from_template): Deal with tricky friend template
13865         case.
13866         (instantiate_decl): Likewise.
13867
13868 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
13869
13870         * init.c (build_builtin_delete_call): Add missing assemble_external
13871         call.
13872
13873 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
13874
13875         * parse.y (notype_unqualified_id): Also accept ~A<int>.
13876
13877 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
13878
13879         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
13880         arithmetic.
13881         * except.c (build_throw): Warn when NULL is thrown, even with
13882         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
13883         thrown expression.
13884
13885         * cp-tree.h (ansi_null_node): New variable.
13886         * decl.c (ansi_null_node): New variable.
13887         (init_decl_processing): Initialize its type.
13888         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
13889         for null_node in non-ANSI mode.
13890         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
13891         place of null_node to avoid spurious errors.
13892
13893 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
13894
13895         * cp-tree.h (enter_scope_of): New function.
13896         * parse.y (complex_direct_notype_declarator): Use it.
13897         * semantics.c (enter_scope_of): New function.
13898
13899 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
13900
13901         * decl.c (grokparms): No, here.
13902
13903         * decl.c (grokdeclarator): Catch parm with pointer to array of
13904         unknown bound here...
13905         * method.c (process_overload_item): ...not here.
13906
13907         * gxxint.texi: Remove obsolete documentation of overloading code.
13908
13909         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
13910         * class.c (finish_struct_bits): Likewise.
13911
13912         * tree.c (lvalue_type): Fix for arrays.
13913         * typeck.c (build_unary_op): Use lvalue_type.
13914         * call.c (add_function_candidate): Likewise.
13915         * cvt.c (convert_to_reference): Likewise.
13916
13917         * decl2.c (lang_decode_option): Ignore -traditional.
13918
13919         * init.c (build_offset_ref): Don't mess with error_mark_node.
13920         * lex.c (do_scoped_id): Use cp_error.
13921
13922         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
13923
13924 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13925
13926         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
13927
13928 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
13929
13930         * cp-tree.h (set_identifier_local_value): Provide prototype.
13931
13932         * decl2.c (do_namespace_alias): Remove unused variables `binding'
13933         and `old'.
13934
13935 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
13936
13937         * Makefile.in: Rename BBISON to BISON so that it can be properly
13938         inherited from the parent makefile.
13939
13940 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
13941
13942         * lang-options.h: Add -finit-priority.
13943         * decl2.c: Likewise.  Check flag_init_priority instead of
13944         USE_INIT_PRIORITY.
13945
13946         * decl2.c (setup_initp): New fn.
13947         (start_objects, finish_objects, do_ctors): Handle init_priority.
13948         (do_dtors, finish_file): Likewise.
13949
13950 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
13951
13952         * pt.c (tsubst_copy): Hush warning.
13953
13954         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
13955
13956 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
13957
13958         * pt.c (print_template_context): Don't abort when instantiating a
13959         synthesized method.
13960
13961         * decl.c (grokdeclarator): Issue errors on namespace qualified
13962         declarators in parameter lists or in class scope.
13963
13964 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
13965
13966         * pt.c (check_explicit_specialization): Don't abort on bogus
13967         explicit instantiations.
13968
13969 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
13970
13971         * typeck.c (require_complete_type): Use complete_type_or_else.
13972         (complete_type_or_else): Always return NULL_TREE on failure, as
13973         documented.
13974
13975         * pt.c (tsubst_aggr_type): Prototype.
13976         (tsubst_decl): New function, split out from tsubst.  Set
13977         input_filename and lineno as appropriate.
13978         (pop_tinst_level): Restore the file and line number saved in
13979         push_tinst_level.
13980         (instantiate_class_template): Set input_filename and lineno as
13981         appropriate.
13982         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
13983         context for a TYPENAME_TYPE is complete.
13984
13985         * decl2.c (grokbitfield): Issue errors on bitfields declared with
13986         function type.
13987         (do_dtors): As in do_ctors, pretend to be a member of the same
13988         class as a static data member while generating a call to its
13989         destructor.
13990
13991         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
13992         conversions, even in complex virtual base class hierarchies.
13993
13994 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
13995
13996         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
13997         (TYPE_TEMPLATE_INFO): Likewise.
13998         (SET_TYPE_TEMPLATE_INFO): Likewise.
13999         (ENUM_TI_TEMPLATE): Likewise.
14000         (ENUM_TI_ARGS): Likewise.
14001         (lookup_nested_type_by_name): Remove.
14002         * decl.c (maybe_process_template_type_declaration): Handle enums.
14003         (start_enum): Don't check for primary-template enum declarations
14004         here.
14005         (finish_enum): Clean up, document.  Make sure template enum
14006         constants get the correct type.
14007         (build_enumerator): Copy initializers for template enumerations,
14008         too.
14009         (grok_enum_decls): Document.
14010         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
14011         better.  Build LOOKUP_EXPRs for local variables, even if they are
14012         TREE_PERMANENT.
14013         * pt.c (tsubst_enum): Remove field_chain parameter.
14014         (template_class_depth): Include the depth of surrounding function
14015         contexts.
14016         (push_template_decl): Check for primary-template enum declarations
14017         here.  Deal with enumeration templates.
14018         (lookup_template_class): Likewise.
14019         (for_each_template_parm): Likewise.
14020         (instantiate_class_template): Don't call tsubst_enum directly,
14021         call tsubst instead, to instantiate enums.  Deal with all
14022         field_chain issues here, not in tsubst_enum.
14023         (lookup_nested_type_by_name): Remove.
14024         (tsubst_aggr_type): Revise handling of enumeration types.
14025         (tsubst): Likewise.
14026         (tsubst_copy): Likewise.
14027         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
14028
14029 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
14030
14031         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
14032         uses template parameters.
14033         * method.c (build_template_parm_names): Use the full set of
14034         template arguments for tsubst'ing.
14035         (build_overload_identifier): Pass the full set of template
14036         arguments to build_template_parm_names, not just the
14037         innermost_args.
14038         * pt.c (TMPL_ARGS_DEPTH): Define using
14039         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
14040         (NUM_TMPL_ARGS): New macro.
14041         (add_outermost_template_args): Deal with the case where the outer
14042         args will be completely discarded.
14043         (coerce_template_parms): Use the full set of template arguments
14044         for tsubst'ing.  Simplify.  Add some asserts.  Improve
14045         error messages.
14046         (lookup_template_class): Pass the full set of template arguments
14047         to coerce_template_parms.
14048         (tsubst): Add assertion.
14049         (do_type_instantiation): Don't instantiate member template
14050         classes.
14051
14052         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
14053         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
14054
14055 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
14056
14057         * method.c (set_mangled_name_for_decl): Change return type to void.
14058
14059         * decl.c (lookup_name_real): A namespace-level decl takes priority
14060         over implicit typename.  Avoid doing the same lookup twice.
14061
14062         * search.c (dependent_base_p): New fn.
14063         (dfs_pushdecls, dfs_compress_decls): Use it.
14064
14065         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
14066         virtual functions if the type doesn't have any.
14067
14068 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
14069
14070         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
14071         uses template parameters.
14072
14073 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
14074
14075         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
14076         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
14077         * lex.c (do_identifier): Don't use a second argument, or a type,
14078         when building LOOKUP_EXPRs.
14079         (do_identifier): Likewise.
14080         (do_scoped_id): Likewise.
14081         * method.c (hack_identifier): Improve error message.
14082         * pt.c (lookup_template_function): Don't needlessly call
14083         copy_to_permanent or build_min.
14084         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
14085         necessary.
14086         (do_decl_instantiation): Improve error message.
14087         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
14088         (build_min): Copy the type to the permanent obstack, too.
14089
14090 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
14091
14092         * init.c (init_init_processing): Remove BI* handling.
14093         (build_builtin_call): Remove.
14094         (build_builtin_delete_call): New fn.
14095         (build_delete): Use it.
14096
14097 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
14098
14099         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
14100         (maybe_check_template_type): New function.
14101         * decl.c (maybe_process_template_type_declaration): New function,
14102         split out from pushtag  Call maybe_check_template_type.
14103         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
14104         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
14105         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
14106         * pt.c (template_class_depth_real): Generalization of ...
14107         (template_class_depth): Use it.
14108         (register_specialization): Use duplicate_decls for duplicate
14109         declarations of specializations.
14110         (maybe_check_template_type): New function.
14111         (push_template_decl_real): Fix comment.
14112         (convert_nontype_argument): Likewise.
14113         (lookup_template_class): Likewise.  Avoid an infinite loop on
14114         erroneous code.
14115         (tsubst_friend_function): Fix comment.
14116         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
14117         an IDENTIFIER_NODE.
14118         * semantics.c (begin_function_definition): Use
14119         reset_specialization to note that template headers don't apply
14120         directly to declarations after the opening curly for a function.
14121
14122 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
14123
14124         * decl.c (push_overloaded_decl): Use current_namespace instead of
14125         DECL_CONTEXT (decl) to determine where we go.
14126
14127         * decl.c (lookup_name_real): Fix typo.
14128
14129 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
14130
14131         * friend.c (is_friend): Be lenient with member functions to deal
14132         with nested friends.
14133
14134 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
14135
14136         * class.c (finish_struct_1): Convert integer_zero_node to
14137         ssizetype before passing it to set_rtti_entry.
14138         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
14139         of any size to a pointer.
14140
14141 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
14142
14143         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
14144         (build_template_decl_overload): Remove.
14145         (set_mangled_name_for_decl): New function.
14146         (innermost_args): Remove is_spec parameter.
14147         (most_specialized, most_specialized_class): Remove declarations.
14148         (lookup_template_class): Add entering_scope parameter.
14149         (maybe_process_partial_specialization): New function.
14150         (finish_template_decl): Likewise.
14151         (finish_template_type): Likewise.
14152         * class.c (finish_struct): Clean up processing of member template
14153         specializations.
14154         * decl.c (pushtag): Fix formatting.
14155         (lookup_tag): Improve handling of pseudo-global levels.
14156         (make_typename_type): Adjust call to lookup_template_class.
14157         (shadow_tag): Use maybe_process_partial_specialization.
14158         (xref_tag): Improve handling of member friends.
14159         (start_function): Call push_nested_class before
14160         push_template_decl.  Don't call push_template_decl for
14161         specializations.
14162         * decl2.c (grok_x_components): Don't call xref_tag for
14163         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
14164         (grokclassfn): Use set_mangled_name_for_decl.
14165         (arg_assoc_class): Adjust call to innermost_args.
14166         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
14167         * error.c (dump_function_name): Improve printing of template
14168         function names.
14169         * friend.c (is_friend): Don't compare types of decls to determine
14170         friendship, unless flag_guiding_decls.
14171         (make_friend_class): Partial specializations cannot be friends.
14172         (do_friend): Use set_mangled_name_for_decl.  Call
14173         push_template_decl_real instead of push_template_decl.
14174         * method.c (build_decl_overload_real): Remove prototype.  Give it
14175         external linkage.
14176         (build_overload_identififer): Adjust call to innermost_args.
14177         (build_template_decl_overload): Remove.
14178         (set_mangled_name_for_decl): New function.
14179         * parse.y (.finish_template_type): New non-terminal.
14180         (template_def): Use finish_template_decl.  Use template_extdef
14181         instead of extdef.
14182         (template_extdef, template_datadef): New non-terminals, containing
14183         only those rules for things which can be templates.
14184         (datadef): Tidy.
14185         (template_type, self_template_type): Use .finish_template_type.
14186         (named_class_head): Use maybe_process_partial_specialization.
14187         * pt.c (mangle_class_name_for_template): Remove context parameter.
14188         (get_class_bindings): Remove outer_args parameter.
14189         (complete_template_args): Remove.
14190         (add_outermost_template_args): New function.
14191         (register_specialization): Return the specialization.
14192         (unregister_specialization): New function.
14193         (tsubst_template_parms): Likewise.
14194         (most_specialized, most_specialized_class): Prototype here as
14195         static.
14196         (original_template): Rename to most_general_template.
14197         (tsubst_template_parms): New function.
14198         (set_mangled_name_for_template_decl): Likewise.
14199         (TMPL_ARGS_DEPTH): New macro.
14200         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
14201         (TMPL_ARGS_LEVEL): New macro.
14202         (SET_TMPL_ARGS_LEVEL): Likewise.
14203         (TMPL_ARG): Likewise.
14204         (SET_TMPL_ARG): Likewise.
14205         (TMPL_ARGS_DEPTH): Likewise.
14206         (finish_member_template_decl): Use finish_template_decl.
14207         (maybe_process_partial_specialization): New function, split out
14208         from tsubst.
14209         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
14210         (maybe_begin_member_template_processing): Use new macros.
14211         (is_member_template): Likewise.
14212         (is_member_template_class): Likewise.
14213         (add_to_template_args): Likewise.  Deal with multiple levels of
14214         args.
14215         (maybe_process_partial_specialization): New function.
14216         (retrieve_specialization): Add consistency check.
14217         (determine_specialization): Return full argument list.
14218         (check_explicit_specialization): Tweak friend handling.  Use full
14219         argument lists.  Simplify.
14220         (current_template_args): Use new macros.
14221         (push_template_decl_real): Change ill-named mainargs to specargs.
14222         Check that a partial specialization actually specializes at least
14223         one parameter.   Improve friend handling.  Modify for full
14224         template arguments.
14225         (classtype_mangled_name): Don't mangle the names of
14226         specializations.
14227         (lookup_template_class): Add entering_scope parameter.  Use it to
14228         avoid finding a template type when an instantiation is required.
14229         Simplify.  Use full template arguments.
14230         (tsubst_friend_function): Use unregister_specialization.  Use new
14231         macros.  Use full template arguments.
14232         (tsubst_friend_class): Substitute, using tsubst_template_parms,
14233         into the template parameters before passing them to
14234         redeclare_class_template.
14235         (instantiate_class_template): Simplify.  Use full template
14236         arguments.  Adjust calls to get_class_bindings.  Use
14237         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
14238         (innermost_args): Use new macros.
14239         (tsubst_aggr_type): New function, split out from tsubst.
14240         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
14241         conventions for lookup_template_class.  Refine handling of partial
14242         instantiations.   Remove calls to complete_template_args.
14243         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
14244         and set_mangled_name_for_template_decl.
14245         (tsubst_copy): Use tsubst_aggr_type.
14246         (instantiate_template): Use full template arguments.
14247         (more_specialized): Improve formatting.
14248         (more_specialized_class): Adjust calls to get_class_bindings.
14249         (get_bindings_real): Don't call complete_template_args.
14250         (most_specialized): Don't overwrite input; create a new list.
14251         (most_specialized_class): Use most_general_template.
14252         (regenerate_decl_from_template): Use unregister_specialization.
14253         Use full template arguments.
14254         (instantiate_decl): Use full template arguments.
14255         (set_mangled_name_for_template_decl): New function.
14256         * semantics.c (begin_class_definition): Use
14257         maybe_process_partial_specialization.
14258         (finish_member_class_template): New function.
14259         (finish_template_decl): Likewise.
14260         (finish_template_type): Likewise.
14261         (typeck.c): Don't crash after issuing a compiler_error.
14262         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
14263
14264 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
14265
14266         * typeck2.c (build_functional_cast): Handle default-initialization.
14267
14268         * call.c (build_over_call): Pass 1 to popclass.
14269
14270         * parse.y (direct_notype_declarator): Add precedence declaration
14271         to notype_unqualified_id case.
14272         * Makefile.in (EXPECT): Adjust.
14273
14274         * tree.c (ovl_member): Fix for single function in OVL.
14275
14276 1998-07-27  Dave Brolley  <brolley@cygnus.com>
14277
14278         * c-lex.c (yylex): Fix boundary conditions in character literal and
14279         string literal loops.
14280
14281 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
14282
14283         * decl.c (lookup_name_real): OK, do return the from_obj value
14284         unless got_object depends on template parms.
14285
14286         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
14287
14288         * pt.c (coerce_template_parms): Also complain about local enums.
14289
14290         * cp-tree.h: Add prototype for set_identifier_local_value.
14291         * decl.c (set_identifier_local_value_with_scope): Make static,
14292         prototype.
14293         * search.c (covariant_return_p): Likewise.
14294         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
14295
14296         * call.c (build_method_call): Only pull out the type of a destructor
14297         if it's a template type parm.
14298         * decl.c (lookup_name_real): Never return the from_obj value.
14299
14300 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
14301
14302         * except.c (process_start_catch_block_old): Call start_decl_1 for
14303         catch parm.
14304         * decl.c (start_decl_1): Avoid duplicate error.
14305
14306         * init.c (expand_default_init): Only perform the initialization if
14307         it will do something.
14308
14309 1998-07-23  H.J. Lu  (hjl@gnu.org)
14310
14311         * parse.y (base_class): Check for invalid base class.
14312
14313 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
14314
14315         * decl2.c (import_export_template): Fold in...
14316         (import_export_class): ...to here.  Handle dllimport/export.
14317
14318         * class.c (build_vtable): Pass at_eof to import_export_vtable.
14319         (prepare_fresh_vtable): Likewise.
14320         * decl2.c (import_export_class): Split out...
14321         (finish_prevtable_vardecl): From here.
14322         * class.c (finish_struct_1): Call import_export_class if at_eof.
14323
14324         * decl.c (start_function): #if 0 mysterious code I wrote and have
14325         forgotten why.
14326         * rtti.c (get_tinfo_fn): If this is for a class type, set
14327         DECL_CONTEXT.
14328
14329 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
14330
14331         * inc/exception: Change terminate and unexpected to ().
14332
14333         * parse.y (named_class_head_sans_basetype_defn): A
14334         named_class_head_sans_basetype followed by '{' or ':' is a defn.
14335
14336 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
14337
14338         * tree.c (canonical_type_variant): New fn to handle arrays.
14339         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
14340         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
14341         * method.c (process_overload_item): Use build_overload_value for
14342         arrays.
14343
14344 1998-07-20  Dave Brolley  <brolley@cygnus.com>
14345
14346         * lex.c (mbchar.h): #include it.
14347         (GET_ENVIRONMENT): New macro.
14348         (init_parse): Set character set based on LANG environment variable.
14349         (real_yylex): Handle multibyte characters in character literals.
14350         (real_yylex): Handle multibyte characters in string literals.
14351
14352 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
14353
14354         * lex.c (do_identifier): Look for class value even if we don't
14355         have a global value.  Do implicit declaration if parsing is 2.
14356         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
14357         lookup.
14358
14359 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
14360
14361         * decl.c (pushtag): Revert previous change.
14362         * pt.c (lookup_template_class): Don't put out debugging
14363         information for types that use template parameters.
14364
14365         * decl.c (pushtag): Don't put out debugging information for
14366         compiler-generated typedefs.
14367
14368         * error.c (dump_type_real): Don't crash when presented with
14369         intQI_type_node or the like.
14370
14371         * semantics.c (finish_translation_unit): Fix spelling error in
14372         comment.
14373
14374 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
14375
14376         * decl.c (lookup_name_real): Pull out single function here.
14377         (select_decl): Not here.
14378         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
14379
14380         * decl.c (qualify_lookup): Tweak again.
14381
14382         * pt.c (lookup_template_class): Don't mess with the context of the
14383         instantiation.
14384         * decl2.c (current_decl_namespace): Remove special handling for
14385         templates.
14386
14387         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
14388         a member template specialization.
14389
14390         * tree.c (ovl_member): Use decls_match to compare functions.
14391         * decl.c (decls_match): Check the context of a function.
14392
14393         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
14394         in Koenig lookup support rules.
14395         * semantics.c (finish_call_expr): Handle the new cases.
14396
14397         * typeck.c (build_x_function_call): Handle overloaded methods.
14398
14399         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
14400
14401 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
14402
14403         * semantics.c (finish_object_call_expr): Revert previous change.
14404         * call.c (build_new_method_call): Likewise.  Instead, convert
14405         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
14406
14407 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
14408
14409         * decl.c (qualify_lookup): Handle templates.
14410
14411         * decl2.c (do_using_directive): Don't pass ancestor.
14412         * decl.c (push_using_directive): Calculate ancestor.
14413
14414         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
14415         * decl.c (pushdecl): Move type shadowing handling from here...
14416         (duplicate_decls): ...to here.
14417         * decl.c (set_identifier_local_value_with_scope): New fn.
14418         (pushdecl): Use it.
14419         (set_identifier_local_value, lookup_type_current_level): New fns.
14420         * decl2.c (do_local_using_decl): Handle types and binding level
14421         stuff properly.
14422
14423         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
14424         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
14425         (lookup_namespace_name): Likewise.
14426         * typeck.c (build_unary_op): Not here anymore.
14427
14428         * decl2.c (do_class_using_decl): Make sure we get an identifier.
14429         * class.c (handle_using_decl): Ignore TYPE_DECLs.
14430
14431         * decl.c (qualify_lookup): New fn.
14432         (lookup_name_real): Use it.
14433
14434 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
14435
14436         * decl2.c (add_using_namespace): When directly using a namespace
14437         that was indirect before, promote it.
14438
14439         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
14440         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
14441         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
14442         * decl.c (select_decl): Replace two flag parameters by one.
14443         (unqualified_namespace_lookup): Likewise, pass flag.
14444         (lookup_flags): New function.
14445         (lookup_name_real): Compute flags, pass them.
14446         (lookup_namespace_name): Call with zero-flag.
14447         * decl2.c (ambiguous_decl): Add flag parameter, complain only
14448         according to flags.
14449         (lookup_using_namespace, qualified_lookup_using_namespace):
14450         Add flag parameter, pass them through.
14451         * lex.c (do_scoped_id): Call with zero-flag.
14452
14453 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
14454
14455         * typeck.c (convert_for_assignment): Use comptypes.
14456
14457 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
14458
14459         * semantics.c (finish_object_call_expr): Move test for the
14460         function called being a TYPE_DECL to ...
14461         * call.c (build_new_method_call): Here.
14462
14463 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
14464
14465         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
14466         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
14467
14468         * lex.c (looking_for_typename): Don't initialize.
14469
14470         * decl2.c (ambiguous_decl): Clarify error message.
14471
14472         * decl.c (push_using_directive): Iterate over namespaces used
14473         indirectly.
14474
14475 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14476
14477         * decl2.c (add_using_namespace): Iterate over namespaces used
14478         indirectly.
14479
14480         * decl.c (lookup_name_real): Accept namespace aliases as locals.
14481         (cat_namespace_levels): Ignore aliases.
14482         (duplicate_decls): Ignore duplicate aliases.
14483         * decl2.c (do_namespace_alias): Process block level namespace
14484         aliases.  Store alias with pushdecl.  Remove odr errors.
14485         * parse.y (namespace_alias): New non-terminal.
14486         (extdef): Use it.
14487
14488 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
14489
14490         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
14491         Handle TEMPLATE_TYPE_PARM.
14492         (arg_assoc): Rewrite.
14493
14494         * pt.c (complete_template_args): Don't look at the context unless
14495         we have to.
14496
14497         * method.c (build_decl_overload_real): Fix namespace handling.
14498
14499         * typeck.c (build_unary_op): Extract a lone function from an
14500         OVERLOAD.
14501
14502         * call.c (build_scoped_method_call): Handle getting a namespace
14503         for basetype in a destructor call.
14504         (check_dtor_name): Handle enums.
14505
14506         * parse.y (using_directive): New nonterminal.
14507         (extdef, simple_stmt): Use it.
14508
14509 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14510
14511         * decl2.c (add_function): Move error message ...
14512         (arg_assoc_namespace): ... from here.
14513
14514 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
14515
14516         * parse.y (namespace_qualifier): Fix multiple level handling.
14517         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
14518         (arg_assoc): Don't skip the first argument of a function.
14519
14520 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
14521
14522         * search.c (my_tree_cons): Clean up.
14523
14524 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
14525
14526         * call.c (joust): Don't warn about "confusing" conversions to the
14527         same type.
14528
14529 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14530
14531         * class.c (push_nested_class): Complain about namespaces.
14532         * decl.c (start_decl): Enter the object's namespace.
14533         (cp_finish_decl): Leave it.
14534         (grokdeclarator): Likewise.
14535         * decl2.c (check_decl_namespace): New function.
14536         (finish_file): Call it.
14537         * parse.y (complex_direct_notype_declarator): Set complexity
14538         of namespace-qualified ids to -1, enter the namespace.
14539
14540         * method.c (build_template_decl_overload): Expect _DECL as first
14541         parameter.  Put context temporarily into current_namespace.
14542         * pt.c (check_explicit_specialization): Change caller.
14543         (tsubst): Likewise.
14544
14545         * init.c (build_offset_ref): Call mark_used and
14546         convert_from_reference for namespace members.
14547
14548 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14549
14550         * search.c (my_tree_cons): The bitfield is at index 2.
14551
14552 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
14553
14554         * lang-options.h: Format changed to work with new --help support
14555         in gcc/toplev.c
14556
14557 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14558
14559         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
14560         Do Koenig lookup in CALL_EXPR.
14561         (arg_assoc): Handle error_mark.
14562         * lex.c (is_global): New function.
14563         (do_identifier): Expect arguments for Koenig lookup.
14564         * parse.y (primary): Add rules for calls of unqualified function calls.
14565         (do_id): Change call of do_identifier.
14566         * pt.c (finish_stmt_expr): Likewise.
14567         * semantics.c (finish_id_expr): Likewise.
14568         (finish_call_expr): Add integer parameter to indicate
14569         argument-dependent lookup.
14570
14571         * decl.c (struct binding_level): New field using_directives.
14572         (push_using_decl): Not sorry anymore.
14573         (push_using_directive): New function.
14574         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
14575         (unqualified_namespace_lookup): New function, code from ...
14576         (lookup_name_real): ... here.
14577         * decl2.c (lookup_using_namespace): Pass using list instead of
14578         initial scope.
14579         (validate_nonmember_using_decl): New function.
14580         (do_nonmember_using_decl): New function.
14581         (do_toplevel_using_decl): Use them.
14582         (do_local_using_decl): New function.
14583         (do_using_directive): Support block-level directives.
14584         * parse.y (simple_stmt): Support using declarations and
14585         directives.
14586         (namespace_qualifier, namespace_using_decl): New non-terminals.
14587
14588         * xref.c (classname): New function.
14589         (GNU_xref_hier): Change class and base parameters to tree.
14590         * decl.c (xref_baseypes): Change caller.
14591         * friend.c (make_friend_class): Likewise.
14592
14593 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
14594
14595         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
14596         comparison.
14597
14598         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
14599         template template parameter, record its use.
14600         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
14601         its template arguments if exists.
14602
14603         * pt.c (coerce_template_template_parms): New function equivalent
14604         to coerce_template_parms when IS_TMPL_PARM is true.
14605         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
14606         all callers changed.
14607
14608         (coerce_template_parms): Access ARGLIST properly when creating a
14609         new vector.  Only accept implicit TYPE_DECL as valid argument for
14610         a template template parameter when it is a base class of
14611         current_class_type.  Don't display error message when COMPLAIN is
14612         false.
14613
14614 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
14615
14616         * repo.c (get_base_filename): Use file_name_nondirectory.
14617         (open_repo_file): Likewise.
14618         * cp-tree.h (file_name_nondirectory): Add prototype.
14619
14620 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
14621
14622         * friend.c (do_friend): Pull the identifier out of declarator.
14623         Use cp_error and friends.
14624         * decl2.c (qualified_lookup_using_namespace): Fix call to
14625         purpose_member.
14626         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
14627         (grokvardecl): Use DECL_CLASS_SCOPE_P.
14628         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
14629         * class.c (warn_hidden): Fix for OVERLOAD.
14630         From grahams@rcp.co.uk:
14631         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
14632         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
14633
14634 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
14635
14636         * g++.1 (-traditional): Remove duplicated documentation.
14637
14638 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
14639
14640         * method.c (flush_repeats): Add nrepeats parameter.
14641         (issue_nrepeats): Likewise.
14642         (is_back_referenceable_type): New function.  Don't back-reference
14643         TEMPLATE_TYPE_PARMs as well as simple types like integers.
14644         (build_mangled_name_for_type): Likewise.
14645         (build_mangled_name_for_type_with_Gcode): Likewise.
14646         (lasttype): Remove.
14647         (nrepeats): Likewise.
14648         (Nrepeats): Likewise.
14649         (start_squangling): Don't clear the variables removed above.
14650         (end_squangling): Likewise.
14651         (flush_repeats): Tidy.  Use nrepeats parameter rather than
14652         Nrepeats global.
14653         (issue_nrepeats): Likewise, but with nrepeats global.  Use
14654         is_backreferenceable_type.
14655         (build_overload_nested_name): Tidy.  Add comment.  Use
14656         build_mangled_name_for_type.
14657         (build_underscore_int): Comment.
14658         (build_overload_scope_ref): Use build_mangled_name_for_type.
14659         (build_overload_int): Likewise.
14660         (build_template_template_parm_names): Tidy.
14661         (build_template_parm_names): Use build_mangled_name_for_type.
14662         (build_overload_identifier): Add comments.
14663         (build_mangled_name_for_type_with_Gcode): Split out from
14664         build_mangled_name.
14665         (build_mangled_name_for_type): Use it.
14666         (build_mangled_name): Rework to use build_mangled_name_for_type
14667         and to not use global nrepeats/Nrepeats.  Tidy.
14668         (process_modifiers): Tidy.
14669         (check_btype): Use is_backreferenceable_type.  Add comment.
14670         Rename `node' to `type'.
14671         (process_overload_item): Set numeric_output_need_bar here.
14672         Use build_mangled_name_for_type.  Tidy.
14673         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
14674         build_mangled_name_for_type.
14675
14676         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
14677         for TYPE_DECLs.
14678
14679 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
14680
14681         * cp-tree.h (warn_long_long): Define.
14682         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
14683         warning "ANSI C++ does not support `long long'".
14684         * decl2.c (warn_long_long): Define.
14685         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
14686
14687 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
14688
14689         * decl.c (xref_tag): Handle attributes between 'class' and name.
14690         * parse.y (aggr): Likewise.
14691         * semantics.c (finish_class_definition): Likewise.
14692         * Makefile.in (EXPECTED): Adjust.
14693
14694         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
14695         * decl2.c: Define them.
14696         (lang_decode_option): Handle them.
14697         * lang-options.h: Add -foptional-diags.
14698         * class.c (finish_struct): Don't complain about multiple meanings of
14699         name if -fno-optional-diags.
14700         * decl.c (pushdecl_class_level): Likewise.
14701         * lex.c (real_yylex): Check warn_multichar.
14702
14703 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
14704
14705         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
14706
14707         * tree.c (make_binfo): Fix length.
14708
14709 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
14710
14711         * decl2.c (lang_decode_option): Remove warn_template_debugging.
14712         * lang-options.h: Likewise.
14713
14714 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14715
14716         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
14717         (process_start_catch_block): Likewise for variables
14718         `false_label_rtx', `call_rtx' and `return_value_rtx'.
14719
14720 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
14721
14722         * tree.c (build_srcloc): Make sure we allocate this node on the
14723         permanent obstack.
14724
14725 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
14726
14727         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
14728         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
14729         (lang_specific_driver): Only add -lm automatically if need_math is
14730         nonzero.
14731
14732 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
14733
14734         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
14735
14736 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14737
14738         * Makefile.in (EXPR_H): New dependency variable.
14739         (decl2.o): Depend on $(EXPR_H).
14740         (typeck.o): Likewise.
14741         (init.o): Likewise.
14742         (expr.o): Likewise.
14743
14744 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14745
14746         * decl.c (start_enum): Put local enums on permanent_obstack.
14747
14748 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
14749
14750         * cp-tree.h (c_get_alias_set): Declare.
14751         * decl.c (init_decl_processing): Set lang_get_alias_set.
14752
14753 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
14754
14755         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
14756         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
14757         flag for all function decls which are in the exception table.
14758         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
14759         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
14760         code is emitted for any referenced rtti function.
14761
14762 1998-06-25  Dave Brolley  <brolley@cygnus.com>
14763
14764         * lang-specs.h: Use new | syntax to eliminate
14765         string concatenation.
14766
14767 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
14768
14769         * cp-tree.h (CP_DECL_CONTEXT): New macro.
14770         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
14771         * method.c (build_overload_nested_name): Likewise.
14772         * sig.c (build_signature_pointer_or_reference_type): Don't set
14773         DECL_CONTEXT.
14774
14775 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14776
14777         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
14778         * cp-tree.h (FROB_CONTEXT): New macro.
14779         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
14780         * decl.c (namespace_binding): Replace NULL_TREE with
14781         global_namespace.
14782         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
14783         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
14784         Likewise.
14785         * decl.c (pushtag): Use FROB_CONTEXT.
14786         (pushdecl, make_typename_type, define_function, grokdeclarator):
14787         Likewise.
14788         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
14789         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
14790         Likewise.
14791         * decl2.c (decl_namespace): Return global_namespace if no context.
14792         * method.c (build_overload_nested_name): Expect null as context.
14793         * pt.c (mangle_class_name_for_template): Do nothing for null
14794         contexts.
14795         (lookup_template_class): Allow for null id_context.
14796
14797 1998-06-25  Richard Henderson  <rth@cygnus.com>
14798
14799         * method.c (emit_thunk): Set current_function_is_thunk for the
14800         ASM_OUTPUT_MI_THUNK case as well.
14801
14802 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14803
14804         * exception.cc (__cplus_type_matcher): Get a match_info pointer
14805         instead of an exception table entry as a parameter.
14806
14807 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14808
14809         * parse.y (function_try_block): Don't call start_catch_handler.
14810         * except.c (call_eh_info): Remove coerced field from declaration.
14811         (build_eh_type_type_ref): New function to create an address of a
14812         rtti function for the new style exception tables.
14813         (expand_start_catch_block): Split function, this contains the
14814         common part.
14815         (process_start_catch_block_old): New function to perform the rest
14816         of expand_start_catch_block under old style exceptions.
14817         (process_start_catch_block_old): New function to perform the rest
14818         of expand_start_catch_block under new style exceptions.
14819         (expand_end_catch_block): Only pop the false label off the stack under
14820         the old style of exceptions.
14821         * semantics.c (finish_try_block): Don't call start_catch_handler.
14822         * exception.cc (struct cp_eh_info): Add original_value field.
14823         (__cplus_type_matcher): Perform type matching on the original exception
14824         value, and if we have a match, set the current value.
14825         (__cp_push_exception): Set the original exception value.
14826
14827 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
14828
14829         * call.c (joust): Fix confusing conversion warning.
14830
14831         * call.c (build_op_delete_call): Add placement parm.  Check
14832         LOOKUP_SPECULATIVELY.
14833         * cp-tree.h, decl2.c, init.c: Adjust.
14834         * decl.c (finish_function): Use it.
14835
14836         * pt.c (tsubst): Diagnose creating void fields or variables.
14837
14838 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14839
14840         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
14841
14842         * cp-tree.h (check_dtor_name): Add prototype.
14843
14844         * init.c (expand_member_init): Remove unused variables
14845         `ptr_type_node', `parm' and `rval'.
14846
14847         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
14848         in call to fprintf.
14849         (lang_print_xnode): Likewise.
14850
14851         * typeck2.c (enum_name_string): Cast argument to sprintf to long
14852         and use %ld specifier.
14853
14854         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
14855         specifier in call to fprintf.
14856         (GNU_xref_member): Cast argument to sprintf to int.
14857
14858 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14859
14860         * typeck2.c (pop_init_level): Warn about implicit zero initialization
14861         of struct members.
14862
14863 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14864
14865         * cp-tree.h: Prototype function `check_java_method'.
14866
14867 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
14868
14869         * class.c (finish_struct): Make conflicting use of id a pedwarn.
14870         * decl.c (pushdecl_class_level): Likewise.
14871
14872 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
14873
14874         * pt.c (convert_nontype_argument): Issue an error when presented
14875         with an integer (real) constant that cannot be simplified to an
14876         INT_CST (REAL_CST).
14877
14878         * cp-tree.h (c_get_alias_set): Remove declaration added in
14879         1998-06-13 change that should never have been checked in.
14880
14881 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
14882
14883         * typeck.c (build_binary_op_nodefault): Change % in format strings
14884         to %%.
14885
14886         * decl.c (grokvardecl): Don't build_static_name for decls that
14887         aren't at namespace scope.
14888
14889         * init.c (perform_member_init): Catch default-initialization of
14890         references.
14891
14892 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
14893
14894         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
14895
14896 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
14897
14898         * method.c (hack_identifier): Complain about getting a namespace
14899         or class template.
14900         * typeck.c (decay_conversion): Remove check for namespaces.
14901         * typeck2.c (incomplete_type_error): Likewise.
14902         * parse.y (template_arg): Add PTYPENAME expansion.
14903
14904 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
14905
14906         * decl.c (grokvardecl): Don't build external assembler names for
14907         TYPENAMEs in other namespaces as there is no declarator.
14908         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
14909         info from DECL_CONTEXT if it is NULL.
14910
14911 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
14912
14913         * call.c (check_dtor_name): Split out.
14914         (build_scoped_method_call): Use it.
14915         (build_method_call): Use it.
14916         * init.c (build_offset_ref): Use it.
14917
14918         * typeck.c (build_static_cast): Fix handling of pointers to members.
14919
14920         * decl.c (finish_function): Just return nothing from a constructor.
14921         * typeck.c (c_expand_return): Complain about returning a void
14922         expression from a destructor.
14923
14924 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
14925
14926         * class.c (alter_access): Accept a BINFO explaining how to get
14927         from the entity whose accessed is being altered to the type doing
14928         the altering.
14929         (handle_using_decl): New function containing code split out from ...
14930         (finish_struct_1): Here.
14931
14932         * cp-tree.h (complete_type_or_else): Declare.
14933         * init.c (build_new_1, build_delete): Use it.
14934         * typeck.c (require_complete_type): Use complete_type, rather than
14935         expanding it inline.
14936         (complete_type_or_else): New function.
14937         (build_component_ref): Use it.
14938         (pointer_int_sum): Make sure the type pointed to is complete.
14939         (pointer_diff): Likewise.
14940
14941         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
14942         types.
14943
14944         * search.c (get_matching_virtual): Note that member templates
14945         cannot override virtual functions.
14946
14947 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
14948
14949         * pt.c (check_explicit_specialization): If DECLARATOR turned into
14950         an error_mark_node from lookup_template_function, return the same.
14951         (determine_specialization): Also make sure TEMPLATE_ID isn't an
14952         error_mark_node, before we try to read its operands.
14953         * decl.c (grokdeclarator): If we got an error_mark_node from
14954         check_explicit_specialization, just return it right back.
14955
14956 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
14957
14958         * class.c (instantiate_type): Don't treat template-ids that don't
14959         specify any template arguments as equivalent to ordinary
14960         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
14961         pointer-to-members for member templates.  Tidy slightly.
14962         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
14963         * init.c (build_offset_ref): Handle template-ids like ordinary
14964         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
14965         offset part of the OFFSET_REF.
14966         * typeck.c (build_unary_op): Change check for unknown types to
14967         look for OFFSET_REFs, not SCOPE_REFs.
14968
14969 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
14970
14971         * pt.c (is_member_template_class): New function.
14972         (push_template_decl_real): Use it.
14973
14974 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
14975
14976         * friend.c (do_friend): Add support for nested classes using
14977         member functions of the enclosing class as friends.
14978
14979 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
14980
14981         * call.c (convert_default_arg): Make global, not static.
14982         (convert_arg_for_ellipsis): Split out from ...
14983         (build_over_call): Here.
14984         * cp-tree.h (convert_default_arg); Declare.
14985         (convert_arg_to_ellipsis): Likewise.
14986         (do_member_init): Remove.
14987         * init.c (do_member_init): Remove; this code is dead.
14988         (expand_member_init): Remove much of this code; it is dead.
14989         * typeck.c (convert_arguments): Use convert_default_arg and
14990         convert_arg_for_ellipsis, rather than duplicating here.
14991
14992         * call.c (convert_like): Don't fail silently if
14993         build_user_type_conversion fails.  Always return error_mark_node
14994         for failure.
14995
14996 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
14997
14998         * search.c (covariant_return_p): Complain about ambiguous base.
14999
15000         * typeck.c (build_component_ref): Diagnose ref to nested type.
15001
15002 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
15003
15004         * decl.c (grokparms): Check that INIT isn't an error_mark_node
15005         before giving error about invalid type for default arg.
15006
15007 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
15008
15009         * call.c (build_method_call): Fix thinko.
15010
15011 1998-06-10  Dave Brolley  <brolley@cygnus.com>
15012
15013         * decl2.c (lang_decode_option): New argc/argv interface.
15014         * cp-tree.h (lang_decode_option): New argc/argv interface.
15015         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
15016         specified for cpplib-enabled compilers.
15017         * lex.c (lang_init): Don't check_newline for cpplib.
15018         (init_parse): Don't initialize cpplib here.
15019
15020 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
15021
15022         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
15023         piece before checking DECL_MUTABLE_P.
15024
15025 1998-06-10  John Carr  <jfc@mit.edu>
15026
15027         * tree.c (debug_binfo): Make printf format match arguments.
15028
15029         * error.c (OB_PUTI): Make printf format match arguments.
15030
15031 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
15032
15033         * init.c (perform_member_init): Handle default-initialization.
15034
15035         * except.c (build_throw): Handle throwing NULL.
15036
15037         * typeck.c (build_x_function_call): Use resolve_offset_ref.
15038
15039         * search.c (compute_access): Only strip an anonymous union
15040         for a FIELD_DECL.
15041
15042         * call.c (add_builtin_candidates): Tweak.
15043
15044         * cvt.c (build_expr_type_conversion): Restore code for conversion
15045         from class types.
15046         * decl2.c (delete_sanity): Use it.  Clean up.
15047
15048         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
15049
15050 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
15051
15052         * typeck.c (c_expand_return): Don't warn about void expressions on
15053         return statements in functions returning void.
15054
15055 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
15056
15057         * pt.c (fn_type_unification): Revise documentation.  Tidy.
15058         (type_unification): Likewise.
15059
15060 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
15061
15062         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
15063         expand_end_catch.
15064         * parse.y (function_try_block): Rename expand_start_catch, and delete
15065         expand_end_catch.
15066         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
15067         expand_end_catch.
15068
15069 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
15070
15071         * search.c (lookup_member): New fn.
15072         * class.c (finish_struct_1): Use it.
15073         * decl.c (lookup_name_real): Use it.
15074
15075 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15076
15077         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
15078
15079         * cp-tree.h: Add prototype for `maybe_print_template_context' and
15080         `maybe_make_one_only'.
15081
15082         * decl.c (auto_function): Remove unused variable `decl'.
15083
15084         * decl2.c: Include dwarf2out.h and dwarfout.h.
15085
15086         * lex.c: Remove redundant declarations of `set_float_handler' and
15087         `asm_out_file'.
15088
15089 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
15090
15091         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
15092         time flag.  Call __cp_eh_info instead of __cp_exception_info.
15093         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
15094         (__cp_exception_info): Return offset into cp_eh_info structure to
15095         match what use to be the start of this structure.
15096         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
15097         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
15098         compile time flag.
15099         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
15100         __cp_eh_info instead of __cp_exception_info.
15101
15102 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
15103
15104         * decl.c (cp_finish_decl): Disable inlining of extern inlines
15105         with static variables.
15106
15107 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
15108
15109         * init.c (build_offset_ref): Correct previous change to use build,
15110         not build_min.
15111
15112 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
15113
15114         * class.c (instantiate_type): Handle pointer-to-members where the
15115         member is a template.
15116         * init.c (build_offset_ref): Likewise.
15117         * typeck.c (build_unary_op): Likewise.
15118
15119 1998-06-07  Richard Henderson  <rth@cygnus.com>
15120
15121         * lex.c (lang_init_options): New function.
15122         (lang_init): Remove flag_exceptions == 2 hack.
15123
15124 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
15125
15126         * search.c (envelope_add_decl): Tweak for implicit typename.
15127
15128         * call.c (joust): Also warn about confusing conversion op/constructor
15129         overload resolution.
15130
15131         * spew.c (yylex): Also return the TYPE_DECL if got_object.
15132         Don't clear got_object after '~'.
15133         * call.c (build_scoped_method_call): Tweak destructor handling.
15134         (build_method_call): Likewise.
15135         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
15136         TYPE_MAIN_VARIANT for destructors.
15137         * semantics.c (finish_object_call_expr): Complain about calling a
15138         TYPE_DECL.
15139
15140 1998-06-05  Per Bothner  <bothner@cygnus.com>
15141
15142         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
15143         Define - update needed by gcc.c change.
15144
15145 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
15146
15147         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
15148
15149 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
15150
15151         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
15152         * decl.c (lookup_name_real): Add namespaces_only parameter.
15153         If set, return only NAMESPACE_DECLs.
15154         (select_decl): Likewise.
15155         (identifier_type_value): Give additional parameter.
15156         (lookup_name_nonclass): Likewise.
15157         (lookup_name): Likewise.
15158         (find_binding): Skip namespace aliases.
15159         (binding_for_name): Likewise.
15160         (push_namespace): Check for namespace aliases.
15161         (lookup_name_namespace_only): New function.
15162         (begin_only_namespace_names, end_only_namespace_names): New functions.
15163         * decl2.c (set_decl_namespace): Skip namespace aliases.
15164         (do_using_directive): Likewise.
15165         (do_namespace_alias): Produce namespace aliases, fix alias
15166         redeclaration.
15167         * error.c (dump_decl): Support SCOPE_REF.
15168         * parse.y (extdef): Wrap lookup with namespace_only for namespace
15169         aliases and using declarations.
15170
15171 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
15172
15173         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
15174
15175         * error.c (dump_expr): Clean up NEW_EXPR case.
15176
15177 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
15178
15179         Suggested by Brendan Kehoe
15180         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
15181         treat it as using ::decl.
15182
15183         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
15184
15185         * tree.c (mapcar): Support NEW_EXPR.
15186
15187         * error.c (dump_expr): Support NEW_EXPR.
15188
15189 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
15190
15191         * method.c (make_thunk): Use overload machinery to make name.
15192         * search.c (covariant_return_p): New fn.
15193         (get_matching_virtual): Use it.
15194
15195         * init.c (build_new_1): Fix check for void.
15196
15197 1998-06-01  Per Bothner  <bothner@cygnus.com>
15198
15199         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
15200         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
15201         java_int_type_node, java_long_type_node, java_float_type_node,
15202         java_double_type_node, java_char_type_node, java_boolean_type_node):
15203         New "primitive" types, with predefined names __java_byte etc.
15204         (record_builtin_java_type):  New function.
15205         (init_decl_processing):  Make Java types with record_builtin_java_type.
15206         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
15207         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
15208         (grokfndecl):  Call check_java_method for Java classes.
15209         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
15210         (process_overload_item):  Match types against specific
15211         java_XX_type_node types, rather than using is_java_type.
15212         * class.c (finish_struct_1):  Don't add default copy constructor
15213         or operator= if TYPE_FOR_JAVA.
15214         (pop_lang_conext):  Restore strict_prototyp proper if Java.
15215         * decl2.c (acceptable_java_type, check_java_method):  New functions.
15216         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
15217         (tsubst):  Move common statement after if statement.
15218         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
15219
15220 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
15221
15222         * pt.c (for_each_template_parm): Use first_rtl_op.
15223
15224         * tree.c (build_cplus_array_type_1): Also check index_type for
15225         template parms.
15226
15227 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
15228
15229         * pt.c (tsubst): Always copy BINFO_BASETYPES.
15230
15231 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
15232
15233         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
15234         TYPE_SIZE_UNIT too.
15235
15236 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
15237
15238         * decl.c (grokdeclarator): Don't complain about in-class
15239         initialization of static consts if we don't really know the type
15240         of the variable.
15241
15242 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
15243
15244         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
15245         * method.c (build_destructor_name): New fn.
15246         * decl2.c (maybe_retrofit_in_chrg): Split out...
15247         (grokclassfn): From here.  Reorganize.
15248         * decl.c (grok_ctor_properties): Make sure ctors for types with
15249         vbases have the in_chrg parm.
15250         * pt.c (instantiate_class_template): Update
15251         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
15252         grok_*_properties.
15253         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
15254
15255 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
15256
15257         * pt.c (instantiate_decl): Make test for whether or not static
15258         variables should be instantiated early match its comment.
15259
15260 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
15261
15262         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
15263         a member.
15264         (start_function): Call check_default_args.
15265         * decl2.c (grokfield): Don't call check_default_args.
15266         (check_default_args): Use cp_error_at.
15267         * lex.c (do_pending_defargs): Call check_default_args.
15268
15269 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
15270
15271         * call.c (build_method_call): Make sure get_type_value returns
15272         something before we try to use its TYPE_MAIN_VARIANT.
15273         (build_scoped_method_call): Likewise.
15274
15275 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
15276
15277         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
15278         initialize an array.
15279
15280         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
15281         DECL_VIRTUAL_P.
15282
15283         * friend.c (do_friend): Clarify template warning.
15284
15285 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
15286
15287         * decl.c (shadow_label): Don't treat decls as identifiers.
15288         (maybe_push_to_top_level): Clear shadowed_labels.
15289
15290         * pt.c (instantiate_decl): Reset lineno and filename after calling
15291         regenerate_decl_from_template.
15292
15293         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
15294         error_mark_node.
15295
15296 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
15297
15298         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
15299
15300 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15301
15302         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
15303         (convert_nontype_argument): Handle cases when nontype template
15304         parameters become classes after substitution.
15305
15306 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
15307
15308         * friend.c (is_friend): Use comptypes, rather than == to compare
15309         types.  Modify for new representation of template friends.
15310         (make_friend_class): Likewise.
15311         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
15312         (instantiate_class_template): Deal with template friends.
15313
15314         * decl.c (store_parm_decls): Remove redundant call to
15315         expand_main_function.
15316
15317 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
15318
15319         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
15320         DECL_USE_TEMPLATE.
15321
15322 1998-05-26  Per Bothner  <bothner@cygnus.com>
15323
15324         * language_as_string:  Handle lang_java.
15325
15326 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
15327
15328         * decl.c (pushdecl): Don't copy the type_decl.
15329
15330 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15331
15332         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
15333         current_class_type.
15334         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
15335
15336         * parse.y (complex_direct_notype_declarator): Use $1 to access
15337         scope of notype_qualified_id.
15338
15339 1998-05-26  Dave Brolley  <brolley@cygnus.com>
15340
15341         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
15342         (init_parse): Initialize cpplib interface.
15343
15344         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
15345         empty continuation.
15346
15347 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
15348
15349         * decl.c (pushtag): Avoid crashing on erroneous input.
15350
15351 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15352
15353         * decl.c (push_namespace): Only produce one unique name for
15354         anonymous namespaces.
15355         (get_unique_name): Remove.
15356
15357 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
15358
15359         * call.c (tourney): Don't do any extra comparisons.
15360
15361         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
15362
15363         * cp-tree.h (processing_template_parmlist): Declare.
15364         * decl.c (pushtag): Don't call push_template_decl when we
15365         shouldn't.
15366         * pt.c (processing_template_parmlist): New variable.
15367         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
15368         (complete_template_args): Use it.
15369         (add_to_template_args): Likewise.
15370         (innermost_args): Likewise.
15371         (tsubst): Likewise.
15372         (begin_template_parm_list): Use processing_template_parmlist.
15373         (end_template_parm_list): Likewise.
15374
15375         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
15376         * decl.c (grokdeclarator): Use it.
15377         * decl2.c (grok_x_components): Likewise.
15378         * init.c (initializing_context): Likewise.
15379         * method.c (do_build_copy_constructor): Likewise.
15380         (do_build_assign_ref): Likewise.
15381         * search.c (compute_access): Likewise.
15382         * typeck.c (build_component_ref): Likewise.
15383
15384         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
15385         unnamed type a typedef name "for linkage purposes".
15386
15387         * pt.c (lookup_template_class): Don't look at
15388         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
15389
15390         * method.c (build_overload_int): Handle error cases gracefully.
15391
15392         * pt.c (instantiate_decl): Handle static member variables
15393         correctly.
15394
15395         * pt.c (tsubst): Use the tsubst'd type when producing new
15396         TEMPLATE_PARM_INDEX nodes.
15397
15398 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
15399
15400         * tree.c (cp_tree_equal): Handle pointers to member functions.
15401
15402         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
15403         sure the type of the REF_BIND is a reference type.
15404         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
15405         target_type for clarity.
15406
15407         * parse.y (xcond): Move call to condition_conversion ...
15408         * semantics.c (finish_for_cond): Here.
15409         * parse.c: Regenerated.
15410
15411 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
15412
15413         * decl.c (push_namespace): Namespaces have type void.
15414         * typeck2.c (incomplete_type_error): Complain about namespace
15415         used as expression.
15416         * typeck.c (decay_conversion): Likewise.
15417
15418 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
15419
15420         * error.c (dump_expr): Support namespaces.
15421
15422 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
15423
15424         * cp-tree.def: Add SRCLOC.
15425         * cp-tree.h: Add struct tree_srcloc and accessor macros.
15426         * tree.c (build_srcloc, build_srcloc_here): New fns.
15427         * pt.c (add_pending_template): Use build_srcloc_here.
15428         (push_tinst_level): Update last_template_error_tick before erroring.
15429         (instantiate_decl): Restore lineno and input_filename before
15430         calling add_pending_template.
15431         * decl2.c (finish_file): Set up lineno and input_filename for
15432         pending templates.
15433
15434 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
15435
15436         * decl.c (lang_print_error_function): New fn.
15437         (init_decl_processing): Set print_error_function to use it.
15438         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
15439
15440         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
15441         ICS_BAD_FLAG.
15442
15443         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
15444         copy-initialization.
15445
15446         * class.c (build_vtable_entry): Use int_fits_type_p.
15447         (build_vtable): Pass a signed offset to build_vtable_entry.
15448         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
15449         set_rtti_entry): Likewise.
15450
15451 1998-05-22  Per Bothner  <bothner@cygnus.com>
15452
15453         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
15454         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
15455
15456 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
15457
15458         * pt.c (print_template_context): Use fprintf instead of cp_error.
15459
15460         * pt.c (determine_specialization): Just return an error_mark_node.
15461         Also print the decl we want in error messages.  If we complain,
15462         return error_mark_node.
15463         (tsubst_friend_function): Set lineno and input_filename so
15464         error messages will be useful.
15465         (instantiate_template): Just return an error_mark_node.
15466         (check_explicit_specialization): Don't mess with a returned
15467         error_mark_node.
15468
15469         * pt.c (print_template_context): Add new argument.
15470         (maybe_print_template_context): New fn.
15471         (push_tinst_level): Increment tinst_level_tick.
15472         (pop_tinst_level): Likewise.
15473         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
15474         xrealloc instead of xmalloc.
15475
15476         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
15477
15478 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
15479
15480         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
15481         if the template we looked up is the same as the one we already
15482         have.
15483
15484 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
15485
15486         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
15487         (cpp_reader,parse_in): Add for cpplib.
15488         (check_newline): Call handle_sysv_pragma with new interface.
15489         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
15490
15491         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
15492         (sub_getch): Call GETC for cpplib.
15493
15494         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
15495         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
15496
15497         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
15498
15499 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
15500
15501         * decl2.c (maybe_make_one_only): New fn.
15502         (import_export_vtable): Use it.
15503         (import_export_decl): Likewise.
15504         * pt.c (mark_decl_instantiated): Likewise.
15505
15506 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
15507
15508         * decl2.c (find_representative_member): Rename to ...
15509         (build_anon_union_vars): New function.
15510         (finish_anon_union): Fix stupidity of previous change.
15511
15512 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
15513
15514         * decl.c (grokfndecl): Handle definition of specialization in
15515         friend declaration.
15516
15517         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
15518
15519 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
15520
15521         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
15522         to look for type declarations.
15523         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
15524         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
15525         (finish_member_class_template): Declare.
15526         * decl.c (pushtag): Put member class templates on the
15527         CLASSTYPE_TAGS list, just as for ordinary member classes.
15528         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
15529         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
15530         IDENTIFIER_NAMESPACE_VALUEs.
15531         * parse.y (component_decl): Move code to ...
15532         * semantics.c (finish_member_class_template): New function.
15533         Don't put member class templates on the list of components for a
15534         class.
15535         * parse.c: Regenerated.
15536         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
15537         In fact, don't use DECL_CONTEXT at all here.
15538
15539 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15540
15541         * decl.c (record_unknown_type): New function.
15542         (init_decl_processing): Call it for the unknown and global type
15543         nodes.
15544
15545 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
15546
15547         * decl2.c (find_representative_member): New function.
15548         (finish_anon_union): Use it.
15549
15550         * cp-tree.h (MAIN_NAME_P): New macro.
15551         (DECL_MAIN_P): Likwise.
15552         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
15553         (grokfndecl): Use the new macros.
15554         (grokdeclarator): Likewise.
15555         (start_function): Likewise.
15556         (store_parm_decls): Likewise.
15557         (finsh_function): Likewise.
15558         * friend.c (do_friend): Likewise.
15559         * typeck.c (build_function_call_real): Likewise.
15560         (build_unary_op): Likewise.
15561
15562 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
15563
15564         * decl2.c (start_objects, finish_objects, do_dtors,
15565         do_ctors): Split out from...
15566         (finish_file): ...here.
15567
15568 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
15569
15570         * tree.c (is_overloaded_fn): Don't abort on placeholders from
15571         push_class_decls.
15572
15573 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
15574
15575         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
15576
15577         * error.c (dump_expr): Handle an ARROW_EXPR.
15578
15579 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
15580
15581         * decl.c (saveable_obstack): Declare.
15582         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
15583         declare, if necessary.
15584
15585 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
15586
15587         * call.c (compare_qual): Remove.
15588         (is_subseq): Tweak.
15589         (is_properly_derived_from): New function.
15590         (maybe_handle_ref_bind): Likewise.
15591         (maybe_handle_implicit_object): Likewise.
15592         (compare_ics): Modify substantially to bring into conformance with
15593         the standard.
15594         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
15595         (comp_cv_qualification): Declare.
15596         (comp_cv_qual_signature): Likewise.
15597         * typeck.c (comp_cv_qualification): Likewise.
15598         (comp_cv_qual_signature): Likewise.
15599
15600 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15601
15602         * Makefile.in (parse.o): Depend on toplev.h.
15603
15604         * class.c (typecode_p): Remove prototype and definition.
15605
15606         * cp-tree.h (currently_open_class, is_empty_class, member_p):
15607         Add prototype.
15608
15609         * decl.c (push_overloaded_decl_top_level): Remove prototype and
15610         definition.
15611
15612         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
15613         in call to `cp_thing'.
15614         (cp_warning): Likewise for function pointer `warning'.
15615
15616         * except.c (do_function_call): Remove prototype and definition.
15617         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
15618
15619         * method.c (is_java_type): Add prototype and make it static.
15620
15621         * parse.y: Include toplev.h.
15622
15623         * pt.c (type_unification): Remove unused variable `arg'.
15624         (instantiate_decl): Likewise for `save_ti'.
15625
15626         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
15627
15628 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
15629
15630         * init.c (build_member_call): Handle template_ids.
15631         * parse.y (primary): Add global_scope template_id.
15632
15633 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
15634
15635         * decl2.c (get_sentry): Use end_temporary_allocation.
15636         Don't declare permanent_obstack.
15637
15638 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
15639
15640         * parse.y (.finish_new_placement): New non-terminal.
15641         (unary_expr, new_type_id): Use it.
15642         * parse.c: Regenerated.
15643
15644 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
15645
15646         * pt.c (redeclare_class_template): Say where the original definition
15647         of the template-parameter's default argument appeared.
15648
15649 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
15650
15651         * call.c (build_over_call): Tweak empty class handling.
15652
15653         * decl.c (make_typename_type): Use currently_open_class.
15654
15655         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
15656
15657 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
15658
15659         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
15660         for a type unless it is one.
15661
15662         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
15663
15664 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
15665
15666         * Makefile.in (program_transform_name, objdir): Define.
15667
15668         * Makefile.in (BISON): Use bison from the build tree if it exists.
15669         (FLEX): Likewise.
15670
15671 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
15672
15673         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
15674
15675         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
15676
15677 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
15678
15679         * call.c (build_scoped_method_call): Likewise.
15680
15681 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
15682
15683         * init.c (build_new_1): Call suspend_momentary around the creation
15684         of values that must be saved for exception handling.
15685         * parse.y (.build_new_placement): New non-terminal.
15686         (unary_expr, new_placement): Use it.
15687         * parse.c: Regenerated.
15688
15689 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
15690
15691         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
15692         old and new types.
15693
15694         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
15695         canonical type.
15696
15697         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
15698
15699 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
15700
15701         * decl.c (start_decl): Revert problem change.
15702
15703         * Makefile.in (CONFLICTS): Fix.
15704
15705 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15706
15707         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
15708
15709 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
15710
15711         * class.c (finish_struct_1): Use BINFO_SIZE.
15712
15713         * decl.c (start_decl): Use 'tem'.
15714
15715 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
15716
15717         * exception.cc: Include eh-common.h.
15718         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
15719         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
15720         (__cp_push_exception): Initialize eh_info struct as well.
15721         * except.c: Remove local structs and include eh-common.h.
15722         (init_exception_processing): Set language and version codes.
15723         (call_eh_info): Add presence of eh_info to runtime description of
15724         struct cp_eh_info.
15725         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
15726         * semantics.c (finish_try_block): Call start_catch_block() and
15727         end_catch_block().
15728         * parse.y (function_try_block): Call start_catch_block() and
15729         end_catch_block().
15730
15731 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
15732
15733         * typeck.c (original_type): New function.
15734         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
15735         to see if they're actually the same.
15736         * cp-tree.h (original_type): Declare.
15737
15738 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15739
15740         * Makefile.in (lex.o): Depend on output.h.
15741
15742         * call.c (add_function_candidate): Remove unused variable `cand'.
15743         (add_conv_candidate): Likewise.
15744         (build_builtin_candidate): Likewise.
15745
15746         * cp-tree.h: Add prototype for `types_overlap_p'.
15747
15748         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
15749
15750         * decl2.c (merge_functions): Remove unused variables `tmp' and
15751         `tempn'.
15752
15753         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
15754         (code_as_string): Likewise.
15755         (language_as_string): Likewise.
15756         (parm_as_string): Likewise.
15757         (op_as_string): Likewise.
15758         (assop_as_string): Likewise.
15759         (cv_as_string): Likewise.
15760
15761         * lex.c: Include output.h.
15762
15763         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
15764
15765         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
15766         ATTRIBUTE_UNUSED.
15767
15768         * tinfo.cc (__class_type_info::dcast): Change the type of variable
15769         `i' from int to size_t.
15770
15771         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
15772         ATTRIBUTE_UNUSED.
15773
15774 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
15775
15776         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
15777         DECL_NAMESPACE_SCOPE_P.
15778         (lang_decl_name): Likewise.
15779         * pt.c (tsubst_friend_function, tsubst): Likewise.
15780         * decl.c (pushdecl, redeclaration_error_message, start_decl,
15781         cp_finish_decl, start_function): Likewise.
15782         * class.c (finish_struct_1): Likewise.
15783         * call.c (build_over_call): Likewise.
15784         (compare_ics): Use DERIVED_FROM_P.
15785
15786 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
15787
15788         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
15789         * method.c (build_mangled_name): Use it.
15790         (build_decl_overload_real): Likewise.
15791
15792         * error.c (dump_simple_decl): New function, broken out from ...
15793         (dump_decl): Use it.
15794
15795 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
15796
15797         * ptree.c (lang_print_xnode): Add missing `break'.
15798
15799         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
15800
15801         * call.c (add_template_candidate): Adjust for changes to
15802         fn_type_unification.
15803         (add_template_candidate_real): Likewise.
15804         (add_template_conv_candidate): Likewise.
15805         (build_user_type_conversion_1): Likewise.
15806         (build_new_function_call): Likewise.
15807         (build_object_call): Likewise.
15808         (build_new_op): Likewise.
15809         (build_new_method_call): Likewise.
15810         * class.c (instantiate_type): Likewise.
15811         * cp-tree.h (unification_kind_t): New type.
15812         (fn_type_unification): Adjust prototype.
15813         (type_unificaiton): Likewise.
15814         * pt.c (UNIFY_ALLOW_NONE): New macro.
15815         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
15816         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
15817         (UNIFY_ALLOW_DERIVED): Likewise.
15818         (unify): Change prototype.
15819         (maybe_adjust_types_for_deduction): New function.
15820         (check_cv_quals_for_unify): Likewise.
15821         (determine_specialization): Adjust.
15822         (fn_type_unification): Likewise.
15823         (type_unification): Likewise.
15824         (type_unification_real): Likewise.  Use
15825         maybe_adjust_types_for_deduction.  Fix mishandling of
15826         back-unification of template functions passed as arguments.  Pass
15827         appropriate combination of UNIFY_ALLOW_* to unify.
15828         (unify): Remove unused NTPARMS parameter.  Use
15829         check_cv_quals_for_unify.  Remove bogus code that allowed
15830         too-generous unification in order to adhere more closely to standard.
15831         (get_bindings_real): Adjust.
15832         (get_class_bindings): Likewise.
15833
15834         * method.c (build_overload_identifier): Only use the innermost
15835         template arguments when mangling.
15836         * pt.c (tsubst_template_argument_vector): New function.
15837         (complete_template_args): Deal with the situation where the
15838         extra_args contain more than one level of arguments.
15839         (lookup_template_class): Deal with member template classes, which
15840         may have more than one level of arguments.
15841         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
15842         Improve handling of member template classes.  Use
15843         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
15844         tsubst_template_argument_vector where appropriate.
15845         (regenerate_decl_from_template): Break out from ...
15846         (instantiate_decl): Here.
15847
15848         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
15849         * parse.h: Regenerated.
15850         * parse.c: Really regenerated.
15851
15852         * cp-tree.h (finish_unary_op_expr): New function.
15853         (finish_id_expr): Likewise.
15854         (begin_new_placement): Likewise.
15855         (finish_new_placement): Likewise.
15856         (finish_declarator): Likewise.
15857         (finish_translation_unit): Likewise.
15858         (finish_parmlist): Likewise.
15859         (begin_class_definition): Likewise.
15860         (finish_class_definition): Likewise.
15861         (finish_default_args): Likewise.
15862         (finish_inline_definitions): Likewise.
15863         * parse.y (GCC_ASM_KEYWORD): Remove.
15864         (TYPENAME_ELLIPSIS): Likewise.
15865         * parse.c: Regenerated.
15866         Use new functions in semantics.c in the actions for many rules.
15867         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
15868         * hash.h: Regenerated.
15869         * semantics.c (finish_expr_stmt): Allow NULL expr.
15870         (finish_unary_op_expr): New function, containing
15871         code previously in parse.y.
15872         (finish_id_expr): Likewise.
15873         (begin_new_placement): Likewise.
15874         (finish_new_placement): Likewise.
15875         (finish_declarator): Likewise.
15876         (finish_translation_unit): Likewise.
15877         (finish_parmlist): Likewise.
15878         (begin_class_definition): Likewise.
15879         (finish_class_definition): Likewise.
15880         (finish_default_args): Likewise.
15881         (finish_inline_definitions): Likewise.
15882
15883 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
15884
15885         * typeck.c (build_c_cast): Don't decay arrays and functions to
15886         pointer type when converting to a class type.
15887
15888 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
15889
15890         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
15891         (DECL_CLASS_SCOPE_P): Likewise.
15892
15893 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
15894
15895         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
15896         * decl2.c (constructor_name_full): Likewise.
15897
15898 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
15899
15900         * tree.c (mapcar): Add OVERLOAD support.
15901
15902         * init.c (resolve_offset_ref): We must use basetype_path before we
15903         destroy it with a call to convert_pointer_to.
15904
15905 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
15906
15907         * class.c (currently_open_class): New fn.
15908         * decl.c (lookup_name_real): Use it.
15909         * search.c (lookup_field): Likewise.
15910
15911 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15912
15913         * cp-tree.def (OVERLOAD): New node.
15914         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
15915         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
15916         (NAMESPACE_BINDING): Remove.
15917         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
15918         namespace_binding.
15919         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
15920         Define.
15921         (tree_overload): New struct.
15922         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
15923         (REAL_IDENTIFIER_TYPE_VALUE): Define.
15924         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
15925         (lang_decl_flags): Remove in_namespace.
15926         (lang_decl): Remove chain.
15927         (DECL_CHAIN, DECL_NAMESPACE): Remove.
15928         (flag_honor_std): Declare extern.
15929         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
15930         namespace_binding, set_namespace_binding,
15931         lookup_function_nonclass, cat_namespace_levels,
15932         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
15933         scratch_ovl_cons, ovl_member, build_overload): Declare.
15934         (decl_list_length, get_namespace_id, current_namespace_id,
15935         overloaded_globals_p): Remove.
15936         (lookup_using_namespace, qualified_lookup_using_namespace): Change
15937         return type.
15938         (push_scratch_obstack): New macro.
15939         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
15940         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
15941         convs, fns.
15942         (build_new_function_call): Iterate using OVL_CHAIN.
15943         Print DECL_NAME in when reporting ambiguities.
15944         (build_object_call): Iterate using OVL_NEXT for fns, convs.
15945         (build_new_op): Call lookup_function_nonclass.
15946         Iterate using OVL_NEXT.
15947         (build_op_delete_call): Change detection of members.
15948         Do not wrap TREE_LIST around fields and single global functions.
15949         (build_over_call): Don't push a class level if the context is a
15950         namespace.
15951         (build_new_method_call): Iterate using OVL_NEXT.
15952         * class.c (add_method): Chain overloaded members using
15953         build_overload.  Remove copying of method.
15954         (grow_method): When iterating through the obstack, expect OVERLOAD
15955         nodes.  Chain overload members.
15956         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
15957         nodes in call to get_baselinks.
15958         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
15959         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
15960         fdecls that are OVERLOAD nodes.
15961         (validate_lhs): New function.
15962         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
15963         code.  Use DECL_NAME in error messages.  Split code between global
15964         and member function processing.
15965         * decl.c (global_type_node): New static variable.
15966         (in_std): New global.
15967         (struct binding_level): New field usings.
15968         (resume_binding_level): Assert that we are not in a class.
15969         (toplevel_bindings_p): Just check for namespace_p or
15970         pseudo_global.
15971         (resume_level): Remove.
15972         (find_binding): New function.
15973         (binding_for_name): Call it.
15974         (namespace_binding, set_namespace_binding): New functions.
15975         (push_namespace): Associate binding level with new namespace,
15976         resume_binding_level for existing namespace.  Remove old code.
15977         Fake std by counting.
15978         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
15979         (maybe_push_to_top_level): Save current namespace.
15980         (pop_from_top_level): Restore saved namespace.
15981         (pop_namespace): Call suspend_binding_level.  Remove old code.
15982         (cat_namespace_levels): New function.
15983         (set_identifier_type_value_with_scope): For namespace bindings,
15984         set BINDING_TYPE, and use global_type_node.
15985         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
15986         (identifier_type_value): New function.
15987         (pushtag): If no context, use current_namespace.
15988         (duplicate_decls): Don't process DECL_CHAIN.
15989         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
15990         already set.  Never reset it to NULL_TREE.  Lookup global variables
15991         in their namespace.  Push overloaded templates if they are on
15992         namespace level.
15993         (pushdecl_namespace_level): New function.
15994         (pushdecl_top_level): Implement using pushdecl_namespace_level.
15995         (pushdecl_using_decl): New function.
15996         (overloaded_globals_p): Remove.
15997         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
15998         them.  Use namespace_binding and set_namespace_value.
15999         (redeclaration_error_message): Complain if the declarations come
16000         from different namespaces.
16001         (lookup_tag): On namespace level, look in the BINDING_TYPE.
16002         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
16003         old code.
16004         (select_decl): New function.
16005         (lookup_name_real): Call it for qualified and unqualified lookup.
16006         Pass tree_bindings from the stack.
16007         If prefer_type is 1, also accept namespaces.
16008         (lookup_function_nonclass): New function.
16009         (init_decl_processing): Set the binding level of the global
16010         namespace to global_binding_level.
16011         Build a proper type list for __builtin_apply.
16012         Initialize std_node to "fake std" if flag_honor_std is set.
16013         Initialize global_type_node.
16014         Allocated bad_alloc in namespace std if flag_honor_std.
16015         (define_function): Set the DECL_CONTEXT to the current_namespace.
16016         (start_decl): A namespace is not considered as a context here.  If
16017         the DECL_CONTEXT is a namespace, push the decl.
16018         (cp_finish_decl): Check for namespaces used as initializers.
16019         (grokfndecl): Add namespace parameter.  Remove processing of
16020         DECL_CHAIN.
16021         (grokvardecl): Add namespace parameter.
16022         (grokdeclarator): Process SCOPEs that are namespaces.  For
16023         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
16024         (start_function): Check for contexts that are namespaces.
16025         Set context for declarations that have not been pushed.
16026         (store_parm_decls): Check for ::main only.
16027         (finish_function): Likewise.
16028         (start_method): Check for contexts that are namespaces.
16029         (start_method): Remove DECL_CHAIN processing.
16030         * decl2.c (flag_honor_std): Declare.
16031         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
16032         (decl_namespace_list): New static global.
16033         (grok_x_components): Ignore namespaces as type contexts.
16034         (check_classfn): Expect OVERLOAD nodes.
16035         (grokfield): Remove DECL_CHAIN processing.
16036         (finish_file): Call cat_namespace_levels.
16037         (merge_functions): New function.
16038         (ambiguous_decl): Rewrite.
16039         (lookup_using_namespace): Produce tree_bindings.
16040         (qualified_lookup_using_namespace): Likewise.
16041         (set_decl_namespace, decl_namespace, current_decl_namespace,
16042         push_decl_namespace, pop_decl_namespace): New functions.
16043         (arg_lookup): New struct.
16044         (add_function, arg_assoc_namespace, arg_assoc_class,
16045         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
16046         New functions.
16047         (get_namespace_id, current_namespace_id): Remove.
16048         (do_toplevel_using_decl): Rewrite.
16049         (do_class_using_decl): Complain about namespace qualifiers.
16050         (do_using_directive): Sorry if not on namespace level.  Complain
16051         about unknown namespaces.
16052         * error.c (dump_aggr_type): Check for namespace contexts.
16053         * except.c (init_exception_processing): Push terminate into std.
16054         * friend.c (is_friend): A namespace is not a context, here.
16055         * init.c (expand_member_init): Remove DECL_CHAIN processing.
16056         (build_offset_ref): Process OVERLOAD nodes.
16057         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
16058         * lex.c (identifier_type): Loop using OVL_CHAIN.
16059         (see_typename): Set looking_for_typename to 2.
16060         (real_yylex): Likewise.
16061         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
16062         (do_scoped_id): Expect OVERLOAD nodes.
16063         Change calling convention for qualified_lookup_using_namespace.
16064         (build_lang_decl): Don't set in_namespace anymore.
16065         * method.c (typevec_size): New global.
16066         (build_overload_nested_name): Return if global_namespace.
16067         Otherwise, always expect a declaration context.
16068         (build_qualified_name): Likewise.
16069         Make sure we don't write beyond typevec_size.
16070         (build_decl_overload_real): Likewise.
16071         Allocate one extra slot for the namespace.
16072         (hack_identifier): Mark code dead.
16073         Process OVERLOAD and NAMESPACE_DECL nodes.
16074         * parse.y (program): Pop namespaces until in global namespace.
16075         (extdef): In a using-declaration, don't discard the identifier if
16076         there is no declaration.
16077         (left_curly): Ignore type contexts which are namespaces.
16078         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
16079         used as scope.
16080         * pt.c (template_class_depth): Expect types to be namespaces.
16081         (determine_specialization): Simplify by expecting OVERLOAD nodes.
16082         (push_template_decl): Push into namespace level.
16083         Reset ctx if it is a namespace.
16084         Set DECL_CONTEXT to current_namespace if not set already.
16085         Ignore real contexts that are namespaces.
16086         (mangle_class_name_for_template): Skip global_namespace.
16087         Mangle other namespaces as declarations.
16088         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
16089         (lookup_template_class): Push into namespace of context.
16090         If the context is a namespace, set it to global_namespace.
16091         Use id_context for mangling.
16092         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
16093         (tsubst_friend_function): Ignore namespace contexts.
16094         Push into namespace level.
16095         (tsubst): Handle NAMESPACE_DECL nodes.
16096         Remove DECL_CHAIN processing.
16097         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
16098         * ptree.c (print_lang_identifier): Print bindings.
16099         (lang_print_xnode): Print OVERLOAD nodes.
16100         * rtti.c (init_rtti_processing): Push type_info into std.
16101         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
16102         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
16103         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
16104         lookup_fnfields_here): Likewise.
16105         Process all nodes, instead of going through TREE_CHAIN.
16106         * sig.c (build_signature_pointer_or_reference_type): Set context
16107         to global_namespace.
16108         (build_signature_table_constructor): Expect OVERLOAD nodes.
16109         * spew.c (yylex): Save old setting of looking_for_typename.
16110         * tree.c (decl_list_length): Remove.
16111         (binding_init): New function.
16112         (count_functions): Rewrite.
16113         (is_overloaded_fn): Expect OVERLOAD nodes.
16114         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
16115         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
16116         ovl_member): New functions.
16117         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
16118         (type_unknown_p): Likewise.
16119         (require_instantiated_type): Likewise.
16120         (build_component_ref): Declare code dead.
16121         (build_x_function_call): Create and expect OVERLOAD nodes.
16122         (build_function_call_real): Check for ::main only.
16123         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
16124         (convert_for_assignment): Check for TREE_LIST before accessing
16125         TREE_VALUE.
16126         * decl.c (duplicate_decls): Check for namespace bindings instead
16127         of global bindings.
16128         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
16129         lookup_name_current_level, start_decl, xref_tag,
16130         finish_enum): Likewise.
16131         * init.c (build_offset_ref): Likewise.
16132         * search.c (lookup_field): Likewise.
16133         (lookup_fnfields): Likewise.
16134         (dfs_debug_mark): Likewise.
16135         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
16136         (poplevel_class, pop_from_top_level): Likewise.
16137         * decl2.c (finish_method): Likewise.
16138         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
16139         * decl.c (record_builtin_type): Likewise.
16140         (init_decl_processing, grokfndecl): Likewise.
16141         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
16142         (make_lang_type): Likewise.
16143         * parse.y (make_thunk): Likewise.
16144         * pt.c (tsubst): Likewise.
16145         * tree.c (debug_binfo): Likewise.
16146         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
16147         tinfo2.cc, inc/new.h: Add std qualifications.
16148         * inc/new: Wrap with namespace std if __HONOR_STD.
16149         * inc/typeinfo: Likewise.
16150
16151 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
16152
16153         * call.c (build_user_type_conversion_1): Handle second_conv
16154         properly for templates.
16155
16156 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
16157
16158         * method.c (build_decl_overload_real): Set TREE_USED flag to
16159         zero for build_type_variants nodes as well.
16160
16161 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
16162
16163         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
16164
16165 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
16166
16167         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
16168         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
16169         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
16170         xref.o): Add toplev.h dependencies.
16171
16172 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
16173
16174         * errfn.c (cp_error, cp_warning): Remove declarations for
16175         error and warning respectively.
16176
16177 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16178
16179         * error.c: Convert to using ctype macros defined in system.h.
16180         * method.c: Likewise.
16181         * xref.c: Likewise.
16182         * lex.c: Likewise.  Also remove redundant system header stuff.
16183
16184 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
16185
16186         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
16187         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
16188         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
16189         xref.c: Add include of toplev.h.
16190
16191 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
16192
16193         * tree.c (perm_manip): Also regenerate the RTL of an extern.
16194         (copy_to_permanent): Use end_temporary_allocation.
16195
16196 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
16197
16198         * init.c (expand_vec_init): The initialization of each array
16199         element is a full-expression.
16200
16201 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
16202
16203         * method.c (build_mangled_name): Add a call to build_type_variant
16204         to get the right type.
16205
16206 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
16207
16208         * Makefile.in: Add .SUFFIXES.
16209
16210         * cp-tree.def: Remove NAMESPACE_DECL.
16211
16212 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
16213
16214         * call.c (build_over_call): Do evaluate arg even if it has empty
16215         class type.
16216         * decl.c (start_function): Don't push a member function.
16217
16218 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
16219
16220         * Makefile.in (g++FAQ.info): Put -o option before input file.
16221
16222 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
16223
16224         * gxxint.texi: Add info for squangling codes K and B.
16225
16226 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
16227
16228         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
16229         the expression in templates.
16230         (finish_stmt_expr): Likewise.
16231
16232 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
16233
16234         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
16235
16236 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
16237
16238         * decl.c (maybe_push_to_top_level): Always clear
16239         current_template_parms and processing_template_decl.
16240         (pushtag): Remove check of current_class_type and some comments,
16241         since maybe_push_to_top_level no longer creates confusion.
16242
16243 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
16244
16245         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
16246         (DECL_CLASS_TEMPLATE_P): Likewise.
16247         (DECL_PRIMARY_TEMPLATE): Likewise.
16248         (PRIMARY_TEMPLATE_P): Use it.
16249         (push_template_decl_real): New function.
16250         (redeclare_class_template): Take new template parameters as
16251         input.
16252         (is_specialization_of): New function.
16253         (comp_template_args): Declare.
16254         * decl.c (pushtag): Handle friend template classes.
16255         (xref_tag): Likewise.  Use new calling convention for
16256         redeclare_class_template.
16257         * decl2.c (grok_x_components): Handle friend templates.
16258         * friend.c (is_friend): Use is_specialization_of where
16259         appropriate.  Deal with friend class templates.
16260         (make_friend_class): Let a class template be friends with itself.
16261         * pt.c (comp_template_args): Remove declaration.
16262         (tsubst_friend_class): New function.
16263         (push_template_decl_real): New function.
16264         (push_template_decl): Use it.
16265         (redeclare_class_template): Adjust for new calling convention.
16266         (comp_template_args): Give it external linkage.
16267         (instantiate_class_type): Use tsubst_friend_class to deal
16268         with friend templates.
16269         * typeck.c (comptypes): Use comp_template_args, rather than
16270         expanding it inline.
16271         * parse.y (component_decl): Handle a nested template type
16272         like other component type declarations.
16273
16274         * pt.c (check_explicit_specialization): Handle overloaded
16275         constructors correctly.
16276
16277         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
16278         (lookup_template_class): Use it.
16279
16280 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
16281
16282         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
16283         * cp-tree.h: Add WRAPPER support.
16284         * call.c (add_candidate): Split out from add_*_candidate fns.
16285         (build_over_call): Take the candidate instead of function and args.
16286         Enforce access control here.  Emit overload warnings here.
16287         (add_warning): New fn.
16288         (joust): Add WARN parm.  If not set, call add_warning instead of
16289         printing a warning.  Re-enable some warnings.
16290         (tourney): Pass it.
16291         (convert_like): Adjust.
16292         (build_new_op): Adjust.
16293         (build_new_function_call): Adjust.
16294         (build_user_type_conversion_1): Adjust.
16295         (USER_CONV_FN): Adjust.
16296         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
16297         build_int_wrapper): New fns.
16298
16299 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
16300
16301         * pt.c (unify): Fix typo in previous change.
16302
16303 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
16304
16305         * error.c (dump_type_real): Declare canonical_name.
16306
16307         * typeck.c (comp_target_types): Fix PMFs.
16308
16309 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
16310
16311         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
16312         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
16313         TEMPLATE_DECL.
16314
16315         * pt.c (tsubst): Decrease the template-level of
16316         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
16317         TEMPLATE_PARM_INDEX.
16318         (template_decl_level): New function.
16319         (unify): Make sure to record unifications for template
16320         parameters, even when the parameters exactly match the arguments.
16321         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
16322         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
16323         aren't from the level we're currently working on.
16324
16325 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
16326
16327         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
16328
16329         * decl2.c (check_member_template): Set DECL_IGNORED for member
16330         class templates, too.
16331
16332         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
16333
16334 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16335
16336         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
16337
16338 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
16339
16340         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
16341         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
16342         (init_decl_processing): Handle TI types.
16343         * typeck.c (unsigned_type, signed_type): Handle TI types.
16344
16345 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
16346
16347         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
16348         New local added_libraries.  Increment count when add library to
16349         arglist.
16350
16351 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
16352
16353         * cp-tree.h (type_as_string_real): New function.
16354         * pt.c (mangle_class_name_for_template): Use it.
16355         * error.c (dump_aggr_type): Change prototype.
16356         (dump_type_prefix): Likewise.
16357         (dump_type_suffix): Likewise.
16358         (dump_type_real): Convert from dump_type.  If desired, the
16359         "canonica" name of a typedef, i.e., the name of the underlying
16360         type, can be printed.
16361         (dump_type): Call dump_type_real.
16362
16363 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
16364
16365         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
16366
16367         * typeck.c (comp_target_types): Tweak pedantic case.
16368         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
16369         Return -1 or 1 instead of 1 or 2.
16370         (compparms): Remove STRICT handling.
16371         (convert_for_assignment): Fix handling of pmfs.
16372
16373 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
16374
16375         * typeck.c (comp_target_types): Handle references like pointers.
16376         (comp_target_parms): Note that return code from comp_target_types
16377         can be negative to indicate failure.
16378
16379 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16380
16381         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
16382         which requires a working target compiler to build.
16383
16384 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
16385
16386         * tree.c (avoid_overlap): Add prototype.
16387
16388         * spew.c (num_tokens): Add prototype.
16389         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
16390
16391         * search.c (dfs_check_overlap): Add prototype.
16392         (dfs_no_overlap_yet): Likewise.
16393
16394         * pt.c (original_template): Add prototype.
16395         (inline_needs_template_parms): Likewise.
16396         (push_inline_template_parms_recursive): Likewise.
16397         (retrieve_specialization, register_specialization): Likewise.
16398         (print_candidates, reduce_template_parm_level): Likewise.
16399         (build_template_decl, mark_template_parm): Likewise.
16400         (tsubst_friend_function, get_bindings_real): Likewise.
16401
16402         * method.c (start_squangling): Add prototype.
16403         (end_squangling, check_ktype, issue_ktype): Likewise.
16404         (build_overloaded_scope_ref, check_btype): Likewise.
16405         (build_mangled_template_parm_index): Likewise.
16406
16407         * lex.c (init_cpp_parse): Add prototype.
16408         (handle_cp_pragma, handle_sysv_pragma): Likewise.
16409         (reduce_cmp, token_cmp): Likewise.
16410
16411         * except.c (call_eh_info): Add prototype.
16412         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
16413         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
16414
16415         * decl2.c (is_namespace_ancestor): Add prototype.
16416         (namespace_ancestor, add_using_namespace): Likewise.
16417         (ambiguous_decl): Likewise.
16418
16419         * decl.c (indent): Add prototype.
16420
16421         * call.c (add_template_candidate_real): Add prototype.
16422
16423 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
16424
16425         * decl2.c (build_expr_from_tree): Just return a PMF.
16426
16427 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
16428
16429         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
16430         when doing initializations.
16431
16432         * pt.c (unify): Use comptypes to compare type args.
16433
16434 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
16435
16436         * decl.c (duplicate_decls): Fix check for when it's safe to free
16437         the new decl.
16438
16439         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
16440         to type_as_string.
16441
16442 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
16443
16444         * pt.c (build_template_parm_index): Add prototype.
16445
16446         * search.c (my_tree_cons): Don't clear words outside the
16447         newly allocated node.
16448
16449 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
16450
16451         * lex.c (init_parse): Now returns char* containing the filename.
16452
16453 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
16454                           Jeff Law   <law@cygnus.com>
16455
16456         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
16457         than a pointer.
16458
16459 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16460
16461         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
16462
16463 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
16464
16465         * decl.c (duplicate_decls): Don't warn for redundant decls if
16466         friend: let add_friend take care of it.
16467
16468 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
16469
16470         * sig.c (build_signature_pointer_constructor): Don't set
16471         TREE_HAS_CONSTRUCTOR for a signature pointer.
16472         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
16473         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
16474         here, too.
16475         * typeck.c (build_unary_op): Only allow taking the address of a
16476         real constructor.
16477         * typeck2.c (digest_init): Simplify.
16478         (store_init_value): Don't pedwarn about using { } for pmfs.
16479
16480 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
16481
16482         * cp-tree.h (start_decl):  Update prototype.
16483         * decl.c (start_decl):  Like the C version, new parameters
16484         for the attributes.  Call cplus_decl_attributes here,
16485         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
16486         (grokdeclarator):  Pass NULL for new start_decl arguments.
16487         * pt.c (tsubst_expr):  Likewise.
16488         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
16489         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
16490         * lex.c (build_lang_decl): Add lang_name_java.
16491         * class.c (push_lang_context): Add lang_name_java.
16492         * method.c (build_mangled_name): Check for is_java_type.
16493
16494 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
16495
16496         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
16497         * call.c (build_scoped_method_call): Check for TREE_CODE for
16498         VOID_TYPE instead of type ==  void_type_node.
16499         (build_method_call): Likewise.
16500         * decl.c (lookup_name_real): Likewise.
16501         (grokdeclarator): Likewise.
16502         (start_decl): Likewise.
16503         (grokparms): Likewise.
16504         (start_function): Likewise.
16505         (finish_function): Likewise.
16506         (start_method): Likewise.
16507
16508 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
16509
16510         * lex.c (finput): New variable.
16511         (init_cpp_parse):  Renamed from init_parse.
16512         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
16513         (finish_parse): New function.
16514         * cp-tree.h (init_lex, init_parse): Remove declarations.
16515
16516 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
16517
16518         * call.c (build_call): Still evaluate the actual argument.
16519         * class.c (is_empty_class): Update for -fnew-abi.
16520
16521         * decl2.c: -fnew-abi implies -fsquangle.
16522
16523         * method.c (do_build_assign_ref): Don't do anything to copy
16524         an empty class.
16525         (do_build_copy_constructor): Likewise.
16526         * call.c (build_over_call): Likewise.
16527
16528 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
16529
16530         * tree.c (avoid_overlap): Return a value.
16531
16532 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
16533
16534         * method.c (check_btype): Add missing argument to xrealloc.
16535         (check_ktype): Likewise.
16536
16537 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
16538
16539         Implement empty base optimization.
16540         * class.c (finish_struct_1): Add vbase fields earlier.  Set
16541         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
16542         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
16543         (types_overlap_p): New fn.
16544         * tree.c (avoid_overlap): New fn.
16545         (build_base_fields): Use it to avoid overlapping empty bases.
16546         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
16547
16548         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
16549
16550         Re-implement allocation of base class subobjects.
16551         * tree.c (unshare_base_binfos): New fn.
16552         (layout_basetypes): Use it.  Now handles offsets of both virtual and
16553         non-virtual bases, after layout_type.
16554         (layout_vbasetypes): Remove.
16555         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
16556         (build_vbase_pointer_fields): Split out from old layout_basetypes.
16557         * class.c (finish_base_struct): Lose offset handling code.
16558         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
16559         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
16560         * cp-tree.h: Adjust.
16561
16562 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
16563
16564         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
16565         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
16566         * class.c (duplicate_tag_error): Likewise.
16567         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
16568         * tree.c (layout_vbasetypes): Update from layout_record, remove
16569         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
16570         (layout_basetypes): Likewise.
16571
16572 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
16573
16574         * class.c, Make sure system.h is included just after config.h.
16575         Delete lingering stdio and errno references too.
16576         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
16577
16578 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
16579
16580         * friend.c (is_friend): Fix access control for local classes.
16581
16582         * class.c (is_empty_class): New fn.
16583         * call.c (build_call): Don't pass empty class objects to a function.
16584
16585 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
16586
16587         * call.c (build_over_call): Do name resolution for default
16588         arguments of function templates in the scope of the templates.
16589
16590 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
16591
16592         * call.c: Include system.h.  Remove includes, declarations and
16593         defines provided by system.h.
16594         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
16595         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
16596         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
16597         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
16598         * typeck2.c, xref.c: Likewise.
16599         * Makefile.in: Dependencies updated as appropriate.
16600         * Make-lang.in: Likewise.
16601
16602 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
16603
16604         * pt.c (fn_type_unification): Allow incomplete unification without
16605         an immediate error message.
16606
16607 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
16608
16609         * tree.c (member_p): New fn.
16610         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
16611         initializing class members.
16612
16613         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
16614         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
16615
16616         * call.c (build_method_call): Handle non-scoped destructors, too.
16617         * pt.c (tsubst_copy): Likewise.
16618
16619         * pt.c (print_template_context): Split out...
16620         (push_tinst_level): ...from here.
16621
16622         * friend.c (is_friend): Don't pass a type to decl_function_context.
16623
16624         * typeck.c (convert_for_initialization): Always hand off
16625         conversions to class type.
16626
16627 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
16628
16629         * friend.c (is_friend): Local classes have the same access as the
16630         enclosing function.
16631
16632 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
16633
16634         * typeck.c (expand_target_expr): Delete dead function.
16635
16636         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
16637
16638         * repo.c (save_string): Delete dead function.
16639
16640         * method.c (thunk_printable_name): Delete dead function.
16641
16642         * lex.c (yynextch): Delete dead function.
16643
16644         * expr.c (tree_extract_aggr_init): #if 0 out.
16645
16646         * except.c (do_unwind): Delete dead function.
16647         (easy_expand_asm): Likewise.
16648
16649         * cvt.c (build_conversion_type_1): Delete dead function.
16650
16651         * cp-tree.h (push_expression_obstack): Declare.
16652
16653         * call.c (source_type): #if 0 out.
16654
16655         * class.c (alter_access): Remove unused label.  Add braces
16656         around empty else clause.
16657
16658         * lex.c (yyprint): Fix argument to printf.
16659
16660 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
16661
16662         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
16663
16664         * pt.c (instantiate_class_template): Make sure template
16665         arguments are permanent.
16666         * init.c (resolve_offset_ref): Don't go looking around in
16667         template types.
16668
16669         * semantics.c: Add routines to handle expressions, and some
16670         declaration processing.
16671         * parse.y: Use them.
16672         (current_class_depth): Move declaration to cp-tree.h.
16673         * parse.c: Regenerated.
16674         * cp-tree.h: Use them.
16675         (current_class_depth): Declare.
16676         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
16677
16678 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
16679
16680         * error.c (dump_decl): Be a bit more explicit with template
16681         type arguments, when verbose.
16682
16683 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
16684
16685         * inc/exception: Reorder closing braces.
16686
16687 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
16688
16689         * pt.c (redeclare_class_template): New function.
16690         * cp_tree.h (redeclare_class_template): Declare it.
16691         * decl.c (xref_tag): Use it.
16692
16693 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
16694
16695         * call.c (build_over_call): Check IS_AGGR_TYPE, not
16696         TYPE_LANG_SPECIFIC.
16697         * typeck.c (convert_arguments): Likewise.
16698
16699         * decl.c (grokdeclarator): Remove const and volatile from type after
16700         setting constp and volatilep.
16701
16702         * class.c (finish_struct_1): Don't warn about bool bitfield larger
16703         than one bit.
16704
16705 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
16706
16707         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
16708
16709 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
16710
16711         * call.c (build_object_call): Complain about ambiguous operator(),
16712         rather that crashing.
16713         (build_new_op): Likewise.
16714         (build_op_delete_call): Likewise.
16715
16716 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
16717
16718         * cvt.c (perform_qualification_conversions): Use comp_target_types
16719         instead of comp_ptr_ttypes.
16720
16721 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
16722
16723         * cp-tree.h (enforce_access): Declare.
16724         * call.c (enforce_access): Make it extern, not static.
16725         * class.c (alter_access): Use enforce_access; modify code for ISO
16726         compliance, rather than ARM rules.
16727
16728 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16729
16730         * cp-tree.h: Fix typo.
16731
16732 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
16733
16734         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
16735         if (aggregate_value_p (type)).
16736
16737         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
16738
16739 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
16740
16741         * tree.c (mapcar): When dealing with a DECL, use it's constant
16742         value, if any.
16743         * pt.c (lookup_template_class): Don't mangle the names of template
16744         classes whose arguments are unknown.
16745
16746         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
16747
16748 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
16749
16750         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
16751
16752 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
16753
16754         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
16755         boolean_type_node to 1.
16756
16757 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
16758
16759         * error.c (dump_expr): Remove unused variable `l'.
16760
16761         * pt.c (for_each_template_parm): New function, created by
16762         converting uses_template_parms.
16763         (tree_fn_t): New typedef.
16764         (uses_template_parms): Use it.
16765         (mark_template_parm): New function.
16766         (push_template_decl): Check that the argument list of a partial
16767         specialization uses all the template parameters.
16768
16769         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
16770         with it; we might want it for debugging.
16771         * cp-tree.h (type_unification): Change interface.
16772         * class.c (finish_struct_1): Skip nested template types, just like
16773         ordinary nested types.
16774         (instantiate_type): Use new interface to type_unification.
16775         * lex.c (init_lex): Add __sz as opname for sizeof.
16776         * method.c (build_overload_scope_ref): New function.
16777         (build_overload_int): Handle complex expressions.  Set
16778         numeric_output_need_bar if necessary.
16779         (build_overload_value): Handle non-PARM_DECL nodes; this
16780         routine is now used by build_overload_int.  Remove some
16781         assignments to numeric_output_need_bar.  Use
16782         build_overload_scope_ref.
16783         (build_qualified_name): Note that some template mangled names end
16784         with digits, and set numeric_output_need_bar appropriately.  Use
16785         build_underscore_int.
16786         * pt.c (unify): Change interface.
16787         (type_unification_real): Likewise.
16788         (determine_specialization): Use new interfaces.
16789         (tsubst): Deal gracefully with situations in which the argument
16790         vector is not fully filled.
16791         (fn_type_unification): Use new interfaces.
16792         (type_unification): Likewise.  Remove NOP_EXPR hack.
16793         (type_unification_real): Likewise.
16794         (unify): Likewise.  Deal with unification of complex expressions.
16795
16796 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
16797
16798         * pt.c (complete_template_args): Initialize skip properly.
16799
16800         * decl.c (make_typename_type): Revert.
16801         (make_implicit_typename): Remove.
16802         (lookup_name_real): Don't call it.  Call lookup_field if we see a
16803         TYPE_DECL from a template base.
16804         * search.c (lookup_field): Do implicit typename stuff.
16805
16806 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
16807                           Geoff Noer    <noer@cygnus.com>
16808
16809         * Makefile.in: Various fixes for building cygwin32 native toolchains.
16810         * Make-lang.in: Likewise.
16811
16812 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16813
16814         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
16815
16816 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
16817
16818         * decl.c (make_implicit_typename): Rewrite removed code.
16819         (make_typename_type): Call it if the type we look up comes from
16820         a base that uses template parms.
16821
16822         * pt.c (complete_template_args): Rewrite.
16823         (tsubst, FUNCTION_DECL): Use it.
16824
16825 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
16826
16827         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
16828         c_expand_asm_operands () if output_operands, input_operands or
16829         clobbers is not NULL_TREE.
16830
16831 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16832
16833         * pt.c (complete_template_args): New function.
16834         (get_bindings): Deal with specializations of function templates
16835         with return type containing parameters from outer class
16836         templates.
16837         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
16838         substitute arguments and compose a new type.
16839
16840 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
16841
16842         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
16843         FUNCTION_DECLs.
16844
16845 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
16846
16847         * decl.c (make_implicit_typename): Lose useless code.
16848
16849         * call.c (standard_conversion): Handle A* -> const A* properly.
16850
16851         * pt.c (get_bindings_real): Rename from get_bindings.  Add
16852         check_rettype parm.
16853         (get_bindings): Pass 1.
16854         (get_bindings_overload): Pass 0.
16855
16856 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
16857
16858         * pt.c (check_explicit_specialization): When reverting a static
16859         member function, also remove the `this' parameter from
16860         last_function_parms.
16861
16862 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
16863
16864         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
16865         a function context.
16866
16867         * decl.c (store_bindings): Use free_binding_vecs.
16868         (pop_from_top_level): Likewise.
16869
16870 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
16871
16872         * decl.c (make_implicit_typename): Only change the type of a
16873         TYPENAME_TYPE.
16874
16875 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
16876
16877         * semantics.c: New file, containing routines to perform the
16878         semantic phase of parsing.
16879         * parse.y: Use it.
16880         * pt.c (tsubst_expr): Likewise.
16881         * cp-tree.h: Declare the various functions in semantics.c.
16882         Provide macros to access _STMT tree nodes.
16883         * cp-tree.def: Add ASM_STMT tree node.
16884         * Makefile.in, Make-lang.in: Add dependencies on and for
16885         semantics.c.
16886
16887 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
16888
16889         * pt.c (push_template_decl): Only check primary templates.
16890
16891         * pt.c (check_explicit_specialization): Complain about default args
16892         in explicit specialization.
16893
16894         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
16895         constructor_declarator.
16896
16897 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
16898
16899         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
16900         has no overloaded operator ->.
16901
16902         * call.c (build_field_call): Don't crash when presented with a
16903         field that is actually a nested type.
16904
16905         * decl.c (pushtag): Deal with friend class injection in local
16906         classes.
16907
16908         * call.c (build_object_call): Don't crash if OBJ is a
16909         pointer-to-member-function.
16910
16911 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
16912
16913         * pt.c (push_template_decl): Complain about template with C linkage,
16914         anonymous template class.
16915
16916 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
16917
16918         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
16919         * search.c: Likewise.
16920
16921         * lex.c (do_pending_defargs): Only call
16922         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
16923
16924         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
16925
16926 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
16927
16928         * parse.y: Deal with CONSTRUCTORS in new_initializers.
16929
16930 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
16931
16932         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
16933         closely mimics the behavior in parse.y.
16934         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
16935         into a compound statement.
16936
16937 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
16938
16939         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
16940         * pt.c (inline_needs_template_parms): New fn.
16941         (original_template): New fn.
16942         (push_inline_template_parms_recursive): New fn.
16943         (maybe_begin_member_template_processing): Use them.
16944         (maybe_end_member_template_processing): Likewise.
16945         (is_member_or_friend_template): Rename to is_member_template.
16946         Member functions of local classes are never member templates.
16947
16948 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16949
16950         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
16951         added in the class scope to catch redefinition error.
16952
16953         * pt.c (reduce_template_parm_level): Also copy
16954         the DECL_TEMPLATE_PARMS field.
16955
16956 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
16957
16958         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
16959         reduced-level template type parameter.
16960
16961 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16962
16963         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
16964         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
16965         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
16966         * decl.c (duplicate_decls): Propagate it.
16967         * typeck2.c (abstract_virtuals_error): Use two loops to emit
16968         abstract virtual functions and virtual functions which need a
16969         final overrider separately.
16970
16971 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16972
16973         * lang-specs.h: Properly put brackets around array elements in
16974         initializer.
16975
16976         * typeck.c (build_binary_op_nodefault): Correctly place parens around
16977         && and || in expression.
16978
16979 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16980
16981         * call.c (default_parm_conversions): Remove prototype definition.
16982         (build_method_call): Remove unused variable result.
16983
16984         * cvt.c (ocp_convert): Remove unused variable conversion.
16985
16986         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
16987
16988         * except.c (do_unwind): #if 0 definition of unused variables fcall
16989         and next_pc.
16990
16991         * expr.c (extract_scalar_init): #if 0 prototype and function
16992         definition.
16993
16994         * init.c (expand_aggr_init_1): Remove unused variable init_type.
16995         (build_new_1): Remove unused variable t.
16996
16997         * pt.c (instantiate_class_template): Remove unused variable newtag;
16998         cast called function return value to void.
16999         (do_decl_instantiation): Remove unused variables name and fn.
17000
17001         * tree.c (get_type_decl): Add default return to shut up compiler from
17002         complaining control reaches end of non-void function.
17003
17004         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
17005
17006 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
17007
17008         * call.c (default_parm_conversions): Remove prototype definition.
17009         (build_method_call): Remove unused variable result.
17010         (build_over_call): Add default case in enumeration switch.
17011
17012 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
17013
17014         * decl2.c (lang_decode_option): Change j's type to size_t.
17015
17016         * tree.c (layout_vbasetypes): record_align and desired_align are of
17017         type unsigned int; const_size and nonvirtual_const_size likewise.
17018
17019 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
17020
17021         * parse.y (new_initializer): Make sure all initializers are
17022         lists.
17023
17024 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
17025
17026         * decl2.c (import_export_decl): Mark tinfo functions for
17027         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
17028
17029 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
17030
17031         * method.c: Fix typo.
17032
17033 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17034
17035         * method.c: Include "system.h" to get stdlib.h, stdio.h,
17036         ctype.h, string.h, etc.
17037         (issue_nrepeats): Add default case in enumeration switch.
17038         (check_btype): Likewise.
17039         (process_overload_item): Likewise.
17040
17041         * Makefile.in (method.o): Depend on system.h.
17042
17043 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17044
17045         * lex.c (do_scoped_id): Fix parenthesizing.
17046
17047 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
17048
17049         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
17050         FLAG_RTTI is unset, initialize type info machinery and continue
17051         with FLAG_RTTI enabled.
17052         (get_typeid): Likewise.
17053
17054 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
17055
17056         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
17057         from B.
17058
17059 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
17060
17061         * pt.c (finish_member_template_decl): Deal more gracefully with
17062         invalid declarations.
17063
17064 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
17065
17066         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
17067         cp-tree.h: Clean up more old overloading code, old RTTI code, and
17068         some formatting quirks.
17069
17070         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
17071         method.c, pt.c, ptree.c, typeck.c: Remove support for
17072         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
17073         * class.h: Remove.
17074         * Makefile.in: Adjust.
17075
17076         * pt.c (unify): Don't allow reduced cv-quals when strict.
17077
17078         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
17079         *type_unification* and unify.
17080
17081 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
17082
17083         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
17084         (nested_name_specifier): And add it before this use.
17085         (typename_sub0): And this use.  Also add use without the keyword.
17086         (typename_sub1): Likewise.
17087         * pt.c (instantiate_class_template): Don't actually instantiate
17088         anything if our type uses template parms.
17089
17090 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
17091
17092         * decl.c (start_function): Don't call temporary_allocation for a
17093         nested function.
17094
17095 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
17096
17097         * pt.c (instantiate_class_template): Don't mess with friends if
17098         our type uses template parms.
17099
17100 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
17101
17102         * parse.y (nested_name_specifier): Use explicit_template_type.
17103         (typename_sub): Allow a template_type, an explicit_template_type,
17104         or an implicit template type at the end.
17105         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
17106         * decl.c (make_typename_type): Handle template-id where the name
17107         is a TEMPLATE_DECL.
17108         * call.c (build_scoped_method_call): Handle member template
17109         destructor call.
17110         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
17111         destructor is represented by the type.
17112
17113         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
17114         * parse.y (nested_name_specifier): Add 'template' case.
17115         (explicit_template_type): New rule.
17116         (typename_sub): Use it.
17117         * decl.c (make_typename_type): Handle getting a template-id for NAME.
17118         * pt.c (tsubst): Likewise.
17119
17120 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
17121
17122         * pt.c (add_to_template_args): Fix thinko.
17123         (instantiate_class_template): Call it later.
17124
17125         * pt.c (get_class_bindings): Add outer_args parm.
17126         (most_specialized_class): Likewise.
17127         (instantiate_class_template): Pass it.
17128         (more_specialized_class): Likewise.
17129         (lookup_template_class): Get context from template if none
17130         was specified.
17131         (finish_member_template_decl): Don't do anything with a
17132         partial specialization.
17133         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
17134         AGGREGATE_TYPE_P.
17135         * class.c (finish_struct): Member class templates have already been
17136         checked for name clashes.
17137         * decl.c (pushdecl_with_scope): Handle pushing at class level.
17138
17139 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
17140
17141         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
17142         (tsubst, *_PARM): Support multiple levels of template classes.
17143         (instantiate_class_template): Look up the pattern from the
17144         original template.
17145         (lookup_template_class): Handle getting a template for d1.
17146         (push_template_decl): Correct setting of 'primary'.
17147         (reduce_template_parm_level): Add 'levels' parm.
17148         (finish_member_template_decl): Support member class templates.
17149         (template_class_depth): Handle multiple levels.
17150         * parse.y (component_decl_1, fn.def2): Remove member template case.
17151         (component_decl): Add member template cases.
17152         * decl2.c (check_member_template): We now handle member template
17153         classes.
17154         * decl.c (pushtag): Handle member templates.
17155         * method.c (do_inline_function_hair): Don't touch
17156         IDENTIFIER_GLOBAL_VALUE.
17157         * init.c (build_offset_ref): If name isn't an identifier, just
17158         return it.
17159         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
17160
17161         * typeck.c (get_delta_difference): Do adjust for conversions to
17162         and from virtual base.
17163
17164 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
17165
17166         * typeck.c (get_delta_difference): Give hard error for conversion
17167         from virtual base.
17168
17169         * cp-tree.h: Tweak formatting.
17170
17171 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
17172
17173         * decl.c (push_namespace): Handle redeclaration error.
17174
17175         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
17176         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
17177         (NAMESPACE_BINDING): New macro.
17178         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
17179         * *.c: Use them.
17180
17181         * pt.c (push_template_decl): Use innermost_args.
17182
17183         * decl.c (get_unique_name): Tweak from earlier in the name.
17184
17185 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
17186
17187         * cp-tree.def: Add CPLUS_BINDING node.
17188         * cp-tree.h (tree_binding): New struct.
17189         (BINDING_SCOPE, BINDING_VALUE): New macros.
17190         (current_namespace, global_namespace): Declare extern.
17191         (struct lang_decl_flags): New field in_namespace.
17192         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
17193         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
17194         (TREE_INDIRECT_USING): New macro.
17195         * decl2.c (current_namespace, global_namespace): Declare.  The
17196         value is a NAMESPACE_DECL now, not a TREE_LIST.
17197         (is_namespace_ancestor, namespace_ancestor): New static functions.
17198         (add_using_namespace, ambiguous_decl): Likewise.
17199         (lookup_using_namespace): New support function for lookup_name.
17200         (qualified_lookup_using_namespace): New support function for
17201         do_scoped_id and lookup_namespace_name.
17202         (get_namespace_id): Mark as obsolete.
17203         (current_namespace_id): Likewise.
17204         (do_namespace_alias): Implement.
17205         (do_using_directive): Implement as call to add_using_namespace.
17206         * decl.c (binding_for_name): New function.
17207         (push_namespace, pop_namespace): Implement.
17208         (push_decl): Don't install a FUNCTION_DECL in the global branch.
17209         (lookup_namespace_name): Implement using qualified lookup.
17210         (lookup_name_real): For global scoping, lookup in
17211         global_namespace.  For namespace scoping, lookup in given
17212         namespace.  For unscoped lookup, iterate over namespace,
17213         considering using directives.
17214         (init_decl_processing): Initialize global_namespace.
17215         (grokvardecl): Build assembler name as static name for globals.
17216         (grokdeclarator): Remove old namespace mangling.
17217         (xref_tag): When installing a global binding for the
17218         tag, make sure we have an identifier.
17219         * method.c (build_overload_nested_name): Mangle namespaces.
17220         (build_qualified_name): Likewise.
17221         (build_decl_overload_real): Likewise.
17222         * lex.c (build_lang_decl): Set namespace for new declaration to
17223         current_namespace.
17224         (do_scoped_id): Find global names in global or current
17225         namespace, or using qualified namespace lookup, depending on
17226         context.
17227         * init.c (build_member_call): When scope is namespace, use
17228         build_x_function_call instead.
17229         (build_offset_ref): When scope is namespace, collapse processing
17230         to lookup_namespace_name instead.
17231         * error.c (dump_decl): Support NAMESPACE_DECL.
17232         * decl.c (pushdecl): Bind globals to current namespace.
17233         (push_overloaded_decl): Likewise.
17234         (lookup_tag): Likewise.
17235         (lookup_name_current_level): Likewise.
17236         (xref_tag): Likewise.
17237         (start_function): Likewise.
17238         * lex.c (do_identifier): Likewise.
17239         (identifier_typedecl_value): Likewise.
17240         (real_yylex): Likewise.
17241         * method.c (do_inline_function_hair): Likewise.
17242         * parse.y (unscoped): Likewise.
17243         * pt.c (check_explicit_specialization): Likewise.
17244         (lookup_template_class): Likewise.
17245         * rtti.c (call_void_fn): Likewise.
17246         * sig.c (build_sigtable): Likewise.
17247         * ptree.c (lang_print_xnode): New function.
17248
17249 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
17250
17251         * pt.c (instantiate_class_template): Don't instantiate if pedantic
17252         and the args use template parms.
17253
17254         * pt.c (push_tinst_level): If the instantiation uses template parms,
17255         fail silently.
17256         * decl.c (xref_basetypes): Do call complete_type for basetypes
17257         that involve template parameters.
17258
17259 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
17260
17261         * typeck2.c (process_init_constructor): Fix labeled init check.
17262
17263 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
17264
17265         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
17266         argument to tsubst and friends.
17267
17268         * pt.c (tsubst, FUNCTION_DECL): Tidy.
17269
17270         * typeck.c (build_x_function_call): Handle static member function
17271         templates like non-templates.  Handle friend templates like normal
17272         function templates.
17273         * pt.c (tsubst, *_PARM): Don't use orig_level.
17274         (get_bindings): Don't call add_to_template_args.
17275         (instantiate_template): Likewise.
17276         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
17277         * ptree.c (print_lang_type): Print index/level for template parms.
17278
17279 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
17280
17281         * Make-lang.in (cc1plus): Note that cc1plus depends on
17282         cp/cp-tree.h and cp/cp-tree.def.
17283
17284         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
17285         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
17286         position in a template parameter list.
17287         * cp-tree.h (template_parm_index): New structure, used as the tree
17288         structure for a TEMPLATE_PARM_INDEX.
17289         (TEMPLATE_PARM_IDX): New macro.
17290         (TEMPLATE_PARM_LEVEL): Likewise.
17291         (TEMPLATE_PARM_DESCENDANTS): Likewise.
17292         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
17293         (TEMPLATE_PARM_DECL): Likewise.
17294         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
17295         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
17296         (TEMPLATE_TYPE_DECL): Likewise.
17297         (TEMPLATE_CONST_IDX): Remove.
17298         (TEMPLATE_CONST_LEVEL): Likewise.
17299         (TEMPLATE_CONST_SET_INFO): Likewise.
17300         (TEMPLATE_TYPE_SET_INFO): Likewise.
17301         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
17302         node.
17303         (TEMPLATE_TYPE_LEVEL): Likewise.
17304         * decl.c (decls_match): Call comp_template_parms, rather than
17305         expanding it inline.
17306         (duplicate_decls): If two template declarations are being merged,
17307         then their TEMPLATE_INFOs should be merged as well.
17308         (grokfndecl): Save template-id information when declaring a friend
17309         with explicit template arguments.  Pass arguments to
17310         check_explicit_specialization via correct convention; at some
17311         point check_explicit_specialization changed, but these call-sites
17312         did not.
17313         (grokdeclarator): Tidy up slightly.
17314         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
17315         two template functions with the same DECL_ASSEMBLER_NAME the same,
17316         since the names are not yet mangled.
17317         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
17318         TEMPLATE_CONST_PARM.
17319         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
17320         decl for a non-type parameter, rather than printing `<tparm ...>'.
17321         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
17322         (do_friend): Deal with template friends.
17323         * lex.c (do_pending_inlines): Call
17324         maybe_begin_member_template_processing, rather than
17325         conditionally calling begin_member_template_processing.
17326         (process_next_inline): Likewise.  Call
17327         maybe_end_member_template_processing, rather than
17328         conditionally calling end_member_template_processing.
17329         (do_pending_defargs): Likewise.
17330         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
17331         TEMPLATE_CONST_PARM.
17332         * method.c (build_mangled_template_parm_index): New function.
17333         (build_overload_value): Use it.
17334         (build_overload_name): Likewise.
17335         * pt.c (finish_member_template_decl): Allow friend declarations.
17336         (template_class_depth): New function.
17337         (is_member_template): Rename, and modify, to become...
17338         (is_member_or_friend_template): New function.
17339         (end_member_template_processing): Rename, and modify, to become...
17340         (maybe_end_member_template_processing).
17341         (build_template_parm_index): New function.
17342         (reduce_template_parm_level): New function.
17343         (process_template_parm): Modify to use build_template_parm_index.
17344         (push_template_decl): Deal with friend templates.
17345         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
17346         TEMPLATE_CONST_PARM.
17347         (tsubst_friend_function): New function.
17348         (instantiate_class_template): Generate the DECL_FRIENDLIST
17349         for a new instantiation by using tsubst_friend_function rather
17350         than just tsubst.
17351         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
17352         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
17353         appropriate new macros.  Use reduce_template_parm_level to
17354         generate lower-level template parameters.  Handle tsubst'ing into
17355         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
17356         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
17357         templates.  Similarly for the template parameters for a new
17358         template.
17359         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
17360         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
17361         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
17362         (get_bindings): Call add_to_template_args if necessary.
17363         (instantiate_decl): Handle instantiations of friend templates.
17364         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
17365         TEMPLATE_TYPE_PARM as a list of fields; it's not!
17366         * spew.c (yylex): Do a little manual constant propagation to
17367         clarify the code.
17368
17369 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
17370
17371         * error.c: Include sys/types.h.
17372
17373 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
17374
17375         * method.c (build_mangled_name): Start CPP directives in column zero.
17376
17377 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
17378
17379         * typeck2.c (process_init_constructor): Sorry about non-trivial
17380         labeled initializers.
17381         * parse.y (initlist): Re-enable labeled initializers.
17382
17383 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17384
17385         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
17386         all callers changed.  Rely on the new parameter instead of arg
17387         being a TREE_LIST when determine whether we are working inside
17388         template template parameter.  Clean up is_type test.
17389
17390 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
17391
17392         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
17393         * typeck2.c (initializer_constant_valid_p): Allow conversions
17394         between pointers and references.
17395
17396 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
17397
17398         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
17399         if pedantic || warn_pointer_arith.
17400
17401 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17402
17403         * pt.c (unify): Handle TEMPLATE_DECL.
17404
17405 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
17406
17407         * cp-tree.h (strip_attrs): Remove decl.
17408
17409 1998-02-18  Doug Evans  <devans@cygnus.com>
17410
17411         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
17412         Update olddecl's attributes too.
17413         (strip_attrs): Remove function.
17414         * typeck.c (common_type): Call merge_machine_type_attributes.
17415
17416 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
17417
17418         * parse.y (initdcl0_innards): New grammar symbol.
17419         (nomods_initdecls, nomods_initdcl0): Change type from itype to
17420         none, since the resulting value is never used.
17421         (parse_decl): New function.
17422         (datadef): Remove redundant actions.
17423         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
17424         * parse.c: Regenerated.
17425
17426 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
17427
17428         * parse.y (simple_stmt): Use getdecls() to check for decl.
17429
17430 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
17431
17432         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
17433         macros.
17434         (c++.install-common): Install c++filt properly as native or as cross
17435         variant.
17436         (c++.uninstall): Add c++filt.
17437
17438 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
17439
17440         * call.c (standard_conversion): Fix multi-level ptr conversions.
17441
17442 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
17443
17444         * init.c (build_new): Propagate error_mark_node up.
17445
17446 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
17447
17448         * parse.y (simple_stmt): If the condition isn't a declaration,
17449         start the controlled block after the test.
17450
17451 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17452
17453         * call.c (build_over_call): Convert builtin abs, labs and fabs to
17454         tree-codes.
17455         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
17456         builtins.
17457
17458 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
17459
17460         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
17461
17462 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
17463
17464         * cp-tree.h: Add access_protected_virtual_node.
17465         * class.c (init_class_processing): Initialize it.
17466         * decl.c (xref_basetypes): Use it.
17467         * parse.y (base_class_access_list): Likewise.
17468
17469         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
17470         (c++.install-common): Install c++filt.
17471
17472 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17473
17474         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
17475
17476 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
17477
17478         * call.c (reference_binding): Use comptypes when comparing
17479         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
17480
17481 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
17482
17483         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
17484         (really_overloaded_fn): Move check here from is_overloaded_fn.
17485         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
17486
17487 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
17488
17489         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
17490         conversions.
17491
17492 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
17493
17494         * cp-tree.h (push_template_decl): Return the decl passed in, or an
17495         equivalent duplicate.
17496         * decl.c (pushtag): Use the return value from push_template_decl.
17497         (duplicate_decls): When duplicating a template declaration, merge
17498         the DECL_TEMPLATE_RESULTs as well.
17499         (make_implicit_typename): Don't try to dive into typename types to
17500         find a context for making a new implicit typename.
17501         (start_decl): Use the return value from push_template_decl.
17502         (grokdeclarator): Complain about declarations list `const operator
17503         int'.  Since we don't correctly handle in-class initializations of
17504         non-static data members, complain about this (now illegal)
17505         practice.  Issue an error for initializations of non-const statics
17506         since that is illegal as well, and since we don't handle that case
17507         correctly either.
17508         (start_function): Use the return value from push_template_decl.
17509         (start_method): Likewise.
17510         * decl2.c (grokfield): Likewise.  Since the change to
17511         grokdeclarator ensures that all initialized fields are in fact
17512         static, remove a redundant test for TREE_PUBLIC.
17513         * parse.y (initlist): Disable labeled initializers since they do
17514         not work as per the documentation, and since they do not use the
17515         same syntax as the C front end.
17516         * pt.c (push_template_decl): Return the decl passed in, or an
17517         equivalent duplicate.
17518         (lookup_template_class): When searching in a nested context,
17519         use the right arguments.
17520         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
17521         * typeck.c (build_component_ref): Assign the correct type to the
17522         result of build_vfn_ref.
17523
17524 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
17525
17526         * pt.c (convert_nontype_argument): Fix typo.
17527         (check_explicit_specialization): Allow old-style specialization
17528         of class template members.
17529
17530 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
17531                           Manfred Hollstein  <manfred@s-direktnet.de>
17532
17533         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
17534         when deciding to override DECL_ASSEMBLER_NAME.
17535
17536 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
17537
17538         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
17539         * cp-tree.h (flag_do_squangling): Add declaration.
17540         * lang-options.h: Add -fsquangle and -fno-squangle.
17541         * method.c: Add macros and static variables for squangling.
17542         (build_overload_name): Rename to build_mangled_name, add logic for B
17543         compression, and split into process_modifiers and
17544         process_overload_item.
17545         (process_modifiers): New function, to handle constant, reference,
17546         and pointer types.
17547         (process_overload_item): New function, handles issue of type codes.
17548         (build_overload_name): New function, start squangling and call
17549         build_mangled_name.
17550         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
17551         (start_squangling): New function to initialize squangling structs.
17552         (end_squangling): New function to destroy squangling structs.
17553         (nrepeats): Rename variable to Nrepeats.
17554         (issue_nrepeats): New function for issuing 'n' type repeats.
17555         (check_ktype): New function to check for type K name compression.
17556         (build_overload_nested_name): Add a check for K name compression.
17557         (build_qualified_name): Add a check for K name compression and don't
17558         use DECL_ASSEMBLER_NAME when squangling is on.
17559         (check_btype): New function, checks for B type compression.
17560         (build_static_name, build_decl_overload_real): Initiate squangling.
17561         (build_typename_overload, build_overload_with_type): Initiate
17562         squangling
17563
17564 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
17565
17566         * method.c (make_thunk): Avoid name buffer overflow.
17567
17568 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
17569
17570         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
17571         don't define them yet.
17572
17573         * parse.y (nomods_initdcl0): Add constructor_declarator case.
17574
17575 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17576
17577         * config-lang.in (diff_excludes): Use basename only.
17578
17579 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
17580
17581         * tinfo2.cc: Add tinfo for signed char.
17582
17583 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
17584
17585         * search.c (compute_access): Handle protected constructors in derived
17586         classes as accessible.
17587
17588 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
17589
17590         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
17591         Call convert_from_reference sooner.
17592
17593 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
17594
17595         * cvt.c (ocp_convert): Obtain the constant values from constant
17596         decls even if the destination type is the same as the type of the
17597         decl.
17598
17599         * decl2.c (finish_file): Make sure that static inlines with
17600         definitions are not marked DECL_EXTERNAL before returning.
17601
17602 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
17603
17604         * decl.c: Lose arg_looking_for_template.
17605         (lookup_name_real): Likewise.
17606         * parse.y: Lose processing_template_arg, template_arg1.
17607         (primary): Likewise.
17608         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
17609
17610 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17611
17612         * error.c (dump_decl): Fix type of default arguments for template
17613         template parameters and nontype template parameters.
17614         * parse.y (template_parm): Handle invalid default template
17615         template arguments here.
17616
17617         * parse.y (template_parm): Use template_arg instead of PTYPENAME
17618         for default template template argument.
17619         * pt.c (coerce_template_parms): Merge default template argument
17620         codes.  Can treat RECORD_TYPE as template name if it is implicitly
17621         created.  Fix argument index in error message.
17622         * typeck.c (comptypes): Merge template argument comparison codes in
17623         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
17624
17625 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
17626
17627         * lex.c (file_name_nondirectory): Also check for '/'.
17628
17629 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
17630
17631         * parse.y (primary): Deal with statement-expressions in
17632         templates.
17633         * pt.c (tsubst_copy): Handle BIND_EXPR.
17634         * tree.c (mapcar): Likewise.
17635
17636         * call.c (add_template_candidate_real): Pass extra parameter to
17637         fn_type_unification.
17638         * cp-tree.h (fn_type_unification): Add parameter.
17639         * pt.c (fn_type_unification): Add additional parameter to deal with
17640         static member functions.
17641         (get_bindings): Deal with static member functions.
17642
17643         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
17644         (revert_static_member_fn): Declare.
17645         * decl.c (revert_static_member_fn): Remove declaration.  Change
17646         linkage from internal to external.
17647         (cp_finish_decl): Deal with virtual functions in classes local to
17648         template functions.
17649         * decl2.c (finish_file): Don't forget to emit increment/decrement
17650         expressions in initializers for file-scope variables.
17651         * parse.y (typename_sub2): If the typename doesn't names a
17652         template, rather than a type, issue an error message.
17653         * pt.c (check_explicit_specialization): Handle specializations of
17654         static member functions.
17655         (coerce_template_parms): Handle offset references to lists of
17656         member functions.
17657         * search.c (note_debug_info_needed): Don't crash when handed a
17658         type which is being defined.
17659         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
17660         that can happen with some illegal code.
17661
17662 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17663
17664         * call.c (user_harshness): Initialize `code' to 0.
17665         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
17666         (null_ptr_cst_p): Add parentheses around && within ||.
17667         (standard_conversion): Likewise.
17668         (z_candidate): Likewise.
17669         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
17670         (build_object_call): Likewise for `mem_args'.
17671         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
17672         default case in enumeration switch.
17673
17674         * class.c (build_vtable_entry): Add explicit braces to avoid
17675         ambiguous `else'.
17676         (build_class_init_list): Likewise.
17677         (finish_struct_1): Initialize `width' to 0.
17678         (instantiate_type): Initialize `name' to NULL_TREE.  Add
17679         explicit braces to avoid ambiguous `else'.
17680
17681         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
17682         `else'.
17683
17684         * decl.c (grok_reference_init): Eliminate unused parameter, all
17685         callers changed.
17686         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
17687         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
17688         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
17689         (grokdeclarator): Add parentheses around && within ||.  Add
17690         explicit braces to avoid ambiguous `else'.
17691         (grokparms): Initialize `type' to NULL_TREE.
17692         (xref_tag): Remove unused label `just_return'.
17693         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
17694         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
17695         (hack_incomplete_structures): Add parentheses around assignment
17696         used as truth value.
17697
17698         * decl2.c (coerce_delete_type): Hide definition of `e3'.
17699
17700         * error.c: Include <stdlib.h>.
17701         (dump_expr): Change the type of `i' to size_t.  Remove unused
17702         label `error'.
17703
17704         * except.c (init_exception_processing): Remove unused variable `d'.
17705         (expand_throw): Likewise for `label'.
17706
17707         * friend.c (add_friends): Add explicit braces to avoid ambiguous
17708         `else'.
17709
17710         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
17711         (sort_base_init): Likewise for `binfo'.
17712         (expand_member_init): Likewise for `rval'.
17713         (build_member_call): Add parentheses around assignment used as
17714         truth value.
17715         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
17716         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
17717         `old_immediate_size_expand' to 0.
17718         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
17719         (build_vec_delete_1): Remove unused variable `block'.
17720         (expand_vec_init): Initialize `itype' to NULL_TREE.
17721
17722         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
17723         declaration of `index' and `rindex' with autoconf macros.
17724         (reinit_parse_for_expr): Remove unused variables
17725         `look_for_semicolon' and `look_for_lbrac'.
17726         (cons_up_default_function): Initialize `args' to NULL_TREE.
17727         (readescape): Initialize `firstdig' to 0.
17728         (real_yylex): Add parentheses around assignment used as truth value.
17729
17730         * method.c: Include <strings.h> if we don't have <string.h>.
17731         Protect declaration of `index' with autoconf macro.
17732
17733         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
17734         Initialize `type' to NULL_TREE.
17735         (structsp): Remove unused variable `id'.
17736
17737         * pt.c (coerce_template_parms): Add explicit braces to avoid
17738         ambiguous `else'.
17739         (lookup_template_class): Initialize `template' to NULL_TREE.
17740         (instantiate_class_template): Remove unused variable `name' and `e'.
17741         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
17742         (do_poplevel): Initialize `saved_warn_unused' to 0.
17743         (type_unification): Remove unused varable `parm'.
17744         (unify): Likewise for `j'.
17745
17746         * repo.c (init_repo): Add parentheses around assignment used as
17747         truth value.
17748         (finish_repo): Remove unused varable `p'.
17749
17750         * search.c (get_binfo): Initialize `type' to NULL_TREE.
17751         (get_base_distance): Likewise.
17752         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
17753         and `new_v' to NULL_TREE.
17754         (lookup_fnfields): Likewise for `rval_binfo_h'.
17755         (breadth_first_search): Add parentheses around assignment used as
17756         truth value.
17757         (get_template_base): Initialize `type' to NULL_TREE.
17758
17759         * sig.c (append_signature_fields): Initialize `last_mfptr' to
17760         NULL_TREE.
17761         (build_signature_table_constructor): Likewise for
17762         `last_rhs_field', `pfn' and `vt_off'.
17763         (build_sigtable): Likewise for `init'.
17764
17765         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
17766         (propagate_binfo_offsets): Likewise for `delta'.
17767         (hash_tree_cons): Initialize hashcode to 0.
17768         (can_free): Likewise for `size'.
17769         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
17770
17771         * typeck.c (convert_sequence): Hide prototype.
17772         (common_type): Add explicit braces to avoid ambiguous `else'.
17773         (comp_target_types): Likewise.
17774         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
17775         (build_function_call_real): Add explicit braces to avoid ambiguous
17776         `else'.
17777         (convert_arguments): Initialize `called_thing' to 0.
17778         (convert_for_initialization): Initialize `savew' and `savee' to 0.
17779
17780         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
17781         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
17782         (build_x_arrow): Likewise for `last_rval'.
17783
17784         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
17785
17786 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
17787
17788         * decl.c (init_decl_processing): Use set_sizetype.
17789         * decl2.c (sizetype): Don't declare.
17790         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
17791         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
17792         (build_component_addr, unary_complex_lvalue): Likewise.
17793         * rtti.c (expand_class_desc): Likewise.
17794         * class.c (get_vfield_offset): Likewise.
17795
17796 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
17797
17798         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
17799         early to avoid bogus error.  Handle overloaded function
17800         names provided as template arguments correctly.
17801         (coerce_template_parms): Don't mishandle overloaded functions when
17802         dealing with template template parameters.
17803         (lookup_template_class): Issue an error message, rather than
17804         crashing, when the TYPE_DECL provided is not a template type.
17805
17806 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
17807
17808         * class.c (instantiate_type): Don't just return a known type if
17809         it's wrong.
17810
17811 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
17812
17813         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
17814         since that code could never be reached.
17815
17816         * error.c (dump_decl): Avoid aborting in the midst of printing an
17817         error message about an illegal template declaration.
17818
17819         * parse.y (structsp): Print an error message, rather than crashing,
17820         when a class-head does not name a class.
17821
17822         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
17823         template arguments as a g++ extension.
17824
17825         * cp-tree.def (ALIGNOF_EXPR): New tree code.
17826         * decl2.c (grok_alignof): If processing_template_decl, just store
17827         the expression.
17828         * typeck.c (c_alignof): Likewise.
17829         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
17830         * error.c (dump_expr): Likewise.
17831         * pt.c (tsubst_copy): Likewise.
17832         * tree.c (cp_tree_equal): Likewise.
17833         * pt.c (uses_template_parms): Correctly determine whether or not a
17834         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
17835         folding can be done.
17836
17837         * cp-tree.h (grok_enum_decls): Remove type parameter.
17838         * decl.c (grok_enum_decls): Likewise.
17839         * decl2.c (grok_x_components): Call grok_enum_decls
17840         unconditionally, since it will do nothing if there is no
17841         current_local_enum.  Use the new calling sequence.
17842         * pt.c (tsubst_enum): Use the new calling sequence for
17843         grok_enum_decls.
17844
17845         * decl.c (start_function): Make member functions of local classes
17846         in extern inline functions have comdat linkage here...
17847         (grokdeclarator): Rather than here.
17848
17849 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
17850
17851         * pt.c (convert_nontype_argument): Use decl_constant_value.
17852
17853 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
17854
17855         * call.c (add_template_candidate_real): New function.
17856         (add_template_candidate): Use it.
17857         (add_template_conv_candidate): Likewise.
17858         (joust): Pass extra argument to more_specialized.
17859         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
17860         (is_local_class): Remove.
17861         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
17862         * cp-tree.h (is_local_class): Remove.
17863         (perform_array_to_pointer_conversion): Likewise.
17864         (finish_member_template_decl): Add.
17865         (check_explicit_specialization): Return a tree, not an int.
17866         (more_specialized): Take additional argument.
17867         (get_bindings): Likewise.
17868         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
17869         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
17870         (perform_array_to_pointer_conversion): Remove.
17871         * decl.c (saved_scope): Add processing_specialization,
17872         processing_explicit_instantiation fields.
17873         (maybe_push_to_top_level): Save them.
17874         (pop_from_top_level): Restore them.
17875         (grokfndecl): Use new return value from
17876         check_explicit_specialization.
17877         (start_decl): Don't check flag_guiding_decls before pushing
17878         decls.
17879         (cp_finish_decl): Remove previous (bogus) change.
17880         (grok_declarator): Use decl_function_context rather than
17881         is_local_class.
17882         * decl2.c (finish_file): Pass extra argument to get_bindings.
17883         (build_expr_from_tree): Let build_x_component_ref check
17884         validity of arguments rather than doing it here.
17885         * lex.c (cons_up_default_function): Remove code fooling with
17886         processing_specialization, processing_explicit_instantiation
17887         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
17888         * method.c (build_overload_identifier): Mangle local classes in
17889         template functions correctly.
17890         * parse.y (finish_member_template_decl): Move to pt.c.
17891         * pt.c (finish_member_template_decl): Moved here from parse.y.
17892         (print_candidates): New function.
17893         (determine_specialization): Change interface.  Properly look for
17894         most specialized versions of template candidates.
17895         (check_explicit_specialization): Fully process explicit
17896         instantiations.
17897         (push_template_decl): Avoid looking at CLASSTYPE fields in
17898         FUNCTION_DECLS.
17899         (determine_overloaded_function): Remove.
17900         (convert_nontype_argument): Change name from
17901         convert_nontype_parameter.  Use determine_overloaded_function
17902         instead of instantiate_type.
17903         (mangle_class_name_for_template): Handle type contexts as well as
17904         function contexts.
17905         (classtype_mangled_name): Likewise.
17906         (lookup_template_class): Likewise.
17907         (tsubst): Likewise.
17908         (more_specialized): Take explict template arguments as a
17909         parameter.
17910         (most_specialized): Likewise.
17911         (get_bindings): Likewise.  Check that return types match before
17912         proclaiming a function a match.
17913         (do_decl_instantiation): Remove code searching for function to
17914         instantiate; that is now done in check_explicit_specialization.
17915         (add_maybe_template): Pass extra argument to get_bindings.
17916         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
17917         implementation.
17918         * typeck.c (build_component_ref): Check for invalid arguments.
17919
17920 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
17921
17922         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
17923         return_target and call_target are equivalent.
17924
17925         * pt.c (type_unification_real): Just accept function parms that
17926         don't use any template parms.
17927
17928 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
17929
17930         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
17931         unset DECL_NOT_REALLY_EXTERN.
17932
17933         * parse.y (typename_sub*): Fix std::.
17934
17935 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
17936
17937         * error.c (dump_decl): Fix type default template args.
17938         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
17939
17940 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
17941
17942         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
17943         (file_name_nondirectory): Use.
17944
17945 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17946
17947         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
17948         that are not really present.  Substitute default arguments in
17949         template template arguments.  Correctly convert TEMPLATE_DECL to
17950         TEMPLATE_TEMPLATE_PARM.
17951         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
17952         are no longer treated specially here.
17953         * parse.y (template_template_parm): Fix copy error.
17954         * decl.c (grokdeclarator): Warn about missing `typename' for nested
17955         type created from template template parameters.
17956         * parse.y (bad_parm): Likewise
17957
17958         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
17959         (push_nested_class): Likewise.
17960         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
17961         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
17962         (copy_template_template_parm): Declare.
17963         * decl.c (arg_looking_for_template): New variable.
17964         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
17965         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
17966         node if arg_looking_for_template is nonzero.
17967         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
17968         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
17969         (grokdeclarator): Handle TEMPLATE_DECL.
17970         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
17971         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
17972         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
17973         (dump_decl): Handle unnamed template type parameters.
17974         Handle template template parameters.
17975         (dump_function_name): Handle template template parameters.
17976         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
17977         Handle TEMPLATE_TEMPLATE_PARM.
17978         * method.c (build_template_template_parm_names): New function.
17979         (build_template_parm_names): Handle TEMPLATE_DECL.
17980         (build_overload_nested_name, build_overload_name):
17981         Handle TEMPLATE_TEMPLATE_PARM.
17982         * parse.y (maybe_identifier): New nonterminal.
17983         (template_type_parm): Use it.
17984         (template_template_parm, template_arg1): New nonterminal.
17985         (template_parm): Add template_template_parm rules.
17986         (template_arg): Set processing_template_arg.
17987         (template_arg1): Rules moved from template_arg.
17988         (primary, nonnested_type): Set arg_looking_for_template if we are
17989         processing template arguments.
17990         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
17991         (process_template_parm): Handle template template parameters.
17992         (coerce_template_parms, comp_template_args): Likewise.
17993         (mangle_class_name_for_template, lookup_template_class): Likewise.
17994         (uses_template_parms): Handle TEMPLATE_DECL and
17995         TEMPLATE_TEMPLATE_PARM.
17996         (current_template_args): Handle TEMPLATE_DECL.
17997         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
17998         * search.c (dfs_walk, dfs_record_inheritance):
17999         Handle TEMPLATE_TEMPLATE_PARM.
18000         * tree.c (copy_template_template_parm): New function.
18001         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
18002         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
18003
18004 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
18005
18006         * decl.c (start_decl): Don't allow duplicate definitions of static
18007         data members.
18008
18009         * call.c (build_user_type_conversion_1): Handle user-defined
18010         template conversion operators correctly.
18011
18012         * decl2.c (build_expr_from_tree): Issue an error message if the
18013         object in a COMPONENT_REF is a TEMPLATE_DECL.
18014
18015         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
18016
18017         * class.c (is_local_class): New function.
18018         * cp-tree.h (is_local_class): Declare it.
18019         (last_tree): Likewise.
18020         (begin_tree): Likewise.
18021         (end_tree): Likewise.
18022         (lookup_template_class): Change prototype.
18023         * decl.c (cp_finish_decl): Check for NULL where necessary.
18024         Consider FUNCTION_DECLS to declare objects with top-level binding,
18025         when calling make_decl_rtl.
18026         (grokdeclarator): Give members of local classes internal linkage.
18027         (start_function): Remove declaration of last_tree.
18028         (finish_function): Set flag_keep_inline_functions around call to
18029         rest_of_compilation if we are processing a member function in a
18030         local class.
18031         (start_method): Call push_template_decl for member functions of
18032         local classes in template functions.
18033         * decl2.c (import_export_decl): Don't give external linkage to
18034         instantiations of templates with internal linkage.
18035         * parse.y (last_tree): Remove declaration.
18036         (template_type): Pass extra parameter to lookup_template_class.
18037         (self_template_type): Likewise.
18038         (structsp): Move call to reset_specialization into left_curly.
18039         (left_curly): Call reset_specialization, and begin_tree.
18040         * pt.c (saved_trees): New variable.
18041         (mangle_class_name_for_template): Change prototype.  Use
18042         additional function context to name local classes in templates
18043         correctly.
18044         (classtype_mangled_name): Pass the context.
18045         (push_template_decl): Handle local classes and templates, and
18046         member functions for such classes.
18047         (convert_nontype_parameter): Fix handling of pointer-to-member
18048         constants.
18049         (lookup_template_class): Handle local classes in templates.
18050         (tsubst): Likewise.  Don't assume that template instantiations
18051         have external linkage; pay attention to the template declaration.
18052         (mark_decl_instantiated): Likewise.
18053         (begin_tree): New function.
18054         (end_tree): Likewise.
18055
18056         * decl.c (xref_basetypes): Don't call complete_type for basetypes
18057         that involve template parameters; that can lead to infinite
18058         recursion unnecessarily.
18059
18060         * pt.c (register_specialization): Do not register specializations
18061         that aren't ready to be registered yet.
18062         (check_explicit_specialization): Handle explicit specialization of
18063         constructors and destructors.
18064         (build_template_decl): New function.
18065         (push_template_delc): Handle out-of-class specializations of
18066         member templates.
18067
18068         * pt.c (check_explicit_specialization): Set up the template
18069         information before registering the specialization.
18070         (coerce_template_parms): Fix thinko.
18071         (tsubst): Handle specializations of member templates correctly.
18072
18073         * class.c (finish_struct_methods): Remove calls to
18074         check_explicit_specialization from here.
18075         (finish_struct): And insert them here.
18076         * cp-tree.h (perform_qualification_conversions): New function.
18077         (perform_array_to_pointer_conversion): Likewise.
18078         (begin_explicit_instantiation): Likewise.
18079         (end_explicit_instantiation): Likewise.
18080         (determine_specialization): Renamed from
18081         determine_explicit_specialization.
18082         (comp_template_parms): New function.
18083         (processing_explicit_instantiation): New variable.
18084         * cvt.c (perform_qualification_conversions): New function.
18085         (perform_array_to_pointer_conversion): Likewise.
18086         * decl.c (duplicate_decls): Don't consider template functions
18087         alike unless they have the same parameters.  Refine handling of
18088         instantiation/specialization mismatches.
18089         (start_decl): Don't call pushdecl for template specializations,
18090         since they don't affect overloading.
18091         (start_function): Likewise.
18092         (grokfndecl): Call check_explicit_specialization a little later.
18093         Don't call duplicate_decls for memberm template specializations.
18094         (grokdeclarator): Don't update template_count for classes that are
18095         themselves specializations.  Remove use of `2' as parameter to
18096         grokfndecl since that value isn't used.
18097         * lex.c (cons_up_default_function): Save and restore
18098         processing_explicit_instantiation around calls to grokfield.
18099         * parse.y (finish_member_template_decl): New function.
18100         (component_decl_1): Use it.
18101         (fn.def2): Likewise.
18102         (template_arg_list_opt): New nonterminal.
18103         (template_type): Use it.
18104         (self_template_type): Likewise.
18105         (template_id): Likewise.
18106         (object_template_id): Likewise.
18107         (notype_template_declarator): Likwise.
18108         (begin_explicit_instantiation): Likewise.
18109         (end_explicit_instantiation): Likewise.
18110         (explicit_instantiation): Use them.
18111         * pt.c (coerce_template_parms): Add parameters.
18112         (processing_explicit_instantiation): New variable.
18113         (convert_nontype_parameter): New function.
18114         (determine_overloaded_function): Likewise.
18115         (begin_explicit_instantiation): Likewise.
18116         (end_explicit_instantiation): Likewise.
18117         (retrieve_specialization): Likewise.
18118         (register_specialization): Likewise.
18119         (processing_explicit_specialization): Removed.
18120         (determine_specialization): Handle specializations of member
18121         functions of template class instantiations.
18122         (check_explicit_specialization): Refine to conform to standard.
18123         (comp_template_parms): New function.
18124         (coerce_template_parms): Call convert_nontype_parameter.
18125         (tsubst): Refine handling of member templates.  Use
18126         register_specialization.
18127         (instantiate_template): Use retrieve_specialization.
18128         (do_decl_instantiation): Likewise.
18129         (instantiate_decl): Likewise.
18130         (type_unification): Improve handling of explict template
18131         arguments.
18132         * tree.c (mapcar): Return error_mark_node, rather than aborting,
18133         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
18134         * typeck.c (build_unary_op): Call determine_specialization, rather
18135         than determine_explicit_specialization.
18136
18137 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
18138
18139         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
18140
18141 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18142
18143         * error.c (dump_decl): For enum tags, output the tag, not its value.
18144
18145 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
18146
18147         * decl.c (init_decl_processing): Only call init_rtti_processing
18148         FLAG_RTTI is set.
18149
18150 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
18151
18152         * init.c (build_new_1): Split out from build_new.
18153         (build_new): Just return a NEW_EXPR.
18154         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
18155
18156         * decl2.c (get_temp_regvar): Tweak.
18157
18158         * cp-tree.h (TREE_CALLS_NEW): Comment out.
18159         * class.c (resolves_to_fixed_type_p): Remove use.
18160         * method.c (build_opfncall): Likewise.
18161         * call.c (build_new_op): Likewise.
18162
18163 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
18164
18165         * exception.cc (__eh_alloc, __eh_free): New fns.
18166         (__cp_push_exception, __cp_pop_exception): Use them.
18167         (__uncatch_exception): Call terminate here if no exception.
18168         * except.c (build_terminate_handler): New fn.
18169         (expand_start_catch_block): Use it.
18170         (expand_exception_blocks): Likewise.
18171         (alloc_eh_object): New fn.
18172         (expand_throw): Use it.  Protect exception init with terminate.
18173         * typeck.c (build_modify_expr): Remove code that ignores trivial
18174         methods.
18175
18176 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18177
18178         * call.c (add_builtin_candidate): Add default case in enumeration
18179         switch.
18180         (build_new_op): Likewise.
18181         (convert_like): Likewise.
18182         * cvt.c (build_expr_type_conversion): Likewise.
18183         * tree.c (real_lvalue_p): Likewise.
18184         (lvalue_p): Likewise.
18185         (cp_tree_equal): Likewise.
18186         * typeck.c (comptypes): Likewise.
18187         (build_component_ref): Likewise.
18188         (build_function_call_real): Likewise.
18189         (build_binary_op_nodefault): Likewise.
18190         (build_unary_op): Likewise.
18191         (build_modify_expr): Likewise.
18192         * typeck2.c (initializer_constant_valid_p): Likewise.
18193
18194 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
18195
18196         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
18197
18198 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
18199
18200         * pt.c (coerce_template_parms): Make sure to digest_init if
18201         possible.
18202
18203         * decl.c (duplicate_decls): Make the newdecl virtual if the
18204         olddecl was, just as is done with other attributes of olddecl.
18205
18206 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
18207
18208         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
18209         address of an OFFSET_REF.
18210
18211         * cp-tree.def: Add AGGR_INIT_EXPR.
18212         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
18213         AGGR_INIT_EXPR where appropriate.
18214         * expr.c (cplus_expand_expr): Likewise.  Simplify.
18215
18216         * decl2.c (finish_file): Remove call to register_exception_table.
18217
18218 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18219
18220         * pt.c (instantiate_class_template): Don't do injection when
18221         processing_template_decl is true, as pollutes current_binding_level
18222         for base classes.
18223
18224 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
18225
18226         * pt.c (maybe_fold_nontype_arg): Add prototype.
18227
18228 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18229
18230         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
18231         * error.c (dump_expr): Likewise.
18232
18233 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
18234
18235         * typeck.c (build_function_call_real): Remove "inline called before
18236         definition" pedwarn.
18237
18238         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
18239
18240 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18241
18242         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
18243
18244         * pt.c (type_unification_real): Change __null to type void* with
18245         a warning.
18246
18247 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
18248
18249         * call.c (implicit_conversion): Don't call
18250         build_user_type_conversion_1 with a NULL expr, since it will
18251         crash.
18252
18253         * pt.c (unify): Don't try to unify array bounds if either array is
18254         unbounded.
18255
18256 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18257
18258         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
18259         Replace extern decls with casts.
18260
18261         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
18262         Update last_parm_cleanup_insn.
18263         (store_after_parms): Remove.
18264         * cp-tree.h: Adjust.
18265
18266 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
18267
18268         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
18269         (finish_file): Check DECL_COMDAT instead of weak|one_only.
18270         (import_export_vtable): Use make_decl_one_only instead of
18271         comdat_linkage for win32 tweak.
18272         (import_export_decl): Likewise.
18273         * pt.c (mark_decl_instantiated): Likewise.
18274
18275         * decl2.c (finish_file): Lose handling of templates in pending_statics.
18276
18277 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
18278
18279         * decl2.c (finish_file): Lose call to expand_builtin_throw.
18280         * except.c (expand_builtin_throw): Remove.
18281         * cp-tree.h: Remove ptr_ptr_type_node.
18282         * decl.c: Likewise.
18283
18284 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
18285
18286         * decl.c (ptr_ptr_type_node): Define.
18287         (init_decl_processing): Initialize it.
18288         * cp-tree.h: Declare it.
18289         * exception.cc (__cp_exception_info): Use __get_eh_info.
18290         (__cp_push_exception): Likewise.
18291         (__cp_pop_exception): Likewise.
18292
18293         From Scott Snyder <snyder@d0sgif.fnal.gov>:
18294         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
18295         saved_pc.
18296         (init_exception_processing): Removed saved_pc initialization.
18297
18298 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
18299
18300         * pt.c (instantiate_decl): Defer all templates but inline functions.
18301
18302 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
18303
18304         * init.c (expand_vec_init): Don't fold a list of parameters.
18305
18306         * decl.c (copy_args_p): Handle copy elision for types with virtual
18307         bases.
18308         * call.c (build_over_call): Likewise.
18309
18310 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
18311
18312         * pt.c (lookup_template_function): Copy the template arguments,
18313         not just the list containing them, to the permanent obstack.
18314
18315 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18316
18317         * except.c (expand_start_catch_block): suspend_momentary for the
18318         terminate handler.
18319
18320         * error.c (dump_decl): Handle LOOKUP_EXPR.
18321
18322 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
18323
18324         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
18325         permanent obstack if we are processing a template decl.
18326         * typeck.c (build_static_cast): Likewise.
18327         (build_const_cast): Likewise.
18328         (build_reinterpret_cast): Likewise.
18329
18330         * pt.c (coerce_template_parms): Coerce some expressions, even
18331         when processing_template_decl.
18332
18333 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18334
18335         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
18336         handling of pointer difference expressions.
18337
18338         * typeck.c (comp_target_types): Comparison of function/method types
18339         is independent of nptrs.
18340
18341 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
18342
18343         * pt.c (tsubst): Avoid creating pointer to reference and
18344         reference to reference types.
18345
18346 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
18347
18348         * parse.y (do_id): New nonterminal.
18349         (template_id): Use it.
18350
18351 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
18352
18353         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
18354         * spew.c (yylex): Don't do_identifier here.
18355         * decl2.c (build_expr_from_tree): Revert last change.
18356
18357         * decl2.c (build_expr_from_tree): Expand the name for a method call.
18358         * parse.y (object_template_id): Don't try to take the DECL_NAME.
18359
18360 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
18361
18362         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
18363         alloc_expr.
18364         * call.c (build_op_delete_call): Adjust.
18365
18366         * except.c (expand_end_catch_block): Lose rethrow region.
18367         (expand_start_catch_block): Likewise.
18368         (expand_end_catch_block): Don't expand_leftover_cleanups.
18369
18370 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18371
18372         * pt.c (tsubst): Remove tree_cons call (places redundant info into
18373         DECL_TEMPLATE_INSTANTIATION).
18374
18375 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
18376
18377         * tree.c (is_overloaded_fn): Handle getting a fn template.
18378         (really_overloaded_fn): Likewise.
18379         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
18380         * pt.c (check_explicit_specialization): Tweak.
18381         (determine_explicit_specialization): Tweak.
18382
18383         * tree.c, cp-tree.h (get_target_expr): New fn.
18384
18385 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
18386
18387         * pt.c (check_explicit_specialization): Fix misspelling in
18388         diagnostic: `preceeded'.
18389         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
18390         `conversiona'.
18391
18392 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
18393
18394         * pt.c (determine_explicit_specialization): Avoid an internal
18395         error for bad specializations.
18396
18397         * method.c (build_overload_value): Handle SCOPE_REF.
18398
18399 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
18400
18401         * class.c (prepare_fresh_vtable): Enable even more complex MI
18402         vtable names.
18403
18404 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
18405
18406         * exception.cc (__check_eh_spec): Optimize a bit.
18407
18408         * exception.cc (__cp_pop_exception): Lose handler arg.
18409         * except.c (do_pop_exception): Likewise.
18410         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
18411         (expand_end_catch_block): Likewise.
18412
18413 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18414
18415         * pt.c (check_explicit_specialization): Complain about using a
18416         template-id for a non-specialization.
18417
18418 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
18419
18420         * repo.c: Prototype rindex only if needed.
18421         * xref.c: Likewise.
18422
18423 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18424
18425         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
18426
18427 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
18428
18429         * typeck.c (build_const_cast): Handle references here instead of
18430         handing off to convert_to_reference.
18431
18432         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
18433         TerminateFunctionCall.
18434         (init_exception_processing): Likewise.  Terminate et al are now
18435         the fns, not ADDR_EXPRs.
18436         (various): Lose redundant assemble_external calls.
18437         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
18438
18439         * cp-tree.h (struct lang_decl_flags): Add comdat.
18440         (DECL_COMDAT): New macro.
18441         * decl.c (duplicate_decls): Propagate it.
18442         (cp_finish_decl): Handle it.
18443         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
18444
18445         * class.c: Remove static pending_hard_virtuals.
18446         (add_virtual_function): Take pointers to pending_virtuals
18447         and pending_hard_virtuals.
18448         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
18449
18450 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
18451
18452         * decl2.c (import_export_vtable): If we support one_only but not
18453         weak symbols, mark instantiated template vtables one_only.
18454         (import_export_decl): Likewise for tinfo functions.
18455         (finish_vtable_vardecl): Also write out vtables from explicitly
18456         instantiated template classes.
18457         * pt.c (mark_class_instantiated): Revert last change.
18458
18459         * except.c (expand_throw): Call mark_used on the destructor.
18460
18461 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
18462
18463         * lex.c (lang_init): Enable flag_exceptions by default if no
18464         command line switch was specified.
18465
18466 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
18467
18468         * pt.c (unify): Handle `void' template parameters in
18469         specializations.
18470
18471 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
18472
18473         * rtti.c (build_dynamic_cast): Handle template case here.
18474         (build_dynamic_cast_1): Not here.
18475
18476         * typeck2.c (digest_init): Make copies where appropriate.
18477
18478         * decl2.c (delete_sanity): resolve_offset_ref.
18479
18480         * except.c: Call terminate without caching so many bits.
18481
18482         * except.c (expand_start_catch_block): Fix catching a reference
18483         to pointer.
18484
18485 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
18486
18487         * init.c (build_new): Copy size to the saveable obstack.
18488
18489         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
18490         TRY_CATCH_EXPR for now.
18491
18492 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
18493
18494         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
18495         has DECL_LANG_SPECIFIC.
18496
18497         * exception.cc (struct cp_eh_info): Add handlers field.
18498         (__cp_push_exception): Initialize it.
18499         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
18500         (__throw_bad_exception): Remove.
18501         * except.c (call_eh_info): Add handlers field.
18502         (get_eh_handlers): New fn.
18503         (push_eh_cleanup): Increment handlers.
18504
18505 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
18506
18507         * except.c (expand_start_eh_spec): Use the try/catch code.
18508         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
18509         doing everything inline.
18510         (init_exception_processing): throw_type_match now takes
18511         const void pointers.
18512         * exception.cc (__check_eh_spec): New fn.
18513         * inc/exception: Neither terminate nor unexpected return.
18514         * decl.c: Make const_ptr_type_node public.
18515         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
18516
18517         * except.c (expand_start_catch_block): We only need the rethrow
18518         region for non-sjlj exceptions.
18519         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
18520
18521 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
18522
18523         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
18524         (various.o): Likewise.
18525         * inc/new: Add placement deletes.  Add throw specs for default new.
18526         * new.cc (set_new_handler): Move here from libgcc2.
18527         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
18528         (new): Move from libgcc2.  Throw bad_alloc.
18529         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
18530         * decl.c (init_decl_processing): Update exception specs on new and
18531         delete.
18532
18533         * method.c (build_decl_overload_real): Don't mess with global
18534         placement delete.
18535
18536         * init.c (build_new): Check for null throw spec, not nothrow_t.
18537
18538         * decl.c (duplicate_decls): Don't complain about different exceptions
18539         from an internal declaration.
18540
18541         * call.c (build_op_delete_call): Fix check for member fns again.
18542
18543         * decl2.c (import_export_decl): Interface hackery affects
18544         virtual synthesized methods.
18545
18546 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18547
18548         * decl.c (start_decl): Don't just complain about a mismatched
18549         scope, fix it.
18550
18551         * decl.c (make_implicit_typename): Handle case where t is not
18552         actually from context.
18553         * tree.c (get_type_decl): Lose identifier case.
18554         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
18555         * parse.y (nonnested_type): Just use lookup_name.
18556         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
18557
18558 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
18559
18560         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
18561         T was built in C language context (for example, by
18562         output_func_start_profiler).
18563
18564 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
18565
18566         * decl.c (make_implicit_typename): New fn.
18567         (lookup_name_real): Use it.  Use current_class_type as the context.
18568
18569 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
18570
18571         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
18572
18573 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18574
18575         * friend.c (do_friend): Warn about non-template friends in templates.
18576
18577         * call.c (build_op_delete_call): Fix handling of inherited delete.
18578
18579         * search.c (dfs_record_inheritance): Ignore template type parms.
18580
18581 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
18582
18583         * call.c (build_new_op): Fix copy error.
18584         (build_op_new_call): New fn.
18585         (build_op_delete_call): New fn.
18586         * cp-tree.h: Declare them.
18587         * init.c (build_new): Use them.  Support placement delete.
18588         (build_x_delete): Use build_op_delete_call.
18589         (build_delete): Likewise.
18590         * decl2.c (delete_sanity): Likewise.
18591         (coerce_delete_type): Don't complain about placement delete.
18592
18593 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18594
18595         * call.c (build_new_function_call): Remove unused 'obj' parm.
18596         * cp-tree.h, typeck.c: Adjust.
18597
18598         * init.c (build_new): Make the cleanup last longer.
18599         (expand_vec_init): Call do_pending_stack_adjust.
18600
18601 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
18602
18603         * pt.c (do_type_instantiation): Fix typo.
18604         (mark_class_instantiated): If we support one_only but not weak
18605         symbols, don't mark this as known.
18606
18607         * init.c (build_new): Handle vec delete in EH cleanup.
18608
18609 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18610
18611         * call.c (build_method_call): Call complete_type before checking
18612         for destructor.
18613
18614 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
18615
18616         * decl.c (add_block_current_level): Delete.
18617         * init.c (build_vec_delete_1): Delete build_block and
18618         add_block_current_level calls.
18619
18620 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
18621
18622         * init.c (build_new): Handle freeing allocated memory when the
18623         constructor throws.
18624
18625         * call.c (build_new_method_call): Fix flags arg.
18626
18627         * pt.c (do_type_instantiation): Don't try to instantiate
18628         member templates.
18629         (mark_decl_instantiated): If we support one_only but not
18630         weak symbols, mark this one_only.
18631         * decl2.c (import_export_vtable): Don't defer handling of vtables
18632         if MULTIPLE_SYMBOL_SPACES.
18633
18634 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18635
18636         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
18637
18638 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
18639
18640         * except.c (do_pop_exception): Return a value.
18641
18642 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
18643
18644         * call.c (build_new_method_call): Handle getting a
18645         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
18646         if we got template parms.
18647         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
18648         not just the args.
18649         * decl2.c (build_expr_from_tree): Tweak last change.
18650         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
18651         (maybe_fold_nontype_arg): Split out from tsubst_copy.
18652         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
18653
18654 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
18655
18656         * pt.c (tsubst_copy): Handle explicit template arguments in
18657         function calls.
18658         * typeck.c (build_x_function_call): Likewise.
18659         * decl2.c (build_expr_from_tree): Lookup function name if it
18660         hasn't been done.
18661
18662         * pt.c (tsubst): Instantiate template functions properly when
18663         template parameter does not appear in function arguments and return
18664         type.
18665         (comp_template_args): Handle member templates required by tsubst.
18666
18667 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
18668
18669         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
18670         previous change.
18671
18672 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18673
18674         * pt.c (coerce_template_parms): Tweak error message.
18675
18676         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
18677         return type defaults to `int', even if there are storage-class
18678         specifiers.
18679
18680 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18681
18682         Complete nested exception support.
18683         * except.c (do_pop_exception): Split out...
18684         (push_eh_cleanup): From here.  Handle the EH region by hand.
18685         (expand_start_catch_block): Add a new level for the catch parm.
18686         Move the rethrow region outside the two cleanup regions.
18687         Protect the initializer for the catch parm with terminate.
18688         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
18689         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
18690         popping off the middle of the stack.
18691         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
18692         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
18693         (build_cplus_new): Only wrap CALL_EXPRs.
18694         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
18695         the constructor call.
18696
18697 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18698
18699         * Make-lang.in (c++.distdir): Make inc subdirectory.
18700
18701 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18702
18703         * decl2.c (finish_file): Put back some code.
18704
18705 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18706
18707         * decl2.c (finish_file): Remove redundant code.
18708         * method.c (emit_thunk): Don't let the backend defer generic thunks.
18709
18710 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
18711
18712         * except.c (call_eh_info): Split out...
18713         (push_eh_info): From here.
18714         (expand_builtin_throw): Use it.
18715         (expand_start_catch_block): Move region start back.
18716
18717 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
18718
18719         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
18720         (real_yylex): Record wide strings using target endianness, not host.
18721
18722 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
18723
18724         * repo.c (rindex): Add decl unconditionally.
18725         (get_base_filename, open_repo_file): Don't cast rindex.
18726         * xref.c (rindex): Add decl unconditionally.
18727         (index): Remove unused decl.
18728         (open_xref_file): Don't cast rindex.
18729
18730 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18731
18732         * class.c (build_vbase_path): Propagate the result type properly.
18733
18734 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
18735
18736         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
18737         remaining use of saved_throw_type with a call to get_eh_type.
18738
18739 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
18740
18741         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
18742         (file_name_nondirectory): New function, doing the same as the macro.
18743         (set_typedecl_interface_info): Use it instead of the macro.
18744         (check_newline): Likewise.
18745         (handle_cp_pragma): Likewise.
18746
18747         * repo.c (get_base_filename): Cast result of rindex to char*.
18748         (open_repo_file): Likewise.
18749         * xref.c (open_xref_file): Likewise.
18750         * error.c (dump_char): Make its arg int, not char.
18751
18752         * except.c (push_eh_info): Pass the number of fields - 1 down, not
18753         the exact number of fields.
18754
18755 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
18756
18757         Support for nested exceptions.
18758         * tinfo2.cc (__is_pointer): New fn.
18759         * exception.cc (struct cp_eh_info): Define.
18760         (__cp_exception_info, __uncatch_exception): New fns.
18761         (__cp_push_exception, __cp_pop_exception): New fns.
18762         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
18763         Lose empty_fndecl.
18764         (init_exception_processing): Likewise.  __eh_pc is now external.
18765         (push_eh_info): New fn.
18766         (get_eh_{info,value,type,caught}): New fns.
18767         (push_eh_cleanup): Just call __cp_pop_exception.
18768         (expand_start_catch_block): Use push_eh_info.  Start the eh region
18769         sooner.
18770         (expand_end_eh_spec): Use push_eh_info.
18771         (expand_throw): Call __cp_push_exception to set up the exception info.
18772         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
18773         when we rethrow.
18774         (expand_builtin_throw): Don't refer to empty_fndecl.
18775
18776 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
18777
18778         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
18779
18780 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
18781
18782         * method.c (build_template_parm_names, build_decl_overload_real):
18783         Add static to definitions.
18784         * pt.c (add_to_template_args, note_template_header,
18785         processing_explicit_specialization, type_unification_real): Likewise.
18786         ({determine,check}_explicit_specialization): Use a single string for
18787         error messages.
18788
18789 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
18790
18791         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
18792         (expand_end_catch_block): Likewise.
18793         (expand_end_eh_spec): Likewise.
18794
18795 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
18796
18797         * decl.c (duplicate_decls): Handle template specializations
18798         correctly.
18799         * error.c (dump_function_name): Fix printing of specializations of
18800         member functions that are not member templates.
18801         * cp-tree.h (processing_specialization): Make global.
18802         * pt.c (processing_specialization): Likewise.
18803         * lex.c (cons_up_default_function): Save and restore
18804         processing_specialization to avoid confusion.
18805
18806 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18807
18808         * decl.c (init_decl_processing): Give null_node unknown* type.
18809         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
18810         (common_type): Likewise.
18811         * error.c (args_as_string): Recognize null_node.
18812
18813 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18814
18815         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
18816         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
18817
18818         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
18819
18820         * Make-lang.in (g++): Include prefix.o.
18821
18822 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
18823
18824         * pt.c (determine_explicit_specialization): Initialize "dummy"
18825         to keep Purify quiet.
18826
18827 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
18828
18829         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
18830         (build_overload_int): Not here.
18831
18832 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
18833
18834         * class.c (build_type_pathname): Remove.
18835         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
18836
18837 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
18838
18839         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
18840         &&label GNU extension.
18841
18842 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
18843
18844         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
18845         so as to avoid incorrect manglings.
18846         * method.c (build_decl_overload_real): Don't mangle return types
18847         for constructors.
18848
18849 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18850
18851         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
18852         scratch_tree_cons): Define as macros for now.
18853         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
18854         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
18855         typeck2.c: Use them and the expression_obstack variants.
18856
18857 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18858
18859         * decl.c (store_return_init): Allow classes with explicit ctors to
18860         be used with the named return values extension.
18861
18862 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
18863
18864         * pt.c (instantiate_decl): Fix previous change.
18865
18866 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
18867
18868         * pt.c (tsubst): Fix thinko.
18869         (instantiate_decl): Really use the original template.
18870
18871         * call.c (build_new_method_call): Use simple constructor_name for
18872         error messages.
18873
18874 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
18875
18876         * method.c (build_underscore_int): Don't use ANSI specific
18877         features.
18878
18879 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18880
18881         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
18882         for our key method; it might have been inlined by -O3.
18883
18884 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
18885
18886         * decl.c (make_typename_type): Do not try to call lookup_field for
18887         non-aggregate types.
18888
18889 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
18890
18891         * typeck.c (build_reinterpret_cast): Tweak.
18892
18893 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
18894
18895         * typeck.c (build_reinterpret_cast): Converting a void pointer
18896         to function pointer with a reinterpret_cast produces a warning
18897         if -pedantic is issued.
18898
18899 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18900
18901         * typeck.c (c_expand_return): Don't warn about returning a
18902         reference-type variable as a reference.
18903
18904 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18905
18906         * method.c (build_static_name): Fix typo.
18907
18908 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
18909
18910         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
18911         OLDDECL before we try to do DECL_USE_TEMPLATE.
18912
18913 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18914
18915         * decl.c (duplicate_decls): Don't warn about template instances.
18916
18917         * typeck.c (mark_addressable): Lose ancient code that unsets
18918         DECL_EXTERNAL.
18919
18920         * pt.c (do_decl_instantiation): Lose support for instantiating
18921         non-templates.
18922
18923         * call.c (build_new_function_call): Fix handling of null explicit
18924         template args.
18925         (build_new_method_call): Likewise.
18926
18927 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
18928
18929         * method.c (build_underscore_int): Fix typo.
18930
18931 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
18932
18933         * tree.c (print_lang_statistics): #if 0 call to
18934         print_inline_obstack_statistics until its definition is checked in.
18935
18936 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
18937
18938         * decl2.c (finish_file): Move dump_tree_statistics to end.
18939
18940         * pt.c (instantiate_decl): Look for the original template.
18941         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
18942         of member templates.
18943
18944 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
18945
18946         * Makefile.in (g++FAQ.*): New rules.
18947         (CONFLICTS): Update.
18948         * g++FAQ.texi: Moved from libg++.
18949
18950         * parse.y (PFUNCNAME): Only specify the type once.
18951
18952 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
18953
18954         * lex.c (real_yylex): Clean up the code to fully behave the way
18955         the c-lex.c parser does for complex and real numbers.
18956
18957 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18958
18959         * method.c (build_decl_overload_real): Reformat.
18960
18961 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
18962
18963         * method.c (synthesize_method): If at_eof, determine our linkage.
18964
18965 1997-09-29  Paul Eggert  <eggert@twinsun.com>
18966
18967         * lex.c (real_yylex): Treat `$' just like `_', except issue a
18968         diagnostic if !dollars_in_ident or if pedantic.
18969
18970         * lang-specs.h (@c++): -ansi no longer implies -$.
18971
18972         * decl2.c (lang_decode_option):
18973         -traditional and -ansi now do not mess with
18974         dollars_in_ident.
18975
18976 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
18977
18978         * Makefile.in (parse.o, decl.o): Also depend on
18979         $(srcdir)/../except.h $(srcdir)/../output.h.
18980         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
18981         $(srcdir)/../except.h $(srcdir)/../output.h.
18982         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
18983         ../insn-codes.h.
18984
18985         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
18986
18987         * expr.c (cplus_expand_expr): Make it static.
18988
18989         * decl2.c, init.c, typeck.c: Include "expr.h".
18990         (expand_expr): Use proper values when calling the function.
18991
18992 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
18993
18994         * lang-options.h: New -Wold-style-cast flag.
18995         * cp-tree.h (warn_old_style_cast): New variable.
18996         * decl2.c (warn_old_style_cast): Likewise.
18997         (lang_decode_option): Support -Wold-style-cast.
18998         (reparse_absdcl_as_casts): Produce old-style-cast warning.
18999
19000 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
19001
19002         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
19003         TREE_USED, reset value based on already_used.
19004
19005         * init.c (expand_member_init): Revert change.
19006
19007 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
19008
19009         * cp-tree.h, decl.c, decl2.c, pt.c:
19010         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
19011
19012         * decl2.c (lang_decode_option): Add missing ;.
19013
19014 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
19015
19016         * friend.c (do_friend): Disable injection for all template-derived
19017         decls.
19018         * decl2.c (lang_decode_option): Handle -fguiding-decls.
19019         * parse.y (notype_template_declarator): New nonterminal.
19020         (direct_notype_declarator): Use it.
19021         (complex_direct_notype_declarator): Likewise.
19022         (object_template_id): Accept any kind of identifier after TEMPLATE.
19023         (notype_qualified_id): Don't add template declarators here.
19024
19025 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
19026
19027         * call.c (add_template_candidate): Add explicit_targs parameter.
19028         (build_scoped_method_call): Use it.
19029         (build_overload_call_real): Likewise.
19030         (build_user_type_conversion_1): Likewise.
19031         (build_new_function_call): Likewise.
19032         (build_object_call): Likewise.
19033         (build_new_op): Likewise.
19034         (build_new_method_call): Likewise.
19035         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
19036         (build_new_method_call): Likewise.
19037
19038         * class.c (finish_struct_methods): Add specialization pass to
19039         determine which methods were specializing which other methods.
19040         (instantiate_type): Handle TEMPLATE_ID_EXPR.
19041
19042         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
19043
19044         * cp-tree.h (name_mangling_version): New variable.
19045         (flag_guiding_decls): Likewise.
19046         (build_template_decl_overload): New function.
19047         (begin_specialization): Likewise.
19048         (reset_specialization): Likewise.
19049         (end_specialization): Likewise.
19050         (determine_explicit_specialization): Likewise.
19051         (check_explicit_specialization): Likewise.
19052         (lookup_template_function): Likewise.
19053         (fn_type_unification): Add explicit_targs parameter.
19054         (type_unification): Likewise.
19055
19056         * decl.c (duplicate_decls): Add smarts for explicit
19057         specializations.
19058         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
19059         specializations.
19060         (grokfndecl): Call check_explicit_specialization.
19061
19062         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
19063         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
19064         (check_classfn): Handle specializations.
19065
19066         * error.c (dump_function_name): Print specialization arguments.
19067
19068         * friend.c (do_friend): Don't call pushdecl for template
19069         instantiations.
19070
19071         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
19072
19073         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
19074         and -fno-guiding-decls.
19075
19076         * lex.c (identifier_type): Return PFUNCNAME for template function
19077         names.
19078
19079         * method.c (build_decl_overload_real): New function.
19080         (build_template_parm_names): New function.
19081         (build_overload_identifier): Use it.
19082         (build_underscore_int): New function.
19083         (build_overload_int): Use it.  Add levels for template
19084         parameters.
19085         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
19086         (build_overload_nested_names): Handle template type parameters.
19087         (build_template_decl_overload): New function.
19088
19089         * parse.y (YYSTYPE): New ntype member.
19090         (nested_name_specifier): Use it.
19091         (nested_name_specifier_1): Likewise.
19092         (PFUNCNAME): New token.
19093         (template_id, object_template_id): New non-terminals.
19094         (template_parm_list): Note specializations.
19095         (template_def): Likewise.
19096         (structsp): Likewise.
19097         (fn.def2): Handle member template specializations.
19098         (component_decl_1): Likewise.
19099         (direct_notype_declarator): Handle template-ids.
19100         (component_decl_1): Likewise.
19101         (direct_notype_declarator): Handle template-ids.
19102         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
19103
19104         * pt.c (processing_specializations): New variable.
19105         (template_header_count): Likewise.
19106         (type_unification_real): New function.
19107         (processing_explicit_specialization): Likewise.
19108         (note_template_header): Likewise.
19109         (is_member_template): Handle specializations.
19110         (end_template_decl): Call reset_specialization.
19111         (push_template_decl): Handle member template specializations.
19112         (tsubst): Likewise.
19113         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
19114         (instantiate_template): Handle specializations.
19115         (instantiate_decl): Likewise.
19116         (fn_type_unification): Handle explicit_targs.
19117         (type_unification): Likewise.  Allow incomplete unification
19118         without an error message, if allow_incomplete.
19119         (get_bindings): Use new calling sequence for fn_type_unification.
19120
19121         * spew.c (yylex): Handle PFUNCNAME.
19122
19123         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
19124         (really_overloaded_fn): Likewise.
19125         (get_first_fn): Handle function templates.
19126
19127         * typeck.c (build_x_function_call): Use really_overloaded_fn.
19128         Handle TEMPLATE_ID_EXPR.
19129         (build_x_unary_op): Likewise.
19130         (build_unary_op): Likewise.
19131         (mark_addressable): Templates whose address is taken are marked
19132         as used.
19133
19134 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
19135
19136         * decl.c (init_decl_processing): Declare __builtin_constant_p as
19137         accepting any kind of type, not only int.
19138
19139 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
19140
19141         * search.c (get_matching_virtual): Notice virtual bases when sorrying
19142         about covariant returns.
19143
19144         * parse.y (member_init): Also imply typename here.  Remove ancient
19145         extension for initializing base members.
19146
19147 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
19148
19149         Handle multi-level typenames and implicit typename in base list.
19150         * parse.y (typename_sub{,[0-2]}): New rules.
19151         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
19152         (nonnested_type): New rule.
19153         (complete_type_name): Use it.
19154         (base_class.1): Use typename_sub and nonnested_type.
19155         (nested_name_specifier): Don't elide std:: here.
19156         * decl.c (make_typename_type): Handle getting a type for NAME.
19157         (lookup_name_real): Turn std:: into :: here.
19158
19159         Rvalue conversions were removed in London.
19160         * call.c (is_subseq): Don't consider lvalue transformations.
19161         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
19162         (joust): Re-enable ?: kludge.
19163
19164 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
19165
19166         * decl.c (start_function): Up warning of no return type to be a
19167         pedwarn.
19168
19169 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
19170
19171         * init.c (expand_member_init): Don't set TREE_USED.
19172         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
19173         set,don't clear TREE_USED wholesale.
19174
19175 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
19176
19177         * call.c (build_over_call): Do require_complete_type before
19178         build_cplus_new.
19179
19180 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
19181
19182         * search.c (lookup_field): Call complete_type in all cases.
19183
19184         * decl.c (finish_function): Just warn about flowing off the end.
19185
19186 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19187
19188         * decl.c (grokparms): Don't bash a permanent list node if we're
19189         in a function.
19190
19191 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
19192
19193         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
19194
19195 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
19196
19197         * call.c (build_new_op): Give better error for syntactically
19198         correct, but semantically invalid, use of undeclared template.
19199
19200         * call.c (compare_qual): Handle pmfs.
19201
19202         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
19203         after the exception spec.
19204
19205 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
19206
19207         * call.c (null_ptr_cst_p): Integer type, not integral type.
19208
19209         * call.c (joust): Disable warnings until they can be moved to the
19210         right place.
19211
19212 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
19213
19214         * Makefile.in, config-lang.in:  Convert to autoconf.
19215
19216 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
19217
19218         * decl.c (lookup_name_real): Add implicit 'typename' to types from
19219         base classes.
19220
19221         * pt.c (most_specialized_class): Fix typo.
19222         (tsubst): Move constant folding to TREE_VEC case.
19223
19224 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
19225
19226         * pt.c (do_poplevel): Don't warn about unused local variables
19227         while processing_template_decl since we don't always know whether
19228         or not they will need constructing/destructing.
19229
19230         * pt.c (uses_template_parms): Check the values of an enumeration
19231         type to make sure they don't depend on template parms.
19232
19233         * decl.c (make_typename_type): Don't lookup the field if the
19234         context uses template parms, even if we're not
19235         processing_template_decl at the moment.
19236
19237         * pt.c (coerce_template_parms): Avoid looking at the
19238         TYPE_LANG_DECL portion of a typename type, since there won't be
19239         one.
19240         (tsubst): Do constant folding as necessary to make sure that
19241         arguments passed to lookup_template_class really are constants.
19242
19243 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
19244
19245         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
19246         * decl2.c (finish_file): Only register exception tables if we
19247         need to.
19248
19249         * decl.c (init_decl_processing): Add __builtin_[fs]p.
19250
19251 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
19252
19253         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
19254
19255 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
19256
19257         * error.c (dump_decl): Avoid crashing when presented with a
19258         uninitialized constant, as can occur with a template parameter.
19259         (dump_expr): Make sure that there are enough levels of
19260         current_template_parms before we start diving through them.
19261
19262 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
19263
19264         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
19265         c-typeck.c.
19266
19267 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
19268
19269         * except.c (expand_throw): Call build_delete for all
19270         exception types, not just objects with destructors.
19271
19272 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
19273
19274         * decl.c (current_local_enum): Remove static.
19275         * pt.c (tsubst_enum): Save and restore value of current_local_enum
19276         in case template is expanded in enum decl.
19277         (instantiate_class_template): Use new tsubst_enum signature.
19278         (tsubst_expr): Likewise.
19279
19280 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
19281
19282         * pt.c (begin_member_template_processing): Take a function as
19283         argument, not a set of template arguments.  Use the template
19284         parameters, rather than the arguments.  Handle non-type parameters
19285         correctly.  Push a binding level for the parameters so that multiple
19286         member templates using the same parameter names can be declared.
19287         (end_member_template_processing): Pop the binding level.
19288         (push_template_decl): Mark member templates as static when
19289         appropriate.
19290
19291         * lex.c (do_pending_inlines): Pass the function, not its template
19292         arguments, to begin_member_template_processing.
19293         (process_next_inline): Likewise.
19294         (do_pending_defargs): Likewise.
19295
19296         * error.c (dump_expr): Obtain the correct declaration for a
19297         TEMPLATE_CONST_PARM.
19298
19299         * call.c (add_template_conv_candidate): New function.
19300         (build_object_call): Handle member templates, as done in the other
19301         build_ functions.
19302
19303 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
19304
19305         * decl.c (replace_defag): Undo previous change.
19306         * lex.c (do_pending_defargs): Deal with member templates.
19307
19308         * pt.c (is_member_template): Avoid crashing when passed a
19309         non-function argument.
19310
19311 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
19312
19313         * class.c (grow_method): Remove check for redeclaration.
19314
19315 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
19316
19317         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
19318         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
19319         (PRIMARY_TEMPLATE_P): Use it.
19320         * call.c (build_overload_call_real): Use it.
19321         * class.c (instantiate_type): Likewise.
19322         * decl.c (decls_match): Likewise.
19323         * method.c (build_overload_identifier): Likewise.
19324         * pt.c (push_template_decl): Likewise.
19325         (classtype_mangled_name): Likewise.
19326         (lookup_template_class): Likewise.
19327
19328         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
19329         DECL_NTPARMS to conform to usage elsewhere.
19330         * call.c (add_template_candidate): Likewise.
19331         * class.c (instantiate_type): Likewise.
19332         * pt.c (instantiate_template): Likewise.
19333         (get_bindings): Likewise.
19334
19335         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
19336         is_member_template.
19337
19338         * pt.c (unify): Undo changes to allow multiple levels of template
19339         parameters.
19340         (type_unification): Likewise.
19341         (fn_type_unification): Likewise.
19342         (get_class_bindings): Likewise.
19343         * cp-tree.h (Likewise).
19344
19345         * decl.c (replace_defarg): Check that the type of the default
19346         parameter does not invlove a template type before complaining
19347         about the initialization.
19348
19349         * error.c (dump_expr): Deal with template constant parameters in
19350         member templates correctly.
19351
19352         * pt.c (is_member_template): Deal with class specializations
19353         correctly.
19354         (tsubst): Handle "partial instantiation" of member templates
19355         correctly.
19356
19357 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
19358
19359         * pt.c (type_unification): Change calling sequence to allow for
19360         multiple levels of template parameters.
19361         (tsubst_expr): Likewise.
19362         (tsubst): Likewise.
19363         (tsubst_copy): Likewise.
19364         (instantiate_template): Likewise.
19365         (unify): Likewise.
19366         * call.c (build_overload_call_real): Use it.
19367         (add_builtin_candidate): Use it.
19368         (build_new_method_call): Use it.
19369         * class.c (instantiate_type): Use it.
19370         * decl.c (grokdeclarator): Use it.
19371         * decl2.c (finish_file): Use it.
19372         * method.c (build_overload_identifier): Use it.
19373
19374         * call.c (add_template_candidate):  Add additional parameter for
19375         the function return type.  Call fn_type_unification istead of
19376         type_unification.
19377         (build_user_type_conversion_1): Handle member templates.
19378         (build_new_function_call): Likewise.
19379         (build_new_op): Likewise.
19380         (build_new_method_call): Likewise.
19381
19382         * class.c (grow_method): Don't give an error message indicating
19383         that two member templates with the same name are ambiguous.
19384         (finish_struct): Treat member template functions just like member
19385         functions.
19386
19387         * cp-tree.h (check_member_template): Add declaration.
19388         (begin_member_template_processing): Likewise.
19389         (end_member_template_processing): Likewise.
19390         (fn_type_unification): Likewise.
19391         (is_member_template): Likewise.
19392         (tsubst): Change prototype.
19393         (tsubst_expr): Likewise.
19394         (tsubst_copy): Likewise.
19395         (instantiate_template): Likewise.
19396         (get_bindings): Likewise.
19397
19398         * decl.c (decls_match): Handle multiple levels of template
19399         parameters.
19400         (pushdecl): Handle template type params just like other type
19401         declarations.
19402         (push_class_level_binding): Return immediately if the
19403         class_binding_level is NULL.
19404         (grokfndecl): If check_classfn() returns a member_template, use
19405         the result of the template, not the template itself.
19406
19407         * decl2.c (check_member_template): New function.  Check to see
19408         that the entity declared to be a member template can be one.
19409         (check_classfn): Allow redeclaration of member template functions
19410         with different types; the new functions can be specializations or
19411         explicit instantiations.
19412
19413         * error.c (dump_decl): Handle multiple levels of template
19414         parameters.
19415         (dump_function_decl): Update to handle function templates.
19416
19417         * lex.c (do_pending_inlines): Set up template parameter context
19418         for member templates.
19419         (process_next_inline): Likewise.
19420
19421         * method.c (build_overload_identifier): Adjust for multiple levels
19422         of template parameters.
19423
19424         * parse.y (fn.def2): Add member templates.
19425         (component_decl_1): Likewise.
19426
19427         * pt.c (begin_member_template_processing): New function.
19428         (end_member_template_processing): Likewise.
19429         (is_member_template): Likewise.
19430         (fn_type_unification): Likewise.
19431         (current_template_parms): Return a vector of all the template
19432         parms, not just the innermost level of parms.
19433         (push_template_decl): Deal with the possibility of member
19434         templates.
19435         (lookup_template_class): Likewise.
19436         (uses_template_parms): Likewise.
19437         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
19438         TEMPLATE_CONST_PARM to deal with multiple levels of template
19439         arguments.   Add processing of TEMPLATE_DECL to produce new
19440         TEMPLATE_DECLs from old ones.
19441         (do_decl_instantiation): Handle member templates.
19442
19443         * search.c (lookup_fnfields_1): Handle member template conversion
19444         operators.
19445
19446         * tree.c (cp_tree_equal): Check the levels, as well as the
19447         indices, of TEMPLATE_CONST_PARMs.
19448
19449         * typeck.c (comptypes): Check the levels, as well as the indices,
19450         fo TEMPLATE_TYPE_PARMs.
19451         (build_x_function_call): Treat member templates like member
19452         functions.
19453
19454 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19455
19456         * typeck.c (c_expand_return): Always convert_for_initialization
19457         before checking for returning a pointer to local.
19458
19459         * pt.c (type_unification): If strict and the function parm doesn't
19460         use template parms, just compare types.
19461
19462 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
19463
19464         * method.c (build_overloaded_value): Replace direct call
19465         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
19466
19467 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
19468
19469         * typeck.c (convert_arguments): Don't arbitrarily choose the first
19470         of a set of overloaded functions.
19471
19472 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
19473
19474         * lex.c (real_yylex): Don't elide __FUNCTION__.
19475
19476         * method.c (build_overload_value): Add in_template parm.
19477         (build_overload_int): Likewise.
19478         (build_overload_identifier): Pass it.
19479
19480         * decl.c (duplicate_decls): Don't bash a previous template
19481         definition with a redeclaration.
19482
19483         * pt.c (unify): float doesn't match double.
19484
19485         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
19486         TYPE_DECL.  Handle getting non-template types.
19487         * parse.y (explicit_instantiation): Use typespec instead of
19488         aggr template_type.
19489
19490 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
19491
19492         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
19493
19494 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
19495
19496         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
19497         (compare_ics): Likewise.
19498
19499 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
19500
19501         * call.c (joust): Warn about choosing one conversion op over
19502         another because of 'this' argument when the other return type is
19503         better.
19504         (source_type): New fn.
19505
19506         * call.c (build_new_op): Strip leading REF_BIND from first operand
19507         to builtin operator.
19508
19509         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
19510         use its RTL.
19511
19512 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
19513
19514         * call.c (null_ptr_cst_p): Remove support for (void*)0.
19515
19516 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
19517
19518         * typeck.c (expand_target_expr): Make definition match declaration.
19519
19520         * class.c (get_basefndecls): Make definition match declaration.
19521
19522 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
19523
19524         * input.c (sub_getch): Eventually give up and release the input file.
19525
19526         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
19527         right place.
19528
19529         * call.c (joust): Tweak message.
19530
19531 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
19532
19533         * error.c (type_as_string): Put const/volatile on template type
19534         parameters where appropriate.
19535
19536 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
19537
19538         * call.c (strictly_better): Make arguments unsigned ints.
19539
19540 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
19541
19542         * lex.c (real_yylex): Refer to __complex instead of complex.
19543
19544 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
19545
19546         * lex.c (real_yylex): Don't use getc directly.
19547
19548 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
19549
19550         * call.c (is_subseq): Don't try to be clever.
19551
19552 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
19553
19554         * parse.y, pt.c: Include "except.h".
19555         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
19556         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
19557         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
19558         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
19559         prototyping.
19560
19561 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
19562
19563         * decl2.c (mark_vtable_entries): Instead of replacing pure
19564         virtuals with a reference to __pure_virtual, copy the decl and
19565         change the RTL.
19566
19567 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
19568
19569         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
19570
19571         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
19572
19573         * pt.c (instantiate_class_template): Call repo_template_used
19574         before finish_prevtable_vardecl.
19575
19576         * call.c (is_subseq): New fn.
19577         (compare_ics): Use it.
19578
19579         * repo.c (finish_repo): Don't crash on no args.
19580
19581         * parse.y (named_complex_class_head_sans_basetype): Handle
19582         explicit global scope.
19583         * decl2.c (handle_class_head): New fn.
19584
19585         * pt.c (unify): Add CONST_DECL case.
19586
19587 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19588
19589         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
19590
19591         * cp-tree.h (report_type_mismatch): Add prototype.
19592         * call.c (build_overload_call_real): Remove erroneous fourth
19593         argument to report_type_mismatch.
19594         (build_user_type_conversion_1): Remove erroneous second arg to
19595         tourney.
19596         (build_new_function_call): Likewise.
19597         (build_object_call): Likewise.
19598         (build_new_op): Likewise.
19599         (build_new_method_call): Likewise.
19600
19601 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19602
19603         * error.c (dump_decl): Don't bother processing a function with no
19604         DECL_LANG_SPECIFIC.
19605
19606         * method.c (emit_thunk): Call init_function_start in the macro case.
19607
19608 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
19609
19610         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
19611         defined and used to set flag_vtable_thunks.
19612
19613 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
19614
19615         * parse.y: Don't clear the inlines from their obstack until they've
19616         all been processed.
19617
19618         * decl.c (duplicate_decls): Don't complain about exception
19619         specification mismatch if flag_exceptions is off.
19620
19621 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
19622
19623         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
19624
19625 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
19626
19627         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
19628         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
19629         Include <stdio.h> before include files that formerly used STDIO_PROTO.
19630
19631         * decl.c, g++spec.c, lex.c, method.c, repo.c:
19632         Include "config.h" first, as per autoconf manual.
19633
19634 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
19635
19636         * decl.c (duplicate_decls): Tweak wording.
19637         * lex.c (do_pending_defargs): Don't die if we see a default arg
19638         that isn't a DEFAULT_ARG.
19639         * error.c (dump_expr): Handle DEFAULT_ARG.
19640
19641         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
19642         * lang-options.h: Add -fhandle-exceptions.
19643
19644         * class.c (build_vtable): Vtables are artificial.
19645         (prepare_fresh_vtable): Likewise.
19646
19647 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
19648
19649         * cvt.c (ocp_convert): After converting to the target type, set
19650         LOOKUP_NO_CONVERSION.
19651
19652         * call.c (joust): Warn about potentially confusing promotion rules
19653         with -Wsign-promo.
19654         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
19655
19656 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
19657
19658         * exception.cc: Declare __terminate_func with noreturn attribute.
19659
19660 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
19661
19662         * parse.y: Break out eat_saved_input, handle errors.
19663         (function_try_block): Use compstmt instead of compstmt_or_error.
19664
19665 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
19666
19667         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
19668
19669 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
19670
19671         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
19672         existence of cc1plus check whether $(LANGUAGES) contains C++.
19673
19674 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
19675
19676         * method.c (do_build_copy_constructor): When copying an anonymous
19677         union member loop around to handle nested anonymous unions.  Use
19678         the offset of the member relative to the outer structure, not the
19679         union.
19680
19681 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
19682
19683         * call.c (resolve_args): New fn.
19684         (build_new_function_call): Use it.
19685         (build_object_call): Likewise.
19686         (build_new_method_call): Likewise.
19687
19688 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
19689
19690         * call.c (build_over_call): tsubst all default parms from templates.
19691
19692 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19693
19694         * decl.c (struct cp_function): Add static_labelno.
19695         (push_cp_function_context): Save it.
19696         (pop_cp_function_context): Restore it.
19697
19698 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
19699
19700         * typeck.c (build_component_ref_1): Convert from reference.
19701
19702 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19703
19704         * parse.y (current_declspecs, prefix_attributes): Initialize to
19705         NULL_TREE.
19706
19707         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
19708         before we try to force it to be a TREE_LIST.
19709         (decl): Make sure $1.t is non-nil.
19710
19711 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
19712
19713         * pt.c (uses_template_parms): Handle template first-parse codes.
19714
19715         * decl.c (cp_finish_decl): Only warn about user-defined statics.
19716
19717 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
19718
19719         * pt.c (unify): Handle BOOLEAN_TYPE.
19720
19721         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
19722         * pt.c (tsubst): Don't set it.
19723         * call.c (build_over_call): Use uses_template_parms.
19724
19725 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
19726
19727         * method.c (build_overload_nested_name): Use static_labelno
19728         instead of var_labelno.
19729         (build_qualified_name): New fn.
19730         (build_overload_name): Split out from here.
19731         (build_static_name): Use build_qualified_name.
19732         * decl.c (cp_finish_decl): Statics in extern inline functions
19733         have comdat linkage.
19734         (start_function): Initialize static_labelno.
19735
19736 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
19737
19738         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
19739         before "all member functions in class [] are private".
19740
19741 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
19742
19743         * lex.c (do_scoped_id): convert_from_reference.
19744         * init.c (build_offset_ref): Likewise.
19745
19746 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
19747
19748         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
19749
19750 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
19751
19752         * typeck.c (get_member_function_from_ptrfunc): Promote index
19753         before saving it.
19754
19755 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
19756
19757         * tree.c (layout_basetypes): Move non-virtual destructor warning.
19758         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
19759
19760 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
19761
19762         * decl.c (grokdeclarator): Call add_defarg_fn for the function
19763         type, too.
19764         * lex.c (add_defarg_fn): Adjust.
19765         (do_pending_defargs): Adjust.  Don't skip the first parm.
19766
19767 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
19768
19769         * decl.c (build_enumerator): Global enumerators are also readonly.
19770
19771         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
19772         (build_dynamic_cast): Call it and convert_from_reference.
19773
19774         * lex.c (add_defarg_fn): New fn.
19775         (snarf_defarg): Don't add to defarg_types.
19776         (do_pending_defargs): Lose defarg_types.  All fns we process now
19777         have defargs.
19778         * decl.c (grokfndecl): Call add_defarg_fn.
19779
19780         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
19781         * cp-tree.def: Add DEFAULT_ARG.
19782         * spew.c (yylex): Call snarf_defarg as appropriate.
19783         * parse.y: New tokens DEFARG and DEFARG_MARKER.
19784         (defarg_again, pending_defargs, defarg, defarg1): New rules.
19785         (structsp): Use pending_defargs.
19786         (parms, full_parm): Use defarg.
19787         * lex.c (init_lex): Initialize inline_text_firstobj.
19788         (do_pending_inlines): Never pass the obstack to feed_input.
19789         (process_next_inline): Call end_input instead of restore_pending_input.
19790         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
19791         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
19792         * input.c (end_input): New fn.
19793         (sub_getch): At the end of some fed input, just keep returning EOF
19794         until someone calls end_input.
19795         Remove 'obstack' field from struct input_source.
19796         * decl.c (grokparms): Handle DEFAULT_ARG.
19797         (replace_defarg): New fn.
19798         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
19799
19800 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
19801
19802         * call.c (implicit_conversion): If nothing else works, try binding
19803         an rvalue to a reference.
19804
19805 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
19806
19807         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
19808         ifndef for Cygwin32 to include SIGSEGV.
19809
19810 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19811
19812         * class.c (finish_struct_1): Only complain about pointers without
19813         copy stuff if there are any constructors.
19814
19815         * rtti.c (build_dynamic_cast): Call complete_type on the types.
19816
19817         * decl.c (grokfndecl): If the function we chose doesn't actually
19818         match, die.
19819
19820         * decl2.c (grokclassfn): Don't specify 'const int' for the
19821         artificial destructor parm.
19822
19823         * pt.c (type_unification): If we are called recursively, nothing
19824         decays.
19825
19826 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
19827
19828         * decl.c (init_decl_processing): Stop trying to catch signals
19829         other than SIGABRT since the Cygwin32 library doesn't support
19830         them correctly yet.  This fixes a situation in which g++ causes
19831         a hang on SIGSEGVs and other such signals in our Win32-hosted
19832         tools.
19833
19834 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
19835
19836         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
19837
19838 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
19839
19840         * typeck2.c (store_init_value): Always return the value if our
19841         type needs constructing.
19842
19843         * method.c (hack_identifier): Convert class statics from
19844         reference, too.
19845
19846 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
19847
19848         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
19849
19850 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
19851
19852         * typeck.c (c_expand_return): Make sure we clean up temporaries at
19853         the end of return x;
19854
19855 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19856
19857         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
19858
19859 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
19860
19861         * except.c (expand_builtin_throw): Add support
19862         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
19863
19864 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
19865
19866         * repo.c (extract_string): Null-terminate.
19867
19868         * cp-tree.h (TI_SPEC_INFO): New macro.
19869         (CLASSTYPE_TI_SPEC_INFO): New macro.
19870         * pt.c (push_template_decl): Correctly determine # of template parms
19871         for partial specs.
19872
19873         * call.c (compare_ics): Really fix 'this' conversions.
19874
19875         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
19876         non-template fn.
19877
19878         * pt.c (push_template_decl): Complain about mismatch in # of
19879         template parms between a class template and a member template.
19880
19881 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
19882
19883         * method.c (synthesize_method): You can't call
19884         function_cannot_inline_p after finish_function.
19885         * decl.c (finish_function): Turn on flag_inline_functions and turn
19886         off DECL_INLINE before handing a synthesized method to the
19887         backend.
19888
19889 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
19890
19891         * method.c (synthesize_method): Remove July 30 change to never set
19892         DECL_INLINE if at_eof.
19893
19894 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
19895
19896         * xref.c (GNU_xref_member): Ensure that the node has a
19897         decl_lang_specific part before checking DECL_FRIEND_P.
19898
19899 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19900
19901         * pt.c (instantiate_class_template): Diagnose non-class types used
19902         as bases.
19903
19904 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
19905
19906         * typeck.c (build_conditional_expr): Use convert_for_initialization
19907         instead of convert_and_check.
19908
19909 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19910
19911         * parse.y (typespec): Don't pedwarn for typeof.
19912
19913 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
19914
19915         * repo.c (finish_repo): Only check changes if we would write a
19916         repo file.
19917
19918         * call.c (compare_ics): Fix handling of 'this' conversions.
19919
19920         * pt.c (do_decl_instantiation): Support static data too.  Rename
19921         from do_function_instantiation.
19922         * cp-tree.h: Adjust.
19923         * parse.y: Adjust.
19924
19925         * repo.c (extract_string): New fn.
19926         (get_base_filename): Use it.
19927         (init_repo): Compare old args with current args.
19928
19929 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
19930
19931         * Makefile.in, Make-lang.in: Protect C-ls with a comment
19932         character, idea from Paul Eggert <eggert@twinsun.com>.
19933
19934 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
19935
19936         * typeck.c (c_expand_return): Be more persistent in looking for
19937         returned temps.
19938
19939         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
19940         pointer to reference.
19941
19942         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
19943
19944 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19945
19946         * init.c (build_member_call, build_offset_ref):
19947         Use do_scoped_id instead of do_identifier.
19948
19949         * cvt.c (convert): Remove bogosity.
19950
19951 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19952
19953         * cvt.c (build_up_reference): Do checks of ARGTYPE and
19954         TARGET_TYPE before trying to use get_binfo.
19955
19956 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
19957
19958         * cvt.c (build_up_reference): Call get_binfo to get access control.
19959
19960         * decl2.c (import_export_decl): If we don't support weaks, leave
19961         statics undefined.
19962
19963 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
19964
19965         * except.c (expand_builtin_throw): Add support for machines that
19966         cannot access globals after throw's epilogue when
19967         -fno-sjlj-exceptions is used.
19968
19969 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
19970
19971         * parse.y: 'std::' becomes '::'.
19972         * lex.c (real_yylex): Remove 'namespace' warning.
19973         * init.c (build_member_call): Ignore 'std::'.
19974         (build_offset_ref): Likewise.
19975         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
19976         (do_toplevel_using_decl): Ignore 'using std::whatever'.
19977         * decl.c (push_namespace): Just sorry.
19978         (pop_namespace): Nop.
19979         (init_decl_processing): Declare std namespace.
19980
19981 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
19982
19983         * search.c (push_class_decls): A name which ambiguously refers to
19984         several instantiations of the same template just refers to the
19985         template.
19986
19987 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
19988
19989         * decl.c (build_enumerator): Fix problem with unsigned long
19990         enumerated values being smashed to ints, causing overflow
19991         when computing next enumerated value (for enum values around
19992         MAX_VAL).
19993
19994 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
19995
19996         * typeck.c (build_component_ref): Only call mark_used on a decl.
19997
19998 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19999
20000         * typeck.c (build_c_cast): Make the check for a ptr to function
20001         more specific before possible default_conversion call.
20002
20003 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
20004
20005         * except.c (expand_exception_blocks): Simplify and fix and make
20006         sure we don't end a region in a sequence, as expand_end_bindings
20007         doesn't like it.
20008
20009 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
20010
20011         * except.c (init_exception_processing): Mark terminate as not
20012         returning so that the optimizer can optimize better.
20013
20014 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
20015
20016         * cvt.c (convert): Don't do any extra work, if we can avoid it
20017         easily.
20018
20019 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
20020
20021         * *.[chy]: Change cp_convert to ocp_convert, change convert to
20022         cp_convert.  convert is now reserved for the backend, and doesn't
20023         have the semantics a frontend person should ever want.
20024
20025 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
20026
20027         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
20028         Lose -traditional support.
20029
20030 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
20031
20032         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
20033
20034         * parse.y (self_reference): Do it for templates, too.
20035         * class.c (pushclass): Don't overload_template_name; the alias
20036         generated by build_self_reference serves the same purpose.
20037
20038         * tree.c (list_hash): Make static, take more args.
20039         (list_hash_lookup): Likewise.
20040         (list_hash_add): Make static.
20041         (list_hash_canon): Lose.
20042         (hash_tree_cons): Only build a new node if one isn't already in the
20043         hashtable.
20044         (hash_tree_chain): Use hash_tree_cons.
20045         * cp-tree.h: Adjust.
20046         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
20047         of calling lookup_name.
20048
20049 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
20050
20051         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
20052         doesn't refer to the CONST_DECLs.
20053
20054 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
20055
20056         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
20057         is bigger.
20058         (expand_class_desc): Convert the last argument to a sizetype.
20059
20060 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20061
20062         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
20063         __real__): Add reswords.
20064         * hash.h: Regenerate.
20065         * lex.h (rid): Add RID_COMPLEX.
20066         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
20067         * lex.c (init_lex): Add building of RID_COMPLEX.
20068         (real_yylex): General cleanup in line with what c-lex.c also has,
20069         sans the cruft for traditional; add handling of SPEC_IMAG, complex
20070         types, and imaginary numeric constants.
20071         * parse.y (REALPART, IMAGPART): Add tokens.
20072         (unary_expr): Add REALPART and IMAGPART rules.
20073         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
20074         * decl.c (complex_{integer,float,double,long}_type_node): Define
20075         types.
20076         (init_decl_processing): Set up the types.
20077         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
20078         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
20079         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
20080         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
20081         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
20082         COMPLEX_TYPE case.
20083         * method.c (build_overload_name): Add handling of the different
20084         COMPLEX_TYPEs, prefixing them with `J'.
20085         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
20086         as a template parm.
20087         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
20088         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
20089         (mapcar): Handle COMPLEX_CST.
20090         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
20091         (common_type): Add code for complex types.
20092         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
20093         (convert_for_assignment): Likewise.
20094         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
20095
20096 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
20097
20098         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
20099         tsubst_expr, as it might try to do overload resolution.
20100
20101 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
20102
20103         * pt.c (instantiate_class_template): Oops.
20104
20105 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
20106
20107         * cp-tree.def: Add TAG_DEFN.
20108         * pt.c (tsubst_enum): New fn.
20109         (instantiate_class_template): Use it.
20110         (tsubst_expr): Support TAG_DEFN.
20111         (tsubst): Support local enums.
20112         (tsubst_copy): Likewise.
20113         * decl.c (finish_enum): Likewise.
20114         (start_enum): If this is a local enum, switch to permanent_obstack.
20115
20116 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
20117
20118         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
20119         (finish_function): Put the base init code for constructors just
20120         after the parm cleanup insns.
20121         (struct cp_function): Add last_parm_cleanup_insn.
20122         (push_cp_function_context): Likewise.
20123         (pop_cp_function_context): Likewise.
20124
20125 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
20126
20127         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
20128
20129 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20130
20131         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
20132         for THUNK_FNDECL before we switch to temporary allocation.
20133
20134 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
20135
20136         * call.c (build_new_op): Handle null arg2 for ?:.
20137
20138 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
20139
20140         * except.c (expand_exception_blocks): Ensure that we flow through
20141         the end of the exception region for the exception specification.
20142         Move exception region for the exception specification in, so that
20143         it doesn't protect the parm cleanup.  Remove some obsolete code.
20144         * decl.c (store_parm_decls): Likewise.
20145         (finish_function): Likewise.
20146
20147 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
20148
20149         * init.c (build_new): Fix nothrow handling.
20150
20151 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20152
20153         * init.c (emit_base_init): Don't warn about the initialization
20154         list for an artificial member.
20155
20156 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20157
20158         * expr.c (do_case): Handle !START case for the error msg.
20159
20160 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
20161
20162         * decl2.c, lang-options.h: New option -Weffc++.
20163         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
20164         to -Weffc++.
20165
20166         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
20167         to MULTIPLE_SYMBOL_SPACES.
20168
20169 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
20170
20171         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
20172
20173         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
20174
20175         * typeck.c (c_expand_return): Don't complain about returning void
20176         to void in an artificial function.
20177         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
20178         don't set DECL_RESULT, set DECL_ARTIFICIAL.
20179         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
20180
20181 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
20182
20183         * init.c (init_decl_processing): Add support for setjmp/longjmp based
20184         exception handling.
20185         * except.c (init_exception_processing): Likewise.
20186         (expand_end_catch_block): Likewise.
20187         (expand_exception_blocks): Likewise.
20188         (expand_throw): Likewise.
20189         * exception.cc (__default_terminate): Likewise.
20190
20191         * init.c (perform_member_init): Use new method of expr level
20192         cleanups, instead of cleanups_this_call and friends.
20193         (emit_base_init): Likewise.
20194         (expand_aggr_vbase_init_1): Likewise.
20195         (expand_vec_init): Likewise.
20196         * decl.c (cp_finish_decl): Likewise.
20197         (expand_static_init): Likewise.
20198         (store_parm_decls): Likewise.
20199         (cplus_expand_expr_stmt): Likewise.
20200         * decl2.c (finish_file): Likewise.
20201
20202         * Make-lang.in (exception.o): Ok to compile with -O now.
20203
20204         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
20205         we know it will be done later by the backend.
20206
20207         * decl2.c (lang_f_options): Remove support for short temps.
20208         * lang-options.h: Likewise.
20209
20210 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
20211
20212         * tree.c (varargs_function_p): New fn.
20213         * method.c (emit_thunk): Replace broken generic code with code to
20214         generate a heavyweight thunk function.
20215
20216 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
20217
20218         * pt.c (process_template_parm): pedwarn about floating-point parms.
20219
20220         * decl.c (grokdeclarator): inline no longer implies static.
20221
20222         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
20223
20224 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
20225
20226         * class.c (check_for_override): The signature of an overriding
20227         function is not changed.
20228
20229         * call.c (build_over_call): Move setting of conv into the loop.
20230         Note: this change, along with the related changes of the 18th thru
20231         the 20th of April, fix an infinite loop problem in conversions.
20232
20233 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
20234
20235         * call.c (build_user_type_conversion_1): Really ignore rvalue
20236         conversions when looking for a REFERENCE_TYPE.
20237
20238         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
20239         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
20240         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
20241         (build_unary_op): Likewise.
20242         * call.c (build_over_call): See through a CONVERT_EXPR around the
20243         ADDR_EXPR for on a temporary.
20244         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
20245         the ADDR_EXPR for a local variable.
20246
20247 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
20248
20249         * call.c (build_user_type_conversion_1): If we're trying to
20250         convert to a REFERENCE_TYPE, only consider lvalue conversions.
20251         (build_new_function_call): Print candidates.
20252         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
20253         (reference_binding): Binding a temporary of a reference-related type
20254         is BAD.
20255
20256 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20257
20258         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
20259         * tinfo2.cc (type_info::before): Likewise.
20260
20261 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
20262
20263         * call.c (implicit_conversion): Oops.
20264
20265 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
20266
20267         * call.c (implicit_conversion): Try to find a reference conversion
20268         before binding a const reference to a temporary.
20269
20270 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
20271
20272         * exception.cc (__default_unexpected): Call terminate by default,
20273         so that if the user overrides terminate, the correct function will
20274         be called.
20275
20276 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
20277
20278         * parse.y (left_curly): Avoid trying to use any fields of
20279         error_mark_node, as there aren't any.
20280
20281 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
20282
20283         * lex.c (do_identifier): Avoid breaking on overloaded methods
20284         as default arguments.
20285
20286 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
20287
20288         * call.c (add_template_candidate): Initialize the variable "dummy".
20289
20290 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
20291
20292         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
20293         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
20294
20295 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20296
20297         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
20298         (debug_binfo): Delete decl, not needed.
20299
20300         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
20301         promotes_to_aggr_type): Delete fns.
20302         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
20303         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
20304         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
20305
20306         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
20307
20308         * friend.c (is_friend_type): Delete fn.
20309         * cp-tree.h (is_friend_type): Delete decl.
20310
20311         * decl.c (original_result_rtx, double_ftype_double,
20312         double_ftype_double_double, int_ftype_int, long_ftype_long,
20313         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
20314         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
20315
20316         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
20317         fwd decls.
20318         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
20319
20320         * decl.c (pushdecl_nonclass_level): #if 0, unused.
20321         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
20322
20323         * lex.c (reinit_lang_specific): #if 0, unused.
20324         * cp-tree.h (reinit_lang_specific): #if 0 decl.
20325
20326         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
20327         * cp-tree.h (revert_static_member_fn): Delete decl.
20328
20329         * class.c (root_lang_context_p): Delete fn.
20330         * cp-tree.h (root_lang_context_p): Delete decl.
20331
20332         * decl.c (set_current_level_tags_transparency): #if 0, unused.
20333         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
20334
20335         * lex.c (set_vardecl_interface_info): Make static.
20336         * cp-tree.h (set_vardecl_interface_info): Delete decl.
20337
20338         * call.c (find_scoped_type): Make static.
20339         * cp-tree.h (find_scoped_type): Delete decl.
20340
20341         * search.c (convert_pointer_to_vbase): Make static.
20342         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
20343
20344         * decl.c (const_ptr_type_node): Likewise.
20345         * cp-tree.h (const_ptr_type_node): Delete decl.
20346
20347         * typeck.c (common_base_type): Make static.
20348         * cp-tree.h (common_base_types): Delete erroneous decl.
20349
20350         * pt.c (classtype_mangled_name): Make static.
20351         * cp-tree.h (classtype_mangled_name): Delete decl.
20352
20353         * lex.c (check_newline): Make static.
20354         * cp-tree.h (check_newline): Delete decl.
20355
20356         * typeck.c (build_x_array_ref): Delete fn, same idea as
20357         grok_array_decl.
20358         * cp-tree.h (build_x_array_ref): Delete decl.
20359
20360         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
20361         copy_lang_decl.
20362         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
20363
20364         * class.c (build_vtable_entry): Make static.
20365         * cp-tree.h (build_vtable_entry): Delete decl.
20366
20367         * class.c (build_vbase_pointer): Make static.
20368         * cp-tree.h (build_vbase_pointer): Delete decl.
20369
20370         * sig.c (build_sptr_ref): Add forward decl and make static.
20371         * cp-tree.h (build_sptr_ref): Delete decl.
20372
20373         * call.c (build_new_method_call): Add forward decl and make static.
20374         * cp-tree.h (build_new_method_call): Delete decl.
20375
20376         * call.c (build_object_call): Make static.
20377         * class.c (check_for_override, complete_type_p, mark_overriders):
20378         Likewise.
20379         * decl.c (cp_function_chain): Likewise.
20380         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
20381         Likewise.
20382         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
20383         Likewise.
20384         * tree.c (build_cplus_array_type_1): Likewise.
20385         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
20386         (comp_target_parms): Likewise.
20387
20388         * init.c (build_builtin_call): Make static.
20389         * cp-tree.h (build_builtin_call): Delete decl.
20390
20391         * typeck.c (binary_op_error): Delete decl.
20392         * cp-tree.h (binary_op_error): Likewise.
20393
20394 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20395
20396         * call.c (build_method_call): Compare against error_mark_node
20397         directly, rather than the ERROR_MARK tree code.
20398         * cvt.c (cp_convert): Likewise.
20399         * decl.c (print_binding_level): Likewise.
20400         (duplicate_decls): Likewise.
20401         (grokdeclarator): Likewise.
20402         (grokdeclarator): Likewise.
20403         * init.c (expand_aggr_init_1): Likewise.
20404         (decl_constant_value): Likewise.
20405         * method.c (build_opfncall): Likewise.
20406         (hack_identifier): Likewise.
20407         * typeck.c (build_modify_expr): Likewise.
20408
20409         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
20410
20411 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
20412
20413         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
20414
20415         * pt.c (coerce_template_parms): Add new error message.
20416
20417         * method.c (build_overload_value): Implement name mangling for
20418         floating-point template arguments.
20419
20420         * method.c (build_overload_int, icat, dicat): Fix mangling of template
20421         arguments whose absolute value doesn't fit in a signed word.
20422
20423 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20424
20425         * friend.c: New file; put all of the friend stuff in here.
20426         * init.c: Instead of here.
20427         * Makefile.in (CXX_OBJS): Add friend.o.
20428         (friend.o): Add dependencies.
20429         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
20430
20431 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
20432
20433         * call.c (build_scoped_method_call): Complain if the scope isn't a
20434         base.
20435
20436 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
20437
20438         * parse.y (left_curly): Don't crash on erroneous type.
20439
20440         * init.c (build_delete): Fix type of ref.
20441
20442 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
20443
20444         * search.c (get_vbase_1): Renamed from get_vbase.
20445         (get_vbase): Wrapper, now non-static.
20446         (convert_pointer_to_vbase): Now static.
20447
20448         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
20449         * init.c (build_delete): Pass one.
20450         (build_partial_cleanup_for): Use build_scoped_method_call.
20451         * decl.c (finish_function): Pass a binfo.
20452
20453 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
20454
20455         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
20456
20457         * typeck.c (build_c_cast): Lose other reference to flag.
20458
20459         * call.c (build_field_call): Don't look for [cd]tor_identifier.
20460         * decl2.c (delete_sanity): Remove meaningless use of
20461         LOOKUP_HAS_IN_CHARGE.
20462         * decl.c (finish_function): Use build_scoped_method_call instead
20463         of build_delete for running vbase dtors.
20464         * init.c (build_delete): Call overload resolution code instead of
20465         duplicating it badly.
20466
20467 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
20468
20469         * call.c (build_over_call): Call mark_used before trying to elide
20470         the call.
20471
20472         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
20473
20474 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20475
20476         * typeck.c (build_modify_expr): Always pedwarn for a cast to
20477         non-reference used as an lvalue.
20478
20479 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
20480
20481         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
20482
20483 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
20484
20485         * parse.y (handler): Fix template typo.
20486
20487 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
20488
20489         * error.c (lang_decl_name): New fn.
20490         * tree.c (lang_printable_name): Use it.
20491
20492 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
20493
20494         * g++spec.c: Include config.h so that we can catch bzero #defines
20495         from the config file.
20496
20497 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
20498
20499         * new1.cc: Include a declaration for malloc, to avoid warning, and
20500         avoid lossing on systems that require one (ones that define malloc
20501         in xm.h).
20502
20503 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
20504
20505         * decl2.c (max_tinst_depth): New variable.
20506         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
20507         option.
20508         * pt.c (max_tinst_depth): Variable moved.
20509         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
20510         as legal.
20511
20512 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
20513
20514         * decl.c (xref_basetypes): Allow a base class that depends on
20515         template parms to be incomplete.
20516
20517         * decl2.c (build_expr_from_tree): Support typeid(type).
20518         * rtti.c (get_typeid): Support templates.
20519         (expand_si_desc, expand_class_desc): Fix string length.
20520         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
20521
20522 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
20523
20524         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
20525
20526         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
20527
20528 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
20529
20530         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
20531         smashes together template and non-template decls of the same
20532         signature.
20533
20534 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
20535
20536         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
20537
20538 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20539
20540         * decl.c (duplicate_decls): Next route, pedwarn about different
20541         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
20542
20543 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20544
20545         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
20546         (struct lang_type): Delete has_default_implementation member.
20547         Increase dummy to 21.
20548         * decl.c (start_method): Delete usage.
20549
20550         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
20551         store_after_parms, start_decl_1, auto_function): Add decls.
20552         (get_arglist_len_in_bytes, declare_implicit_exception,
20553         have_exceptions_p, make_type_decl, typedecl_for_tag,
20554         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
20555         build_component_type_expr, cplus_exception_name,
20556         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
20557         * call.c (build_this): Make static.
20558         (is_complete): Likewise.
20559         (implicit_conversion): Likewise.
20560         (reference_binding): Likewise.
20561         (standard_conversion): Likewise.
20562         (strip_top_quals): Likewise.
20563         (non_reference): Likewise.
20564         (build_conv): Likewise.
20565         (user_harshness): Likewise.
20566         (rank_for_ideal): Likewise.
20567         * decl.c (start_decl_1): Delete forward decl.
20568         (push_decl_level): Make static.
20569         (resume_binding_level): Make static.
20570         (namespace_bindings_p): Make static.
20571         (declare_namespace_level): Make static.
20572         (lookup_name_real): Make static.
20573         (duplicate_decls): Make static.  Take register off NEWDECL and
20574         OLDDECL parm decls.
20575         * decl2.c (get_sentry): Make static.
20576         (temp_name_p): Delete fn.
20577         * except.c (auto_function): Delete decl.
20578         * lex.c (handle_{cp,sysv}_pragma): Make static.
20579         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
20580         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
20581         * pt.c (tsubst_expr_values): Make static.
20582         * rtti.c (combine_strings): Delete decl.
20583
20584 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
20585
20586         * pt.c (push_template_decl): Handle getting a typedef.
20587
20588         * call.c (build_new_function_call): Complain about void arg.
20589
20590 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20591
20592         * decl.c (duplicate_decls): Give pedwarn of different exceptions
20593         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
20594
20595 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
20596
20597         * except.c (expand_throw): Don't expand the cleanup tree here,
20598         since we are not going to write the rtl out.  Fixes problem with
20599         -g -O on SPARC.
20600
20601 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
20602
20603         * Make-lang.in: Add $(exeext) as necessary.
20604
20605 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
20606
20607         * parse.y (handler_seq): Must have at least one catch clause.
20608
20609 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
20610
20611         * call.c (add_builtin_candidate): Restore ?: hack.
20612
20613         * decl.c (grok_op_properties): More warnings.
20614
20615 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20616
20617         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
20618         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
20619
20620         * decl.c (duplicate_decls): Scale back to a warning, and only do
20621         'em if -pedantic.
20622
20623 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
20624
20625         * decl.c (duplicate_decls): pedwarn mismatched exception
20626         specifications.
20627
20628 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
20629
20630         * call.c (build_new_method_call): Don't display the invisible
20631         argument for controlling virtual bases.
20632
20633 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
20634
20635         * new: Add nothrow new and delete, bad_alloc and throw specifications
20636         for delete.
20637         * decl.c (init_decl_processing): Add throw specification for delete.
20638         * new.cc (nothrow): Define.
20639         * lex.c (real_yylex): Removing warning that throw and friends are
20640         keywords.
20641         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
20642         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
20643         * Make-lang.in: Add new{1,2}.{cc,o}.
20644
20645 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
20646
20647         * lex.c (cons_up_default_function): Fix return type of synth op=.
20648
20649         * init.c (emit_base_init): Add warnings for uninitialized members
20650         and bases.
20651
20652         * decl.c (xref_basetypes): Add warning for non-polymorphic type
20653         with destructor used as base type.
20654
20655         * decl.c (grok_op_properties): Add warning for op= returning void.
20656         * typeck.c (c_expand_return): Add warning for op= returning anything
20657         other than *this.
20658
20659         * class.c (finish_struct_1): Add warning for class with pointers
20660         but not copy ctor or copy op=.
20661
20662         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
20663         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
20664         (instantiate_template): If -fexternal-templates, add this
20665         instantiation to pending_templates.
20666
20667         * decl2.c (copy_assignment_arg_p): Disable old hack to support
20668         Booch components.
20669
20670 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
20671
20672         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
20673
20674 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
20675
20676         * call.c (standard_conversion): Handle getting references.  Tack
20677         on RVALUE_CONV here.  Do it for non-class types, too.
20678         (reference_binding): Pass references to standard_conversion.
20679         (implicit_conversion): Likewise.
20680         (add_builtin_candidate): Disable one ?: kludge.
20681         (convert_like): Handle RVALUE_CONVs for non-class types.
20682         (joust): Disable the other ?: kludge.
20683
20684 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20685
20686         * decl.c (init_decl_processing): Add code to build up common
20687         function types beforehand, to avoid creation then removal of
20688         things already in the hash table.
20689
20690 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
20691
20692         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
20693         the arguments.
20694
20695         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
20696         current_template_parms.
20697
20698 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
20699
20700         * search.c (lookup_field): Don't return a function, check want_type.
20701
20702 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20703
20704         * init.c (build_new): Make sure PLACEMENT has a type.
20705
20706 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
20707
20708         * init.c (build_new): Support new (nothrow).
20709
20710 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
20711
20712         * pt.c (instantiate_decl): Also do push_to_top_level before setting
20713         up DECL_INITIAL.
20714
20715         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
20716         * pt.c (tsubst): Defer instantiation of default args.
20717         * call.c (build_over_call): Until here.
20718
20719 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20720
20721         * search.c (lookup_field): Make sure we have an
20722         IDENTIFIER_CLASS_VALUE before we try to return it.
20723
20724 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20725
20726         * call.c (build_method_call): Delete unused var PARM.
20727         (build_overload_call_real): Likewise.
20728         (build_object_call): Delete unused var P.
20729         (build_new_op): Likewise.
20730         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
20731         var definitions, which are never used.
20732         (shadow_tag): Delete unused var FN.
20733         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
20734         * init.c (build_new): Delete unused var ALLOC_TEMP.
20735         * method.c (hack_identifier): Delete unused var CONTEXT.
20736         (do_build_copy_constructor): Delete unused var NAME.
20737         (synthesize_method): Delete unused var BASE.
20738         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
20739         * rtti.c (build_headof): Delete unused var VPTR.
20740         (get_typeid): Delete unused var T.
20741         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
20742         and ORIG_OP2.
20743         (build_ptrmemfunc): Delete unused vars U and NINDEX.
20744         * typeck2.c (build_functional_cast): Delete unused var BINFO.
20745
20746 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
20747
20748         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
20749         things in a type being defined.
20750         * decl.c (finish_enum): Reverse the values so that they are in
20751         the correct order.
20752
20753         * pt.c (instantiate_class_template): Don't initialize
20754         BINFO_BASETYPES until the vector is filled out.
20755         (unify): Don't abort on conflicting bindings, just fail.
20756         (instantiate_decl): Do push_tinst_level before any tsubsting.
20757
20758         * method.c (build_overload_value): Handle getting a
20759         TEMPLATE_CONST_PARM for a pointer.
20760
20761 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
20762
20763         * init.c (expand_member_init): Don't give 'not a base' error for
20764         templates.
20765
20766         * pt.c (instantiate_decl): Call import_export_decl later.
20767
20768         * pt.c (instantiate_class_template): Return a value.
20769
20770         * parse.y (extension): New rule for __extension__.
20771         (extdef, unary_expr, decl, component_decl): Use it.
20772
20773 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
20774
20775         * class.c (base_binfo): Remove unused base_has_virtual member.
20776         (finish_base_struct): Likewise.
20777         (finish_struct_1): Likewise.
20778
20779 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
20780
20781         * search.c (expand_upcast_fixups): Fix bogus code generation
20782         problem where the generated code uses the wrong index into the
20783         runtime built vtable on the stack.  Old code could clobber random
20784         stack values.
20785
20786 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
20787
20788         * init.c (perform_member_init): Make sure the partial EH cleanups
20789         live on the function_obstack.
20790
20791 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
20792
20793         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
20794         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
20795
20796 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
20797
20798         * decl.c (grokvardecl): Avoid ANSI style initialization.
20799
20800 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
20801
20802         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
20803
20804 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
20805
20806         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
20807
20808 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20809
20810         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
20811         arguments we compare against.  Start the count of I at 1, not 0,
20812         since argv[0] is still the command.
20813
20814 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
20815
20816         * lang-specs.h: Accept .cp as an C++ extension.
20817
20818 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20819
20820         * cp-tree.h (ptr_reasonably_similar): Add decl.
20821
20822 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20823
20824         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
20825         pointer.  New local SPECBITS with the parm's value.
20826         (grokdeclarator): Pass &specbits down.
20827
20828         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
20829         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
20830
20831         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
20832         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
20833
20834         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
20835         not an error_mark_node.
20836
20837 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20838
20839         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
20840         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
20841
20842 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20843
20844         * decl.c (grokdeclarator): When giving an anonymous struct a name,
20845         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
20846         not affected).
20847
20848         * typeck2.c (build_m_component_ref): If component is a pointer
20849         to data member, resolve the OFFSET_REF now.
20850
20851         * call.c (convert_like): Don't go into infinite recursion.
20852
20853         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
20854
20855         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
20856         * tree.c (layout_basetypes): And on the vbase ptr.
20857
20858 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
20859
20860         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
20861         CHAR_TYPE_SIZE so bool is always the same size as another type.
20862
20863         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
20864
20865 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
20866
20867         * decl2.c (grok_x_components): Remove synthesized methods from
20868         TYPE_METHODS of an anonymous union, complain about member
20869         functions.
20870         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
20871         anonymous unions.
20872         (finish_function): Just clear the DECL_RTL of our arguments.
20873
20874 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20875
20876         * decl2.c (finish_file): Emit DWARF debugging info for static data
20877         members.
20878
20879         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
20880
20881 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
20882
20883         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
20884         IDENTIFIER_NODE.
20885
20886 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
20887
20888         * Make-lang.in (g++-cross$(exeext)): Fix typo.
20889
20890 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20891
20892         Make the g++ driver now be a standalone program, rather than one
20893         that tries to run the gcc driver after munging up the options.
20894         * Make-lang.in (g++.c, g++spec.o): New rules.
20895         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
20896         added.
20897         (g++$(exeext)): New rule, based on xgcc rule.
20898         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
20899         * g++spec.c: New file.
20900         * g++.c: Removed file.
20901
20902 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
20903
20904         * cvt.c (build_up_reference): Arrange for any temporary values
20905         that have been keep in registers until now to be put into memory.
20906
20907 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20908
20909         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
20910         that make -j3 bootstrap works better.
20911
20912 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20913
20914         * decl.c (pushtag): Do pushdecl for anon tags.
20915
20916 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
20917
20918         * typeck.c (c_expand_return): Fix logic.
20919         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
20920
20921 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
20922
20923         * g++.c (main): Make sure arglist has a final NULL entry.  Add
20924         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
20925         stdin/stdout of the invoked program are redirected to
20926         nowheresville.
20927
20928 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20929
20930         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
20931
20932 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
20933
20934         * init.c (resolve_offset_ref): Handle obj.vfn better.
20935         * typeck.c (build_component_ref): Set TREE_TYPE on result from
20936         build_vfn_ref.
20937
20938 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
20939
20940         * typeck.c (convert_for_assignment): Also handle anachronistic
20941         implicit conversions from (::*)() to cv void*.
20942         * cvt.c (cp_convert_to_pointer): Likewise.
20943
20944 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20945
20946         * lex.c (handle_cp_pragma): Fix bogus warning.
20947
20948 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
20949
20950         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
20951         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
20952
20953 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20954
20955         * class.c (finish_struct_1): Support DWARF2_DEBUG.
20956         * search.c (dfs_debug_mark): Likewise.
20957         * decl2.c (finish_vtable_vardecl): Likewise.
20958         * decl.c (pushtag, finish_enum): Likewise.
20959         * lex.c (check_newline): Use debug_* instead of calling *out
20960         functions directly.
20961
20962 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20963
20964         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
20965         on some picky hosts.
20966
20967 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
20968
20969         * class.c (finish_struct_1): A class has a non-trivial copy
20970         constructor if it has virtual functions.
20971
20972         * cvt.c (cp_convert): Always call a constructor.
20973
20974         * call.c (reference_binding): Still tack on a REF_BIND
20975         for bad conversions.
20976         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
20977
20978         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
20979         (c_expand_return): Likewise.
20980         * typeck2.c (digest_init): Likewise for { }.
20981         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
20982         * cvt.c (cp_convert): Handle failure better.
20983
20984 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20985
20986         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
20987         of GCC be path-relative.
20988
20989 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
20990
20991         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
20992         it does need choose-temp.o and pexecute.o.
20993
20994 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20995
20996         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
20997         that we still use it.
20998         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
20999
21000 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
21001
21002         * init.c (expand_default_init): Avoid calling constructors to
21003         initialize reference temps.
21004
21005         * cvt.c (convert_to_reference): Fix.
21006
21007 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
21008
21009         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
21010         (convert_to_reference): Likewise.
21011         * typeck.c (convert_for_initialization): Likewise.
21012         * init.c (expand_default_init): Likewise.
21013         (expand_aggr_init_1): Likewise.
21014         * cp-tree.h (CONV_NONCONVERTING): Lose.
21015         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
21016         * *.c: Adjust.
21017         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
21018
21019 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
21020
21021         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
21022
21023 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21024
21025         * init.c (expand_aggr_init_1): Don't crash on non-constructor
21026         TARGET_EXPR.
21027
21028 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21029
21030         * g++.c: Include gansidecl.h.
21031         (VPROTO, PVPROTO, VA_START): Delete.
21032         (choose_temp_base_try, choose_temp_base, perror_exec,
21033         run_dos) [__MSDOS__]: Delete fns.
21034         (pfatal_with_name): Delete fn.
21035         (temp_filename): Declare like in gcc.c.
21036         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
21037         (error_count, signal_count): Define.
21038         (error): Delete both definitions.
21039         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
21040         (pfatal_pexecute): Add fn from gcc.c.
21041         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
21042         code to use the pexecute stuff also used by gcc.c.
21043         (MIN_FATAL_STATUS): Define.
21044         * Make-lang.in (g++): Add dependency on and linking with
21045         choose-temp.o and pexecute.o.
21046
21047         * cp-tree.h: Include gansidecl.h.
21048         (STDIO_PROTO): Delete #undef/#define.
21049         * cvt.c (NULL): Delete #undef/#define.
21050         * expr.c (NULL): Likewise.
21051         * init.c (NULL): Likewise.
21052         * rtti.c (NULL): Likewise.
21053         * xref.c (NULL): Likewise.
21054
21055         * cp-tree.h (build_user_type_conversion): Add prototype.
21056         * call.c (build_user_type_conversion): Delete prototype.  Correct
21057         decl of FLAGS arg to be an int.
21058         * cvt.c (build_user_type_conversion): Likewise.
21059
21060 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
21061
21062         * cp-tree.def: Add TRY_BLOCK and HANDLER.
21063         * except.c (expand_start_catch_block): Support templates.
21064         * parse.y (try_block, handler_seq): Likewise.
21065         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
21066
21067 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
21068
21069         * pt.c (current_template_args): New fn.
21070         (push_template_decl): Use it.
21071         * decl.c (grokdeclarator): Use it.
21072
21073         * decl2.c (build_expr_from_tree): Dereference ref vars.
21074
21075         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
21076         the decl-specifier-seq.
21077
21078         * decl.c (grok_op_properties): Don't force the type of a conversion
21079         op to be complete.  Don't warn about converting to the same type
21080         for template instantiations.
21081
21082         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
21083         methods.
21084
21085 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
21086
21087         * typeck.c (get_delta_difference): Remove previous bogusness.
21088         Don't give errors if force is set.
21089
21090 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21091
21092         * decl2.c (finish_file): Don't emit debug info.
21093         * decl.c (pushdecl): Lose obsolete code.
21094         (grokdeclarator): Still do the long long thing after complaining.
21095         * search.c (note_debug_info_needed): Don't do anything if we're in a
21096         template.
21097         * method.c (synthesize_method): For non-local classes,
21098         push_to_top_level first.
21099
21100 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
21101
21102         * typeck.c (get_delta_difference): Add no_error parameter.
21103         (build_ptrmemfunc): Call get_delta_difference with no_error set;
21104         we don't want error messages when converting unrelated
21105         pointer-to-member functions.
21106
21107 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
21108
21109         * error.c (dump_expr): Improve the wording on error messages that
21110         involve pointer to member functions.
21111
21112 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
21113
21114         * cvt.c (cp_convert_to_pointer): Move code for conversions from
21115         (::*)() to void* or (*)() up a bit, so that we can convert from
21116         METHOD_TYPEs as well.
21117
21118 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21119
21120         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
21121         There are no 'member' types.
21122         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
21123         (build_x_typeid): Handle errors.
21124
21125 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
21126
21127         * typeck.c (convert_for_assignment): Handle anachronistic implicit
21128         conversions from (::*)() to void* or (*)().
21129         * cvt.c (cp_convert_to_pointer): Likewise.
21130         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
21131         conversions from here.
21132         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
21133         * lang-options.h: Likewise.
21134         * decl2.c (warn_pmf2ptr): Define.
21135         * cp-tree.h: Declare it.
21136         * typeck2.c (digest_init): Allow pmfs down into
21137         convert_for_initialization.
21138
21139 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
21140
21141         * typeck.c (c_expand_return): Fix for returning overloaded fn.
21142
21143 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21144
21145         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
21146         * decl.c (grok_reference_init): Pass DIRECT_BIND.
21147         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
21148         DIRECT_BIND.
21149         * call.c (convert_like): Don't pass INDIRECT_BIND.
21150         * typeck.c (convert_arguments): Likewise.
21151         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
21152
21153 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
21154
21155         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
21156         similar code in build_up_ref.
21157         * cvt.c (build_up_reference): Drastically simplify.
21158
21159 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
21160
21161         * typeck.c (signed_or_unsigned_type): If the given type already
21162         as the correct signedness, then just return it.
21163
21164         * typeck.c ({un,}signed_type): If can't do anything, call
21165         signed_or_unsigned_type.
21166
21167 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
21168
21169         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
21170         current_class_type is NULL.
21171
21172 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
21173
21174         * class.c (finish_struct_1): Avoid empty structs by adding a field
21175         so layout_type gets the mode right.
21176
21177         * typeck.c (c_expand_return): Drastically simplify.
21178
21179 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
21180
21181         * typeck.c (decay_conversion): Handle overloaded methods.
21182
21183 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
21184
21185         * call.c (build_over_call): A TARGET_EXPR has side-effects.
21186
21187 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
21188
21189         * cvt.c (convert_to_pointer_force): Add code to support pointer to
21190         member function to pointer to function conversions.
21191         * init.c (resolve_offset_ref): Add code to allow faked up objects,
21192         ignoring them if they are not used, and giving an error, if they
21193         are needed.
21194         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
21195         code, and so that we can give an error, if we needed an object,
21196         and one was not provided.
21197         (build_c_cast): Don't call default_conversion when we want to
21198         convert to pointer to function from a METHOD_TYPE.
21199
21200 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
21201
21202         * Make-lang.in (cplib2.ready): Fix logic.
21203
21204         * decl.c (shadow_tag): Only complain about non-artificial function
21205         members.
21206
21207         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
21208
21209 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
21210
21211         * expr.c (cplus_expand_expr): Pre-tweak call_target like
21212         expand_inline_function would.
21213
21214         * pt.c (mark_decl_instantiated): If extern_p, call
21215         mark_inline_for_output.
21216
21217 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
21218
21219         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
21220         pmd conversions.
21221
21222         * typeck.c (get_delta_difference): Fix wording, as we can be used
21223         for pointer to data members.
21224
21225 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
21226
21227         * pt.c (tsubst): If the function decl isn't a member of this
21228         template, return a copy of the decl (including copying the
21229         lang-specific part) so we don't hose ourselves later.
21230
21231 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
21232
21233         * class.c (finish_struct): Remove DWARF-specific tag handling.
21234         * decl.c (pushtag): Likewise.
21235         (finish_function): Always clear DECL_ARGUMENTS on function decls with
21236         no saved RTX.
21237         * decl2.c (finish_file): Emit DWARF debugging info for static data
21238         members.
21239
21240 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
21241
21242         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
21243         isn't the same as the new one before we whack it.
21244
21245 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
21246
21247         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
21248         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
21249         warn_traditional and warn_strict_prototypes; remove ancient
21250         'overload' code; remove references to flag_traditional.
21251
21252 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
21253
21254         * input.c (sub_getch): Handle 8-bit characters in string literals.
21255
21256 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
21257
21258         * tree.c (mapcar): Handle CONSTRUCTORs.
21259         (copy_to_permanent): Handle expression_obstack properly.
21260
21261         * Make-lang.in (cplib2.txt): Also depend on the headers.
21262
21263         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
21264         INT_TYPE_SIZE.
21265         (expand_class_desc): Use USItype for offset field.
21266         * tinfo.h (struct __class_type_info): Likewise.
21267
21268         * method.c (build_overload_int): TYPE_PRECISION should be applied
21269         to types.
21270
21271 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
21272
21273         * call.c (build_new_op): A COND_EXPR involving void must be a
21274         builtin.
21275
21276 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21277
21278         * typeck.c (build_x_component_ref): New fn.
21279         (build_object_ref): Use it.
21280         * parse.y (primary): Use it.
21281         * decl2.c (build_expr_from_tree): Use it.
21282         * cp-tree.h: Declare it.
21283
21284         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
21285         * error.c (dump_type_suffix): Handle variable arrays.
21286
21287 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21288
21289         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
21290
21291 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21292
21293         * decl.c (lookup_name_real): Don't try to look up anything in a
21294         TYPENAME_TYPE.
21295
21296         * tinfo2.cc (__throw_type_match_rtti): Oops.
21297
21298 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21299
21300         * Make-lang.in (exception.o): Use -fno-PIC for now.
21301
21302 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
21303
21304         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
21305         calling them.
21306         (get_tinfo_fn_dynamic): Extracted from build_typeid.
21307         * tinfo2.cc (__dynamic_cast): Adjust.
21308
21309         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
21310         (build_x_typeid): Likewise.
21311
21312         * parse.y: Call build_x_typeid instead of build_typeid.
21313         * cp-tree.def: Add TYPEID_EXPR.
21314         * pt.c (tsubst_copy): Handle typeid.
21315         * decl2.c (build_expr_from_tree): Likewise.
21316         * rtti.c (build_x_typeid): Throw bad_typeid from here.
21317         (build_typeid): Not here.
21318         * cp-tree.h: Declare build_x_typeid.
21319
21320 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
21321
21322         * call.c (convert_like): Pull out constant values.
21323
21324         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
21325
21326 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
21327
21328         * decl.c (init_decl_processing): Create short int types before
21329         creating size_t in case a machine description needs to use
21330         unsigned short for size_t.
21331
21332 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21333
21334         * Make-lang.in (exception.o): Turn off pic.
21335
21336         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
21337         type, multi-level ptr conversions.
21338
21339         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
21340         (throw_bad_cast): Use it.
21341         (throw_bad_typeid): New fn.
21342         (build_typeid): Throw bad_typeid as needed.
21343         Use build_call.
21344         (synthesize_tinfo_fn): Handle functions and arrays before checking
21345         for cv-quals.
21346
21347         * Remove .h from standard C++ headers, add new.h, move into inc
21348         subdirectory.
21349
21350         * exception*: Remove pointer from object, constructors.  Add
21351         default exception::what that uses type_info::name.  Add
21352         __throw_bad_typeid.
21353
21354         * init.c (build_new): Don't add a cookie to new (void *) T[2].
21355
21356 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
21357
21358         * Make-lang.in: Building C++ code depends on cc1plus.
21359
21360 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21361
21362         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
21363         a HOST_WIDE_INT, not a tree.
21364
21365 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
21366
21367         * exception.cc: Don't include <stdlib.h>.
21368
21369         * Make-lang.in (c++.clean): Remove cplib2.*.
21370
21371 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
21372
21373         * parse.y (component_decl_1, component_costructor_declarator case):
21374         Pass attributes/prefix_attributes in tree list.
21375
21376 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
21377
21378         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
21379
21380 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21381
21382         * lex.c (do_identifier): Don't do deferred lookup in a template
21383         header.
21384
21385         * typeck2.c (store_init_value): Oops.
21386
21387         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
21388         New files for C++ lang-support library.
21389         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
21390         (CXX_LIB2FUNCS): Define.
21391         And rules for building the C++ lang-support code.
21392         * config-lang.in (headers): Define.
21393         (lib2funcs): Define.
21394
21395 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
21396
21397         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
21398         digest_init.
21399         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
21400         * typeck2.c (store_init_value): Check for initializing pmf with { }
21401         here.
21402         (process_init_constructor): Not here.
21403
21404 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
21405
21406         * pt.c (begin_template_parm_list): Increment
21407         processing_template_decl here.
21408         (end_template_parm_list): Not here.
21409         (process_template_parm): No need to add 1 to it now.
21410         * *.c: Use processing_template_decl instead of current_template_parms
21411         to check for being in a template.
21412
21413         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
21414         (tsubst_copy): Handle CONSTRUCTOR.
21415         (instantiate_decl): Set up context properly for variables.
21416         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
21417         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
21418
21419 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21420
21421         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
21422
21423 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
21424
21425         * method.c (make_thunk): Call comdat_linkage before setting the
21426         TREE_CODE.
21427
21428         * decl2.c (comdat_linkage): Use make_decl_one_only.
21429         (import_export_decl): Likewise.
21430         * decl.c (init_decl_processing): Check supports_one_only instead of
21431         SUPPORTS_WEAK.
21432
21433 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
21434
21435         * decl2.c (grokfield): Tighten checking for access decls.
21436
21437         * decl.c (make_typename_type): Resolve references to
21438         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
21439         (lookup_name_real): Types that depend on a template parameter get
21440         an implicit 'typename' unless they're in the current scope.
21441         (start_decl_1): We don't care about incomplete types that depend
21442         on a template parm.
21443         (grokdeclarator): Resolve 'typename's in the type specifier that
21444         refer to members of the current scope.
21445
21446         * call.c (build_over_call): Remove 'inline called before
21447         definition' diagnostic.
21448         (build_method_call): Likewise.
21449         * decl.c (duplicate_decls): Downgrade 'used before declared
21450         inline' to a warning, only with -Winline.
21451
21452 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
21453
21454         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
21455
21456 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
21457
21458         * call.c (build_method_call): When calling a signature
21459         default implementation, as in other cases, let instance_ptr simply
21460         be instance.
21461
21462 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
21463
21464         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
21465
21466 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
21467
21468         * except.c (expand_start_catch_block): Add a pushlevel so that -g
21469         works on hppa and SPARC.
21470
21471 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21472
21473         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
21474
21475 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
21476
21477         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
21478         before testing whether it's a signature.
21479
21480 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
21481
21482         * call.c (build_new_method_call): Don't complain about signature
21483         pointers and references not being an aggr type.
21484         (build_this): If a signature pointer or reference was passed in,
21485         just return it.
21486         (build_new_method_call): If instance is a signature pointer, set
21487         basetype to the signature type of instance.
21488         * sig.c (build_signature_method_call): Deleted basetype and
21489         instance parameters, they can be found as the DECL_CONTEXT of
21490         function and as the first argument passed in.
21491         * cp-tree.h: Changed declaration of build_signature_method_call.
21492         * call.c (build_method_call): Deleted first two arguments in call
21493         of build_signature_method_call.
21494         (build_over_call): Added call to build_signature_method_call.
21495
21496 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
21497
21498         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
21499         target_expr.
21500
21501 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21502
21503         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
21504
21505 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
21506
21507         * except.c (expand_start_try_stmts): Move to except.c in the backend.
21508         (expand_end_try_stmts): Remove.
21509
21510         * init.c (perform_member_init): Use add_partial_entry () instead
21511         of directly manipulating lists.
21512         (emit_base_init): Likewise.
21513
21514 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
21515
21516         * except.c (expand_exception_blocks): Always make sure USE and
21517         CLOBBER insns that came at the end still do, the backend relies
21518         upon this.
21519
21520 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
21521
21522         * call.c (build_over_call): We can only use a TARGET_EXPR of the
21523         right type.
21524
21525 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
21526
21527         * cvt.c (convert_to_reference): Revert last change, don't complain
21528         about temp without target decl.
21529
21530 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
21531
21532         * decl.c (grokdeclarator): Don't core dump when void() is given.
21533
21534 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
21535
21536         * decl.c (copy_args_p): Don't crash.
21537
21538 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
21539
21540         * pt.c (tsubst): And support template args inside the exception
21541         specification.
21542
21543         * pt.c (tsubst): Add support for exception specifications in
21544         template functions.
21545
21546 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
21547
21548         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
21549         fields now.
21550         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
21551         (start_function): Likewise.
21552         (start_method): Likewise.
21553         (grokfield): Likewise.
21554         (make_call_declarator): Add throw spec parameter.
21555         (set_quals_and_spec): Add routine.
21556         * lex.c (set_quals_and_spec): Likewise.
21557         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
21558         * decl.c (shadow_tag): Eliminate the throw spec parameter to
21559         grokdeclarator.
21560         (groktypename): Likewise.
21561         (start_decl): Eliminate the throw spec parameter.  Eliminate the
21562         throw spec parameter to grokdeclarator.  Eliminate the throw spec
21563         field in DECL_STMT.
21564         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
21565         (grokfndecl): Remove useless set of raises.
21566         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
21567         the throw spec parameter to start_decl.  Pull the throw spec out
21568         of the call declarator.
21569         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
21570         (start_function): Eliminate the throw spec parameter.  Eliminate
21571         the throw spec parameter to grokdeclarator.
21572         (start_method): Likewise.
21573         * decl2.c (grokfield): Likewise.
21574         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
21575         (grokoptypename): Likewise.
21576         (finish_file): Eliminate the throw spec parameter to
21577         start_function.  Add throw spec to make_call_declarator.
21578         * except.c (init_exception_processing): Add throw spec to
21579         make_call_declarator.  Eliminate the throw spec parameter to
21580         start_decl.
21581         (expand_start_catch_block): Eliminate the throw spec parameter to
21582         grokdeclarator.
21583         (expand_builtin_throw): Add throw spec to make_call_declarator.
21584         Eliminate the throw spec parameter to start_function.
21585         (start_anon_func): Likewise.
21586         * lex.c (make_call_declarator): Add throw spec parameter.
21587         (set_quals_and_spec): New routine.
21588         (cons_up_default_function): Add throw spec to make_call_declarator.
21589         Eliminate the throw spec parameter to grokfield.
21590         * method.c (synthesize_method): Eliminate the throw spec parameter
21591         to start_function.
21592         * pt.c (process_template_parm): Eliminate the throw spec parameter
21593         to grokdeclarator.
21594         (tsubst): Add throw spec to make_call_declarator.
21595         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
21596         (do_function_instantiation): Eliminate the throw spec parameter to
21597         grokdeclarator.  Eliminate the throw spec parameter to
21598         start_function.
21599         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
21600         to start_function.
21601         * parse.y (datadef): Remove non-winning optimization.
21602         (decl): Likewise.
21603         (fndef): Remove ambiguous error productions uncovered by grammar
21604         fixing.
21605         (constructor_declarator): Add exception_specification_opt here.
21606         (component_constructor_declarator): Likewise.
21607         (direct_after_type_declarator): Likewise.
21608         (complex_direct_notype_declarator): Likewise.
21609         (direct_abstract_declarator): Likewise.
21610         (fn.def1): Remove exception_specification_opt.
21611         (fn.def2): Likewise.
21612         (condition): Likewise.
21613         (initdcl0): Likewise.
21614         (initdcl): Likewise.
21615         (notype_initdcl0): Likewise.
21616         (nomods_initdcl0): Likewise.
21617         (component_decl_1): Likewise.
21618         (component_declarator): Likewise.
21619         (after_type_component_declarator0): Likewise.
21620         (after_type_component_declarator): Likewise.
21621         (notype_component_declarator): Likewise.
21622
21623 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21624
21625         * call.c (build_over_call): Also use an INIT_EXPR when
21626         initializing anything from an rvalue.
21627
21628         * call.c (build_over_call): Call stabilize_reference when building
21629         an INIT_EXPR instead of calling the copy ctor.
21630
21631         * call.c (joust): Extend the previous change to all comparisons.
21632
21633         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
21634         NO_LINKAGE_HEURISTICS.
21635
21636         * decl2.c (finish_file): Emit any statics that weren't already.
21637
21638         * typeck.c (build_static_cast): Implement.
21639         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
21640         * decl.c (grokparms): Use can_convert_arg instead of
21641         implicit_conversion directly.
21642         (copy_args_p): New fn.
21643         * cvt.c (convert_to_reference): Don't complain about temp with
21644         static_cast.
21645         (build_up_reference): Handle TARGET_EXPRs.
21646         * call.c (build_over_call): Elide unnecessary temps.
21647         (can_convert*): Use new overloading code.
21648
21649 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
21650
21651         * call.c: Move TYPE_PTR*_MACROS ...
21652         * cp-tree.h: To here.
21653         * typeck.c (build_reinterpret_cast): Implement.
21654
21655         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
21656         ptr_complete_ob.
21657         (joust): If we're comparing a function to a builtin and the worst
21658         conversion for the builtin is worse than the worst conversion for the
21659         function, take the function.
21660
21661         * typeck.c (build_const_cast): Implement.
21662         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
21663         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
21664
21665 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
21666
21667         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
21668         too early.  Make sure we explode if exprtype turns out to be a
21669         NULL_TREE when it shouldn't be.
21670
21671 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
21672
21673         * cp-tree.h: New routine make_call_declarator.
21674         * lex.c (make_call_declarator): Define it.
21675         * except.c (init_exception_processing): Use it.
21676         (expand_builtin_throw): Likewise.
21677         (start_anon_func): Likewise.
21678         * decl2.c (finish_file): Likewise.
21679         * lex.c (cons_up_default_function): Likewise.
21680         * parse.y: Likewise.
21681         * pt.c (tsubst): Likewise.
21682
21683 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
21684
21685         * decl2.c (groktypefield): Remove unused code.
21686
21687 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
21688
21689         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
21690         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
21691         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
21692         nonempty_cv_qualifiers.
21693         * hash.h: Rebuild.
21694
21695         * lex.c (make_pointer_declarator): Change type_quals into
21696         cv_qualifiers.
21697         (make_reference_declarator): Likewise.
21698
21699 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21700
21701         * decl.c (start_function): Only check interface_* for templates
21702         with flag_alt_external_templates.
21703
21704         * call.c (build_new_op): Check for comparison of different enum types.
21705         (build_over_call): Fix arg # output.
21706
21707         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
21708
21709 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21710
21711         * call.c (build_new_op): Check for erroneous args.
21712
21713         * call.c (build_new_method_call): Add missing args to cp_error.
21714
21715         * tree.c (error_type): Don't print reference-to-array.
21716
21717         * typeck.c (convert_for_assignment): Don't say contravariance for
21718         removing const.
21719
21720 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
21721
21722         * call.c (build_over_call): Diagnose bad convs for `this'.
21723
21724         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
21725         on _ctor_arg.
21726
21727         * call.c (convert_like): Handle bad convs.
21728         (build_over_call): Handle bad convs better.
21729
21730         * decl2.c: -fansi-overloading is now the default.
21731
21732         * call.c (build_new_method_call): Check for erroneous args.
21733
21734         * pt.c (instantiate_class_template): Propagate
21735         TYPE_USES_MULTIPLE_INHERITANCE.
21736
21737 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
21738
21739         * call.c (enforce_access): Add static to routine.
21740
21741 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
21742
21743         * call.c (build_user_type_conversion_1): Fix bad handling.
21744         (compare_ics): Likewise.
21745
21746 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21747
21748         * call.c (standard_conversion): Oops.
21749
21750 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
21751
21752         * g++.c: Update test for win32 (&& ! cygwin32).
21753
21754 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
21755
21756         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
21757         (ptr_reasonably_similar): New fn.
21758         * call.c (BAD_RANK): New rank.
21759         (ICS_BAD_FLAG): New macro.
21760         (standard_conversion): Handle almost-right pointer conversions.
21761         (reference_binding): Handle bad rvalue bindings.
21762         (add_*_candidate): Stuff.
21763         (build_over_call): Pass bad conversions to convert_for_initialization.
21764         (compare_ics): Handle bad convs.
21765         (joust): Likewise.
21766
21767 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
21768
21769         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
21770         integer_type_node when computing pointer offsets.
21771
21772 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
21773
21774         * tree.c (lvalue_type): New fn.
21775         (error_type): New fn.
21776         * call.c (op_error): Use error_type.
21777         (add_conv_candidate): Use lvalue_type.
21778         (add_builtin_candidates): Likewise.
21779         * error.c (args_as_string): Use error_type.
21780
21781 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
21782
21783         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
21784         (tsubst): Not here.
21785
21786         * decl.c (init_decl_processing): With -ansi, __null's type is the
21787         signed integral type with the same number of bits as a pointer.
21788         Introduce a new variable null_node for it.
21789         * cp-tree.h: Adjust.
21790         * call.c (null_ptr_cst_p): Adjust.
21791
21792 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
21793
21794         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
21795         optimize.
21796
21797 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
21798
21799         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
21800         fns of classes without virtual functions.
21801
21802         * call.c (add_function_candidate): Handle `this' specially.
21803         (compare_ics): Likewise.
21804
21805 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
21806
21807         * typeck.c (build_conditional_expr): Fix handling of __null.
21808
21809         * decl2.c (comdat_linkage): New fn.
21810         (import_export_vtable): Use it.
21811         (import_export_decl): Use it.
21812         * method.c (make_thunk): Use it.
21813
21814 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21815
21816         * pt.c (end_template_decl): If we don't actually have parms, return.
21817         * parse.y (template_header): Accept 'template <>'.
21818
21819         * errfn.c: Allow 5 args.
21820
21821 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
21822
21823         * tree.c (make_temp_vec): New fn.
21824         * pt.c (push_template_decl): Handle partial specs.
21825         (instantiate_class_template): Likewise.
21826         (more_specialized): Use get_bindings.
21827         (more_specialized_class): New fn.
21828         (get_class_bindings): New fn.
21829         (most_specialized_class): New fn.
21830         (do_function_instantiation): List candidates for ambiguous case.
21831         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
21832         (shadow_tag): Call push_template_decl for partial specializations.
21833         * parse.y: Likewise.
21834         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
21835         DECL_TEMPLATE_MEMBERS.
21836         * call.c (print_z_candidates): Reduce duplication.
21837
21838 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21839
21840         * decl2.c (lang_decode_option): Allow -fansi-overloading.
21841
21842 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21843
21844         * pt.c (get_bindings): New fn.
21845         (most_specialized): Likewise.
21846         (do_function_instantiation): Use them.
21847         (add_maybe_template): New fn.
21848         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
21849         * call.c (build_new_op): Handle guiding decls.
21850         (build_new_function_call): Likewise.
21851         * decl2.c (finish_file): Likewise.
21852
21853         * decl2.c (mark_used): Do synthesis here.
21854         * call.c (build_method_call): Not here.
21855         (build_over_call): Or here.
21856         * typeck.c (build_function_call_real): Or here.
21857         * tree.c (bot_manip): Call mark_used on functions used in default
21858         args.
21859
21860 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
21861
21862         * decl2.c (import_export_vtable): Delete code that disabled vtable
21863         heuristic on systems with ASM_OUTPUT_EXTERNAL.
21864
21865 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21866
21867         * typeck.c (build_x_function_call): Handle static call context
21868         better.
21869
21870         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
21871         the function, not its outer block.
21872
21873         * call.c (build_field_call): Pass fields on to build_opfncall
21874         regardless of TYPE_OVERLOADS_CALL_EXPR.
21875         (build_method_call): Pass on to build_new_method_call sooner.
21876
21877         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
21878         gives us.
21879         * class.c (instantiate_type): Don't put a POINTER_TYPE to
21880         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
21881         modifying it.
21882
21883 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
21884
21885         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
21886         (add_builtin_candidate): Don't take enums for ++.
21887         (build_new_method_call): Handle non-aggregates and field calls.
21888         Move new overloading code from...
21889         * cvt.c: Here.
21890
21891         * decl.c (grokparms): Don't check default args in templates.
21892
21893 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
21894
21895         * cvt.c (build_new_op): Fix args to build_unary_op.
21896         (add_builtin_candidates): Don't call type_promotes_to on float.
21897
21898         * decl.c (grokparms): Check the type of the default arg.
21899
21900         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
21901         returning NULL_TREE.
21902
21903         * typeck.c (build_x_binary_op): Avoid doing extra work.
21904         (build_x_unary_op): Likewise.
21905         (build_x_conditional_expr): Likewise.
21906         * cvt.c (build_over_call): Return.
21907         (add_builtin_candidate): Fix MEMBER_REF.
21908         (build_new_op): Likewise.
21909
21910 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
21911
21912         * method.c (build_overload_name): Put bug fix into code but leave
21913         disabled for now so we can be bug compatible with older releases
21914         that do repeats incorrectly.  In the future, we can enable it.
21915
21916 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
21917
21918         * cvt.c (convert_like): Don't call build_cplus_new twice.
21919
21920         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
21921         Control new overloading code with -fansi-overloading.
21922
21923 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21924
21925         * cvt.c (build_over_call): Call build_cplus_new.
21926         * call.c (build_method_call): Likewise.
21927         * typeck.c (build_function_call_real): Likewise.
21928         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
21929         the COND_EXPR in a TARGET_EXPR so they use the same slot.
21930
21931         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
21932         recursive calls.
21933         * typeck.c (complete_type): Propagate
21934         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
21935
21936 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
21937
21938         * cvt.c (joust): More ?: kludging.  Sigh.
21939         (build_over_call): Don't try to synthesize global fns.
21940
21941         * search.c (lookup_conversions): Use binfo marking.
21942
21943 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
21944
21945         * search.c (build_mi_matrix): Use the correct value of cid
21946         when determining the new mi_size.
21947
21948 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
21949
21950         * cvt.c (add_builtin_candidates): Do consider type conversion ops
21951         for the first parms of += et al.
21952         (strip_top_quals): New fn.
21953         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
21954         (implicit_conversion): Likewise.
21955         (add_builtin_candidates): Be careful about arrays.
21956         (build_new_method_call): Handle vtable optimization.
21957
21958 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
21959
21960         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
21961         * cvt.c (reference_binding): Use it.
21962         (implicit_conversion): Use it.
21963         (add_builtin_candidate, COND_EXPR): Use it.
21964
21965         * cvt.c (build_new_function_call): Check for error args.
21966
21967         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
21968
21969         * gxx.gperf: Add __null.
21970         * hash.h: Regenerate.
21971         * lex.h: Add RID_NULL.
21972         * lex.c (init_lex): Create null_pointer_node here, stick it in
21973         RID_NULL.
21974         * decl.c (init_decl_processing): Still set its type here.
21975         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
21976         (convert_to_pointer_force): Likewise.
21977         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
21978         if (! pedantic).
21979         * call.c (convert_harshness): Use null_ptr_cst_p.
21980         * typeck.c (convert_for_assignment): Likewise.  Don't produce
21981         null_pointer_node.
21982
21983         * error.c (args_as_string): Handle lists of actual args, too.
21984         * cvt.c (null_ptr_cst): Support (void*)0 for now.
21985         (build_user_type_conversion_1): Improve diagnostics.
21986         (build_new_function_call): Likewise.
21987         (build_object_call): Likewise.
21988         (build_new_method_call): Likewise.  Move call before def diagnostic...
21989         (build_over_call): Here.
21990
21991         * cvt.c (build_new_method_call): Don't complain about no match if
21992         LOOKUP_SPECULATIVELY.
21993         (build_over_call): Fix 'this' for virtual fn.
21994         (build_new_method_call): Add diagnostic.
21995
21996 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21997
21998         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
21999         constructors to be passed in.
22000         (build_over_call): Likewise.
22001         (build_user_type_conversion_1): Pass them in.
22002         (convert_like): Likewise.
22003         (build_object_call): Handle overloaded conversions.
22004         (build_over_call): Pass the right args to build_vfn_ref.
22005         (standard_conversion): Fix pmf convs.
22006         (joust): Handle comparing statics and non-statics.
22007         (build_new_method_call): New fn.
22008         * call.c (build_method_call): Call it if NEW_OVER.
22009
22010 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
22011
22012         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
22013         %D instead.
22014
22015 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
22016
22017         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
22018         instead of just maybe_build_cleanup so that we deallocate the
22019         thrown object.
22020
22021 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22022
22023         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
22024         * cp-tree.h (finish_prevtable_vardecl): Add decl.
22025
22026 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
22027
22028         * pt.c (instantiate_class_template): Call complete_type.  Also, if
22029         we're at the end of the file and we just instantiated a template
22030         class with a vtable, call finish_prevtable_vardecl.
22031
22032         * error.c (dump_decl): Don't explode (or explode more gracefully
22033         as appropriate) if the object being dumped has a null type.
22034         (dump_expr): Likewise.
22035
22036         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
22037         by counting the number of nodes that we'll need before allocating
22038         the array.
22039         (lookup_fnfields): Fix comment.
22040         (breadth_first_search): Fix comment.
22041
22042 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
22043
22044         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
22045         TYPE_ALIGN.
22046         * class.c (finish_struct): Call cplus_decl_attributes here.
22047         (finish_struct_1): Not here.
22048         * cp-tree.h: Adjust.
22049
22050         * pt.c (type_unification): New parameter STRICT.
22051         (unify): If STRICT, don't allow cv addition or base deduction.
22052         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
22053
22054 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
22055
22056         * search.c (get_template_base{_recursive}): New fns.
22057         * pt.c (more_specialized): New fn.
22058         (do_function_instantiation): Use it.
22059         (unify): Handle base deduction.
22060         * cvt.c (joust): Use more_specialized.
22061         Don't arbitrarily choose between non-builtin candidates.
22062         (build_over_call): Call require_complete_type.
22063
22064         * decl.c (start_function): Statics are static even in a #pragma
22065         interface file.
22066
22067         * decl2.c (import_export_vtable): Disable vtable heuristic on
22068         systems with ASM_OUTPUT_EXTERNAL.
22069
22070         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
22071         (standard_conversion): No std conv to enum type.
22072
22073         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
22074         for ptm's.
22075
22076         * cvt.c (reference_binding): Bind directly to a base subobject of
22077         a class rvalue.
22078
22079         * cvt.c (build_new_op): Enforce access control.
22080
22081 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
22082
22083         * typeck2.c (process_init_constructor): When scanning the
22084         union for a named field, skip things that aren't FIELD_DECLs.
22085
22086         * method.c (synthesize_method): Don't scan fndecl's rtl if
22087         we're at the end of the file; just assume the function can't
22088         be inlined.
22089
22090 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22091
22092         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
22093         it failed.
22094
22095         * cvt.c (build_user_type_conversion_1): Handle overloaded
22096         conversion ops.
22097
22098         * cvt.c (add_builtin_candidates): Don't consider type conversion
22099         operators for the first parameter of operator=.
22100
22101 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
22102
22103         * typeck.c (complete_type): Only call layout_type if we're not
22104         expanding a template.
22105
22106 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22107
22108         * cvt.c (compare_ics): Oops.
22109
22110         * cvt.c (op_error): Oops.
22111
22112         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
22113         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
22114         (build_conv): Use them.
22115         (implicit_conversion): Use them.
22116         (convert_like): Handle them.
22117         (build_new_op): Handle builtin COND_EXPR again.
22118         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
22119         in lists of types for COND_EXPR.
22120         (add_builtin_candidate): Add enum candidates for COND_EXPR.
22121
22122 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
22123
22124         * typeck.c (build_modify_expr): Always attempt to build a call to
22125         the assignment operator, even if we're using a default one.
22126         (convert_for_initialization): Call complete_type.
22127
22128 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22129
22130         * cvt.c (reference_binding): A REF_BIND gets the reference type.
22131         (implicit_conversion): Likewise.
22132         (convert_like): Likewise.
22133         (compare_ics): Likewise.
22134         (compare_qual): Likewise.
22135         (print_z_candidates): Handle no candidates.
22136         (build_new_op): Don't handle builtin COND_EXPR for now.
22137
22138 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
22139
22140         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
22141
22142 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
22143
22144         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
22145
22146         * cvt.c (build_builtin_candidate): Oops.
22147         (build_new_op): Oops.
22148
22149         * method.c (build_opfncall): Pass COND_EXPR on.
22150         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
22151         (add_builtin_candidate{,s}): Likewise.
22152         (add_builtin_candidates): Likewise.
22153         (print_z_candidates, op_error, build_new_op): Likewise.
22154         (type_decays_to): New fn.
22155         * lex.c (init_lex): Just say ?: for COND_EXPR.
22156
22157 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22158
22159         * typeck.c (complete_type): Call layout_type rather than building
22160         a new array type.
22161
22162         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
22163         only use ptrdiff_t.
22164
22165 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22166
22167         * cvt.c: Always compile the new overloading code (but don't use it).
22168         (implicit_conversion): Add a BASE_CONV when converting to
22169         the same class type.
22170         (convert_like): Handle BASE_CONV.
22171
22172 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22173
22174         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
22175         (add_builtin_candidate): Likewise.
22176
22177         NEW_OVER changes:
22178         * typeck.c (build_x_function_call): Try an operator function
22179         whenever we call an object of class type.
22180         * method.c (build_opfncall): Pass CALL_EXPRs through.
22181         * cvt.c (implicit_conversion): Do const-ref case first.
22182         (add_conv_candidate, build_object_call, op_error): New fns.
22183         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
22184         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
22185         builtin candidates.
22186         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
22187         Fall back on preincrement handling.  Use op_error.
22188         Handle warn_synth.
22189         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
22190         an error_mark_node.
22191         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
22192         properly.
22193
22194 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
22195
22196         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
22197
22198 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
22199
22200         * typeck.c (build_component_ref_1): Use build_component_ref
22201         instead of open coding it here.
22202
22203 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
22204
22205         * g++.c (main): Don't link with -lg++.
22206
22207         NEW_OVER changes:
22208         * cvt.c (convert_to_reference): Don't use convert_from_reference on
22209         result of build_type_conversion.
22210         (cp_convert): Only call build_method_call for ctors if
22211         build_type_conversion failed.
22212         (ptr_complete_ob): New function.
22213         (TYPE_PTR{,OB,MEM}_P): New macros.
22214         ({add,build}_builtin_candidate{,s}): New functions.
22215         (print_z_candidates): Handle builtins.
22216         (build_user_type_conversion_1): Don't use conversion fns for
22217         converting to a base type.
22218         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
22219         (build_user_type_conversion): Use convert_from_reference.
22220         (build_new_op): New function.
22221         (build_over_call): Fix handling of methods.
22222         (compare_ics): Handle AMBIG_CONV properly.
22223         * typeck2.c: Increment abort count.
22224         * method.c (build_opfncall): Forward most requests to build_new_op.
22225         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
22226
22227 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22228
22229         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
22230         invalid second argument to dump_expr_list.
22231
22232 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
22233
22234         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
22235
22236 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
22237
22238         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
22239         ASSEMBLE_EXTERNAL.
22240
22241 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
22242
22243         * typeck2.c (process_init_constructor): New pedwarn for using { }
22244         to initialize a pointer to member function.
22245         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
22246         we can avoid the new error.
22247
22248 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
22249
22250         * typeck.c (build_ptrmemfunc1): New function to hide details of
22251         pointer to member functions better.
22252
22253 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
22254
22255         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
22256         methods into the actual method, as we know the implied object is
22257         not used.
22258
22259 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22260
22261         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
22262         inside a system header.
22263
22264 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
22265
22266         * call.c (build_method_call): Call complete_type on the
22267         instance type.
22268
22269 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
22270
22271         * typeck.c (build_component_ref): Always build up an OFFSET_REF
22272         for obj_ptr->func so that we can know which object to use in a
22273         method call.
22274
22275 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
22276
22277         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
22278         around things.  Also improve maintainability.
22279
22280 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
22281
22282         * decl.c (grokdeclarator): Check for overflow when evaluating an
22283         array dimension.
22284
22285 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
22286
22287         * cvt.c (cp_convert): Don't check for ambiguity with constructor
22288         if NEW_OVER.
22289
22290         * typeck.c (build_x_function_call): Pass function overload
22291         questions to new overloading code if NEW_OVER.
22292         * init.c (expand_aggr_init_1): Only check for type conversion ops
22293         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
22294         Don't check for ambiguity with constructor if NEW_OVER.
22295         * cvt.c (convert_to_reference): Dereference the result of a type
22296         conversion operator.
22297         (build_conv): Propagate ICS_USER_FLAG.
22298         (implicit_conversion): Call instantiate_type.
22299         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
22300         (add_function_candidate): Fix cv-quals on argtype.
22301         (print_z_candidates): New function.
22302         (build_new_function_call): Call it.
22303         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
22304         consider non-converting constructors.
22305         Call print_z_candidates.
22306         Return an AMBIG_CONV for an ambiguous conversion.
22307         (build_user_type_conversion): Handle AMBIG_CONV.
22308         (convert_like): Fix test for building TARGET_EXPR.
22309         Call instantiate_type.
22310         Handle AMBIG_CONV and LVALUE_CONV.
22311         (build_over_call): Handle 0 args and ellipsis.
22312         * cp-tree.def: Add AMBIG_CONV.
22313
22314 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
22315
22316         * decl.c (lookup_name_real): If we find mem in obj when parsing
22317         `obj->mem', make sure we return the right value.
22318
22319 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
22320
22321         * search.c (get_base_distance): Call complete_type.
22322
22323 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
22324
22325         * decl.c (store_bindings): Make static.
22326
22327 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
22328
22329         * init.c (expand_aggr_init_1): Don't check type conversions if
22330         NEW_OVER.
22331
22332         * cvt.c (z_candidate): Put back template field.
22333         (add_function_candidate): Set it.
22334         (add_template_candidate): Likewise.
22335         (joust): Use it.
22336         (compare_qual): Handle references and pointers to members.
22337         (compare_ics): Handle reference bindings.
22338
22339         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
22340
22341 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
22342
22343         * call.c (compute_conversion_costs): Call complete_type.
22344
22345         * tree.c (vec_binfo_member): Use comptypes instead of comparing
22346         pointers, so we can handle template parameters.
22347
22348 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
22349
22350         * cvt.c (cp_convert_to_pointer): We have to call complete_type
22351         here; let's make it explicit instead of a side effect of an
22352         error check.
22353
22354 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
22355
22356         * cvt.c (z_candidate): Remove template field.
22357         (reference_binding): Handle binding to temporary.
22358         (implicit_conversion): Likewise.
22359         (add_function_candidate): Handle artificial constructor parms.
22360         Handle functions with too few parms.
22361         (add_template_candidate): New function.
22362         (build_user_type_conversion_1): Handle constructors.
22363         (convert_like): Likewise.
22364         (build_over_call): Likewise.
22365         (build_new_function_call): Support templates.
22366         (compare_ics): Fix reference, inheritance handling.
22367
22368 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
22369
22370         * decl.c: Add signed_size_zero_node.
22371         (init_decl_processing): Build it.
22372         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
22373         when we're trying to make a negative delta.
22374
22375 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22376
22377         Stop doing this damn index==strchr variable name confusion.
22378         * class.c (add_virtual_function): Change local var INDEX to be
22379         named IDX.
22380         (add_method): Likewise.
22381         * lex.c (print_parse_statistics): Likewise.
22382         * search.c (make_memoized_table_entry): Likewise.
22383         (lookup_fnfields_here): Likewise.
22384         (lookup_field): Likewise.
22385         (lookup_fnfields): Likewise.
22386         (get_baselinks): Likewise.
22387         * sig.c (build_signature_table_constructor): Likewise.
22388         (build_signature_method_call): Likewise.
22389         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
22390         (get_member_function_from_ptrfunc): Likewise.
22391         (build_ptrmemfunc): Change local var INDEX to be IDX.
22392         (c_expand_start_case): Likewise.
22393
22394 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
22395
22396         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
22397         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
22398         (convert_to_reference): Use build_type_conversion to convert to
22399         the reference type directly.
22400         (standard_conversion): Fix void* case, non-conversions.
22401         (reference_binding): Fix expr == 0 case, non-conversions.
22402         (convert_like): Support REF_BIND.
22403         (compare_qual): Split out from compare_ics.
22404         (compare_ics): Use it, handle icses with only a qual_conv.
22405
22406         * init.c (expand_vec_init): Don't crash if decl is NULL.
22407
22408 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
22409
22410         * mpw-config.in: New file, configury for Mac MPW.
22411         * mpw-make.sed: New file, makefile editing for MPW.
22412
22413 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22414
22415         * pt.c (instantiate_class_template): Call repo_template_used.
22416
22417         * search.c (lookup_conversions): Only lookup conversions in
22418         complete types.
22419
22420 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22421
22422         * cp-tree.def: Renamed from tree.def, to avoid confusion with
22423         gcc's tree.def.
22424         * cp-tree.h, lex.c: Include cp-tree.def.
22425         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
22426
22427 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
22428
22429         * init.c (build_vec_delete_1): Call complete_type.
22430
22431 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
22432
22433         * except.c (start_anon_func): Make sure anonymous functions are
22434         never external.
22435
22436 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
22437
22438         * decl.c (finish_function): If function_depth > 1, set nested.
22439
22440         * decl2.c (grokbitfield): Revert Bob's change.
22441         * class.c (finish_struct_1): Fix handling of named bitfield widths.
22442
22443 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22444
22445         * pt.c (add_pending_template): Handle types.
22446         (lookup_template_class): With -fexternal-templates, just add the class
22447         to pending_templates instead of instantiating it now.
22448         * decl2.c (finish_file): Handle types in pending_templates.
22449
22450 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
22451
22452         * decl2.c (grokbitfield): Handle constant decls appropriately.
22453         Give an appropriate error message now instead of spewing core
22454         later.
22455
22456 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
22457
22458         * decl2.c: Don't turn on thunks by default for now.
22459
22460 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
22461
22462         * typeck.c (complete_type): Handle error_mark_node.
22463         (common_type, OFFSET_TYPE): Handle template_type_parms.
22464
22465 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
22466
22467         * pt.c (instantiate_decl): If at_eof, call import_export_decl
22468         regardless of DECL_INLINE.
22469
22470         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
22471
22472         * class.c (finish_struct_bits): Copy TYPE_SIZE.
22473
22474         * rtti.c (build_dynamic_cast): Support templates.
22475         * tree.def: Support DYNAMIC_CAST_EXPR.
22476         * pt.c (tsubst_copy): Likewise.
22477         * decl2.c (build_expr_from_tree): Likewise.
22478
22479 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
22480
22481         * typeck.c (build_static_cast): Support templates.
22482         (build_const_cast): Likewise.
22483         * tree.def: Support CONST/STATIC_CAST_EXPR.
22484         * pt.c (tsubst_copy): Likewise.
22485         * decl2.c (build_expr_from_tree): Likewise.
22486
22487 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
22488
22489         * decl2.c (finish_vtable_vardecl): Don't trust
22490         TREE_SYMBOL_REFERENCED for vtables of local classes.
22491
22492 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
22493
22494         * pt.c (tsubst_copy): Handle operator T.
22495
22496 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22497
22498         * init.c (build_delete): Move creation of PARMS inside test of
22499         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
22500
22501 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
22502
22503         * typeck.c (build_conditional_expr): Don't assume that
22504         the arguments to ?: are always pointers or records.
22505
22506 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22507
22508         * decl2.c (import_export_decl): Still emit static/weak/comdat
22509         copies of inline template functions with -fno-implicit-templates.
22510
22511 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
22512
22513         * init.c (build_delete): Determine the complete basetype
22514         path to the destructor we're calling.
22515
22516 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
22517
22518         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
22519         initialize the enum, because we really and truly don't know where
22520         it came from.
22521         (start_enum): Don't copy integer_zero_node because
22522         build_enumerator will do it.
22523
22524 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
22525
22526         * decl.c (finish_function): Do access control on base destructors.
22527
22528         * pt.c (tsubst, case FUNCTION_DECL): Set up
22529         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
22530         hose us.
22531
22532 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
22533
22534         * cvt.c (build_up_reference): If we have already extended the
22535         lifetime of the temporary, don't try it again.
22536         * typeck.c (c_expand_return): Don't try and convert the return
22537         value twice when we want a reference, once is enough.
22538
22539 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
22540
22541         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
22542         LOOKUP_ONLYCONVERTING at all for now.
22543
22544         * search.c (add_conversions): Put the conversion function in
22545         TREE_VALUE, the basetype in TREE_PURPOSE.
22546         * cvt.c (build_type_conversion): Adjust.
22547         * cvt.c (build_expr_type_conversion): Adjust.
22548         * call.c (user_harshness): Adjust.
22549
22550 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
22551
22552         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
22553         backend's benefit.
22554
22555 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
22556
22557         * except.c (expand_start_catch_block): Add a dummy region, if we
22558         get an error, so that we can avoid core dumping later.
22559
22560 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
22561
22562         * cp-tree.h (OFFSET_REF): Remove.
22563         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
22564         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
22565         * init.c (expand_aggr_init_1): Likewise.
22566         (build_new): Likewise.
22567         * typeck.c (expand_target_expr): Likewise.
22568
22569 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22570
22571         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
22572         TARGET_EXPR.
22573
22574 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
22575
22576         * cvt.c (build_up_reference): Redo how and when temporaries are
22577         created.
22578         * decl.c (grok_reference_init): Don't try and be smart about
22579         running cleanups.
22580
22581 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
22582
22583         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
22584         (TARGET_EXPR...), now that it has 4 arguments.
22585         * tree.c (build_cplus_new): Likewise.
22586
22587 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22588
22589         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
22590
22591         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
22592         * decl.c (struct saved_scope): Remove named_labels,
22593         {base,member}_init_list.
22594         (maybe_push_to_top_level): Don't set them.  Call
22595         push_cp_function_context if appropriate.
22596         (pop_from_top_level): Likewise.
22597
22598         * method.c (do_build_assign_ref): Remove obsolete check of
22599         TYPE_HAS_ASSIGN_REF (basetype).
22600
22601         * decl.c (grokfndecl): Diagnose user definition of
22602         implicitly-declared methods.
22603
22604 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
22605
22606         * method.c (do_build_copy_constructor): Add code to give
22607         meaningful error messages instead of crashing.
22608         (do_build_assign_ref): Don't synthesize assignment operators for
22609         classes containing reference or const members.
22610
22611         * class.c (struct base_info): Remove cant_synth_copy_ctor
22612         and cant_synth_asn_ref.
22613         (finish_base_struct): Remove the code that tries to conditionalize
22614         synthesis of copy constructors & assignment operators based on
22615         access permissions.  Instead, let it fail when it tries to
22616         synthesize the copy constructor.  This will give meaningful error
22617         messages instead of silently generating code to perform a bitcopy.
22618
22619 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
22620
22621         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
22622         determining types for constant values.
22623
22624         * decl.c (struct named_label_list): Use instead of stuffing
22625         random items into a TREE_LIST node.
22626         (named_label_uses): Use the new struct.
22627         (poplevel): Likewise.
22628         (lookup_label): Likewise.
22629         (define_label): Add an error message to tell the user the line
22630         where the goto is located in addition to the destination of the
22631         goto.
22632         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
22633         named_label_uses.
22634         (finish_function): Likewise.
22635
22636         (start_decl): Complain about defining a static data member
22637         in a different type from which it was declared.
22638
22639 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22640
22641         * cvt.c (build_expr_type_conversion): Adjust.
22642
22643 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
22644
22645         * call.c (build_method_call): Always convert 'this' to the
22646         appropriate type.
22647
22648         * search.c (add_conversions): Put the conversion function in
22649         TREE_VALUE, the type in TREE_PURPOSE.
22650         * cvt.c (build_type_conversion): Adjust.
22651         * call.c (user_harshness): Adjust.
22652
22653         * method.c (emit_thunk): Call temporary_allocation and
22654         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
22655
22656         * tree.c (build_cplus_array_type): Handle tweaking of
22657         TYPE_MAIN_VARIANT here.
22658         * typeck.c (common_type): Not here.
22659
22660         * typeck.c (complete_type): Only try to complete an array type if
22661         it has a domain.
22662
22663 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
22664
22665         * decl.c (grokvardecl): Call complete_type.
22666         (grokdeclarator): Call complete_type for PARM_DECLs.
22667
22668 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
22669
22670         * pt.c (instantiate_class_template): Re-set
22671         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
22672
22673 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
22674
22675         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
22676         smart enough to do it right.
22677         * tree.c (cp_expand_decl_cleanup): Likewise.
22678         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
22679         cp_expand_decl_cleanup.
22680         (store_parm_decls): Likewise.
22681         (hack_incomplete_structures): Likewise.
22682         * except.c (push_eh_cleanup): Likewise.
22683
22684 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
22685
22686         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
22687         frontend to the backend where it belongs.
22688         * tree.c (unsave_expr): Likewise.
22689         (unsave_expr_now): Likewise.
22690         * tree.def (UNSAVE_EXPR): Likewise.
22691         * cp-tree.h (unsave_expr): Likewise.
22692         (unsave_expr_now): Likewise.
22693
22694 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
22695
22696         * init.c (emit_base_init): Make sure the partial EH cleanups live
22697         on the function_obstack.
22698
22699 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
22700
22701         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
22702         when checking for pointer types.
22703
22704 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
22705
22706         * pt.c (instantiate_class_template): Remove obsolete check for
22707         access declarations.
22708
22709 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
22710
22711         * call.c (build_overload_call): Simplify calls to
22712         build_overload_call by removing last parameter.
22713         (build_method_call): Likewise.
22714         * cp-tree.h: Likewise.
22715         * method.c (build_opfncall): Likewise.
22716         * typeck.c (build_x_function_call): Likewise.
22717
22718 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
22719
22720         * call.c (default_parm_conversions): Factor out common code.
22721         (build_method_call): Use it.
22722         (build_overload_call_real): Use it.
22723
22724 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
22725
22726         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
22727         but pedwarn as the code is bogus.
22728         * typeck.c (decay_conversion): Likewise.
22729         (build_function_call_real): Use build_addr_func instead of
22730         default_conversion.  Don't allow pointer-to-method functions down
22731         here.
22732         (build_unary_op): Use real pointer-to-member functions instead of
22733         fake ones.
22734         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
22735         (convert_for_assignment): Removed some obsolete code.
22736         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
22737         build_x_function_call instead of current_class_ptr.  Only call
22738         digest_init once on an initializer, we do this just checking
22739         TREE_TYPE.
22740         (build_expr_from_tree): Pass current_class_ref to
22741         build_x_function_call instead of current_class_ptr.
22742         * init.c (build_member_call): Likewise.
22743         * pase.y: Likewise.
22744         * error.c (dump_expr): Handle OFFSET_REFs better.
22745         * pt.c (unify): Handle pointer-to-member functions better.
22746         * decl.c (finish_function): Clear out current_class_ref just like
22747         we do for current_class_ptr.
22748
22749         * typeck.c (get_delta_difference): Handle virtual bases better.
22750
22751 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
22752
22753         * sig.c (build_signature_table_constructor): Use the delta for
22754         the original basetype for this virtual function with thunks.
22755         (build_signature_method_call): We still need to adjust 'this'
22756         with thunks.
22757
22758 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
22759
22760         * call.c (build_addr_func): New routine.  Used to get the `real'
22761         address of a function or a method.  Needed to avoid getting a
22762         pointer-to-member function.
22763         (build_call): New routine to build CALL_EXPRs.
22764         (build_method_call): Use it.
22765         * cvt.c (convert_to_aggr): Likewise.
22766         * typeck.c (build_function_call_real): Likewise.
22767         * sig.c (build_signature_table_constructor): Use build_addr_func.
22768         * cp-tree.h (build_call, build_addr_func): Declare them.
22769
22770 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
22771
22772         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
22773         * parse.y: Remove uses of LOOKUP_AGGR.
22774
22775 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
22776
22777         * *.[chy]: Rename current_class_decl to current_class_ptr, and
22778         C_C_D to current_class_ref.
22779
22780 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22781
22782         * call.c (convert_harshness): Tighten up pointer conversions.
22783
22784 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
22785
22786         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
22787         (finish_file): Likewise.
22788
22789 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
22790
22791         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
22792
22793         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
22794         code.
22795
22796 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22797
22798         * decl2.c: Turn on thunks by default where supported.
22799
22800 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
22801
22802         * cp-tree.h (build_overload_call_maybe): Removed.
22803         * call.c (build_overload_call_real): Invert meaning of last arg to
22804         be require_complete.
22805         (build_overload_call): Likewise.
22806         * typeck.c (build_x_function_call): Use build_overload_call_real
22807         instead of build_overload_call_maybe.
22808
22809 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
22810
22811         * decl2.c (finish_file): Don't try to emit functions that haven't
22812         been compiled.
22813
22814 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
22815
22816         * decl2.c (finish_vtable_vardecl): Oops.
22817
22818         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
22819         Also store the bindings from previous_class_values.
22820         (pop_from_top_level): Restore them.
22821
22822 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
22823
22824         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
22825         symbol has been referenced.
22826         (finish_file): Re-join synthesis/vtable loop with inline emission
22827         loop, disable inlining when an inline is output.
22828
22829 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
22830
22831         * except.c (init_exception_processing): Setup saved_in_catch.
22832         (push_eh_cleanup): Reset __eh_in_catch.
22833         (expand_start_catch_block): Set __eh_in_catch.
22834
22835 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
22836
22837         * except.c (push_eh_cleanup): Add tracking for whether or not we
22838         have an active exception object.
22839         (expand_builtin_throw): Use it to make sure a rethrow without an
22840         exception object is caught.
22841
22842 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
22843
22844         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
22845         cache.
22846
22847 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
22848
22849         * decl2.c (finish_file): Also use sentries for vars with
22850         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
22851         created).
22852
22853         * lex.c (handle_cp_pragma): Disable #pragma
22854         interface/implementation if SUPPORTS_ONE_ONLY > 1.
22855
22856 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
22857
22858         * method.c (emit_thunk): Wrap default case in
22859         temporary/permanent_allocation.
22860
22861         * method.c (make_thunk): Use DECL_ONE_ONLY.
22862         (emit_thunk): Call assemble_end_function.
22863
22864 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
22865
22866         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
22867         (import_export_decl): Likewise.
22868         (finish_prevtable_vardecl): Disable vtable hack if
22869         SUPPORTS_ONE_ONLY > 1.
22870
22871 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
22872
22873         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
22874         PREDECREMENT_EXPRs take two arguments, not one.
22875
22876 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
22877
22878         * class.c (build_vtable_entry): Don't build thunks for abstract
22879         virtuals.
22880
22881         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
22882         frontend.
22883
22884 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
22885
22886         * class.c (set_rtti_entry): Use size_zero_node.
22887         (build_vtable): Likewise.
22888
22889 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
22890
22891         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
22892         (prepare_fresh_vtable): Likewise.
22893
22894 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
22895
22896         * method.c (emit_thunk): Call mark_used on the target function.
22897
22898         * call.c (build_method_call): Don't warn about pending templates.
22899
22900 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
22901
22902         * decl2.c (finish_file): Fix list walking logic.
22903
22904         * typeck2.c (check_for_new_type): Only warn if -pedantic.
22905
22906 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
22907
22908         * class.c (finish_struct_1): Remove old code for
22909         dont_allow_type_definitions.
22910         * cp-tree.h: Likewise.
22911         * spew.c: Make sure cp-tree.h is included before parse.h, so the
22912         definition of flagged_type_tree is found before it is used.
22913         * lex.c: Likewise.
22914         * parse.y: Added the ftype member to the type union, and changed a
22915         number of rules to use it instead of ttype.  Added calls to
22916         check_for_new_type() as appropriate.
22917         * typeck2.c (check_for_new_type): New function for checking
22918         if a newly defined type appears in the specified tree.
22919         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
22920         for check_for_new_type().
22921
22922 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
22923
22924         * decl2.c (finish_file): Only use a sentry if the decl is public.
22925
22926         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
22927         don't pass LOOKUP_ONLYCONVERTING.
22928
22929 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
22930
22931         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
22932         properly keeps track of const and volatile type modifiers.
22933
22934 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
22935
22936         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
22937         * pt.c (comp_template_args): Use it.
22938
22939         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
22940         assemble_external for artificial function decls.
22941
22942         * decl.c (cp_finish_decl): Oops.
22943
22944 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
22945
22946         * decl2.c (import_export_decl): Put static data member templates
22947         into common storage, or make them weak, depending on whether they
22948         are dynamically or statically initialized.
22949         (get_sentry): New function.
22950         (finish_file): Do import_export_decl for static data members before
22951         building the init/fini functions.  Don't init/fini a variable that's
22952         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
22953         push/pop_temp_slots.
22954         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
22955         expand_static_init thang.
22956         * method.c (get_id_2): New function.
22957
22958 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
22959
22960         * parse.y (empty_parms): Make sure we use C++-style prototypes
22961         when we're declaring member functions.
22962
22963 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
22964
22965         * Makefile.in (CONFLICTS): 16 s/r conflicts.
22966         * parse.y (self_template_type): New nonterminal.
22967
22968 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
22969
22970         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
22971         name.
22972         * parse.y (base_class.1): Allow 'typename foo::bar'.
22973
22974         * lex.c (check_newline): Remove #pragma code that plays with the
22975         input stream, since we now deal with tokens.  Clear nextchar when
22976         we're done.
22977         (handle_cp_pragma): Use real_yylex.
22978         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
22979         in one place.
22980
22981         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
22982
22983         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
22984
22985 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22986
22987         * parse.y: New token SELFNAME for potential constructor.
22988         * spew.c (yylex): Handle it.
22989         * lex.c (identifier_type): Produce it.
22990
22991         * parse.y (complete_type_name): In :: case, don't push class binding.
22992         (complex_type_name): Likewise.
22993
22994 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
22995
22996         * typeck.c (build_reinterpret_cast): Handle pointer to member
22997         functions.
22998
22999 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23000
23001         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
23002         pragmas.
23003         (check_newline): Put the vtable/unit/implementation/interface pragma
23004         code into handle_cp_pragma, replacing it with a call.
23005         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
23006         args.  Get the next token after handling the pragma token.
23007
23008 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
23009
23010         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
23011         (convert_to_pointer_force): Likewise.
23012
23013         * init.c (build_new): Fix array new without -fcheck-new.
23014
23015 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
23016
23017         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
23018         tree.c: Lose TYPE_NESTED_NAME.
23019
23020         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
23021         as identifiers.
23022
23023         * tree.def: Add VEC_INIT_EXPR.
23024         * expr.c (cplus_expand_expr): Handle it.
23025         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
23026         the extra file-scope symbol nastiness.
23027
23028 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
23029
23030         * method.c (make_thunk): Thunks are static.
23031         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
23032
23033         * decl2.c (mark_vtable_entries): Emit thunks as needed.
23034         (finish_file): Don't emit them here.
23035
23036 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
23037
23038         * rtti.c (build_dynamic_cast): Handle null pointers.
23039         (ifnonnull): New function.
23040
23041 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
23042
23043         * call.c (build_method_call): Remember the original basetype we
23044         were called with.  Give an error message instead of trying
23045         (incorrectly) to call a non-static member function through a
23046         non-inherited class.
23047
23048         * search.c (expand_upcast_fixups): Mark the new fixup as
23049         DECL_ARTIFICIAL.
23050
23051 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
23052
23053         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
23054
23055         * class.c (set_rtti_entry): Fix for thunks.
23056
23057         * decl2.c (import_export_decl): Still emit typeinfo fns for
23058         cv-variants of builtin types.
23059
23060         * rtti.c (expand_class_desc): Set up base_info_type_node here.
23061         (init_rtti_processing): Instead of here.
23062
23063 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
23064
23065         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
23066         (build_typeid): Only complain about taking dynamic typeid without
23067         -frtti.
23068
23069         * decl2.c: flag_rtti defaults to 1.
23070
23071         * rtti.c (get_tinfo_var): The general class case is now smaller.
23072         (init_rtti_processing): Pack the latter three fields of base_info
23073         into 32 bits.
23074
23075 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
23076
23077         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
23078
23079 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
23080
23081         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
23082         (push_memoized_context): Split out code to undefer pop_type_level to
23083         (clear_memoized_cache): here.
23084         (pop_memoized_context): We can only handle one layer of deferral of
23085         pop_type_level so clear the cache, if there was a previous level.
23086
23087 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
23088
23089         * rtti.c (init_rtti_processing): Build up base_info_type_node.
23090         (expand_class_desc): Use one pointer to an array of base_info
23091         structs, passed using a CONSTRUCTOR.
23092
23093 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
23094
23095         * class.c (build_vbase_path): Remove block extern for
23096         flag_assume_nonnull_objects here.
23097         (build_vfn_ref): Split out functionality into build_vtbl_ref.
23098         (build_vtbl_ref): New routine.
23099         (build_vtable): Set up rtti info here.
23100         (add_virtual_function): Note in CLASSTYPE_RTTI the best
23101         place where we can get the rtti pointers from to avoid having to
23102         search around for a place.
23103         (finish_base_struct): Likewise.
23104         (finish_struct_1): Likewise.  Never create totally new vtables
23105         with totally new vtable pointers for rtti.  Disable code to layout
23106         vtable pointers better until we want to break binary
23107         compatibility.
23108         * rtti.c (build_headof_sub): New routine to convert down to a
23109         sub-object that has an rtti pointer in the vtable.
23110         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
23111         maintainable.
23112         (build_dynamic_cast): Make sure we have saved it, if we need to.
23113         * search.c (dfs_init_vbase_pointers): Disable code that deals with
23114         a more efficient vtable layout, enable later.
23115         * call.c (flag_assume_nonnull_objects): Moved declaration to
23116         * cp-tree.h: here.  Declare build_vtbl_ref.
23117         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
23118         function calls that want a tree.
23119
23120 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
23121
23122         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
23123         other X subobjects in the most derived type.  Ack.
23124
23125         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
23126         get_typeid will do it for us.
23127         (get_typeid_1): Break out call-building for expand_*_desc to use.
23128         (get_typeid): Call it.
23129         (expand_*_desc): Likewise.
23130         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
23131         and void *.
23132         (init_decl_processing): Lose builtin_type_tdescs lossage.
23133         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
23134
23135 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
23136
23137         * pt.c (tsubst): When calling set_nested_typename, use
23138         TYPE_NESTED_NAME (current_class_type) instead of
23139         current_class_name.
23140
23141         * decl.c (pushdecl): Likewise.
23142         (pushdecl_class_level): Likewise.
23143         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
23144         set_nested_typename.
23145
23146 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
23147
23148         * rtti.c (synthesize_tinfo_fn): Handle arrays.
23149
23150         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
23151
23152 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
23153
23154         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
23155         (init_rtti_processing): Lose bad_cast_type.
23156         (build_dynamic_cast): Use throw_bad_cast.
23157
23158         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
23159
23160         * decl2.c (finish_file): Don't synthesize artificial functions
23161         that are external and not inline.
23162
23163         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
23164
23165         * decl2.c (finish_file): Handle having new inlines added to
23166         saved_inlines by synthesis.
23167
23168         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
23169
23170 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
23171
23172         RTTI rewrite to initialize nodes as needed, not require that
23173         users #include <typeinfo>, complete functionality and reduce wasted
23174         space.
23175         * rtti.c (init_rtti_processing): New fn.
23176         (build_typeid): The vtable entry is now a function.
23177         (get_tinfo_var): New fn.
23178         (get_tinfo_fn): Likewise.
23179         (get_typeid): Use it.
23180         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
23181         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
23182         points __rtti_*.
23183         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
23184         (synthesize_tinfo_fn): New fn.
23185         * method.c (build_t_desc_overload): Lose.
23186         (build_overload_with_type): More generic.
23187         * decl.c (init_decl_processing): Call init_rtti_processing.
23188         * class.c (set_rtti_entry): Use get_tinfo_fn.
23189         * decl2.c (mark_vtable_entries): Mark the rtti function.
23190         (finish_prevtable_vardecl): Don't build_t_desc.
23191         (import_export_decl): Handle tinfo functions.
23192         (finish_file): Likewise.
23193         * typeck.c (inline_conversion): New fn.
23194         (build_function_call_real): Use it.
23195         * cp-tree.h: Add decls.
23196
23197         * method.c (hack_identifier): Also convert component_refs from
23198         references.
23199
23200         * lex.c (cons_up_default_function): Use the type, not the name, in
23201         declspecs.
23202
23203         * decl2.c (import_export_vtable): Fix weak vtables.
23204
23205 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
23206
23207         * search.c (get_base_distance_recursive): Fix access checks for
23208         protected bases.
23209
23210 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23211
23212         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
23213         cp-tree.h.
23214         (convert_harshness): Add prototypes wrapped by PROTO.
23215         * decl2.c (grok_function_init): Likewise.
23216         (do_toplevel_using_decl): Change to void return type.
23217         * class.c (build_vtable_entry): Remove decl of make_thunk.
23218         (merge_overrides): Fix order of arg definitions.
23219         (finish_vtbls): Likewise.
23220         (fixup_vtable_deltas): Likewise.
23221         (modify_all_direct_vtables): Likewise.
23222         (modify_all_indirect_vtables): Likewise.
23223         * search.c (get_base_distance_recursive): Likewise.
23224         (get_abstract_virtuals_1): Likewise.
23225         (fixup_virtual_upcast_offsets): Likewise.
23226         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
23227         * init.c (perform_member_init): Fix order of arg definitions.
23228         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
23229         * cp-tree.h (make_thunk): Add decl.
23230         (overload_template_name, push_template_decl): Add decls.
23231         (do_toplevel_using_decl): Change to void return type.
23232         (vec_binfo_member): Add decl.
23233
23234 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23235
23236         * typeck.c (mark_addressable, convert_for_assignment,
23237         convert_for_initialization, pointer_int_sum, pointer_diff,
23238         unary_complex_lvalue): Add prototypes wrapped by PROTO.
23239         (convert_sequence): #if 0 fn decl, since definition also is.
23240
23241 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
23242
23243         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
23244         cast to pointer types for type searching.
23245
23246 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23247
23248         * typeck.c (get_delta_difference): Use cp_error, not error, in the
23249         case where BINFO == 0.
23250
23251 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
23252
23253         * call.c (build_method_call): Fix wording of error messages so
23254         constructors come out right.
23255
23256 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
23257
23258         * decl.c (push_overloaded_decl): Don't warn about hidden
23259         constructors when both the type and the function are declared
23260         in a system header file.
23261
23262 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
23263
23264         * class.c (finish_struct_1): Propagate the TYPE_PACKED
23265         flag for the type to the type's fields.
23266
23267 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23268
23269         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
23270
23271 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
23272
23273         * class.c (base_info, finish_base_struct): Replace
23274         needs_virtual_dtor with base_has_virtual.
23275
23276         (finish_struct_1): Remove the old code that tried to make default
23277         destructors virtual.  Use base_has_virtual when checking if we need
23278         to add a vtable entry for the rtti code.
23279
23280 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
23281
23282         * pt.c (push_template_decl): Complain about template decl with
23283         inappropriate declaration.
23284
23285 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
23286
23287         * typeck.c (build_x_unary_op): Remove bogus check for taking
23288         the address of a member function.
23289
23290 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
23291
23292         * parse.y (constructor_declarator): Only push the class if
23293         we are not already in the class.
23294
23295 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
23296
23297         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
23298         Add additional argument to INIT_CUMULATIVE_ARGS.
23299
23300 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
23301
23302         * decl.c (shadow_tag): Fix error about anon union with methods.
23303
23304         * parse.y (self_reference): Only generate a self-reference if this
23305         is a non-template class.
23306         (opt.component_decl_list): Only use it if it was generated.
23307
23308         * parse.y (component_decl_1): Use constructor_declarator.
23309         (fn.def2): Likewise.
23310         (notype_component_declarator0): Likewise.
23311
23312 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
23313
23314         * typeck.c (build_x_unary_op): Add checks for taking the address
23315         of a TARGET_EXPR or of a member function, and give appropriate
23316         warnings.
23317
23318 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
23319
23320         * pt.c (process_template_parm): Allow template type parms to be
23321         used as types for template const parms.
23322
23323 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
23324
23325         * init.c (expand_vec_init): Ensure the eh cleanups are on the
23326         function_obstack.
23327
23328 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
23329
23330         * decl.c (lookup_name_real): Be even more picky about the
23331         ambiguous lookup warning.
23332         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
23333         * parse.y (constructor_declarator): Rather than here.
23334
23335         * parse.y (constructor_declarator): New nonterminal.
23336         (fn.def1): Use it.
23337         (explicit_instantiation): Likewise.
23338
23339 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23340
23341         Add implicit declaration of class name at class scope.
23342         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
23343         * parse.y (self_reference): New nonterminal.
23344         (opt.component_decl_list): Use it.
23345         (fn.def1): Add nested_name_specifier type_name cases.
23346         * class.c (build_self_reference): New function.
23347         (finish_struct): Handle access_default later, move self-reference
23348         decl to the end.
23349         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
23350         * cp-tree.h: Adjust.
23351
23352         * pt.c (do_function_instantiation): Separate handling of member
23353         functions and non-member functions properly.
23354
23355 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
23356
23357         * pt.c (process_template_parm): Improve error for 'volatile class K'.
23358
23359         * class.c (finish_struct_1): Check the right slot for destructors.
23360
23361         * decl.c (start_enum): Complain about enum templates.
23362
23363 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
23364
23365         * init.c (resolve_offset_ref): Offset pointers to member data by one.
23366         * typeck.c (unary_complex_lvalue): Likewise.
23367
23368 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
23369
23370         * typeck.c (c_expand_return): Check for a returned local
23371         array name, similar to the check for an ADDR_EXPR.
23372
23373 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
23374
23375         * decl.c (cp_finish_decl): Don't build cleanups for static
23376         variables here.
23377
23378 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
23379
23380         * typeck.c (build_modify_expr): Fix error messages to be more
23381         accurate.
23382         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
23383         assignment operators.
23384         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
23385         assignment operators.
23386
23387 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
23388
23389         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
23390         give an error if initialized.  pedwarn about nested type with the
23391         same name as its enclosing class.
23392
23393         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
23394
23395         * typeck.c (require_complete_type): Be sure to instantiate the
23396         MAIN_VARIANT of the type.
23397
23398         * decl2.c (finish_file): Instantiate pending templates before
23399         processing static constructors and destructors.
23400
23401         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
23402         unless at_eof.
23403
23404 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
23405
23406         * decl2.c (delete_sanity): If error_mark_node is passed
23407         in as an expression, quit while we're ahead.
23408
23409         * decl.c (grokdeclarator): Give an error message if `friend'
23410         is combined with any storage class specifiers.
23411
23412 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
23413
23414         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
23415         definition of nonexistent nested type.
23416
23417         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
23418         not to say 'typedef'.
23419
23420 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23421
23422         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
23423         * search.c (dfs_walk, dfs_init_vbase_pointers,
23424         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
23425         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
23426
23427 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
23428
23429         * except.c (build_throw): Support minimal parse.
23430         * pt.c (tsubst_copy): Support THROW_EXPR.
23431         * decl2.c (build_expr_from_tree): Likewise.
23432
23433         * pt.c (mangle_class_name_for_template): Always allocate
23434         scratch_firstobj.
23435
23436 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
23437
23438         * cvt.c (cp_convert_to_pointer): Give an appropriate error
23439         when trying to cast from an incomplete type.
23440
23441 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23442
23443         * pt.c (instantiate_class_template): Don't bother setting up
23444         CLASSTYPE_TAGS explicitly, as the nested types will add
23445         themselves.
23446
23447 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
23448
23449         * decl.c (shadow_tag): Remove old error check for usage of
23450         an enum without a previous declaration.
23451         (xref_tag): Add error message about usage of enums without a
23452         previous declaration.
23453
23454 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
23455
23456         * lex.c (do_identifier): Only do name consistency check if we're
23457         parsing.
23458
23459         * pt.c (push_template_decl): Don't crash if we get a member defn
23460         that doesn't match.
23461
23462         * decl.c (xref_tag_from_type): New function to do an xref without
23463         always having to figure out code_type_node.
23464         * cp-tree.h: Declare it.
23465         * pt.c (instantiate_class_template): Use it for friend classes.
23466         (lookup_template_class): Use it.
23467
23468         * typeck2.c (build_functional_cast): Pull out a single parm before
23469         passing it to build_c_cast.
23470
23471 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
23472
23473         * expr.c (do_case): Give an error message if a pointer is
23474         given as a case value.
23475
23476 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
23477
23478         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
23479         an overload list.
23480
23481         * lex.c (cons_up_default_function): Really, now, interface hackery
23482         does not apply to synthesized methods.
23483
23484 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
23485
23486         * call.c (build_method_call): Ctors and dtors now have special names
23487         with respect to lookups.
23488         * class.c (add_method): Likewise.
23489         (grow_method): Likewise.
23490         (finish_struct_methods): Likewise.
23491         (warn_hidden): Likewise.
23492         (finish_struct_1): Likewise.
23493         * cvt.c (convert_to_reference): Likewise.
23494         (convert_to_aggr): Likewise.
23495         (cp_convert): Likewise.
23496         * decl2.c (check_classfn): Likewise.
23497         * init.c (expand_member_init): Likewise.
23498         (expand_default_init): Likewise.
23499         (expand_aggr_init_1): Likewise.
23500         (build_offset_ref): Likewise.
23501         (build_new): Likewise.
23502         (build_delete): Likewise.
23503         * lex.c (do_inline_function_hair): Likewise.
23504         * search.c (lookup_field_1): Likewise.
23505         (lookup_fnfields_here): Likewise.
23506         (lookup_field): Likewise.
23507         (lookup_fnfields): Likewise.
23508         (get_virtual_destructor): Likewise.
23509         (dfs_debug_mark): Likewise.
23510         (dfs_pushdecls): Likewise.
23511         (dfs_compress_decls): Likewise.
23512         * tree.c (layout_basetypes): Likewise.
23513         * typeck.c (build_component_ref): Likewise.
23514         (build_x_function_call): Likewise.
23515         (build_modify_expr): Likewise.
23516         (convert_for_initialization): Likewise.
23517         (build_functional_cast): Likewise.
23518         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
23519         (CTOR_NAME): New.
23520         (DTOR_NAME): New.
23521         * decl.c (ctor_identifier): New.
23522         (dtor_identifier): New.
23523         (init_decl_processing): Set them.
23524
23525 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
23526
23527         * typeck.c (build_component_ref): Don't get confused by fields whose
23528         context has no type name, like pointer to member functions.
23529
23530 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
23531
23532         * decl.c (grokdeclarator): Handle typedef without declarator.
23533
23534         * pt.c (tsubst): Handle SCOPE_REF in declarator.
23535
23536         * parse.y (bad_parm): Catch another case of missing `typename'.
23537
23538         * lex.c (yyprint): Handle TYPE_DECLs.
23539
23540         * decl.c (start_function): Don't try to be clever.
23541
23542         * lex.c: Lose compiler_error_with_decl.
23543         * typeck2.c: Lose error_with_aggr_type.
23544         (incomplete_type_error): Use cp_* instead of old functions.
23545         (readonly_error): Likewise.
23546         * typeck.c (convert_arguments): Likewise.
23547         * search.c (lookup_nested_field): Likewise.
23548         * method.c (make_thunk): Likewise.
23549         * decl.c (grokparms): Likewise.
23550         * cp-tree.h: Update.
23551
23552         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
23553         and value.
23554
23555 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
23556
23557         * method.c (build_opfncall): When deleting a pointer to an
23558         array, build a new pointer to the tree past any ARRAY_TYPE
23559         nodes.
23560
23561 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23562
23563         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
23564
23565 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
23566
23567         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
23568         and ! DECL_INLINE.
23569
23570         * decl.c (finish_function): Don't set nested based on
23571         hack_decl_function_context.
23572         * parse.y (function_try_block): Check for nested function.
23573         (pending_inlines): Likewise.
23574
23575         * decl2.c (build_expr_from_tree): If a unary op already has a
23576         type, just return it.
23577
23578         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
23579
23580         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
23581         (finish_file): Check the return value of walk_vtables.
23582         (finish_prevtable_vardecl): Return int.
23583         (finish_vtable_vardecl): Likewise.
23584         (prune_vtable_vardecl): Likewise.
23585         * lex.c (set_vardecl_interface_info): Likewise.
23586         * cp-tree.h: Adjust return types.
23587
23588         * class.c (delete_duplicate_fields_1): Don't complain about
23589         duplicate nested types if they're the same type.
23590         (finish_struct): Remove check for duplicate.
23591         * decl2.c (grokfield): Don't check for typedef of anonymous type.
23592
23593 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
23594
23595         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
23596
23597         * decl.c (grokdeclarator): Lose special handling of class-level
23598         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
23599         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
23600
23601         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
23602
23603         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
23604
23605         * search.c (compute_access): Fix handling of anonymous union
23606         members.
23607         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
23608         from anonymous unions to their members.
23609
23610         * typeck.c (build_x_function_call): For static member functions,
23611         hand off to build_member_call.
23612
23613 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
23614
23615         * typeck.c (build_component_ref): Handle OFFSET_REFs.
23616
23617         * init.c (expand_vec_init): Fix init == 0 case.
23618
23619 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
23620
23621         * init.c (build_new): pedwarn about init and array new.
23622         (expand_vec_init): Handle lists, use convert_for_initialization.
23623
23624         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
23625         when converting to an aggregate type.
23626         * cvt.c (cp_convert): Pass it through.
23627
23628         * typeck.c (build_conditional_expr): Handle user-defined
23629         conversions to slightly different types.
23630
23631         * decl.c (grokdeclarator): Force an array type in a parm to be
23632         permanent.
23633
23634         * decl2.c (do_using_directive): Sorry.
23635         (do_namespace_alias): Likewise.
23636         * lex.c (real_yylex): Warn about using the `namespace' keyword.
23637
23638 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
23639
23640         * parse.y (datadef): Move call to note_list_got_semicolon up.
23641
23642 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
23643
23644         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
23645
23646 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
23647
23648         * decl.c (cp_finish_decl): The exception regions have to be
23649         nested, not overlapping.  We start the exception region for a
23650         decl, after it has been fully built, and all temporaries for it
23651         have been cleaned up.
23652
23653 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
23654
23655         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
23656
23657 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
23658
23659         * tree.def: Add RETURN_INIT.
23660         * pt.c (instantiate_decl): Handle RETURN_INIT.
23661         * decl.c (store_return_init): Handle minimal_parse_mode.
23662
23663         * tree.c (cp_build_type_variant): Just return an error_mark_node.
23664         * decl.c (make_typename_type): Don't try to get the file and line
23665         of an identifier.
23666         * typeck.c (comptypes): Handle TYPENAME_TYPE.
23667
23668 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
23669
23670         * decl.c (poplevel): Make sure we clear out and restore old local
23671         non-VAR_DECL values by default when they go out of scope.
23672
23673 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
23674
23675         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
23676         referring to addresses of variables and functions.
23677
23678         * error.c (dump_expr): Support SIZEOF_EXPR.
23679
23680         * init.c (do_friend): Use the return value of check_classfn.
23681
23682         * typeck.c (convert_arguments): Call complete_type.
23683
23684         * method.c (hack_identifier): After giving an error, set value to
23685         error_mark_node.
23686
23687 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
23688
23689         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
23690         lossage for local classes.
23691         * cp-tree.h: Declare it.
23692         * decl.c (lookup_name_real): Evil, painful hack for local classes.
23693         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
23694         Use hack_decl_function_context.
23695         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
23696         (start_function): Use hack_decl_function_context.
23697         (finish_function): Likewise.
23698         * method.c (synthesize_method): Likewise.
23699         * lex.c (process_next_inline): Likewise.
23700         (do_pending_inlines): Likewise.
23701         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
23702         done with it.
23703
23704 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
23705
23706         * sig.c (build_signature_pointer_or_reference_type): Align
23707         signature pointers/references on 8-byte boundaries so they can be
23708         grabbed 2 words at a time on a Sparc.
23709
23710 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
23711
23712         * method.c (hack_identifier): Requiring a static chain is now a
23713         hard error.
23714         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
23715         functions.
23716
23717 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23718
23719         * init.c (build_offset_ref): Call complete_type.
23720
23721         * decl.c (pop_from_top_level): Always pop previous_class_type.
23722
23723         * parse.y: Handle multiple decls in a for-init-statement.
23724         * pt.c (tsubst_expr): Likewise.
23725
23726         * pt.c (tsubst): Use tsubst_expr for the second operand of an
23727         ARRAY_REF.
23728
23729         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
23730         (poplevel_class): Set it here.
23731         (pop_from_top_level): Pop it here if we're returning to class scope.
23732         * class.c (pushclass): Don't set it here.
23733
23734         * decl.c (maybe_push_to_top_level): Save current_template_parms,
23735         and clear it if !pseudo.
23736         (pop_from_top_level): Restore it.
23737
23738         * decl2.c (finish_file): Push the dummy each time we walk the list
23739         of vtables.
23740
23741         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
23742         something for CAST_EXPR.
23743
23744 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
23745
23746         * cvt.c (cp_convert): Warn about implicit conversion of the
23747         address of a function to bool, as it is always true.
23748
23749 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
23750
23751         * typeck.c (c_expand_return): Fix warning for local externs returned.
23752
23753 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
23754
23755         * tree.c (mapcar): Propagate const and volatile properly.
23756
23757         * typeck.c (complete_type): Be sure to instantiate the
23758         MAIN_VARIANT of the type.
23759
23760         * method.c (synthesize_method): Class interface hackery does not
23761         apply to synthesized methods.
23762
23763 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
23764
23765         * pt.c (comp_template_args): Use comptypes rather than just
23766         checking for TEMPLATE_TYPE_PARM equivalence.
23767
23768         * typeck.c (build_x_function_call): Call complete_type before
23769         checking TYPE_OVERLOADS_CALL_EXPR.
23770
23771 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
23772
23773         * g++.c (main): Check also for new define ALT_LIBM.
23774
23775 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23776
23777         * pt.c (instantiate_class_template): If we don't have a pattern
23778         yet, that's OK.
23779         (coerce_template_parms): If we see a local class, bail.
23780
23781         * decl.c (grok_reference_init): Make sure there's a type before
23782         checking its code.
23783
23784         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
23785         (push_template_decl): Likewise.
23786
23787         * parse.y (named_class_head): Set
23788         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
23789
23790         * decl.c (xref_tag): Diagnose redeclaration of template
23791         type-parameter name.
23792
23793         * error.c (dump_type): Handle anonymous template type parms.
23794
23795         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
23796         TYPE_STUB_DECL.
23797         (coerce_template_parms): Likewise.
23798
23799 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
23800
23801         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
23802         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
23803
23804 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
23805
23806         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
23807         before trying to get its STUB_DECL.
23808         (coerce_template_parms): Likewise.
23809
23810         * parse.y (template_type_parm): If they didn't use 'class',
23811         pretend they did after giving an error.
23812
23813         * pt.c (coerce_template_parms): Diagnose use of local class.
23814
23815         * decl.c (grok_reference_init): Use instantiate_type.
23816
23817         * error.c (dump_expr): Handle TEMPLATE_DECLs.
23818
23819         * parse.y (named_class_head): Diagnose mismatching types and tags.
23820
23821         * decl.c (pushdecl): Type decls and class templates clash with
23822         artificial type decls, not hide them.
23823
23824         * decl.c (redeclaration_error_message): Diagnose redefinition of
23825         templates properly.
23826         (duplicate_decls): Diagnose disallowed overloads for template
23827         functions, too.
23828
23829         * decl.c (start_decl): Call complete_type before checking for a
23830         destructor.
23831
23832         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
23833
23834         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
23835
23836 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
23837
23838         * decl.c (grok_op_properties): Don't check for operator++(int) in
23839         a template.
23840
23841         * tree.c (perm_manip): Return a copy of variable and function
23842         decls with external linkage.
23843
23844         * tree.def: Change some of the min tree codes to type "1".
23845         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
23846         * method.c (build_overload_int): Emit something arbitrary for
23847         anything but an INTEGER_CST if we're in a template.
23848
23849         * decl.c (cp_finish_decl): Call complete_type before deciding
23850         whether or not to lay out the decl.
23851
23852         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
23853
23854 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
23855
23856         * typeck2.c (build_x_arrow): Call complete_type.
23857
23858         * pt.c (add_pending_template): Broken out.
23859         (lookup_template_class): If -fexternal-templates, call it for all
23860         the methods of implemented types.
23861         (instantiate_class_template): Instead of instantiating them here.
23862         (instantiate_decl): Handle -fexternal-templates earlier.
23863
23864 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23865
23866         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
23867         memoized lookup stuff inside GATHER_STATISTICS.
23868
23869 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
23870
23871         * decl.c (start_decl): Complain about array of incomplete type
23872         here.
23873         (grokdeclarator): Not here.
23874
23875         * parse.y (template_parm): Expand full_parm inline so we can set
23876         the rule's precedence.
23877
23878         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
23879         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
23880         * decl2.c (grokbitfield): Don't check for integer constant here.
23881         * class.c (finish_struct_1): Check here.
23882
23883         * decl.c (define_label): Make the min decl go on permanent_obstack.
23884
23885         * pt.c (unify): Don't handle CONST_DECLs.
23886         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
23887         (tsubst_copy): Likewise.
23888
23889         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
23890         CONST_DECL for a template parm.
23891
23892 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
23893
23894         * decl.c (grokdeclarator): Complain about array of incomplete type
23895         here.
23896         (start_decl_1): Not here.
23897
23898         * pt.c (tsubst): Handle pointer-to-function declarators.
23899
23900         * method.c (hack_identifier): If pedantic, diagnose local class
23901         methods that require a static chain.
23902
23903         * decl.c (grok_op_properties): No longer static.
23904         * cp-tree.h: Declare it.
23905         * pt.c (tsubst): Call it for operators.
23906         Use tsubst_copy for TREE_VECs.
23907
23908         * parse.y (template_arg): The expr has precedence like '>'.
23909
23910 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
23911
23912         * pt.c (coerce_template_parms): Don't coerce an expression using
23913         template parms.
23914         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
23915         (tsubst): Don't use build_index_2_type if the max_value uses template
23916         parms.
23917         * method.c (build_overload_int): Emit something arbitrary for an
23918         expression using template parms.
23919
23920         * parse.y (template_close_bracket): New non-terminal to catch use
23921         of '>>' instead of '> >' in template class names.
23922         (template_type): Use it.
23923         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
23924
23925         * tree.def: Add CAST_EXPR.
23926         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
23927         CONVERT_EXPR for minimal_parse_mode.
23928         * typeck.c (build_c_cast): Likewise.
23929         * pt.c (tsubst_copy): Likewise.
23930         * decl2.c (build_expr_from_tree): Likewise.
23931         * error.c (dump_expr): Likewise.
23932
23933 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23934
23935         * except.c (SetTerminate, SetUnexpected): Put back global vars.
23936         (init_exception_processing): Put back decl/init of
23937         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
23938         fns from libstdc++.
23939
23940         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
23941         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
23942         Delete unused fns.
23943         * cp-tree.h (declare_uninstantiated_type_level,
23944         uninstantiated_type_level_p): Delete prototypes.
23945
23946 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
23947
23948         * pt.c (tsubst_expr): Add default return.
23949
23950 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23951
23952         * error.c (fndecl_as_string): Delete unused arg CNAME.
23953         * sig.c (build_signature_table_constructor,
23954         build_signature_method_call): Fix calls.
23955
23956         * class.c (the_null_vtable_entry): Delete var definition.
23957         (init_class_processing): Delete tree the_null_vtable_entry init.
23958         * decl.c (no_print_{functions, builtins}): Declare as static.
23959         (__tp_desc_type_node): #if 0 var definition.
23960         (init_type_desc): #if 0 init of __tp_desc_type_node.
23961         (vb_off_identifier): Move var decl into init_decl_processing.
23962         (current_function_assigns_this): Declare as static.
23963         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
23964         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
23965         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
23966         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
23967         * init.c (BI_header_type, BI_header_size): Declare as static.
23968         * pt.c (template_classes): Delete unused var.
23969         (add_pending_template): Delete decl for non-existent fn.
23970         (lookup_template_class): Delete vars CODE and TAG_CODE.
23971         (instantiate_template): Delete unused var TARGS.
23972         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
23973         Delete decls.
23974         (__tp_desc_type_node): #if 0 var decl.
23975         (fndecl_as_string): Fix prototype.
23976
23977 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
23978
23979         * tree.def: Add GOTO_STMT.
23980         * pt.c (tsubst_expr): Support goto and labels.
23981         * decl.c (define_label): Support minimal parsing.
23982         * parse.y (simple_stmt): Likewise.
23983
23984 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23985
23986         * xref.c (GNU_xref_member): Only define/set var I if
23987         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
23988         used.
23989         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
23990         (GNU_xref_end): Fix call.
23991         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
23992         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
23993
23994         * tree.c (build_exception_variant): Delete unused vars I, A, T,
23995         T2, and CNAME.
23996         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
23997         (mapcar): Delete unused var CODE.
23998         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
23999         (break_out_cleanups): Fix call.
24000         (bot_manip): Likewise.
24001         * call.c (build_method_call): Likewise.
24002         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
24003         Likewise.
24004         * typeck.c (unary_complex_lvalue, build_modify_expr,
24005         convert_for_initialization): Likewise.
24006         * typeck2.c (build_functional_cast): Likewise.
24007         * cp-tree.h (build_cplus_new): Fix prototype.
24008
24009         * repo.c (open_repo_file): Delete unused var Q.
24010         (repo_compile_flags, repo_template_declared,
24011         repo_template_defined, repo_class_defined, repo_inline_used,
24012         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
24013         (repo_get_id, repo_vtable_used): Declare as static.
24014         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
24015         prototypes.
24016
24017 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
24018
24019         * parse.y (pending_inlines): Add function_try_block case.
24020
24021         * pt.c (unify): Fix for template const parms.
24022
24023 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24024
24025         * lex.c (extract_interface_info): Delete forward decl.
24026         (default_copy_constructor_body, default_assign_ref_body): Delete
24027         decls for non-existent functions.
24028         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
24029         (init_lex): Delete setting them.
24030         (cons_up_default_function): Delete unused vars FUNC_BUF,
24031         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
24032         #if 0'd synth code.
24033         (toplevel, expression_obstack): Delete unused extern decls.
24034         (tree_node_kind): Delete unused enum.
24035         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
24036         GATHER_STATISTICS.
24037         (tree_node_kind_names): Delete unused extern decl.
24038         (synth_obstack): Delete unused var.
24039         (init_lex): Don't set it.
24040         (init_parse): Add decl before use.
24041         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
24042         (current_unit_{name, language}): Delete unused vars.
24043         (check_newline): Don't bother setting them, just accept the #pragma.
24044         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
24045         (current_unit_{name, language}): Delete decls.
24046
24047         * search.c: Wrap all of the memoized functions, macros, and
24048         variables inside #ifdef GATHER_STATISTICS.
24049         (lookup_field, lookup_fnfields): Likewise.
24050         (init_search_processing): Likewise.
24051         (reinit_search_statistics): Wrap whole function.
24052         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
24053
24054         * decl.c (finish_function): Only call pop_memoized_context if
24055         GATHER_STATISTICS is defined.
24056         (start_function): Likewise for push_memoized_context.
24057         * class.c (pushclass, popclass): Likewise.
24058
24059         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
24060         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
24061
24062         * cvt.c (cp_convert): Delete unused local var FORM.
24063         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
24064         prototypes.
24065
24066 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
24067
24068         * pt.c (do_poplevel): Oops; really return what we get from
24069         poplevel this time.
24070
24071 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24072
24073         * cp-tree.h (is_aggr_type): Add prototype.
24074
24075         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
24076         * method.c ({push,pop}_cp_function_context): Delete decls.
24077         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
24078         (SetUnexpected, SetTerminate): Delete unused vars.
24079         (init_exception_processing): Don't set SetUnexpected or
24080         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
24081         (output_exception_table_entry): Delete unused array LABEL.
24082         (expand_internal_throw): Delete unused var PARAMS.
24083         (expand_start_catch_block): Delete unused var CLEANUP.
24084         (emit_exception_table): Delete unused var EH_NODE_DECL.
24085         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
24086         GOTO_UNWIND_AND_THROW.  Don't set them.
24087         (end_eh_unwinder): Add top decl.
24088         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
24089         (exception_section, push_rtl_perm, do_function_call,
24090         lang_interim_eh, push_eh_cleanup, eh_outer_context,
24091         expand_end_eh_spec, end_eh_unwinder): Declare as static.
24092         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
24093         throw_used): Likewise.
24094         * cp-tree.h (expand_end_eh_spec): Delete prototype.
24095
24096         * search.c (dfs_mark, dfs_mark_vtable_path,
24097         dfs_unmark_vtable_path, dfs_mark_new_vtable,
24098         dfs_unmark_new_vtable, dfs_clear_search_slot,
24099         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
24100         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
24101         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
24102         functions.
24103         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
24104         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
24105         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
24106         Only define #ifdef GATHER_STATISTICS.
24107         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
24108         is defined.
24109         (vbase_decl): Delete var definition.
24110         (init_search): Delete old decl.
24111         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
24112         never actually used.
24113         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
24114         (get_base_distance_recursive): Delete unused fourth arg
24115         BASETYPE_PATH.  Fix call .
24116         (get_base_distance): Fix call.
24117         (push_class_decls): Delete unused var ID.
24118         (make_memoized_table_entry): Declare as static.
24119         (breadth_first_search): Declare as static.
24120         (tree_has_any_destructor_p): Declare as static.
24121         (pop_class_decls): Delete unused arg pop_class_decls.
24122         * class.c (popclass): Fix call to pop_class_decls.
24123         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
24124         tree_has_any_destructor_p): Delete prototypes.
24125
24126         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
24127         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
24128         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
24129         (build_user_desc): Delete unused var T.
24130         (build_class_desc): Delete unused vars T and OFF.
24131         (build_t_desc): Delete unused var NAME_STRING.
24132         (build_headof): Make static.
24133         (get_bad_cast_node): Likewise.
24134         (get_def_to_follow): Likewise.
24135         * cp-tree.h (init_type_desc): Add prototype.
24136         (build_headof): Remove prototype.
24137
24138 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
24139
24140         * pt.c (tsubst): Only look for matching decls at file scope for
24141         non-member functions.
24142
24143         * call.c (build_scoped_method_call): Handle scoped destructor
24144         calls in templates.
24145
24146         * decl.c (*_top_level): Also save previous_class_values.
24147
24148         * pt.c (tsubst_expr): Support do {} while loops.
24149         * parse.y (simple_stmt): Likewise.
24150         * tree.def: Likewise.
24151
24152         * method.c (build_overload_identifier): For a class nested in a
24153         template class, don't mangle in the template parms from our
24154         context.
24155
24156         * lex.c, cp-tree.h: Remove support for template instantiations in
24157         the pending_inlines code.
24158         * pt.c: Remove dead functions and unused arguments.
24159         (uses_template_parms): TYPENAME_TYPEs always use template parms.
24160         * parse.y: Stop passing anything to end_template_decl.
24161         * tree.c (print_lang_statistics): Only print tinst info #ifdef
24162         GATHER_STATISTICS.
24163
24164 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24165
24166         * init.c (expand_recursive_init{,_1}): Delete decls.
24167         (sort_member_init): Delete unused var INIT.
24168         (emit_base_init): Delete unused var X.
24169         (build_offset_ref): Delete unused var CNAME.
24170         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
24171         (emit_base_init): Delete unused local var BASE.  Delete extern
24172         decl of IN_CHARGE_IDENTIFIER.
24173         (build_delete): Delete unused local var VIRTUAL_SIZE.
24174
24175         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
24176         (build_delete): Fix call.
24177         * decl2.c (delete_sanity): Likewise.
24178         * cp-tree.h (build_vec_delete): Update prototype.
24179
24180         * typeck.c (common_base_type): Delete unused var TMP.
24181         (build_binary_op): Delete local var ARGS_SAVE.
24182         (build_array_ref): Delete unused var ITYPE.
24183         (c_expand_return): Delete unused var USE_TEMP.
24184
24185         * typeck.c (compexcepttypes): Delete unused arg STRICT.
24186         (comptypes): Fix calls.
24187         * decl.c (duplicate_decls): Likewise.
24188         * cp-tree.h (compexcepttypes): Delete extra arg.
24189
24190         * decl2.c (check_classfn): Delete unused second arg CNAME.
24191         * decl.c (start_decl, grokfndecl): Fix calls.
24192         * init.c (do_friend): Likewise.
24193         * cp-tree.h (check_classfn): Update prototype.
24194
24195         * cp-tree.h (signature_error, import_export_vtable,
24196         append_signature_fields, id_in_current_class, mark_used,
24197         copy_assignment_arg_p): Add decls.
24198         * decl2.c (mark_used): Delete decl.
24199
24200         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
24201
24202         * class.c (get_vtable_entry): Disable unused function.
24203         (doing_hard_virtuals): Delete unused static global var.
24204         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
24205         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
24206         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
24207         (modify_one_vtable): Delete unused var OLD_RTTI.
24208         (finish_struct_anon): Delete unused vars OFFSET and X.
24209         (finish_struct_bits): Delete unused var METHOD_VEC.
24210         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
24211         for-scope local variable METHODS.
24212
24213         * call.c (user_harshness): Delete unused/unneeded arg PARM.
24214         (ideal_candidate): Delete unused args BASETYPE and PARMS.
24215         (build_method_call): Delete unused args passed into ideal_candidate.
24216         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
24217         * cp-tree.h (synthesize_method): Add decl.
24218
24219         * decl.c (note_level_for_for): Give void return type.
24220         (pushdecl_nonclass_level): Likewise.
24221         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
24222         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
24223         (suspend_binding_level): Delete unused var LEVEL.
24224         (duplicate_decls): Delete unused var CTYPE.
24225         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
24226         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
24227         PTR_ENDLINK.
24228         (grokdeclarator): Delete unused var C.
24229         (grokdeclarator): Delete unused var SIZE_VARIES.
24230         (grokparms): Delete unused var SAW_VOID.
24231         (start_function): Delete unused var OLDDECL.
24232         (cplus_expand_expr_stmt): Delete unused var
24233         REMOVE_IMPLICIT_IMMEDIATELY.
24234
24235         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
24236
24237         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
24238
24239 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
24240
24241         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
24242         (build_min_nt): Likewise.
24243         * pt.c (do_pushlevel): Emit line note.
24244         (do_poplevel): Return what we get from poplevel.
24245         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
24246         * parse.y: Use do_pushlevel and do_poplevel.
24247         * cp-tree.h: Declare do_poplevel.
24248
24249         * cp-tree.h: Declare at_eof.
24250         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
24251         * decl2.c (import_export_decl): Renamed from import_export_inline.
24252         (finish_file): Call it to do interface handling for statics.
24253         * pt.c (tsubst_copy): Call mark_used on variables and functions
24254         used here.
24255
24256         * decl2.c (finish_file): Don't emit statics we can't generate.
24257         * pt.c (instantiate_decl): Don't set interface on instantiations
24258         we can't generate.
24259
24260         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
24261         * tree.c (print_lang_statistics): Print max template depth.
24262         * pt.c (push_tinst_level): Dump entire instantiation context.
24263         (instantiate_class_template): Use it and pop_tinst_level.
24264         (instantiate_decl): Likewise.
24265
24266         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
24267         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
24268
24269 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
24270
24271         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
24272         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
24273         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
24274         the new template implementation.
24275
24276 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24277
24278         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
24279
24280 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
24281
24282         * decl.c (cp_finish_decl): Delay emitting the debug information for
24283         a typedef that has been installed as the canonical typedef, if the
24284         type has not yet been defined.
24285
24286 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
24287
24288         * decl2.c (grokfield): Still call pop_nested_class for access decls.
24289
24290 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24291
24292         * decl.c (lookup_label): Call label_rtx.
24293
24294         * decl.c (make_binding_level): New function.
24295         (pushlevel, pushlevel_class): Call it instead of explicit
24296         duplicate calls to xmalloc.
24297
24298         * decl.c (init_decl_processing): Delete useless build_pointer_type
24299         call.
24300
24301         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
24302         (sizet_ftype_string): Delete variable.
24303         (init_decl_processing): Add built-in functions fabsf, fabsl,
24304         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
24305         variable strlen_ftype, used for strlen.
24306
24307 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
24308
24309         * decl.c (push_to_top_level): Start from current_binding_level
24310         again for now; the stl hacks depend on g++ being broken in this
24311         way, and it'll be fixed in the template rewrite.
24312
24313         * tree.def: Add USING_DECL.
24314         * decl2.c (do_class_using_decl): Implement.
24315         (grokfield): Pass access decls off to do_class_using_decl instead of
24316         grokdeclarator.
24317         * error.c (dump_decl): Handle USING_DECLs.
24318         * decl.c (grokdeclarator): Remove code for handling access decls.
24319         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
24320         as access decls for now.
24321         (finish_struct): Don't check USING_DECLs for other uses of the name.
24322
24323         * search.c (get_matching_virtual): Use cp_error_at.
24324
24325 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24326
24327         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
24328         match c-typeck.c.
24329         (self_promoting_args_p): Move the check that TYPE is non-nil
24330         before trying to look at its main variant.
24331         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
24332
24333         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
24334         Delete macros.
24335         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
24336         (do_friend): Delete call to xref_friend.
24337         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
24338
24339         * typeck.c (convert_sequence): #if 0 unused function.
24340
24341         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
24342         be in decl_in_memory_p.
24343         (decl_in_memory_p): Delete decl.
24344         * expr.c (decl_in_memory_p): Delete fn.
24345         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
24346
24347         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
24348
24349 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
24350
24351         * class.c (finish_struct_1): Check for a pure-specifier on a
24352         non-virtual function here.
24353
24354         * decl2.c (grok_function_init): Don't check whether the function
24355         is virtual here.
24356         (grokfield): Don't call check_for_override here.
24357
24358         * decl.c (push_to_top_level): Start from inner_binding_level,
24359         check class_shadowed in class levels.
24360
24361 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
24362
24363         * decl.c (resume_level): Ignore things that don't have names, instead
24364         of core dumping.
24365
24366 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24367
24368         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
24369
24370 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
24371
24372         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
24373         synthesized dtor.
24374
24375         * parse.y (complete_type_name): Bind global_scope earlier.
24376         (complex_type_name): Likewise.
24377         (qualified_type_name): Remove.
24378
24379 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
24380
24381         * decl.c (grokfndecl): Move code that looks for virtuals in base
24382         classes...
24383         * class.c (check_for_override): ... to a new function.
24384         (finish_struct_1): Call it.
24385
24386         * cp-tree.h: Declare warn_sign_compare.
24387
24388         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
24389         rather than extra_warnings to decide whether to warn about
24390         comparison of signed and unsigned.
24391
24392         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
24393         implies -Wsign-compare.  -Wall doesn't imply -W.
24394
24395 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
24396
24397         * typeck.c (build_component_ref): Fix to handle anon unions in base
24398         classes as well.
24399
24400 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24401
24402         * class.c (resolves_to_fixed_type_p): Delete code dealing with
24403         a WITH_CLEANUP_EXPR, since we don't generate them any more.
24404         * cvt.c (build_up_reference): Likewise.
24405         * decl.c (grok_reference_init): Likewise.
24406         (cp_finish_decl): Likewise.
24407         * error.c (dump_expr): Likewise.
24408         * tree.c (real_lvalue_p): Likewise.
24409         (lvalue_p): Likewise.
24410         (build_cplus_new): Likewise.
24411         (unsave_expr_now): Likewise.
24412         * typeck.c (unary_complex_lvalue, build_modify_expr,
24413         c_expand_return): Likewise.
24414
24415 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24416
24417         Make the C++ front-end pay attention to attributes for structures.
24418         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
24419         finish_struct_1.
24420         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
24421         Take out old round_up_size use and setting the DECL_ALIGN possibly
24422         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
24423         can override what the attribute set.
24424         * cp-tree.h (finish_struct): Update prototype.
24425         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
24426         attributes to finish_struct.
24427         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
24428         value down into finish_struct.
24429         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
24430
24431 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
24432
24433         * decl.c (poplevel):  Re-word dead for local handling.
24434         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
24435         (cp_finish_decl):  If is_for_scope, check for duplicates so
24436         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
24437
24438         * lex.c (do_identifier):  Use global binding in preference of
24439         dead for local variable.
24440
24441 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
24442
24443         * init.c (initializing_context): Handle anon union changes, the
24444         context where fields of anon unions can be initialized now has to be
24445         found by walking up the TYPE_CONTEXT chain.
24446
24447 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
24448
24449         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
24450         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
24451         (obscure_complex_init): If bss is supported, always set
24452         DECL_INITIAL to error_mark_node.
24453
24454 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24455
24456         * init.c (is_friend): Make sure there's a context before we see if
24457         it's an aggr type.
24458
24459 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
24460
24461         * init.c (is_friend): Classes are not friendly with nested classes.
24462
24463 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
24464
24465         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
24466         and record its result.
24467
24468 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
24469
24470         * class.c (finish_struct_anon): Switch around code to not move anon
24471         union elements around, nor mess up their contexts, nor offsets,
24472         instead we now build up the right number of COMPONENT_REFs for all
24473         the anon unions that may be present at build_component_ref time.
24474         * typeck.c (lookup_anon_field): New routine to handle field lookup
24475         on fields without names.  We find them, based upon their unique type
24476         instead.
24477         * typeck.c (build_component_ref): Allow FIELD_DECL components.
24478         Handle finding components in anonymous unions, and ensure that a
24479         COMPONENT_REF is built for each level as necessary.
24480
24481 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
24482
24483         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
24484         code that ensures that copy ctors are used if appropriate.
24485
24486 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24487
24488         * init.c (build_vec_delete): Only give an error if base isn't an
24489         error_mark_node.
24490
24491 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
24492
24493         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
24494         (yylex): If we see `new', keep slurping.
24495
24496 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
24497
24498         * class.c (finish_struct_1): Move code for handling anon unions...
24499         (finish_struct_anon): to here.  Fixup so that we do the offset
24500         calculations right, and so that the fields are physically moved to
24501         the containers's chain.
24502
24503 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24504
24505         * decl.c (grokdeclarator): Avoid trying to get an operand off an
24506         identifier node.
24507
24508 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
24509
24510         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
24511         POINTER_SIZE to agree with expr.c.
24512
24513 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
24514
24515         * search.c (lookup_field): Don't report ambiguities if protect is 0,
24516         instead return NULL_TREE.
24517
24518 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
24519
24520         * class.c (finish_struct_1): Call warn_hidden if we want warnings
24521         about overloaded virtual functions.
24522         (warn_hidden): New routine to warn of virtual functions that are
24523         hidden by other virtual functions, that are not overridden.
24524         (get_basefndecls): New routine, used by warn_hidden.
24525         (mark_overriders): New routine, used by warn_hidden.
24526         * search.c (get_matching_virtual): Remove old warning that just
24527         isn't very useful.
24528
24529 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24530
24531         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
24532
24533         * typeck.c (null_ptr_cst_p): Delete unused fn.
24534         (build_function_call_maybe): Delete unused fn.
24535
24536         * expr.c (extract_init): #if 0 the code after unconditional return 0
24537         for now.
24538
24539         Delete old cadillac code.
24540         * edsel.c: Remove file.
24541         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
24542         * Makefile.in (CXX_OBJS): Delete edsel.o.
24543         (edsel.o): Delete rule.
24544         * cp-tree.h (flag_cadillac): Delete var decl.
24545         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
24546         * decl2.c (flag_cadillac): Delete var definition.
24547         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
24548         (grokfield): Delete code depending on flag_cadillac.
24549         (finish_anon_union): Likewise.
24550         * class.c (finish_struct_1): Likewise.
24551         (pushclass): Likewise.
24552         (popclass): Likewise.
24553         (push_lang_context): Likewise.
24554         (pop_lang_context): Likewise.
24555         * decl.c (init_decl_processing): Likewise.
24556         (start_decl): Likewise.
24557         (cp_finish_decl): Likewise.
24558         (xref_tag): Likewise.
24559         (finish_enum): Likewise.
24560         (start_function): Likewise.
24561         (finish_function): Likewise.
24562         (finish_stmt): Likewise.
24563         * lex.c (lang_init): Likewise.
24564         (check_newline): Likewise.
24565
24566         * lex.c (do_pending_inlines): Delete synthesized method kludge.
24567
24568         Delete defunct, ancient garbage collection implementation.
24569         * rtti.c: New file with the RTTI stuff from gc.c.
24570         * gc.c: Removed file (moved the remaining stuff into rtti.c).
24571         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
24572         (rtti.o): New rule, replacing gc.o.
24573         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
24574         * cp-tree.h: Delete gc-related fn decls.
24575         (DECL_GC_OFFSET): Delete macro.
24576         (flag_gc): Delete extern decl.
24577         * decl.c (current_function_obstack_index): Delete var decl.
24578         (current_function_obstack_usage): Delete var decl.
24579         (start_function): Delete clearing of current_function_obstack_index
24580         and current_function_obstack_usage.
24581         (init_decl_processing): Delete code relying on -fgc.
24582         Delete call to init_gc_processing.
24583         (cp_finish_decl): Delete calls to build_static_gc_entry and
24584         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
24585         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
24586         and to expand_expr of a __gc_main call.
24587         (maybe_gc_cleanup): Delete var decl.
24588         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
24589         * decl2.c (flag_gc): Delete var decl.
24590         (lang_f_options): Delete offering of -fgc.
24591         (lang_decode_option): Delete -fgc and -fno-gc handling.
24592         (get_temp_regvar): Delete gc code.
24593         * init.c (build_new): Delete gc code.
24594         * lex.c (init_lex): Delete checking of flag_gc.
24595
24596         * typeck.c (convert_arguments): Delete gc code.
24597         (build_component_addr): Delete -fgc warning.
24598         (build_modify_expr): Delete gc code.
24599
24600         * decl2.c (build_push_scope): Delete fn.
24601         * cp-tree.h (build_push_scope): Delete decl.
24602
24603         * search.c (clear_search_slots): Delete fn.
24604         * cp-tree.h (clear_search_slots): Delete decl.
24605
24606         * search.c (tree_needs_constructor_p): Delete fn.
24607         * cp-tree.h (tree_needs_constructor_p): Delete decl.
24608
24609         * tree.c (id_cmp): Delete fn.
24610
24611         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
24612         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
24613
24614         * tree.c (decl_value_member): Delete fn.
24615         * cp-tree.h (decl_value_member): Delete decl.
24616
24617         * tree.c (list_hash_lookup_or_cons): Delete fn.
24618         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
24619
24620         * method.c (cplus_exception_name): Delete fn.
24621         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
24622
24623         * spew.c (shift_tokens): Delete fn.
24624
24625 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
24626
24627         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
24628         to cp_finish_decl.
24629         * parse.y: Likewise.
24630
24631 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24632
24633         * tree.c (build_cplus_staticfn_type): Delete function definition;
24634         never used.
24635         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
24636
24637         * tree.c (virtual_member): Delete function definition; never used.
24638         * cp-tree.h (virtual_member): Delete decl.
24639
24640 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
24641
24642         * typeck.c (build_component_ref): Handle getting vbase pointers
24643         out of complex multiple inheritance better.
24644
24645 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
24646
24647         * typeck.c (build_object_ref): Make sure we use the real type, not
24648         any reference type.
24649
24650 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
24651
24652         * tree.c (build_exception_variant): Don't create new types if we
24653         don't have to, also build new types on the right obstack.
24654
24655 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
24656
24657         * decl.c (store_bindings): Split out from push_to_top_level.
24658         (push_to_top_level): Call it for b->type_shadowed on class binding
24659         levels.
24660
24661 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
24662
24663         * search.c (expand_upcast_fixups): Fix so that offsets stored in
24664         vbase_offsets are always right.  Fixes a problem where virtual base
24665         upcasting and downcasting could be wrong during conversions on this
24666         during virtual function dispatch at ctor/dtor time when dynamic
24667         vtable fixups for deltas are needed.  This only sounds easier than
24668         it is.  :-)
24669         (fixup_virtual_upcast_offsets): Change to reflect new calling
24670         convention for expand_upcast_fixups.
24671
24672 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24673
24674         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
24675         check that it's usable as the bitfield width.
24676
24677 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24678
24679         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
24680         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
24681         only ever used for functions in it.
24682
24683 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
24684
24685         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
24686         (nested_type): Likewise.
24687         (nested_name_specifier): Use lastiddecl.
24688
24689         * decl.c (grokdeclarator): Adjust accordingly.
24690         * init.c (expand_member_init): Likewise.
24691         * parse.y (base_class): Likewise.
24692         * typeck2.c (build_functional_cast): Likewise.
24693
24694         * typeck2.c (build_functional_cast): Fill in name after we've
24695         checked for non-aggr type.
24696
24697 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
24698
24699         * decl2.c (warn_pointer_arith): Default to on.
24700
24701 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
24702
24703         * lex.c (is_rid): New function.
24704         * decl.c (grokdeclarator): Diagnose reserved words used as
24705         declarator-ids.
24706
24707 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
24708
24709         * tree.c (get_decl_list): Don't lose cv-quals.
24710
24711         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
24712         typespecs used as declarator-ids.
24713
24714 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
24715
24716         * decl.c (poplevel): When poping a level, don't give a warning for
24717         any subblocks that already exist.
24718
24719 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
24720
24721         * typeck.c (build_object_ref): Finish what I started.
24722
24723         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
24724
24725         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
24726
24727         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
24728         scope.
24729
24730 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
24731
24732         * decl.c (xref_tag): Handle passing a type in directly.
24733
24734         * parse.y (qualified_type_name): Pull out the type.
24735         (nested_type): Likewise.
24736         Take types directly instead of as identifiers.
24737         * call.c (build_scoped_method_call): Take types directly instead of
24738         as identifiers.
24739         * decl.c (xref_basetypes): Likewise.
24740         * init.c (expand_member_init): Likewise.
24741         (build_member_call): Likewise.
24742         (build_offset_ref): Likewise.
24743         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
24744         * method.c (do_build_assign_ref): Likewise.
24745         * decl.c (grokdeclarator): Handle a type appearing as the
24746         declarator-id for constructors.
24747         * method.c (do_build_copy_constructor): current_base_init_list now
24748         uses the types directly, not their names.
24749         * init.c (sort_base_init): Likewise.
24750         (expand_member_init): Likewise.
24751         * init.c (is_aggr_type): New function, like is_aggr_typedef.
24752
24753 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
24754
24755         * tree.c (layout_basetypes): Call build_lang_field_decl instead
24756         of build_lang_decl if first arg is a FIELD_DECL.
24757
24758 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24759
24760         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
24761         non-empty.
24762         * except.c (expand_start_catch_block): Set TREE_USED to avoid
24763         warnings about the catch handler.
24764
24765 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
24766
24767         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
24768         expand_target_expr.
24769
24770 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24771
24772         Fix access control to use trees rather than integers.
24773         * class.c (access_{default, public, protected, private,
24774         default_virtual, public_virtual, private_virtual}_node): Add
24775         definitions.
24776         (init_class_processing): Do creation of those nodes.
24777         * cp-tree.h (access_type): Delete enum decl.
24778         (access_{default, public, protected, private, default_virtual,
24779         public_virtual, private_virtual}_node): Add decls.
24780         (compute_access): Change return type.
24781         * search.c (compute_access): Have tree return type, instead of enum.
24782         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
24783         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
24784         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
24785         * parse.y (VISSPEC): Make ttype rather than itype.
24786         (base_class_access_list): Likewise.
24787         * *.[cy]: Change all refs of `access_public' to `access_public_node',
24788         etc.
24789         * call.c (build_method_call): Make ACCESS be a tree.
24790         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
24791         * cvt.c (convert_to_aggr): Likewise.
24792         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
24793         Likewise.
24794         * method.c (hack_identifier): Likewise.
24795         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
24796
24797 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
24798
24799         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
24800         frontend, and make it more consistent with respect to
24801         warn_pointer_arith.
24802
24803 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
24804
24805         * decl.c (pushdecl): Check for duplicate parameter names.
24806
24807 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
24808
24809         * decl.c (expand_static_init): Call assemble_external for atexit.
24810
24811 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
24812
24813         * except.c (do_unwind): Remove some generated dead code.
24814         (eh_outer_context): New routine, factor out some common code from
24815         expand_builtin_throw and end_eh_unwinder.  Add code to do return
24816         address masking for the PA.
24817         (expand_builtin_throw): Use eh_outer_context instead of open coding
24818         it here.
24819         (end_eh_unwinder): Likewise.
24820
24821 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
24822
24823         * except.c (expand_throw): Call assemble_external for __empty, if we
24824         use it.
24825
24826 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
24827
24828         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
24829         NORMAL_RETURN_ADDR_OFFSET.
24830         (end_eh_unwinder): Likewise.
24831
24832 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
24833
24834         * gc.c (build_dynamic_cast): Make sure we don't cast away const
24835         when dealing with references, and make sure we handle dynamic
24836         casting to a cv qualified reference.
24837
24838 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
24839
24840         * except.c (struct eh_context): New structure top hold eh context
24841         information.
24842         (push_eh_context): New routine.
24843         (pop_eh_context): Likewise.
24844         * decl.c (push_cp_function_context): Use them.
24845         (pop_cp_function_context): Likewise.
24846
24847 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
24848
24849         * decl2.c (finish_file): Also prune uninteresting functions in the
24850         inline emission loop.
24851
24852 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
24853
24854         * sig.c (build_signature_table_constructor): Mark functions
24855         in the signature as referenced.
24856
24857 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
24858
24859         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
24860         the inline emission stuff.
24861
24862 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
24863
24864         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
24865         weak symbols.
24866         * lang-options.h: Add -f{no-,}weak.
24867         * decl.c (init_decl_processing): If the target does not support weak
24868         symbols, don't use them.
24869         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
24870
24871 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
24872
24873         * init.c (expand_member_init): warning for base init after members.
24874
24875 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
24876
24877         * cvt.c (build_expr_type_conversion): Don't convert to a reference
24878         type.
24879
24880 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
24881
24882         * method.c (report_type_mismatch): Improve wording for volatile
24883         mismatches.
24884
24885 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
24886
24887         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
24888         expand_assignment, as the later doesn't handle things that have
24889         copy constructors well.  The compiler would do bitwise copying,
24890         instead of ctor calling in some cases.
24891
24892 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
24893
24894         * g++.c (my_strerror): Return "cannot access" if errno is 0.
24895         (pfatal_with_name, perror_exec): Don't assume that
24896         the returned value from my_strerror contains no '%'s.
24897         (concat): Remove.
24898         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
24899
24900 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
24901
24902         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
24903         TYPE_METHODS/TREE_CHAIN mean what they used to.
24904         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
24905         instead of TYPE_METHODS.
24906         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
24907         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
24908         * cp-tree.h (CLASSTYPE_METHODS): Lose.
24909         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
24910         TYPE_METHODS.
24911         (struct lang_decl): Lose next_method field.
24912         (DECL_NEXT_METHOD): Lose.
24913         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
24914         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
24915         anymore.
24916         (finish_struct_methods): Don't mess with the TREE_CHAINs in
24917         fn_fields.
24918
24919         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
24920         vector.
24921
24922         * call.c (build_method_call): Synthesize here even when not inlining.
24923         * typeck.c (build_function_call_real): Likewise.
24924
24925 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
24926
24927         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
24928         == DBX_DEBUG, call dbxout_start_new_source_file and
24929         dbxout_resume_previous_source_file when appropriate.
24930
24931 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
24932
24933         * except.c (start_anon_func): Push to the top level.
24934         (end_anon_func): Pop from the top level.
24935
24936 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
24937
24938         * cp-tree.h (build_cleanup): New routine to build cleanups.
24939         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
24940         call at ctor time and use atexit to run it later.
24941         * decl2.c (build_cleanup): New routine, taken from finish_file.
24942         (finish_file): Use build_cleanup instead, and don't put function
24943         local statics in global dtor list.
24944
24945 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
24946
24947         * except.c (expand_throw): Ensure that we have cleanups, if we try
24948         and expand cleanups.
24949
24950 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
24951
24952         * except.c (expand_throw): Add logic to manage dynamic cleanups for
24953         the EH object.
24954         (expand_end_catch_block): Use the magic of expand_goto, instead of
24955         emit_jump so that we get the cleanup for any catch clause parameter
24956         and the cleanup for the exception object.  Update to reflect label
24957         changes.
24958         (push_eh_cleanup): New routine to register a cleanup for an
24959         exception object.
24960         (empty_fndecl): Used to default cleanup actions to
24961         nothing.
24962         (init_exception_processing): Setup empty_fndecl.  Setup
24963         saved_cleanup.
24964         (expand_start_catch_block): Update to reflect label changes.  Call
24965         push_eh_object to register the cleanup for the EH object.
24966         (start_anon_func): New routine to start building lambda expressions
24967         from trees.
24968         (end_anon_func): New routine to end them.
24969         (struct labelNode): Change so that we can use tree labels, or rtx
24970         labels.
24971         (saved_cleanup): Object to check for dynamic cleanups for the
24972         exception handling object.
24973         (push_label_entry): Change so that we can use tree labels, or rtx
24974         labels.
24975         (pop_label_entry): Likewise.
24976         (top_label_entry): Likewise.
24977         (expand_start_all_catch): Use tree label instead of rtx label, so
24978         that we can get the magic of expand_goto.
24979         (expand_end_all_catch): Update to reflect label changes.
24980
24981         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
24982         use UNSAVE_EXPRs.
24983         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
24984         building_cleanup logic, as we now use UNSAVE_EXPRs.
24985         * cp-tree.h (unsave_expr): Declare it.
24986         * decl.c (building_cleanup): Remove.
24987         (maybe_build_cleanup): Remove building_cleanup logic, and use
24988         UNSAVE_EXPR instead.
24989
24990 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
24991
24992         * gc.c (build_t_desc): Update error message to say <typeinfo>.
24993
24994 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24995
24996         * decl.c (pushdecl): Only warn about shadowing a local variable if
24997         warn_shadow is true.
24998
24999 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
25000
25001         * typeck.c (build_binary_op_nodefault): Added warning about
25002         comparisons between different enum types with -Wall, unless
25003         -fenum-int-equiv set.
25004
25005 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
25006
25007         * class.c (finish_struct_1): Skip down to the inner type in
25008         multidimensional arrays.  Ensures ctors will be made for types that
25009         need constructing.
25010
25011 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
25012
25013         * decl.c (last_dtor_insn): New to track the last compiler generated
25014         insn in a dtor.
25015         (store_parm_decls): Set it.
25016         (finish_function): Use it to see if the dtor is empty.  Avoid doing
25017         vtable setup all the time, if we can.
25018         (struct cp_function): Add last_dtor_insn.
25019         (push_cp_function_context): Save it.
25020         (pop_cp_function_context): Restore it.
25021
25022 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
25023
25024         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
25025         warnings.
25026
25027 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
25028
25029         * typeck.c (expand_target_expr): Make sure targets get put into the
25030         current temp_slot_level, so that the free_temp_slots call will reuse
25031         them.
25032
25033 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
25034
25035         * class.c (finish_struct_1): Delay delta fixups for virtual bases
25036         until after we have done the hard virtuals, to avoid a bogus `every
25037         virtual function must have a unique final overrider' for virtual
25038         functions that are only overridden by hard virtuals.
25039
25040 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
25041
25042         * pt.c (do_function_instantiation): Don't try to find a file-scope
25043         template for a member function.
25044
25045 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
25046
25047         * g++.c (main): Add handling of -nodefaultlibs.
25048
25049 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
25050
25051         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
25052         distinguish between direct bindings of reference variables, and
25053         indirect bindings of reference variables.
25054         * cvt.c (build_up_reference): Use it.
25055         * typeck.c (convert_arguments): Use it to indicate this is an
25056         indirect binding.
25057         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
25058         as they are unused.
25059         (expand_static_init): Likewise.
25060         (cplus_expand_expr_stmt): Likewise.
25061         * decl2.c (finish_file): Likewise.
25062         * init.c (perform_member_init): Likewise.
25063         (emit_base_init): Likewise.
25064         (expand_aggr_vbase_init_1): Likewise.
25065
25066 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25067
25068         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
25069         get a DECL_LANG_SPECIFIC node.
25070         * cp-tree.h (lang_decl_flags): Add new member `level'.
25071         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
25072         decl_flags level member.
25073
25074 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25075
25076         * call.c (build_method_call): Make sure instance has a
25077         TYPE_LANG_SPECIFIC node before we dive into it.
25078
25079 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
25080
25081         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
25082
25083 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
25084
25085         * decl.c (duplicate_decls): When smashing decls, smash staticness in
25086         the usual way.
25087
25088 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
25089
25090         * decl.c (poplevel): Handle the merging of subblocks of cleanups
25091         when finishing blocks that have already been created (usually due to
25092         the fixup goto code).  Fixes bad debugging information.
25093
25094 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
25095
25096         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
25097         that's not a list of overloaded functions.
25098
25099 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25100
25101         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
25102         before trying to use DECL_ABSTRACT_VIRTUAL_P.
25103
25104 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
25105
25106         * decl2.c (mark_used): New function for hooking into setting of
25107         TREE_USED on decls.
25108         * call.c (build_method_call): Use it.
25109         * class.c (instantiate_type): Likewise.
25110         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
25111         for all like-named functions.
25112         * method.c (hack_identifier): Likewise.
25113         (emit_thunk): Don't call assemble_external.
25114         (make_thunk): Create thunk as a FUNCTION_DECL so that it
25115         gets the right mode and ENCODE_SECTION_INFO works.
25116
25117         * parse.y: Use mark_used.  Pass operator names to do_identifier.
25118         * lex.c (do_identifier): Handle operator names.
25119
25120         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
25121
25122 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25123
25124         * errfn.c: Include stdio.h.
25125         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
25126
25127 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
25128
25129         * typeck2.c (digest_init): Always convert initializers to the
25130         right type.
25131
25132 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
25133
25134         * init.c (member_init_ok_or_else): Don't allow member initializers
25135         for indirect members, as it is invalid.
25136
25137 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25138
25139         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
25140
25141 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
25142
25143         * parse.y (for.init.statement): Catch compound statements inside for
25144         initializations, if we're being pedantic.
25145
25146 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
25147
25148         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
25149         looking for.
25150
25151 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
25152
25153         * error.c (dump_expr): Don't core dump when a boolean expression is
25154         used as a default argument.
25155
25156 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
25157
25158         * class.c (finish_struct_bits): Check aggregate_value_p instead of
25159         RETURN_IN_MEMORY.
25160
25161 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
25162
25163         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
25164         BLKmode type that would otherwise be returned in registers.
25165
25166 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25167
25168         * g++.c (WITHLIBC): New macro.
25169         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
25170         saw_libc and pass it at the end if it was set.
25171
25172 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25173
25174         * parse.y (fn.def1): Call split_specs_attrs in
25175         declmods notype_declarator case.