OSDN Git Service

b4167416a3c21db399d4843361edd7a2fb65acfa
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2
3         * call.c (build_conditional_expr): Use VOID_TYPE_P.
4         * cvt.c (cp_convert_to_pointer): Likewise.
5         (convert_to_void): Likewise.
6         * error.c (dump_expr): Likewise.
7         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
8         * init.c (build_delete): Likewise.
9         * method.c (emit_thunk): Likewise.
10         * optmize.c (declare_return_variable): Likewise.
11         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12         (get_typeid): Likewise.
13         (build_dynamic_cast_1): Likewise.
14         * typeck.c (composite_pointer_type): Likewise.
15         (common_type): Likewise.
16         (build_indirect_ref): Likewise.
17         (build_binary_op): Likewise.
18         (build_x_compound_expr): Likewise.
19         (check_return_expr): Likewise.
20         * typeck2.c (add_exception_specifier): Likewise.
21         
22         * mangle.c (write_method_parms): Use direct comparison for end
23         of parmlist.
24
25 2000-06-19  Benjamin Chelf  <chelf@cabriolet.stanford.edu>
26
27         * cp-tree.h (genrtl_try_block): Declare function.
28         (genrtl_handler): Likewise.
29         (genrtl_catch_block): Likewise.
30         (genrtl_ctor_stmt): Likewise.
31         (genrtl_subobject): Likewise.
32         (genrtl_decl_cleanup): Likewise.
33         (genrtl_do_poplevel): Likewise.
34         (genrtl_do_pushlevel): Likewise.
35         (genrtl_clear_out_block): Likewise.
36         (genrtl_goto_stmt): Likewise.
37         (genrtl_expr_stmt): Likewise.
38         (genrtl_decl_stmt): Likewise.
39         (genrtl_if_stmt): Likewise.
40         (genrtl_while_stmt): Likewise.
41         (genrtl_do_stmt): Likewise.
42         (genrtl_return_stmt): Likewise.
43         (genrtl_for_stmt): Likewise.
44         (genrtl_break_stmt): Likewise.
45         (genrtl_continue_stmt): Likewise.
46         (genrtl_scope_stmt): Likewise.
47         (genrtl_switch_stmt): Likewise.
48         (genrtl_case_label): Likewise.
49         (genrtl_begin_compound_stmt): Likewise.
50         (genrtl_finish_compound_stmt): Likewise.
51         (genrtl_compound_stmt): Likewise.
52         (genrtl_asm_stmt): Likewise.
53         (genrtl_named_return_value): Likewise.
54         (genrtl_begin_stmt_expr): Likewise.
55         (genrtl_finish_stmt_expr): Likewise.
56         (finish_for_stmt): Removed first argument.
57         (finish_switch_stmt): Likewise.
58
59         * semantics.c (genrtl_try_block): Define function.
60         (genrtl_handler): Likewise.
61         (genrtl_catch_block): Likewise.
62         (genrtl_ctor_stmt): Likewise.
63         (genrtl_subobject): Likewise.
64         (genrtl_decl_cleanup): Likewise.
65         (genrtl_do_poplevel): Likewise.
66         (genrtl_do_pushlevel): Likewise.
67         (genrtl_clear_out_block): Likewise.
68         (genrtl_goto_stmt): Likewise.
69         (genrtl_expr_stmt): Likewise.
70         (genrtl_decl_stmt): Likewise.
71         (genrtl_if_stmt): Likewise.
72         (genrtl_while_stmt): Likewise.
73         (genrtl_do_stmt): Likewise.
74         (genrtl_return_stmt): Likewise.
75         (genrtl_for_stmt): Likewise.
76         (genrtl_break_stmt): Likewise.
77         (genrtl_continue_stmt): Likewise.
78         (genrtl_scope_stmt): Likewise.
79         (genrtl_switch_stmt): Likewise.
80         (genrtl_case_label): Likewise.
81         (genrtl_begin_compound_stmt): Likewise.
82         (genrtl_finish_compound_stmt): Likewise.
83         (genrtl_compound_stmt): Likewise.
84         (genrtl_asm_stmt): Likewise.
85         (genrtl_named_return_value): Likewise.
86         (genrtl_begin_stmt_expr): Likewise.
87         (genrtl_finish_stmt_expr): Likewise.
88         (finish_for_stmt): Removed first argument and generate rtl 
89         specific code.
90         (finish_switch_stmt): Likewise.
91         (do_poplevel): Removed generate rtl specific code.
92         (do_pushlevel): Likewise.
93         (add_tree): Likewise.
94         (finish_goto_stmt): Likewise.
95         (finish_expr_stmt): Likewise.
96         (begin_if_stmt): Likewise.
97         (finish_if_stmt_cond): Likewise.
98         (finish_then_clause): Likewise.
99         (begin_else_clause): Likewise.
100         (finish_else_clause): Likewise.
101         (finish_if_stmt): Likewise.
102         (clear_out_block): Likewise.
103         (begin_while_stmt): Likewise.
104         (finish_while_stmt_cond): Likewise.
105         (finish_while_stmt): Likewise.
106         (begin_do_stmt): Likewise.
107         (finish_do_body): Likewise.
108         (finish_do_stmt): Likewise.
109         (finish_return_stmt): Likewise.
110         (begin_for_stmt): Likewise.
111         (finish_for_init_stmt): Likewise.
112         (finish_for_cond): Likewise.
113         (finish_for_expr): Likewise.
114         (finish_break_stmt): Likewise.
115         (finish_continue_stmt): Likewise.
116         (begin_switch_stmt): Likewise.
117         (finish_switch_cond): Likewise.
118         (finish_case_label): Likewise.
119         (begin_try_block): Likewise.
120         (begin_function_try_block): Likewise.
121         (finish_try_block): Likewise.
122         (finish_cleanup_try_block): Likewise.
123         (finish_cleanup): Likewise.
124         (finish_function_try_block): Likewise.
125         (finish_handler_sequence): Likewise.
126         (finish_function_handler_sequence): Likewise.
127         (begin_handler): Likewise.
128         (finish_handler_parms): Likewise.
129         (begin_catch_block): Likewise.
130         (finish_handler): Likewise.
131         (begin_compound_stmt): Likewise.
132         (finish_compound_stmt): Likewise.
133         (finish_asm_stmt): Likewise.
134         (finish_label_stmt): Likewise.
135         (finish_label_decl): Likewise.
136         (finish_subobject): Likewise.
137         (finish_decl_cleanup): Likewise.
138         (finish_named_return_value): Likewise.
139         (begin_stmt_expr): Likewise.
140         (finish_stmt_expr): Likewise.
141         
142         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
143         to call genrtl_expr_stmt when appropriate.
144
145         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
146         begin_compound_expr to call genrtl_begin_stmt_expr and
147         genrtl_begin_compound_expr when appropriate.
148         (finish_init_stmts): Changed calls to finish_compound_expr and
149         finish_stmt_expr to call genrtl_finish_compound_expr and
150         genrtl_finish_stmt_expr when appropriate.
151         (expand_default_init): Changed call to finish_expr_stmt to call
152         genrtl_expr_stmt when appropriate.
153         (build_vec_init): Likewise.
154
155         * parse.y (simple_stmt): Removed first argument from call to 
156         finish_for_stmt. Removed first argument from call to 
157         finish_switch_stmt.
158
159         * parse.c: Regenerated.
160
161         * pt.c (tsubst_expr): Removed first argument from call to 
162         finish_for_stmt. Removed first argument from call to 
163         finish_switch_stmt.
164         
165 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
166
167         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
168         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
169
170         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
171         (cplus_tree_code_length[]): Likewise.
172         (cplus_tree_code_name[]): Likewise.
173         (init_parse): Added call to add_c_tree_codes. Changed 
174         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
175         
176 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
177
178         * cp-tree.h (finish_mem_initializers): Declare.
179         (count_trees): Likewise.
180         * parse.y (base_init): Use finish_mem_initializers.
181         * semantics.c (finish_mem_initializers): New function.
182
183         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
184         the number of trees.
185         (n_trees): Remove.
186         (count_trees): Don't use it.
187         
188 2000-06-15  Jason Merrill  <jason@redhat.com>
189
190         * tree.c (count_trees): New debugging function.
191
192         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
193         * init.c (build_member_call): Pull out the name of a DECL.
194
195         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
196         * semantics.c (expand_body): Push to TV_INTEGRATION here.
197         * optimize.c (optimize_function): Not here.
198         * pt.c (instantiate_decl): Push to TV_PARSE.
199
200 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
201
202         * cp-tree.h (struct language_function): Remove x_base_init_list
203         and x_member_init_list.
204         (current_base_init_list): Remove.
205         (current_member_init_list): Likewise.
206         (setup_vtbl_ptr): Change prototype.
207         (emit_base_init): Likewise.
208         (expand_member_init): Likewise.
209         (reinit_parse_for_function): Remove.
210         * decl.c (save_function_data): Don't clear x_base_init_list and
211         x_member_init_list.
212         (mark_language_function): Don't mark them.
213         * init.c (perform_member_init): Tweak comment.
214         (sort_member_init): Take the list of initializers as an argument.
215         (sort_base_init): Likewise.
216         (emit_base_init): Likewise.
217         (expand_member_init): Return the initializer.  Don't use global
218         variables.
219         * lex.c (reinit_parse_for_function): Remove.
220         * method.c (build_template_parm_names): Correct substitution.
221         (do_build_copy_constructor): Don't use current_member_init_list
222         and current_base_init_list.
223         (synthesize_method): Likewise.
224         * parse.y (base_init): Split mem-initializers into
225         base-initializers and field-initializers.
226         (member_init_list): Build up the list here.
227         (member_init): Return the initializer.
228         (fn.depfn): Don't use reinit_parse_for_function.
229         * parse.c: Regenerated.
230         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
231         ERROR_MARK.
232         (tsubst_expr): Don't use current_member_init_list
233         and current_base_init_list.
234         (tsubst_expr_values): Rename to ...
235         (tsubst_initializer_list): ... this.  Use convert_from_reference.
236         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
237         and current_base_init_list.
238         (begin_function_definition): Don't call reinit_parse_for_function.
239         
240         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
241
242         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
243         correctly.
244         
245         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
246
247 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
248
249         * cp-tree.h (IF_COND): Move to c-common.h.
250         (THEN_CLAUSE): Likewise.
251         (ELSE_CLAUSE): Likewise.
252         (WHILE_COND): Likewise.
253         (WHILE_BODY): Likewise.
254         (DO_COND): Likewise.
255         (DO_BODY): Likewise.
256         (RETURN_EXPR): Likewise.
257         (EXPR_STMT_EXPR): Likewise.
258         (FOR_INIT_STMT): Likewise.
259         (FOR_COND): Likewise.
260         (FOR_EXPR): Likewise.
261         (FOR_BODY): Likewise.
262         (SWITCH_COND): Likewise.
263         (SWITCH_BODY): Likewise.
264         (CASE_LOW): Likewise.
265         (CASE_HIGH): Likewise.
266         (GOTO_DESTINATION): Likewise.
267         (COMPOUND_BODY): Likewise.
268         (ASM_CV_QUAL): Likewise.
269         (ASM_STRING): Likewise.
270         (ASM_OUTPUTS): Likewise.
271         (ASM_INPUTS): Likewise.
272         (ASM_CLOBBERS): Likewise.
273         (DECL_STMT_DECL): Likewise.
274         (STMT_EXPR_STMT): Likewise.
275         (LABEL_STMT_LABEL): Likewise.
276         (SCOPE_BEGIN_P): Likewise.
277         (SCOPE_END_P): Likewise.
278         (SCOPE_STMT_BLOCK): Likewise.
279         (SCOPE_NULLIFIED_P): Likewise.
280         (SCOPE_NO_CLEANUPS_P): Likewise.
281         (SCOPE_PARTIAL_P): Likewise.
282         (ASM_VOLATILE_P): Likewise.
283         (STMT_LINENO): Likewise.
284         (STMT_LINENO_FOR_FN_P): Likewise.
285
286         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
287         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
288         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
289         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
290         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
291
292         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
293
294         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
295         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
296         
297         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
298         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
299         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
300         
301 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
302
303         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
304         * class.c (dfs_find_final_overrider): Set it appropriately.
305         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
306         avoid unneeded secondary vptrs.
307
308 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
309
310         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
311         (check_bitfield_decl, check_field_decl): Likewise.
312         (build_vtbl_or_vbase_field, build_base_field): Likewise.
313         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
314         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
315         (xfer_tag, finish_enum): Likewise.
316         * decl2.c (finish_builtin_type): Likewise.
317         * init.c (init_init_processing): Likewise.
318         * pt.c (instantiate_class_template): Likewise.
319         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
320         * cp-tree.h (struct lang_type): Add user_align member.
321         (CLASSTYPE_USER_ALIGN): Define.
322
323 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
324
325         * Make-lang.in (c++.install-common): Install g++-cross in
326         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
327         $(target_alias)-g++ and $(target_alias)-c++.
328
329 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
330
331         * class.c (vcall_offset_data_s): Add last_init and fns.
332         (overrides): Rename to same_signature_p.
333         (dfs_find_final_overrider): Adjust accordingly.
334         (mark_overriders): Likewise.
335         (warn_hidden): Likewise.
336         (build_vtbl_initializer): Reorganize machinery for building things
337         at negative offsets.
338         (build_vcall_and_vbase_vtbl_entries): Likewise.
339         (build_vbase_offset_vtbl_entries): Likewise.
340         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
341         offset entries.  Do not create two entries for functions with the
342         same signature.
343         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
344         (build_rtti_vtbl_entries): Reorganize machinery for building things
345         at negative offsets.
346
347         * optimize.c (expand_call_inline): Don't recurse into the code
348         used to initialize the parameters more than once.
349
350 2000-06-11  Mark Mitchell <mark@codesourcery.com>
351         
352         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
353         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
354         (find_substitution): Only use the `Sa' substitution for
355         std::allocator, not instantiations of it.
356         (write_template_prefix): Move comment.  Only use a TREE_LIST to
357         represent substitutions for a member template.
358         (write_array_type): Mangle array dimensions correctly.
359         * optimize.c (maybe_clone_body): Copy more information from the
360         cloned function.
361         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
362         on the regenerated declaration.
363
364 2000-06-11  Chip Salzenberg  <chip@valinux.com>
365             Mark Mitchell <mark@codesourcery.com>
366
367         * class.c (build_vtable): Clarify comment.
368         (build_ctor_vtbl_group): Pass the most derived type to
369         build_vtable.
370         
371 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
372
373         * decl2.c (compare_options): Don't needlessly cast away const-ness.
374
375 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
376
377         * decl.c (add_binding): Handle duplicate declarations of external
378         variables.
379
380 2000-06-09  Chip Salzenberg  <chip@valinux.com>
381             Mark Mitchell <mark@codesourcery.com>
382
383         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
384         argument.
385         (write_signed_number): New macro.
386         (write_unsigned_number): Likewise.
387         (write_source_name): Use them.
388         (write_number): Handle signed and unsigned values.
389         (write_integer_cst): Use tree_int_cst_sgn, and use
390         write_unsigned_number or write_signed_number as appropriate.
391         (write_discriminator): Use write_unsigned_number or
392         write_signed_number as appropriate.
393         (write_template_arg_literal): Likewise.
394         (write_array_type): Use tree_low_cst.
395         (write_template_parm):  Use write_unsigned_number or
396         write_signed_number as appropriate.
397         (write_substitution): Adjust call to write_number.
398         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
399         (write_expression): Handle non-type template arguments of
400         reference type correctly.
401         (mangle_thunk): Use write_signed_number.
402
403 2000-06-09  Chip Salzenberg  <chip@valinux.com>
404
405         * mangle.c (find_substition): Don't mangle objects with typename
406         substitutions (e.g. "cin" as "Si").
407
408 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
409
410         * call.c (add_candidate): Use ggc_alloc_cleared.
411         * decl.c (lookup_label): Likewise.
412         * lex.c (retrofit_lang_decl): Likewise.
413
414 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
415
416         * semantics.c (expand_body): Push to TV_EXPAND.
417         * optimize.c (optimize_function): Push to TV_INTEGRATION.
418         * decl.c (start_function): Always call announce_function.
419
420         * tinfo2.cc: Just declare abort.
421
422 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
423
424         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
425         whenever @ is a symbolic name.
426
427 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
428
429         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
430
431 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
432
433         * decl.c (pushdecl): Look up functions by DECL_NAME, not
434         DECL_ASSEMBLER_NAME.
435
436 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
437
438         * decl2.c (c_language): Define.
439
440 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
441
442         * lex.c (lang_init_options): Tweak.
443
444         * decl2.c: Remove #inclusion of diagnostic.h
445         (lang_decode_option): Move diagnostic formatting options to
446         toplevel. 
447
448         * lang-options.h: Remove documentation for diagnostic options.
449
450         * Makefile.in (lex.o): Depends upon diagnostic.h
451
452 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
453
454         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
455         the same DECL_RESULT, it's not a redefinition.
456         * pt.c (tsubst_decl): Remove code to handle illegal
457         specializations.
458
459 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
460
461         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
462
463 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
464
465         * search.c (maybe_suppress_debug_info): Don't check
466         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
467
468         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
469         here if extern_p.
470
471         Remember instantiation context in deferred instantiations.
472         * cp-tree.h (struct tinst_level): Remove.
473         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
474         * pt.c (current_tinst_level): Now a tree.
475         (print_template_context, push_tinst_level, pop_tinst_level,
476         tinst_for_decl): Adjust.
477         (reopen_tinst_level): New fn.
478         (init_pt): Register current_tinst_level as a root.
479         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
480         of the pending templates list.
481         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
482         * lex.c (extract_interface_info): Adjust.
483         * decl2.c (warn_if_unknown_interface): Adjust.
484
485 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
486
487         * class.c (indirect_primary_base_p): New function.
488         (determine_primary_base): Use it.
489
490 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
491
492         Update new-abi dynamic cast algorithm.
493         * tinfo.cc (__class_type_info::__dyncast_result): Add
494         whole_details. Adjust constructor.
495         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
496         Avoid unnecessary searching.
497         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
498
499 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
500
501         * decl.c (init_decl_processing): Don't call record_component_aliases.
502         * tree.c (build_cplus_array_type_1): Likewise.
503
504 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
505
506         * ir.texi: Correct typo.
507         * mangle.c (write_expression): Handle non-type template arguments
508         with reference type.
509         * method.c (build_overload_value): Likewise.
510         * pt.c (convert_nontype_argument): Explicitly represent conversion
511         to a reference with an ADDR_EXPR.
512         (unify): Always unify arguments in left-to-right order.
513
514 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
515             Mark Mitchell  <mark@codesourcery.com>
516
517         * Make-lang.in (CXX_SRCS): Add mangle.c.
518         * Makefile.in (CXX_OBJS): Add mangle.o.
519         (mangle.o): New rule.
520
521         * class.c (local_classes): New variable.
522         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
523         (get_vtt_name): Use mangle_vtt_name for new ABI.
524         (init_class_processing): Initialize local_classes.
525         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
526         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
527         (std_identifier): New macro.
528         (DECL_VOLATILE_MEMFUNC_P): New macro.
529         (DECL_NAMESPACE_STD_P): Likewise.
530         (local_classes): Declare.
531         (get_mostly_instantiated_function_type): Declare.
532         (init_mangle): Declare.
533         (mangle_decl): Likewise.
534         (mangle_type_string): Likewise.
535         (mangle_type): Likewise.
536         (mangle_typeinfo_for_type): Likewise.
537         (mangle_typeinfo_string_for_type): Likewise.
538         (mangle_vtbl_for_type): Likewise.
539         (mangle_vtt_for_type): Likewise.
540         (mangle_ctor_vtbl_for_type): Likewise.
541         (mangle_thunk): Likewise.
542         (mangle_conv_op_name_for_type): Likewise.
543         (mangle_guard_variable): Likewise.
544         * decl.c (pushtag): Keep track of local classes.
545         (initialize_predefined_identifiers): Initialize std_identifier.
546         (init_decl_processing): Use std_identifier.
547         (start_decl): Don't treat instantiations as specializations.
548         (grokdeclarator): Likewise.
549         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
550         name for fully-instantiated templates.
551         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
552         destructors with the new ABI.   
553         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
554         (grokfield): Use mangle_type for new ABI.
555         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
556         (get_sentry): Use mangle_guard_variable for new ABI.
557         (start_static_initialization_or_destruction): Likewise.
558         * expr.c (extract_aggr_init): Remove.
559         (extract_scalar_init): Likewise.
560         (extract_init): Remove #if 0'd code.
561         * mangle.c: New function.
562         * method.c (build_mangled_name): Assert not flag_new_abi.
563         (build_static_name): Likewise.
564         (build_decl_overload_real): Likewise.
565         (build_typename_overload): Likewise.
566         (build_overload_with_type): Likewise.
567         (build_overload_name): Likewise.
568         (get_ctor_vtbl_name): Likewise.
569         (start_squangling): Likewise.
570         (get_id_2): Likewise.
571         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
572         (init_method): Call init_mangle for new ABI.
573         (make_thunk): Call mangle_thunk for new ABI.
574         * operators.def: Correct new ABI manglings for the `%' operator.
575         Add `::' operator.
576         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
577         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
578         (lookup_template_class): Call mangle_decl for new ABI.
579         (get_mostly_instantiated_function_type): New function.
580         (set_mangled_name_for_template_decl): Use it.
581         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
582         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
583         conversion op names.
584         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
585         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
586         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
587         mangle_typeinfo_string_for_type.
588         
589 2000-06-01  Richard Henderson  <rth@cygnus.com>
590
591         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
592
593 2000-06-01  Richard Henderson  <rth@cygnus.com>
594
595         * decl2.c (unsupported_options): Fix typo, make const.
596         (lang_decode_option): Fix bsearch argument order.
597
598 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
599
600         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
601         on FIELD_DECLs.
602
603 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
604
605         * cp-tree.h (c_get_alias_set): Deleted.
606         * Makefile.in (decl.o): Include ../expr.h.
607         * decl.c (expr.h): Include.
608         (init_decl_processing): Call record_component_aliases for arrays.
609         (grokdeclarator): Likewise.
610         Set TREE_ADDRESSABLE for fields that aren't bitfields.
611         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
612
613 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
614
615         Remove guiding declaration support.
616         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
617         (flag_guiding_decls): Remove.
618         * call.c (build_user_type_conversion_1): Remove support for
619         guiding decls.
620         (build_new_function_call): Likewise.
621         (build_new_op): Likewise.
622         (build_new_method_call): Likewise.
623         * decl.c (start_function): Likewise.
624         * friend.c (is_friend): Likewise.
625         (do_friend): Likewise.
626         * decl2.c ((flag_dump_translation_unit): Make it const.
627         (flag_guiding_decls): Remove.
628         (unsupported_options): New variable
629         (compare_options): New function.
630         (lang_decode_option): Use them.
631         
632         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
633
634         * method.c (mangle_expression): Adjust test for legal expression
635         operators.
636
637         * pt.c (instantiate_decl): Save and restore the local
638         specializations list.
639
640 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
641
642         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
643
644 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
645
646         * call.c (add_template_candidate_real): Handle member template
647         constructors for classes with virtual bases.
648         (build_user_type_conversion_1): Use in_charge_arg_for_name.
649         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
650
651         * ir.texi: Update thunk documentation.
652         
653         * call.c (joust): Fix handling of overloaded builtin operators.
654
655 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
656
657         * cp-tree.h (DECL_ANTICIPATED): New macro.
658         Document new use of DECL_LANG_FLAG_7.
659         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
660         in the user namespace.
661         * lex.c (do_identifier): If the identifier's declaration has
662         DECL_ANTICIPATED on, it has not yet been declared.  But do not
663         replace it with an ordinary implicit declaration.             
664
665         * tinfo2.cc: Include stdlib.h.
666
667 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
668
669         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
670         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
671         CLASSTYPE_ALIGN.
672
673 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
674
675         * decl2.c (lang_decode_option): Use skip_leading_substring instead
676         of plain strncmp.
677
678 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
679
680         * operators.def (<?): Duplicated, should have been...
681         (>?): this.  Fixed.
682
683 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
684             Mark Mitchell  <mark@codesourcery.com>
685
686         * cp-tree.h (ansi_opname): Make it a macro.
687         (ansi_assopname): Likewise.
688         (struct lang_decl_flags): Add assignment_operator_p.
689         (struct lang_decl): Add operator_code.
690         (DECL_VTT_PARM): Adjust.
691         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
692         overloaded operator.
693         (SET_OVERLOADED_OPERATOR_CODE): New macro.
694         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
695         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
696         (opname_tab): Remove.
697         (assignop_tab): Likewise.
698         (operator_name_info_t): New type.
699         (operator_name_info): New variable.
700         (assignment_operator_name_info): Likewise.
701         (build_cp_library_fn): Remove declaration.
702         (push_cp_library_fn): Likewise.
703         (operator_name_string): Likewise.
704         (build_decl_overload): Likewise.
705         * call.c (print_z_candidates): Simplify.
706         (build_object_call): Adjust usage of ansi_opname.  Use
707         DECL_OVERLOADED_OPERATOR_P.
708         (op_error): Adjust operator name lookup.
709         (build_conditional_expr): Adjust usage of ansi_opname.
710         (build_new_op): Likewise.
711         (build_op_delete_call): Likewise.
712         (build_over_call): Likewise.
713         (joust): Use DECL_OVERLOADED_OPERATOR_P.
714         * decl.c (duplicate_decls): Copy operator_code.
715         (init_decl_processing): Adjust parameters to push_cp_library_fn.
716         (builtin_function): Adjust parameters to build_library_fn_1.
717         (build_library_fn_1): Accept an overloaded operator code.
718         (build_library_fn): Pass ERROR_MARK.
719         (build_cp_library_fn): Accept an overloaded operator code.
720         (push_cp_library_fn): Likewise.
721         (grokfndecl): Tweak.
722         (grokdeclarator): Simplify code to compute names of overloaded
723         operators.  Adjust use of ansi_opname.
724         (ambi_op_p): Work on tree_codes, not identifiers.
725         (unary_op_p): Likewise.
726         (grok_op_properties): Likewise.
727         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
728         (lang_mark_tree): Don't try to mark the operator_code.
729         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
730         * error.c (dump_decl): Remove special handling for operator
731         names.
732         (dump_function_name): Likewise.
733         (dump_expr): Adjust name lookup of operators.
734         (op_to_string): Simplify.
735         (assop_to_string): Likewise.
736         * init.c (build_new_1): Adjust use of ansi_opname.
737         * lex.c (opname_tab): Remove.
738         (assignop_tab): Likewise.
739         (ansi_opname): Likewise.
740         (ansi_assopname): Likewise.
741         (operator_name_string): Likewise.
742         (reinit_lang_specific): Likewise.
743         (operator_name_info): New variable.
744         (assignment_operator_name_info): Likewise.
745         (init_operators): New function.
746         (init_parse): Use it.
747         (do_identifier): Adjust use of ansi_opname.
748         * method.c (mangle_expression): Don't use ansi_opname for
749         mangling.
750         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
751         (build_decl_overload): Remove.
752         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
753         (do_build_assign_ref): Adjust use of ansi_opname.
754         (synthesize_method): Likewise.
755         (implicitly_declare_fn): Likewise.
756         * operators.def: New file.
757         * parse.y (operator): Adjust use of ansi_opname.
758         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
759         (set_mangled_name_for_template_decl): Don't play games with
760         current_namespace.
761         (special_function_p): Adjust use of ansi_opname.
762         * typeck.c (check_return_expr): Likewise.
763         * Make-lang.in (cc1plus): Depend on operators.def.
764         * Makefile.in (lex.o): Likewise.
765         (decl.o): Likewise.
766
767 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
768
769         * Make-lang.in (cplib2.ready): Eradicate.
770
771 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
772
773         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
774         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
775         (built_min, cp_tree_equal): Likewise.
776
777 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
778
779         * class.c (layout_nonempty_base_or_field): Replace
780         `record_layout_info' with `record_layout_info_s'.
781
782 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
783
784         Fix goto checking.
785         * cp-tree.h (struct language_function): x_named_labels is now
786         a struct named_label_list*.
787         * decl.c (struct named_label_use_list): Renamed from...
788         (struct named_label_list): ...this.  New struct.
789         (push_binding_level): Don't set eh_region.
790         (note_level_for_eh): New fn.
791         (pop_label): Take label and old value directly.
792         (pop_labels): Adjust for new named_labels format.
793         (lookup_label): Likewise.
794         (poplevel): Note characteristics of a binding level containing a
795         named label.  Mess with named label lists earlier.
796         (mark_named_label_lists): New fn.
797         (mark_lang_function): Call it.
798         (use_label): New fn, split out from...
799         (make_label_decl): ...here.  Don't call it.
800         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, 
801         check_previous_gotos): New fns, split out from...
802         (define_label): ...here.
803         (check_switch_goto): New fn.
804         (define_case_label): Call it.
805         (check_goto): New fn.
806         * semantics.c (finish_goto_stmt): Call it and use_label.
807         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
808         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
809
810 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
811
812         * class.c (build_vtable_entry_ref): Correct usage of
813         get_vtbl_decl_for_binfo.
814
815         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
816         * method.c (implicitly_declare_fn): Not here.
817
818 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
819
820         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
821         (CPTI_PTMD_DESC_TYPE): ... here.
822         (ptmd_desc_type_node): Rename to ...
823         (ptm_desc_type_node): ... here.
824         * decl.c: Likewise.
825         * rtti.c (ptmd_initializer): Rename to ...
826         (ptm_initializer): ... here.
827         (sythesize_tinfo_var): Adjust. Deal with pointer to member
828         function.
829         (create_tinfo_types): Adjust.   
830
831 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
832
833         Finish implementation of VTTs.
834         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
835         CPTI_VTT_PARM_IDENTIFIER.
836         (vtt_parm_identifier): New macro.
837         (vtt_parm_type): Likewise.
838         (BINFO_SUBVTT_INDEX): Likewise.
839         (BINFO_VPTR_INDEX): Likewise.
840         (struct lang_decl): Add vtt_parm.
841         (DECL_VTT_PARM): New macro.
842         (DECL_USE_VTT_PARM): Likewise.
843         (DECL_NEEDS_VTT_PARM_P): Likewise.
844         (get_vtt_name): Declare.
845         (build_artifical_parm): Likewise.
846         (fixup_all_virtual_upcast_offsets): Likewise.
847         (expand_indirect_vtbls_init): Remove.
848         * call.c (build_new_method_call): Pass the vtt to subobject
849         constructors and destructors.
850         * class.c (get_vtt_name): Give it external linkage.
851         (build_clone): Handle the magic VTT parameters for clones.
852         (clone_function_decl): Fix typo in comment.
853         (build_vtt): Keep track of the indices in the VTTs where various
854         entities are stored.
855         (build_vtt_inits): Likewise.
856         (dfs_build_vtt_inits): Likewise.
857         (build_ctor_vtbl_group): Tweak type of construction vtables.
858         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
859         primary bases, when building construction vtables.
860         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
861         (initialize_predefined_identifiers): Add vtt_parm_identifier.
862         (init_decl_processing): Initialize vtt_parm_type.
863         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
864         (lang_mark_tree): Make vtt_parm.
865         * decl2.c (build_artificial_parm): New function.
866         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
867         (grokclassfn): Use build_artificial_parm.
868         * init.c (initialize_vtbl_ptrs): Call
869         fixup_all_virtual_upcast_offsets directly.
870         (perform_member_init): Use the complete subobject destructor for
871         member cleanups.
872         (build_vtbl_address): New function.
873         (expand_virtual_init): Handle VTTs.
874         * optimize (maybe_clone_body): Likewise.
875         * search.c (fixup_all_virtual_upcast_offsets): Give it external
876         linkage.
877         (expand_indirect_vtbls_init): Remove.
878         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
879         * tree.c (make_binfo): Make them bigger.
880         
881 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
882
883         * inc/cxxabi.h (__pbase_type_info): Define, based on
884         __pointer_type_info.
885         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
886         (__pointer_to_member_type_info): Likewise.
887         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
888         (__pointer_to_member_type_info::__is_pointer_p): Remove.
889         (__pointer_type_info::__do_catch): Rename to ...
890         (__pbase_type_info::__do_catch): ... here. Adjust.
891         (__pbase_type_info::__pointer_catch): Implement.
892         (__pointer_type_info::__pointer_catch): Adjust.
893         (__pointer_to_member_type_info::__pointer_catch): Adjust.
894
895 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
896
897         * tinfo.h (__user_type_info::contained_virtual_p): New
898         predicate.
899         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
900         shaped heirarchy.
901         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
902         diamond shaped heirarchy. Add early out for mixed diamond and
903         duplicate shaped heirarchy.
904
905 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
906
907         * cp-tree.h (build_delete): Change prototype.
908         (build_vec_delete): Likewise.
909         * call.c (build_scoped_method_call): Use special_function_kind
910         values to indicate the kind of destruction to be done.
911         (build_method_call): Likewise.
912         * decl.c (finish_destructor_body): Likewise.
913         (maybe_build_cleanup_1): Likewise.  Rename to ...
914         (maybe_build_cleanup): ... this.
915         * decl2.c (delete_sanity): Use special_function_kind
916         values to indicate the kind of destruction to be done.
917         (build_cleanup): Likewise.
918         * init.c (perform_member_init): Likewise.
919         (build_vec_delete_1): Likewise.
920         (build_dtor_call): Simplify.
921         (build_delete): Use special_function_kind
922         values to indicate the kind of destruction to be done.
923         (build_vbase_delete): Likewise.
924         (build_vec_delete): Likewise.
925         
926         * init.c (sort_member_init): Fix typo in error message generation
927         code.
928
929 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
930
931         * semantics.c (begin_class_definition): make the packed
932         attribute be sensitive to the "-fpack-struct" command line flag
933
934 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
935
936         Update new-abi upcast algorithm.
937         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
938         prototype and meaning of return value.
939         (__si_class_type_info::__do_upcast): Likewise.
940         (__vmi_class_type_info::__do_upcast): Likewise.
941         * tinfo.cc (__class_type_info::__upcast_result): Replace
942         whole2dst with part2dst. Adjust ctor.
943         (__class_type_info::__do_upcast): Adjust call of worker function.
944         (__class_type_info::__do_upcast): Adjust.
945         (__si_class_type_info::__do_upcast): Adjust. Use parent's
946         __do_upcast.
947         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
948         virtual base in diamond heirarchy bug.
949
950 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
951
952         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
953         and bitfield to tinfo_fn_p.
954         (DECL_TINFO_FN_P): Adjust.
955         (SET_DECL_TINFO_FN_P): Likewise.
956         (DECL_MUTABLE_P): Likewise.
957         (DECL_C_BIT_FIELD): Likewise.
958         (SET_DECL_C_BIT_FIELD): Likewise.
959         (CLEAR_DECL_C_BIT_FIELD): Likewise.
960         (DECL_UNINLINABLE): Likewise.
961         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
962         (handle_using_decl): Remove assertion.
963         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
964         to build FIELD_DECLs.
965         (build_base_field): Likewise.
966         (layout_class_type): Likewise.
967         * decl.c (init_decl_processing): Likewise.
968         (build_ptrmemfunc_type): Likewise.
969         (grokdeclarator): Likewise.
970         * decl2.c (grok_x_components): Likewise.
971         * except.c (call_eh_info): Likewise.
972         * init.c (init_init_processing): Likewise.
973         * rtti.c (expand_class_desc): Likewise.
974         (create_pseudo_type_info): Likewise.
975         (get_vmi_pseudo_type_info): Likewise.
976         (create_tinfo_types): Likewise.
977         * ptree.c (print_lang_decl): Adjust.
978         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
979         before checking DECL_MUTABLE_P.
980         
981         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
982         parameters for template functions.
983         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
984         destructors as well as constructors.
985
986 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
987
988         * class.c (build_ctor_vtbl_group): Set inits.
989         * optimize.c (maybe_clone_body): Set DECL_INLINE and
990         DECL_THIS_INLINE appropriately for clones.
991
992         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
993         (DECL_CONV_FN_P): Simplify.
994         (DECL_OPERATOR): Remove.
995         (language_to_string): Declare.
996         * decl.c (duplicate_decls): Fix typo in comment.
997         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
998         (grok_op_properties): Use DECL_CONV_FN_P instead of
999         IDENTIFIER_TYPENAME_P.
1000         * dump.c (dequeue_and_dump): Dump the language linkage of
1001         declarations.
1002         * error.c (language_to_string): Give it external linkage.
1003         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
1004         (implicitly_declare_fn): Set DECL_LANGUAGE.
1005         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
1006         IDENTIFIER_TYPENAME_P.
1007         (tsubst_decl): Likewise.
1008         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
1009         * semantics.c (finish_member_declaration): Don't mark members of
1010         classes declared in an extern "C" region as extern "C".
1011         
1012 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1013
1014         * decl2.c (qualified_lookup_using_namespace): Look through
1015         namespace aliases.
1016
1017         * decl.c (push_using_decl): Return the old decl on namespace level.
1018
1019 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
1020
1021         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
1022         (VTT_NAME_PREFIX): New macro.
1023         (CTOR_VTBL_NAME_PREFIX): Likewise.
1024         (get_ctor_vtbl_name): New function.
1025         * class.c (get_vtable_name): Simplify.
1026         (get_vtt_name): New function.
1027         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
1028         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
1029         when a virtual base becomes primary.
1030         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
1031         VTTs.
1032         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
1033         additional parameters.
1034         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
1035         (initialize_array): New function.
1036         (build_vtt): Likewise.
1037         (build_vtt_inits): Likewise.
1038         (dfs_build_vtt_inits): Likewise.
1039         (dfs_fixup_binfo_vtbls): Likewise.
1040         (build_ctor_vtbl_group): Likewise.
1041         (initialize_vtable): Use initialize_array.
1042         (accumulate_vtbl_inits): Reimplement to handle construction
1043         vtables.
1044         (dfs_accumulate_vtbl_inits): Likewise.
1045         (bulid_vtbl_initializer): Adjust parameter name.
1046         * method.c (build_typename_overload): Remove #if 0'd code.
1047         (get_ctor_vtbl_name): New function.
1048         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
1049         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
1050         
1051         * cp-tree.h (struct lang_type): Remove search_slot.
1052         (CLASSTYPE_SEARCH_SLOT): Remove.
1053         (emit_base_init): Change prototype.
1054         (initialize_vtbl_ptrs): Likewise.
1055         (expand_indirect_vtbls_init): Likewise.
1056         (clear_search_slots): Remove.
1057         * decl.c (lang_mark_tree): Don't mark search_slot.
1058         * init.c (initialize_vtbl_ptrs): Simplify.
1059         (emit_base_init): Likewise.
1060         * search.c (struct vbase_info): Document decl_ptr.
1061         (convert_pointer_to_single_level): Remove.
1062         (dfs_find_vbases): Remove.
1063         (dfs_init_base_pointers): Simplify.
1064         (dfs_clear_vbase_slots): Remove.
1065         (dfs_vtable_path_unmark): New function.
1066         (init_vbase_pointers): Simplify.
1067         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
1068         (expand_indirect_vtbls_init): Simplify.  Don't call
1069         mark_all_temps_used.
1070         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
1071         initialize_vtbl_ptrs.
1072
1073 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
1074
1075         * except.c: Add static prototypes.
1076
1077 2000-05-20  H.J. Lu  <hjl@gnu.org>
1078
1079         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
1080
1081 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
1082
1083         Don't create a separate copy of virtual bases for the
1084         CLASSTYPE_VBASECLASSES list.
1085         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
1086         (BINFO_FOR_VBASE): Remove.
1087         (CANONICAL_BINFO): Adjust.
1088         (binfo_for_vbase): New function.
1089         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
1090         instead of BINFO_FOR_VBASE.
1091         (build_vbase_pointer): Likewise.
1092         (build_secondary_vtable): Likewise.
1093         (dfs_mark_primary_bases): Likewise.
1094         (mark_primary_bases): Likewise.
1095         (layout_nonempty_base_or_field): Likewise.
1096         (dfs_set_offset_for_shared_vbases): Likewise.
1097         (dfs_set_offset_for_unshared_vbases): Likewise.
1098         (layout_virtual_bases): Likewise.  Adjust for changes to the
1099         CLASSTYPE_VBASECLASSES list.
1100         (dump_class_hierarchy_r): Use binfo_for_vbase
1101         instead of BINFO_FOR_VBASE.
1102         (dump_class_hierarchy): Likewise.
1103         (finish_vtbls): Likewise.
1104         (build_vtbl_initializer): Adjust for changes to the
1105         CLASSTYPE_VBASECLASSES list.
1106         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
1107         * decl.c (finish_destructor_body): Adjust for changes to the
1108         CLASSTYPE_VBASECLASSES list.
1109         * init.c (sort_base_init): Use binfo_for_vbase.
1110         (construct_virtual_bases): Adjust for changes to the
1111         CLASSTYPE_VBASECLASSES list.
1112         (expand_member_init): Use binfo_for_vbase.
1113         (build_vbase_delete):  Adjust for changes to the
1114         CLASSTYPE_VBASECLASSES list.
1115         * method.c (do_build_copy_constructor): Likewise.
1116         * rtti.c (get_base_offset): Use binfo_for_vbase.
1117         (expand_class_desc): Remove #if 0'd code.
1118         * search.c (struct vbase_info): Remove vbase_types.
1119         (get_base_distance):  Use binfo_for_vbase.
1120         (lookup_field_queue_p): Use CANONICAL_BINFO.
1121         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
1122         (get_pure_virtuals): Adjust for changes to the
1123         CLASSTYPE_VBASECLASSES list.
1124         (dfs_find_vbases): Use binfo_for_vbase.
1125         (dfs_init_vbase_pointers): Likewise.
1126         (init_vbase_pointers): Don't initialize vi.vbase_types.
1127         (virtual_context): Use binfo_for_vbase.
1128         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
1129         CLASSTYPE_VBASECLASSES list.
1130         (expand_indirect_vtbls_init): Simplify.
1131         (dfs_get_vbase_types): Don't replicate virtual bases.
1132         (find_vbase_instance): Use binfo_for_vbase.
1133         (binfo_for_vbase): New function.
1134         * typeck.c (get_delta_difference): Use binfo_for_vbase.
1135         
1136 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
1137
1138         * decl2.c (finish_anon_union): Generalize error messages to handle
1139         anonymous structures.
1140         * init.c (perform_member_init): Remove `name' parameter.
1141         (build_field_list): New function.
1142         (sort_member_init): Handle anonymous union initialization order
1143         correctly.  Check for multiple initializations of the same union.
1144         (emit_base_init): Don't look up fields by name here.
1145         (expand_member_init): Record the result of name lookup for future
1146         reference.
1147         * typeck.c (build_component_ref): Fix formatting.
1148         
1149 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1150
1151         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
1152         * typeck.c (build_x_compound_expr): Replace warn_unused with
1153         warn_unused_value.
1154
1155         * decl2.c (lang_decode_option): Update -Wall unused flags by
1156         calling set_Wunused.
1157
1158 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
1159
1160         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
1161         * init.c (dfs_vtable_path_unmark): Remove.
1162         * search.c (marked_new_vtable_p): Likewise.
1163         (unmarked_new_vtable_p): Likewise.
1164         (dfs_search_slot_nonempty_p): Likewise.
1165         (dfs_mark): Likewise.
1166         (dfs_vtable_path_unmark): Likewise.
1167         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
1168         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
1169         (dfs_init_vbase_pointers): Remove special-case new ABI code.
1170         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
1171         (init_vbase_pointers): Simplify.
1172         (expand_indirect_vtbls_init): Likewise.
1173
1174         * class.c (copy_virtuals): New function.
1175         (build_primary_table): Use it.
1176         (build_secondary_vtable): Likewise.
1177         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
1178         indicate that no vcall offset is required.
1179         (add_virtual_function): Likewise.
1180         (modify_all_vtables): Likewise.
1181         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1182         (dfs_accumulate_vtbl_inits): Likewise.
1183         (build_vtbl_initializer): Make changes to handle construction
1184         vtables.
1185         (dfs_build_vcall_offset_vtbl_entries): Likewise.
1186         (build_rtti_vtbl_entries): Likewise.
1187         (build_vtable_entries): Handle a NULL vcall_index.
1188
1189 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
1190
1191         * decl2.c (lang_decode_option): Fix thinko.
1192
1193 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
1194
1195         * except.c (check_handlers): New fn.
1196         * cp-tree.h: Declare it.
1197         * semantics.c (finish_handler_sequence): Call it.
1198         (finish_function_handler_sequence): Likewise.
1199         (finish_handler_parms): Set TREE_TYPE on the handler.
1200         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
1201         * search.c (get_base_distance_recursive): If protect>1, ignore
1202         special access.
1203         (get_base_distance): Don't reduce watch_access.
1204
1205 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
1206
1207         * lex.c: #include diagnostic.h.
1208         (lang_init_options): Set default prefixing rules.
1209
1210         * lang-options.h: Add -fdiagnostics-show-location=.
1211         
1212         * decl2.c: #include diagnostic.h.
1213         (lang_decode_option): Handle -fdiagnostics-show-location=.
1214
1215 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
1216
1217         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
1218         * vec.cc: Revert my 2000-05-07 change.
1219
1220 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
1221
1222         * class.c (check_field_decls): Complain about non-static data
1223         members with same name as class in class with constructor.
1224
1225 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
1226
1227         * decl.c (grokdeclarator): Allow non-static data members with
1228         same name as class.
1229
1230 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
1231
1232         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
1233         and pending_inline.filename.  Update prototypes.
1234         * decl.c (define_label): Constify filename parameter.
1235         * decl2.c (warn_if_unknown_interface): Constify local char *.
1236         * input.c Constify input_source.filename. Don't declare
1237         input_filename or lineno.  Constify filename parameter to feed_input.
1238         * lex.c (init_parse): Constify parameter and return value.
1239         (cp_pragma_interface, cp_pragma_implementation): Constify
1240         filename argument.
1241         (reinit_parse_for_method, reinit_parse_for_block,
1242         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
1243         Constify local char *.
1244         * pt.c: Don't declare lineno or input_filename.
1245         (print_template_context, tsubst_friend_function, tsubst_decl,
1246         tsubst, instantiate_decl): Constify local char *.
1247         * semantics.c (expand_body): Constify local char *.
1248         * tree.c (build_srcloc): Constify filename parameter.
1249         * typeck.c (c_expand_asm_operands): Constify filename
1250         parameter.
1251
1252 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
1253
1254         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
1255         offsetof expansion.
1256
1257 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
1258
1259         * inc/cxxabi.h:  Fix typos in comment.
1260         (__base_class_info::__offset): Use a static_cast.
1261
1262 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
1263
1264         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
1265         of std::size_t and std::ptrdiff_t respectively.
1266         * tinfo.cc: Likewise.
1267         * vec.cc: Likewise.
1268
1269 2000-05-06  Richard Henderson  <rth@cygnus.com>
1270
1271         * typeck.c (build_c_cast): Don't warn integer->pointer size
1272         mismatch for constants.
1273
1274 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
1275
1276         * rtti.c (ptmd_initializer): Set non-public, if class is
1277         incomplete.
1278         
1279         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
1280         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1281         __cxa_vec_delete): Likewise.
1282         * tinfo.cc (__dynamic_cast): Likewise.
1283         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1284         __cxa_vec_delete): Likewise.
1285
1286 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
1287
1288         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
1289         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
1290         (lang_decl_flags): Add vcall_offset.
1291         (THUNK_VCALL_OFFSET): Use it.
1292         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
1293         * method.c (make_thunk): Create the lang_decl here, not in
1294         emit_thunk.
1295         (emit_thunk): Make generic thunks into ordinary functions once
1296         they have been fed to expand_body.
1297         * semantics.c (expand_body): Set current_function_is_thunk here.
1298
1299 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1300
1301         * class.c (update_vtable_entry_for_fn): Prototype.
1302
1303         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
1304         and `tmpl'.
1305
1306         * search.c (dfs_build_inheritance_graph_order): Prototype.
1307
1308 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
1309
1310         * cp-tree.h (special_function_kind): Add various kinds of
1311         destructors.
1312         (special_function_p): New function.
1313         * class.c (overrides): Don't let one kind of destructor override
1314         another.
1315         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
1316         whether or not to instantiate a template.
1317         * tree.c (special_function_p): Define.
1318
1319 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
1320
1321         * cp-tree.def (THUNK_DECL): Remove.
1322         * cp-tree.h (DECL_THUNK_P): New macro.
1323         (DECL_NON_THUNK_FUNCTION_P): Likewise.
1324         (DECL_EXTERN_C_FUNCTION_P): Likewise.
1325         (SET_DECL_THUNK_P): Likewise.
1326         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
1327         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
1328         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
1329         * decl.c (decls_match): Use DECL_EXTERN_C_P.
1330         (duplicate_decls): Likewise.
1331         (pushdecl): Likewise.  Adjust thunk handling.
1332         (grokfndecl): Use DECL_EXTERN_C_P.
1333         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
1334         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
1335         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
1336         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
1337         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
1338         DECL_NO_STATIC_CHAIN.
1339         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
1340         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
1341         * search.c (covariant_return_p): Remove THUNK_DECL handling.
1342         * ir.texi: Update.
1343         
1344 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
1345
1346         * tree.c (walk_tree): Set lineno.
1347
1348 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
1349
1350         * exception.cc: Update license notice.
1351         * new.cc: Likewise.
1352         * new1.cc: Likewise.
1353         * new2.cc: Likewise.
1354         * tinfo.cc: Likewise.
1355         * tinfo2.cc: Likewise.
1356         * vec.cc: Likewise.
1357         * inc/cxxabi.h: Likewise.
1358         * inc/exception: Likewise.
1359         * inc/new: Likewise.
1360         * inc/new.h: Likewise.
1361         * inc/typeinfo: Likewise.
1362
1363 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
1364
1365         * tree.c (build_target_expr_with_type): If we already have a
1366         TARGET_EXPR, just return it.
1367
1368         * optimize.c (initialize_inlined_parameters): Don't generate an
1369         EXPR_STMT if we can just use DECL_INITIAL.
1370         * decl.c (emit_local_var): Only make the initialization a
1371         full-expression if stmts_are_full_exprs_p.
1372
1373 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
1374
1375         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
1376         macro.
1377         * call.c (standard_conversion): Use it.
1378         (direct_reference_binding): Likewise.
1379         (build_over_call): Likewise.
1380         (is_properly_derived_from): Likewise.
1381         (compare_ics): Likewise.
1382         * class.c (resolves_to_fixed_type_p): Likewise.
1383         * optimize.c (declare_return_variable): Likewise.
1384         * pt.c (is_specialization_of): Likewise.
1385         (unify): Likewise.
1386         * typeck.c (comp_target_parms): Likeiwse.
1387         (build_static_cast): Likewise.
1388         (build_reinterpret_cast): Likewise.
1389         (build_const_cast): Likewise.
1390         (comp_ptr_ttypes_real): Likewise.
1391         (comp_ptr_ttypes_const): Likewise.
1392         * typeck2.c (process_init_constructor): Likewise.
1393
1394 2000-04-30  Scott Snyder <snyder@fnal.gov>
1395
1396         * decl.c (finish_destructor_body): Use the base destructor when
1397         destroying virtual bases.
1398
1399 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
1400
1401         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
1402         STMT_EXPRs.
1403         * optimize.c (struct inline_data): Add target_exprs field.
1404         (declare_return_variable): When a function returns an aggregate,
1405         use the variable declared in the TARGET_EXPR as the remapped
1406         DECL_RESULT.
1407         (expand_call_inline): Update the pending target_exprs stack.
1408         (optimize_function): Initialize the stack.
1409         
1410         * decl2.c (finish_file): Fix typo in comment.
1411
1412         * method.c (emit_thunk): Don't try to return a `void' value.
1413
1414         * optimize.c (initialize_inlined_parameters): If the parameter is
1415         addressable, we need to make a new VAR_DECL, even if the
1416         initializer is constant.
1417
1418 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
1419
1420         * decl.c (grok_op_properties): Add an extra check of argtypes.
1421
1422 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
1423
1424         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
1425         variables.
1426         (initialize_inlined_parameters): Try to avoid creating new
1427         VAR_DECLs.
1428
1429 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
1430
1431         * lex.c (my_get_run_time): Remove.
1432         (init_filename_times): Use get_run_time instead of my_get_run_time.
1433         (check_newline): Likewise.
1434         (dump_time_statistics): Likewise.
1435         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
1436         of computing elapsed time explicitly.
1437
1438 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
1439
1440         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
1441         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
1442         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
1443         before calling decl_constant_value.
1444         * class.c (check_bitfield_decl): Likewise.
1445         * cvt.c (ocp_convert): Likewise.
1446         (convert): Likewise.
1447         * decl.c (compute_array_index_type): Likewise.
1448         (build_enumerator): Likewise.
1449         * decl2.c (check_cp_case_value): Likewise.
1450         * pt.c (convert_nontype_argument): Likewise.
1451         (tsubst): Likewise.
1452         * typeck.c (decay_conversion): Likewise.
1453         (build_compound_expr): Likewise.
1454         (build_reinterpret_cast): Likewise.
1455         (build_c_cast): Likewise.
1456         (convert_for_assignment): Likewise.
1457         
1458 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
1459
1460         * decl.c (finish_function): Don't play games with DECL_INLINE.
1461
1462 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
1463
1464         * ir.texi: Correct typo.
1465
1466 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1467
1468         * decl.c (grokdeclarator): Reject VLAs as members.
1469
1470 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
1471
1472         * call.c (standard_conversion): Accept conversion between
1473         COMPLEX_TYPEs.
1474
1475         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
1476
1477 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
1478
1479         * decl2.c (finish_file): Remove double setup for accounting
1480         compile time.
1481
1482 2000-04-24  Robert Lipe <robertlipe@usa.net>
1483
1484         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
1485
1486 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
1487
1488         * new.cc (set_new_handler): Needs to be in std::.
1489
1490 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
1491
1492         * cp-tree.h (lang_decl): Remove pretty_function_p.
1493         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
1494         language-specific node.
1495         * decl.c (cp_make_fname_decl): Use build_decl, not
1496         build_lang_decl, to build the variables.
1497         (grokvardecl): Don't call build_lang_decl for local variables in
1498         templates.
1499         (grokdeclarator): Don't call build_lang_decl for local type
1500         declarations in templates.
1501         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
1502         zero'd memory, rather than calling memset.
1503         * pt.c: Include hashtab.h.
1504         (local_specializations): New variable.
1505         (retrieve_local_specialization): Use it.
1506         (register_local_specialization): Likewise.
1507         (tsubst_decl): Don't assume local variables have
1508         DECL_LANG_SPECIFIC.
1509         (instantiate_decl): Set up local_specializations.
1510         * Makefile.in (HTAB_H): New variable.
1511
1512 2000-04-23  Richard Henderson  <rth@cygnus.com>
1513
1514         * typeck.c (c_expand_asm_operands): Restore the original
1515         contents of the output list.
1516
1517 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
1518
1519         * ir.texi:  Document complex number representation.
1520         
1521 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1522
1523         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
1524         (target_incomplete_p): New function.
1525         (tinfo_base_init): Create comdat NTBS name variable.
1526         (ptr_initializer): Add non_public parameter. Calculate it.
1527         (ptmd_initializer): Likewise.
1528         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
1529         (create_real_tinfo_var): Add non_public parameter. Use it.
1530         Push proxy into global namespace.
1531         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
1532         New enumeration.
1533         * inc/typeinfo (type_info::before, type_info::operator==):
1534         Compare __name addresses.
1535         
1536         * tinfo2.cc: Remove new-abi builtins comment.
1537
1538 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
1539
1540         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
1541
1542         * call.c (joust): Exit early if we get the same function, too.
1543
1544         * decl2.c (key_method): Return NULL_TREE for template classes.
1545         (import_export_class): Don't need to check for template classes.
1546
1547 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
1548
1549         * lex.c: Remove references to cccp.c.
1550
1551 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
1552
1553         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
1554         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
1555         (DECL_DESTRUCTOR_P): Use destructor_attr.
1556         (DECL_CONST_MEMFUNC_P): Reimplement.
1557         (DECL_VOLATILE_MEMFUNC_P): Remove.
1558         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
1559         (overrides): Use DECL_DESTRUCTOR_P.
1560         (check_for_override): Likewise.
1561         * decl.c (start_function): Likewise.
1562         * decl2.c (grokfclassfn): Likewise.
1563         (check_classfn): Likewise.
1564         (grok_function_init): Likewise.
1565
1566 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
1567
1568         * decl2.c (grokfield): Issue error on illegal data member
1569         declaration.
1570
1571 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
1572
1573         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
1574
1575 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
1576
1577         * class.c (build_vtable_entry): Don't build thunks for type-info
1578         functions.
1579
1580 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
1581
1582         * decl.c (decls_match): Allow a redeclaration of a builtin to
1583         specify args while the builtin did not.
1584
1585 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
1586
1587         * cp-tree.def (THUNK_DECL): Add to documentation.
1588         * cp-tree.h (flag_huge_objects): Declare.
1589         * class.c (modify_vtable_entry): Tidy.
1590         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
1591         Calculate delta appropriately for the new ABI.
1592         (dfs_modify_vtables): Use it.
1593         (modify_all_vtables): Fix thinko in code to add overriding copies
1594         of functions to primary vtables.
1595         (build_clone): Fix typo in comment.
1596         (clone_function_decl): Correct order of destructors in vtable.
1597         (build_vbase_offset_vtbl_entries): Adjust comment.
1598         (dfs_vcall_offset_queue_p): Remove.
1599         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
1600         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
1601         (build_vtable_entry): Correct check for pure virtual functions.
1602         Don't declare flag_huge_objects.
1603         * decl.c (flag_huge_objects): Remove declaration.
1604         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
1605         Use int_size_in_bytes.
1606         (emit_thunk): Handle vcall offset thunks.
1607         
1608 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1609
1610         * decl2.c (parse_time, varconst_time): Delete declarations.
1611         (finish_file): Delete LINENO declaration.
1612         START_TIME and THIS_TIME now long.
1613
1614 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
1615
1616         * class.c (build_base_field): Reformat comment.
1617         
1618         * inc/cxxabi.h (stddef.h): Comment inclusion.
1619         (__base_class_info::__offset): Comment shift.
1620
1621 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
1622
1623         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
1624         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
1625         (cp_push_exception_identifier): New macro.
1626         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
1627         (DECL_BASE_DESTRUCTOR_P): Likewise.
1628         (DECL_DELETING_DESTRUCTOR_P): Likewise.
1629         (get_vtbl_decl_for_binfo): Fix formatting.
1630         (in_charge_arg_for_name): New macro.
1631         (maybe_build_cleanup_and_delete): Remove declaration.
1632         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
1633         (in_charge_arg_for_name): New function.
1634         (build_new_method_call): Use it.  Handle cloned destructors.
1635         (build_clone): Don't make the base constructor virtual.
1636         Automatically defer generated functions.
1637         (clone_function_decl): Handle destructors, too.
1638         (clone_constructors_and_destructors): Likewise.
1639         (create_vtable_ptr): Don't create a vtable entry for a cloned
1640         function.
1641         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
1642         (initialize_predefined_identifiers): Update appropriately.
1643         (finish_destructor_body): Simplify.
1644         (maybe_build_cleanup_and_delete): Remove.
1645         * except.c (expand_throw): Handle new-ABI destructors.
1646         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
1647         (build_dtor_call): New function.
1648         (build_delete): Use it.  Simplify.
1649         * optimize.c (maybe_clone_body): Handle destructors.
1650         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
1651         
1652         * exception.cc (cleanup_fn): New typedef.
1653         (CALL_CLEANUP): New macro.
1654         (cp_eh_info): Use them.
1655         (__cp_push_exception): Likewise.
1656         (__cp_pop_exception): Likewise.
1657         
1658 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
1659
1660         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
1661         (complete_dtor_identifier): New macro.
1662         (CLASSTYPE_FIRST_CONVERSION): Remove.
1663         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
1664         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
1665         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
1666         (CLASSTYPE_CONSTRUCTORS): Likewise.
1667         (CLASSTYPE_DESTRUCTORS): Likewise.
1668         (lang_decl): Add cloned_function.
1669         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
1670         (DECL_BASE_CONSTRUCTOR_P): Likewise.
1671         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
1672         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
1673         (DECL_CLONED_FUNCTION_P): Likewise.
1674         (DECL_CLONED_FUNCTION): Likewise.
1675         (clone_function_decl): Declare.
1676         (maybe_clone_body): Likewise.
1677         * call.c (build_user_type_conversion_1): Call complete object
1678         constructors in the new ABI.
1679         (build_new_method_call): Don't add in-charge parameters under the
1680         new ABI.
1681         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
1682         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
1683         CLASSTYPE_DESTRUCTOR_SLOT.
1684         (build_clone): New function.
1685         (clone_function_decl): Likewise.
1686         (clone_constructors_and_destructors): Likewise.
1687         (check_bases_and_members): Use it.
1688         * decl.c (iniitialize_predefined_identifiers): Initialize
1689         complete_dtor_identifier.
1690         (finish_function): Don't add extra code to a clone.
1691         (lang_mark_tree): Mark cloned_function.
1692         * decl2.c (mark_used): Don't bother trying to instantiate things
1693         we synthesized.
1694         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
1695         * method.c (set_mangled_name_for_decl): Don't treat clones as
1696         constructors.
1697         (synthesize_method): Sythesize cloned functions, not the clones.
1698         * optimize.c (inline_data): Update comment on ret_label.
1699         (remap_block): Don't assume DECL_INITIAL exists.
1700         (copy_body_r): Allow ret_label to be NULL.
1701         (maybe_clone_body): Define.
1702         * pt.c (tsubst_decl): Handle clones.
1703         (instantiate_clone): New function.
1704         (instantiate_template): Use it.
1705         (set_mangled_name_for_template_decl): Don't treat clones as
1706         constructors.
1707         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
1708         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
1709         * semantics.c (expand_body): Clone function bodies as necessary.
1710         
1711         * optimize.c (remap_decl): Avoid sharing structure for arrays
1712         whose size is only known at run-time.
1713         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
1714
1715         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
1716         to has_in_charge_parm_p.
1717         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
1718         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
1719         (DECL_COPY_CONSTRUCTOR_P): New macro.
1720         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
1721         (build_user_type_conversion_1): Likewise.
1722         (convert_like_real): Likewise.
1723         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
1724         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
1725         (copy_args_p): Likewise.
1726         (grok_ctor_properties): Likewise.
1727         (start_function): Likewise.
1728         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
1729         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
1730         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
1731         * method.c (do_build_copy_constructor): Use
1732         DECL_HAS_IN_CHARGE_PARM_P.
1733         (synthesize_method): Likewise.
1734         * pt.c (instantiate_template): Remove goto.
1735         * tree.c (build_cplus_method_type): Remove mention of obstacks in
1736         comment.
1737         
1738         * cp-tre.h (finish_function): Change prototype.
1739         * decl.c (end_cleanup_fn): Adjust caller.
1740         (finish_function): Take only one parameter.
1741         * decl2.c (finish_objects): Adjust caller.
1742         (finish_static_storage_duration_function): Likewise.
1743         * method.c (emit_thunk): Likewise.
1744         * parse.y: Likewise.
1745         * parse.c: Regenerated.
1746         * pt.c (instantiate_decl): Likewise.
1747         * rtti.c (synthesize_tinfo_fn): Likewise.
1748         * semantics.c (expand_body): Likewise.
1749
1750         * cp-tree.h (copy_decl): New function.
1751         * class.c (finish_struct_1): Use it.
1752         * lex.c (copy_decl): Define it.
1753         * pt.c (tsubst_decl): Likewise.
1754         * tree.c (copy_template_template_parm): Likewise.
1755         
1756         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
1757         has_nonpublic_assign_ref.
1758         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
1759         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
1760         * class.c (finish_struct_methods): Don't set
1761         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
1762         (interface_only): Don't declare.
1763         (interface_unknown): Likewise.
1764
1765 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1766
1767         * tree.h (HAVE_TEMPLATES): Remove definition.
1768         * lang-options.h (-fthis-is-variable): Remove documentation.
1769
1770 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
1771
1772         * class.c (instantiate_type): Handle object-relative template-id.
1773
1774         * semantics.c (finish_expr_stmt): Call convert_to_void here.
1775         * decl.c (cplus_expand_expr_stmt): Not here.
1776
1777         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
1778         Initialize exprtype earlier.
1779
1780         * parse.y (fn.def1): Check for defining types in return types.
1781
1782         * decl.c (check_tag_decl): Notice extra fundamental types.
1783         Diagnose empty decls in classes, too.
1784
1785         * decl.c (grokdeclarator): Don't override an anonymous name if no 
1786         declarator was given.
1787
1788         * cvt.c (convert_to_void): Call resolve_offset_ref.
1789
1790         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
1791
1792         * decl2.c (decl_namespace): Handle getting a type.
1793
1794         * typeck.c (build_c_cast): Re-enable warning for cast between
1795         pointer and integer of different size.
1796
1797 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
1798
1799         * inc/cxxabi.h (__pointer_type_info): Add restrict and
1800         incomplete flags.
1801         (__pointer_type_info::__pointer_catch): New virtual function.
1802         (__pointer_to_member_type_info): Derive from
1803         __pointer_type_info. Adjust.
1804         (__pointer_to_member_type_info::__do_catch): Remove.
1805         (__pointer_to_member_type_info::__is_pointer_p): Declare.
1806         (__pointer_to_member_type_info::__pointer_catch): Declare.
1807         * rtti.c (qualifier_flags): Add restrict flag.
1808         (ptmd_initializer): Reorder members.
1809         (create_tinfo_types): Expand comments. Reorder
1810         ptmd_desc_type_node members.
1811         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
1812         Implement.
1813         (__pointer_type_info::__do_catch): Move specific code into
1814         __pointer_catch. Call it.
1815         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
1816         specific catch checking. Fix void conversion check.
1817         (__pointer_to_member_type_info::__do_catch): Remove.
1818         (__pointer_to_member_type_info::__pointer_catch): Implement.
1819         
1820 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1821
1822         * lex.c (init_parse): Remove traces of classof and headof.
1823         * decl2.c (flag_operator_names): Default to 1.
1824         (lang_decode_option): Do not set it for -ansi.
1825
1826 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
1827
1828         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
1829         (DECL_MAIN_VARIANT): Remove.
1830         * decl.c (duplicate_decls): Don't set it.
1831         (start_function): Likewise.
1832         (lang_mark_tree): Don't mark it.
1833         * decl2.c (defer_fn): Don't use it.
1834         * lex.c (retrofit_lang_decl): Don't set it.
1835         * pt.c (tsubst_decl): Likewise.
1836         * ptree.c (print_lang_decl): Don't print it.
1837         * typeck.c (mark_addressable): Don't use it.
1838         
1839 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
1840
1841         * vec.cc: Include <new> and <exception>.
1842         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
1843         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
1844         terminate.
1845         (__cxa_vec_delete): Catch dtor exceptions.
1846
1847 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
1848
1849         Prepend __ to implementation defined names.
1850         * inc/typeinfo (type_info): Rename _name to __name.
1851         (type_info::type_info): Rename parameter.
1852         (type_info::operator==, type_info::operator!=,
1853         type_info::before): Likewise.
1854         (type_info::is_pointer_p, type_info::is_function_p,
1855         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
1856         parameters.
1857         * inc/cxxabi.h
1858         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
1859         (__pointer_type_info::__pointer_type_info): Likewise.
1860         (__pointer_type_info::is_pointer_p,
1861         __pointer_type_info::do_catch): Prepend __. Rename parameters.
1862         (__array_type_info::__array_type_info): Rename parameters.
1863         (__function_type_info::__function_type_info): Likewise.
1864         (__function_type_info::is_function_p): Prepend __.
1865         (__enum_type_info::__enum_type_info): Rename parameters.
1866         (__pointer_to_member_type_info::__pointer_to_member_type_info):
1867         Likewise.
1868         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
1869         parameters.
1870         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
1871         (__class_type_info::__class_type_info): Rename parameters.
1872         (__class_type_info::sub_kind): Prepend __. Adjust member names.
1873         (__class_type_info::upcast_result,
1874         __class_type_info::dyncast_result): Prepend __. Move definition
1875         into tinfo.cc.
1876         (__class_type_info::do_upcast, __class_type_info::do_catch,
1877         __class_type_info::find_public_src,
1878         __class_type_info::do_dyncast,
1879         __class_type_info::do_find_public_src): Prepend __. Rename
1880         parameters.
1881         (__si_class_type_info::__si_class_type_info): Rename parameters.
1882         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
1883         __si_class_type_info::do_find_public_src): Prepent __. Rename
1884         parameters.
1885         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
1886         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
1887         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
1888         parameters.
1889         (__dynamic_cast): Rename parameters.
1890         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
1891         type_info::do_catch, type_info::do_upcast): Prepend __.
1892         (contained_p, public_p, virtual_p, contained_public_p,
1893         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
1894         (__class_type_info::do_catch,
1895         __class_type_info::do_upcast): Prepend __. Adjust.
1896         (__class_type_info::__upcast_result,
1897         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
1898         Adjust.
1899         (__class_type_info::find_public_src): Prepend __. Adjust.
1900         (__class_type_info::do_find_public_src, 
1901         __si_class_type_info::do_find_public_src, 
1902         __vmi_class_type_info::do_find_public_src): Likewise.
1903         (__class_type_info::do_dyncast,
1904         __si_class_type_info::do_dyncast,
1905         __vmi_class_type_info::do_dyncast): Likewise.
1906         (__class_type_info::do_upcast,
1907         __si_class_type_info::do_upcast,
1908         __vmi_class_type_info::do_upcast): Likewise.
1909         (__dynamic_cast): Adjust.
1910         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
1911         (__function_type_info::is_function_p): Likewise.
1912         (__pointer_type_info::do_catch): Likewise. Adjust.
1913         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
1914         (__throw_type_match_rtti_2): Adjust.
1915         (__is_pointer): Adjust.
1916
1917 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
1918
1919         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
1920         (complete_ctor_identifier): New macro.
1921         (special_function_kind): Add sfk_copy_constructor and
1922         sfk_assignment_operator.
1923         (LOOKUP_HAS_IN_CHARGE): Remove.
1924         (cons_up_default_function): Rename to ...
1925         (implicitly_declare_fn): ... this.
1926         * call.c (build_new_method_call): Add in-charge parameters for
1927         constructors here.
1928         * class.c (add_implicitly_declared_members): Change parameter name
1929         from cant_have_assignment to cant_have_const_assignment.
1930         Replace calls to cons_up_default_function to implicitly_declare_fn.
1931         * cvt.c (ocp_convert): Use complete_ctor_identifier.
1932         * decl.c (initialize_predefined_identifiers): Initialize it.
1933         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
1934         complex expression.
1935         * init.c (expand_default_init): Don't calculate the in-charge
1936         parameter here.
1937         (build_new_1): Likewise.
1938         * lex.c (cons_up_default_function): Move to method.c.
1939         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
1940         (implicitly_declare_fn): New function.
1941         * typeck.c (build_static_cast): Use complete_ctor_identifier.
1942         (build_modify_expr): Likewise.
1943         * typeck2.c (build_functional_cast): Likewise.
1944         
1945         Under the new ABI, constructors don't return `this'.
1946         * cp-tree.h (warn_reorder): Declare.
1947         (special_function_kind): New enum.
1948         (global_base_init_list): Remove declaration.
1949         (emit_base_init): Don't return a value.
1950         (check_base_init): Don't declare.
1951         (is_aggr_typedef): Likewise.
1952         * decl.c (check_special_function_return_type): New function.
1953         (return_types): Remove.
1954         (grokdeclarator): Use check_special_function_return_type.
1955         (start_function): Don't initialize ctor_label under the new ABI.
1956         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
1957         * init.c (begin_init_stmts): Move to top of file.
1958         (finish_init_stmts): Likewise.
1959         (warn_reorder): Don't declare.
1960         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
1961         value.
1962         (check_base_init): Remove.
1963         (is_aggr_typedef): Likewise.
1964         (build_new_1): Don't use the return value of a constructor.
1965         * semantics.c (setup_vtbl_ptr): Don't use the return value
1966         of emit_base_init.
1967         * typeck.c (check_return_expr): Don't magically convert return
1968         statements into `return this' in constructors under the new ABI.
1969         
1970         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
1971         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
1972         (base_ctor_identifier): New macro.
1973         (base_dtor_identifier): Likewise.
1974         (deleting_dtor_identifier): Likewise.
1975         * decl.c: Don't include obstack.h.
1976         (obstack_chunk_alloc): Don't define.
1977         (obstack_chunk_free): Likewise.
1978         (struct predefined_identifier): New type.
1979         (initialize_predefined_identifiers): New function.
1980         (init_decl_processing): Use it.
1981         (debug_temp_inits): Remove.
1982         (start_method): Don't call preserve_data.
1983         (hack_incomplete_structures): Update comment.
1984         * init.c (init_init_processing): Don't initialize
1985         nelts_identifier.
1986         (build_offset_rf): Remove dead code.
1987         (build_delete): Use CLASSTYPE_N_BASECLASSES.
1988         * search.c (init_search_processing): Don't initialize
1989         vptr_identifier.
1990         
1991 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1992
1993         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
1994         some sign_compare warnings.
1995
1996 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
1997
1998         Rename abi::__vmi_class_type_info members.
1999         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
2000         base_list, detail_masks members to vmi_flags, vmi_base_count,
2001         vmi_bases and vmi_flags_masks respectively.
2002         (__vmi_class_type_info::vmi_flags_masks): Rename
2003         details_unknown_mask to flags_unknown_mask.
2004         * tinfo.cc (__class_type_info::do_upcast): Adjust.
2005         (__vmi_class_type_info::do_find_public_src): Adjust.
2006         (__vmi_class_type_info::do_dyncast): Adjust.
2007         (__vmi_class_type_info::do_upcast): Adjust.
2008         
2009 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
2010
2011         * tinfo.cc (convert_to_base): New function.
2012         (get_vbase_offset): Remove. Move into convert_to_base.
2013         (__vmi_class_type_info::do_find_public_src): Adjust.
2014         (__vmi_class_type_info::do_dyncast): Adjust.
2015         (__vmi_class_type_info::do_upcast): Adjust.
2016
2017 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
2018
2019         * tinfo.cc (operator=): Use __builtin_strcmp.
2020         * tinfo2.cc (before): Likewise.
2021
2022 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
2023
2024         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
2025         (DECL_SAVED_INLINE): Rename to ...
2026         (DECL_DEFERRED_FN): ... this.
2027         (in_function_p): Remove declaration.
2028         (mark_inline_for_output): Rename to ... 
2029         (defer_fn): ... this.
2030         * decl.c (finish_function): Adjust call to mark_inline_for_output.
2031         (in_function_p): Remove definition.
2032         * decl2.c (saved_inlines): Rename to ...
2033         (deferred_fns): ... this.
2034         (saved_inlines_used): Rename to ...
2035         (deferred_fns_used): ... this.
2036         (mark_inline_for_output): Rename to ...
2037         (defer_fn): ... this.
2038         (finish_file): Adjust accordingly.
2039         (init_decl2): Likewise.
2040         * lex.c (cons_up_default_function): Likewise.
2041         * pt.c (mark_decl_instantiated): Likewise.
2042         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
2043         circumstances.
2044         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
2045         * semantics.c (expand_body): Defer more functions.
2046
2047 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
2048
2049         * vec.cc: New file.
2050         * Make-lang.in (CXX_LIB2FUNCS): Add it.
2051         (vec.o): Build it.
2052         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2053         __cxa_vec_delete): Declare.
2054
2055 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
2056
2057         * rtti.c (dfs_class_hint_mark): New static function.
2058         (dfs_class_hint_unmark): New static function.
2059         (class_hint_flags): Use them.
2060
2061 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
2062
2063         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
2064
2065 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
2066
2067         * cp-tree.h (instantiate_decl): Change prototype.
2068         * decl2.c (mark_used): Adjust call.
2069         * optimize.c (inlinable_function_p): Adjust handling of templates.
2070         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
2071         (do_type_instantiation): Likewise.
2072         (instantiate_decl): Defer more templates.
2073         (instantiate_pending_templates): Adjust logic to handle inline
2074         friend functions.
2075
2076         * Makefile.in (GGC_H): New variable.  Use it throughout in place
2077         of ggc.h.
2078         
2079         * call.c: Don't include obstack.h.  Include ggc.h.
2080         (obstack_chunk_alloc): Don't define.
2081         (obstack_chunk_free): Likewise.
2082         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
2083         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
2084         (pop_switch): Free it.
2085
2086         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
2087
2088         * dump.c (dequeue_and_dump): Don't try to print the bit_position
2089         if we don't have a DECL_FIELD_OFFSET.
2090
2091 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
2092
2093         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
2094         special_function_p.
2095
2096 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2097
2098         * cfns.gperf (hash, libc_name_p): Prototype.
2099
2100         * rtti.c (build_dynamic_cast_1): Constification.
2101
2102         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
2103
2104         * semantics.c (deferred_type_access_control): Prototype.
2105
2106 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
2107
2108         Correct many new ABI issues regarding vbase and vcall offset
2109         layout.
2110         * cp-tree.h (BINFO_VTABLE): Document.
2111         (struct lang_type): Tweak formatting.
2112         (BINFO_PRIMARY_BINFO): Add to documentation.
2113         (CLASSTYPE_VSIZE): Fix typo in comment.
2114         (CLASSTYPE_VBASECLASSES): Update documentation.
2115         (BINFO_VBASE_MARKED): Remove.
2116         (SET_BINFO_VBASE_MARKED): Likewise.
2117         (CLEAR_BINFO_VBASE_MARKED): Likewise.
2118         (BINFO_FIELDS_MARKED): Remove.
2119         (SET_BINFO_FIELDS_MARKED): Likewise.
2120         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
2121         (enum access_kind): New enumeration.
2122         (num_extra_vtbl_entries): Remove declaration.
2123         (size_extra_vtbl_entries): Likewise.
2124         (get_vtbl_decl_for_binfo): New function.
2125         (dfs_vbase_unmark): Remove declaration.
2126         (mark_primary_bases): Likewise.
2127         * class.c (SAME_FN): Remove.
2128         (struct vcall_offset_data_s): Move definition.
2129         (build_vbase_pointer): Use `build', not `build_binary_op', to
2130         access the vbase pointer under the new ABI.
2131         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
2132         (build_primary_vtable): Likewise.
2133         (dfs_mark_primary_bases): Move here from search.c.
2134         (mark_primary_bases): Likewise.
2135         (determine_primary_bases): Under the new ABI, don't make a base
2136         class a primary base just because we don't yet have any virtual
2137         functions.
2138         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
2139         (num_vfun_entries): Remove.
2140         (dfs_count_virtuals): Likewise.
2141         (num_extra_vtbl_entries): Likewise.
2142         (size_extra_vtbl_entries): Likewise.
2143         (layout_virtual_bases): Iterate in inheritance graph order under
2144         the new ABI.
2145         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
2146         indicate that a vfield is present.
2147         (init_class_processing): Initialize access_public_node, etc., from
2148         ak_public, etc.
2149         (get_vtbl_decl_for_binfo): New function.
2150         (dump_class_hierarchy_r): Likewise.
2151         (dump_class_hierarchy): Use it.
2152         (finish_vtbls): Build the vtbls in inheritance graph order.
2153         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2154         (initialize_vtable): Use get_vtbl_decl_for_binfo.
2155         (accumulate_vtbl_inits): Add comments explaining why a pre-order
2156         walk is required.
2157         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
2158         where the vptr points, even for primary vtables.
2159         (build_vtbl_initializer): Adjust handling of vbase and vcall
2160         offsets.
2161         (build_vcall_and_vbase_vtable_entries): New function.
2162         (dfs_build_vbase_offset_vtbl_entries): Remove.
2163         (build_vbase_offset_vtbl_entries): Reimplement.
2164         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
2165         were already handled in a primary base class vtable.
2166         (build_vcall_offset_vtbl_entries): Adjust.
2167         (build_rtti_vtbl_entries): Adjust.
2168         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
2169         * init.c (expand_virtual_init): Simplify.
2170         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
2171         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
2172         * search.c (BINFO_ACCESS): New macro.
2173         (SET_BINFO_ACCESS): Likewise.
2174         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
2175         (access_in_type): Likewise.
2176         (dfs_accessible_p): Likewise.
2177         (protected_accessible_p): Likewise.
2178         (lookup_fnfields_1): Adjust documentation.
2179         (dfs_mark_primary_bases): Move to class.c
2180         (mark_primary_bases): Likewise.
2181         (dfs_vbase_unmark): Remove.
2182         (virtual_context): Use BINFO_FOR_VBASE.
2183         (dfs_get_vbase_types): Simplify.
2184         (dfs_build_inheritance_graph_order): New function.
2185         (get_vbase_types): Use it.
2186         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
2187
2188         * tinfo.cc (get_vbase_offset): New function.
2189         (__vmi_class_type_info::do_find_public_src): Use it.
2190         (__vmi_class_type_info::do_dyncast): Likewise.
2191         (__vmi_class_type_info::do_upcast): Likewise.
2192         
2193 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
2194
2195         * lang-specs.h: Pass -fno-show-column to the preprocessor.
2196
2197 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
2198
2199         * rtti.c (class_hint_flags): Rename flags.
2200         (class_initializer): Remove flags.
2201         (synthesize_tinfo_var): Combine offset and flags. Add flags
2202         for __vmi_class_type_info.
2203         (create_tinfo_types): Remove flags from __class_type_info and
2204         __si_class_type_info. Merge flags and offset from
2205         base_class_type_info.
2206         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
2207         (__base_class_info::is_virtual_p): Adjust.
2208         (__base_class_info::is_public_p): Adjust.
2209         (__base_class_info::offset): New accessor.
2210         (__class_type_info::details): Remove member.
2211         (__class_type_info::__class_type_info): Lose details.
2212         (__class_type_info::detail_masks): Remove.
2213         (__si_class_type_info::__si_class_type_info): Lose details.
2214         (__vmi_class_type_info::details): New member.
2215         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
2216         (__vmi_class_type_info::detail_masks): New member.
2217         * tinfo.cc (__class_type_info::do_upcast): Initialize result
2218         with unknown_details_mask.
2219         (__vmi_class_type_info::do_find_public_src): Adjust
2220         (__vmi_class_type_info::do_dyncast): Adjust.
2221         (__vmi_class_type_info::do_upcast): Set result details, if
2222         needed. Adjust.
2223         (__dynamic_cast): Temporarily #if out optimization.
2224
2225 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
2226
2227         * rtti.c (get_tinfo_decl): Mark used.
2228         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
2229         mark as dealt with, if we output it.
2230
2231 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
2232
2233         * class.c: Reorganize to put virtual function table initialization
2234         machinery at the end of the file.
2235
2236 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
2237
2238         * class.c (finish_struct): Use bitsize_zero_node.
2239         * pt.c (instantiate_class_template): Likewise.
2240
2241 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
2242
2243         Put RTTI entries at negative offsets in new ABI.
2244         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
2245         vbase offset at index -3, not -1.
2246         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
2247         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
2248         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
2249         (build_rtti_vtbl_entries): New function.
2250         (set_rtti_entry): Remove.
2251         (build_primary_vtable): Don't use it.
2252         (build_secondary_vtable): Likewise.
2253         (start_vtable): Remove.
2254         (first_vfun_index): New function.
2255         (set_vindex): Likewise.
2256         (add_virtual_function): Don't call start_vtable.  Do call
2257         set_vindex.
2258         (set_primary_base): Rename parameter.
2259         (determine_primary_base): Likewise.
2260         (num_vfun_entries): Don't use skip_rtti_stuff.
2261         (num_extra_vtbl_entries): Include RTTI information.
2262         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
2263         (skip_rtti_stuff): Remove.
2264         (dfs_modify_vtables): Don't use it.
2265         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
2266         (layout_nonempty_base_or_field): Update size handling.
2267         (create_vtable_ptr): Tweak.
2268         (layout_class_type): Adjust parameter names.
2269         (finish_struct_1): Simplify.
2270         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
2271         (skip_rtti_stuff): Remove.
2272         (first_vfun_index): New function.
2273         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
2274         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
2275         (marked_vtable_pathp): Declare.
2276         (unmarked_vtable_pathp): Likewise.
2277         * error.c (dump_expr): Use first_vfun_index to calculate vtable
2278         offsets.
2279         * rtti.c (build_headof): Look for RTTI at negative offsets.
2280         (get_tinfo_decl_dynamic): Likewise.
2281         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
2282         here.
2283         (create_pseudo_type_info): Do it here instead.  Adjust so that
2284         vptr points at first virtual function.
2285         * search.c (marked_vtable_pathp): Make it global.
2286         (unmarked_vtable_pathp): Likewise.
2287         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
2288         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
2289         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
2290         (get_pure_virtuals): Likewise.
2291         (expand_upcast_fixups): Likewise.
2292         * tree.c (debug_binfo): Likewise.
2293         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
2294         negative offset.
2295         
2296 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2297
2298         * class.c (check_field_decl): Fix typo.
2299         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
2300         (check_methods): Likewise.
2301         (check_field_decls): Likewise.
2302         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
2303         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
2304         Use DECL_RESULT_FLD, not DECL_RESULT.
2305         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
2306         * lex.c (identifier_type): Likewise.
2307         * pt.c (determine_specialization, lookup_template_class): Likewise.
2308         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
2309         (resolve_overloaded_unification, more_specialized): Likewise.
2310         * semantics.c (finish_member_declaration): Likewise.
2311         * typeck.c (build_x_function_call): Likewise.
2312         
2313 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
2314
2315         * class.c (layout_empty_base): Handle empty bases with non-byte
2316         alignment.
2317         (build_base_field): Likewise.
2318         (layout_virtual_bases): Likewise.
2319
2320         * class.c (finish_struct_1): Fix typo in this change:
2321         
2322         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2323
2324 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
2325
2326         * decl.c (grokdeclarator): Count partial specializations when
2327         keeping track of how many template classes have been seen.
2328
2329         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
2330         
2331 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2332
2333         * class.c (build_vbase_pointer_fields): layout_field now place_field.
2334         (get_vfield_offset): Use byte_position.
2335         (set_rtti_entry): Set OFFSET to ssizetype zero.
2336         (get_binfo_offset_as_int): Deleted.
2337         (dfs_record_base_offsets): Use tree_low_cst.
2338         (dfs_search_base_offsets): Likewise.
2339         (layout_nonempty_base_or_field): Reflect changes in RLI format
2340         and call byte_position.
2341         (layout_empty_base): Convert offset to ssizetype.
2342         (build_base_field): use rli_size_unit_so_far.
2343         (dfs_propagate_binfo_offsets): Do computation in proper type.
2344         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
2345         (layout_class_type): Reflect changes in RLI names and fields.
2346         (finish_struct_1): Set DECL_FIELD_OFFSET.
2347         * dump.c (dequeue_and_dump): Call bit_position.
2348         * expr.c (cplus_expand_constant): Use byte_position.
2349         * rtti.c (expand_class_desc): Use bitsize_one_node.
2350         * typeck.c (build_component_addr): Use byte_position and don't
2351         special case for zero offset.
2352         
2353 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2354
2355         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
2356         
2357         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
2358         tinfo object.
2359         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
2360         vtable.
2361
2362 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2363
2364         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
2365         DECL_P macros.
2366         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
2367         make_typename_type, check_initializer, cp_finish_decl,
2368         xref_tag): Likewise.
2369         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
2370         decl_namespace, arg_assoc_template_arg, arg_assoc,
2371         validate_nonmember_using_decl, do_class_using_decl): Likewise.
2372         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
2373         args_to_string): Likewise.
2374         * friend.c (is_friend): Likewise.
2375         * lex.c (note_got_semicolon, note_list_got_semicolon,
2376         is_global): Likewise.
2377         * method.c (build_overload_nested_name, build_overload_value,
2378         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
2379         * parse.y (typename_sub, typename_sub1): Likewise.
2380         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
2381         process_partial_specialization, convert_template_argument,
2382         template_args_equal, add_pending_template, lookup_template_class,
2383         for_each_template_parm_r, maybe_fold_nontype_arg,
2384         tsubst, instantiate_template, type_unification_real, unify,
2385         instantiate_pending_templates, set_mangled_name_for_template_decl):
2386         Likewise.
2387         * repo.c (repo_get_id, repo_template_used): Likewise.
2388         * search.c (lookup_field_1): Likewise.
2389         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
2390         * xref.c (classname): Likewise.
2391         
2392 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
2393
2394         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
2395         (CANONICAL_BINFO): New macro.
2396         (BINFO_NEW_VTABLE_MARKED): Use it.
2397         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
2398         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
2399         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
2400         not TREE_TYPE.
2401         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2402         (build_secondary_vtable): Likewise.
2403         (dfs_finish_vtbls): Likewise.
2404         (dfs_accumulate_vtbl_inits): Likewise.
2405         (accumulate_vtbl_inits): New function.
2406         (finish_vtbls): Make sure that virtual bases come after
2407         non-virtual bases in the vtable group.
2408         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
2409         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2410         * search.c (struct vbase_info): Move definition.
2411         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2412         (unmarked_new_vtable_p): Likewise.
2413         (dfs_mark_vtable_path): Remove.
2414         (dfs_mark_new_vtable): Remove.
2415         (dfs_unmark_new_vtable): Likewise.
2416         (dfs_clear_search_slot): Likewise.
2417         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
2418         (dfs_clear_vbase_slots): Likewise.
2419         (init_vbase_pointers): LIkewise.
2420         
2421 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
2422
2423         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
2424         SIZETYPE to a non-SIZETYPE.
2425
2426 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
2427
2428         * class.c (layout_virtual_bases): Adjust names in conditionally
2429         compiled code.
2430         
2431         * class.c (record_base_offsets): New function.
2432         (layout_conflict_p): Likewise.
2433         (layout_nonempty_base_or_field): Use it.
2434         (layout_empty_base): New function.
2435         (build_base_field): Use it.
2436         (build_base_fields): Update comment.
2437         (layout_virtual_bases): Fold in a little code form
2438         layout_basetypes.  Use layout_empty_base.
2439         (layout_basetypes): Remove.
2440         (end_of_class): New function.
2441         (layout_class_type): Use it.  Adjust.
2442
2443         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
2444         (fntype_p): Remove.
2445         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
2446         comment. 
2447         (dfs_skip_nonprimary_vbases_markedp): Likewise.
2448         * typeck.c (fntype_p): Remove.
2449
2450         * cp-tree.h (TI_SPEC_INFO): Remove.
2451         (CLASSTYPE_TI_SPEC_INFO): Likewise.
2452         * pt.c (process_partial_specialization): Likewise.
2453
2454         * class.c (build_base_field): Fix thinko in computation of binfo
2455         offsets.
2456
2457         * tree.c (mark_local_for_remap_p): Mark variables declared in
2458         TARGET_EXPRs as well.
2459
2460 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
2461
2462         * typeck.c (require_complete_type, complete_type,
2463         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
2464         build_array_ref, convert_arguments, pointer_diff,
2465         build_x_unary_op, build_unary_op, build_c_cast,
2466         build_modify_expr): Use COMPLETE_TYPE_P etc.
2467         * call.c (is_complete, convert_like_real,
2468         build_new_method_call): Likewise.
2469         * class.c (build_vbase_pointer_fields, check_bases,
2470         build_base_field, finish_struct_1, pushclass): Likewise.
2471         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
2472         * decl.c (maybe_process_template_type_declaration, pushtag,
2473         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
2474         layout_var_decl, check_initializer, cp_finish_decl,
2475         grokdeclarator, require_complete_types_for_parms,
2476         grok_op_properties, xref_tag, xref_basetypes,
2477         check_function_type): Likewise.
2478         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
2479         * friend.c (do_friend): Likewise.
2480         * init.c (build_offset_ref): Likewise.
2481         * parse.y (structsp): Likewise.
2482         * pt.c (maybe_process_partial_specialization,
2483         tsubst_friend_function, instantiate_class_template, tsubst,
2484         do_type_instantiation, instantiate_pending_templates): Likewise.
2485         * repo.c (repo_get_id): Likewise.
2486         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
2487         synthesize_tinfo_var, emit_support_tinfos): Likewise.
2488         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
2489         * semantics.c (begin_class_definition): Likewise.
2490         * tree.c (build_cplus_method_type): Likewise.
2491         * typeck2.c (digest_init, build_functional_cast,
2492         add_exception_specifier): Likewise.
2493         * parse.h, parse.c: Regenerated.
2494
2495 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
2496
2497         * inc/cxxabi.h: New header file. Define new-abi entry points.
2498         (__pointer_type_info::target): Rename member to ...
2499         (__pointer_type_info::type): ... here.
2500         (__base_class_info::type): Rename member to ...
2501         (__base_class_info::base): ... here.
2502         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
2503         * cp-tree.h (CPTI_ABI): New global tree enumeration.
2504         (abi_node): New global tree node.
2505         * decl.c (abi_node): Document.
2506         (init_decl_processing): Initialize abi_node.
2507         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
2508         (get_vmi_pseudo_type_info): Likewise.
2509         (create_tinfo_types): Likewise.
2510         (emit_support_tinfos): Likewise.
2511         * tinfo.h (cxxabi.h): Include for new-abi.
2512         Move rtti class definitions to new header file.
2513         * tinfo.cc (abi): Use the namespace.
2514         (std): Move new abi rtti classes from here ...
2515         (__cxxabiv1): ... to here.
2516         * tinfo2.cc (cxxabi.h): Include for new-abi.
2517         Move rtti class definitions to new header file.
2518         (std): Move new abi rtti classes from here ...
2519         (__cxxabiv1): ... to here.
2520         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
2521         namespace.
2522
2523 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
2524             Jason Merrill  <jason@casey.cygnus.com>
2525
2526         * method.c (build_overload_int): Use host_integerp.
2527
2528 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2529
2530         * init.c (build_offset_ref): Handle the case of a templated member
2531         function.
2532     
2533 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2534
2535         * except.c (expand_exception_blocks): Clear catch_clauses_last.
2536
2537 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
2538
2539         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
2540         * class.c (check_bitfield_decl): Turn illegal bitfields into
2541         non-bitfields.
2542         (dfs_propagate_binfo_offsets): Adjust for new size_binop
2543         semantics.
2544         (dfs_offset_for_unshared_vbases): Likewise.
2545         * cvt.c (cp_convert_to_pointer): Convert NULL to a
2546         pointer-to-member correctly under the new ABI.
2547         * expr.c (cplus_expand_constant): Don't use cp_convert when
2548         turning an offset into a pointer-to-member.
2549         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
2550         when dereferencing them under the new ABI.
2551         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
2552         of pointers-to-members under the new ABI.
2553         
2554         * class.c (check_bitfield_decl): Remove restriction on really long
2555         bitfields.
2556         (layout_class_type): Implement new ABI handling of bitfields
2557         longer than their types.
2558
2559 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2560
2561         * parse.y (extdefs): Call ggc_collect.
2562         * parse.c: Regenerated.
2563
2564 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
2565
2566         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
2567         (note_name_declared_in_class): Use OVL_CURRENT to get at a
2568         potential overload.
2569
2570 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2571
2572         * class.c (build_vbase_path): Use integer_zerop.
2573         (build_vtable_entry): Use tree_low_cst.
2574         (get_vfield_offset): Use bit_position.
2575         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
2576         Use tree_low_cst.
2577         (check_bitfield_decl): Set DECL_SIZE using convert.
2578         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
2579         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
2580         Use tree_low_cst.
2581         (finish_struct_1): Use bit_position.
2582         (dump_class_hierarchy): Use tree_low_cst.
2583         * cp-tree.h (min_precision): Add declaration.
2584         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
2585         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
2586         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
2587         * expr.c (cplus_expand_constant): Use bit_position.
2588         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
2589         * rtti.c (get_base_offset): Use bit_position.
2590         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
2591         host_integerp, and tree_low_cst.
2592         (pointer_int_sum): Use integer_zerop.
2593         (build_component_addr): Use bit_position.
2594         
2595 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
2596
2597         * typeck.c (require_complete_type): Don't assume size_zero_node.
2598         (complete_type_or_else): Likewise.
2599
2600 2000-03-16  Steven Grady <grady@digitaldeck.com>
2601             Jason Merrill  <jason@casey.cygnus.com>
2602
2603         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
2604
2605 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
2606
2607         * decl2.c (grokfield): Bail out if type is error_mark_node.
2608
2609 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
2610
2611         * tinfo2.cc (__ptr_to_member_data): Rename to ...
2612         (__pointer_to_member_data): ... here. Adjust.
2613         * rtti.c (create_tinfo_types): Adjust.
2614
2615 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
2616
2617         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
2618         * decl.c (ref_desc_type_node): Undocument.
2619         * rtti.c (ptr_ref_initializer): Rename to ...
2620         (ptr_initializer): ... here. Adjust comments.
2621         (ptmd_initializer): Fix comment thinko.
2622         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
2623         (create_tinfo_types): Remove ref_desc_type_node init.
2624         * tinfo2.cc (__reference_type_info): Remove.
2625
2626 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
2627
2628         * decl.c (cp_finish_decl): Remove obsolete comment.
2629         
2630         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
2631
2632 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
2633
2634         * cp-tree.h: Tweak documentation.
2635         * class.c (build_vbase_pointer_fields): Layout the fields, too.
2636         (avoid_overlap): Remove.
2637         (get_binfo_offset_as_int): New function.
2638         (dfs_serach_base_offsets): Likewise.
2639         (layout_nonempty_base_or_field): Likewise.
2640         (build_base_field): Layout fields here.  Avoid placing two objects
2641         of the same type at the same address, under the new ABI.
2642         (build_base_fields): Adjust accordingly.
2643         (create_vtable_ptr): Return the new field, but don't attach it to
2644         TYPE_FIELDS.
2645         (remove_base_field): Remove.
2646         (remove_base_fields): Remove.
2647         (layout_basetypes): Adjust accordingly.
2648         (layout_class_type): Call layout_field for each field, rather than
2649         just making a wholesale call to layout_type.
2650
2651 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
2652
2653         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
2654
2655 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
2656
2657         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
2658
2659         * except.c (dtor_nothrow): New fn.
2660         (do_pop_exception): Use it.  Take type parm.
2661         (push_eh_cleanup): Take type parm.
2662         (expand_start_catch_block): Pass it.
2663         (build_eh_type_type_ref): Accept null type.
2664
2665 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
2666
2667         * cp-tree.h (revert_static_member_fn): Change prototype.
2668         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
2669         (grok_op_properties): Likewise.
2670         (start_function): Likewise.
2671         (revert_static_member_fn): Simplify.
2672         * pt.c (check_explicit_specialization): Adjust call to
2673         revert_static_member_fn.
2674
2675 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
2676
2677         * cp-tree.h (scope_kind): New type.
2678         (tmpl_spec_kind): Likewise.
2679         (declare_pseudo_global_level): Remove.
2680         (pseudo_global_level_p): Rename to template_parm_scope_p.
2681         (pushlevel): Remove declaration.
2682         (begin_scope): New function.
2683         (finish_scope): Likewise.
2684         (current_tmpl_spec_kind): Likewise.
2685         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
2686         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
2687         Add template_spec_p.
2688         (toplevel_bindings_p): Adjust.
2689         (declare_pseudo_global_level): Remove.
2690         (pseudo_global_level_p): Rename to template_parm_scope_p.
2691         (current_tmpl_spec_kind): New function.
2692         (begin_scope): Likewise.
2693         (finish_scope): Likewise.
2694         (maybe_push_to_top_level): Adjust.
2695         (maybe_process_template_type_declaration): Likewise.
2696         (pushtag): Likewise.
2697         (pushdecl_nonclass_level): Likewise.
2698         (lookup_tag): Likewise.
2699         (grokfndecl): Handle member template specializations.  Share
2700         constructor and non-constructor code.
2701         * decl2.c (check_classfn): Handle member template specializations.
2702         * pt.c (begin_template_parm_list): Use begin_scope.
2703         (begin_specialization): Likewise.
2704         (end_specialization): Likewise.
2705         (check_explicit_specialization): Use current_tmpl_spec_kind.
2706         Handle member template specializations.
2707         (end_template_decl): Use finish_scope.  Remove call to
2708         get_pending_sizes.
2709         (push_template_decl_real): Remove bogus error message.
2710         (tsubst_decl): Fix typo in code contained in comment.
2711         (instantiate_template): Handle member template specializations.
2712         (most_general_template): Likewise.
2713         
2714 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
2715
2716         * lex.c (whitespace_cr): Compress consecutive calls to warning().
2717         (do_identifier): Ditto for error().
2718
2719         * pt.c (convert_nontype_argument): Ditto for cp_error().
2720         (convert_template_argument): Ditto for cp_pedwarn().
2721
2722 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
2723
2724         * exception.cc (__check_null_eh_spec): New fn.
2725         * except.c (expand_end_eh_spec): Call it if the spec is throw().
2726
2727 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
2728
2729         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
2730         * except.c (expand_end_eh_spec): Add the return type.
2731         * rtti.c (throw_bad_cast): Add the parmtypes.
2732         (throw_bad_typeid): Likewise.
2733
2734         * semantics.c (expand_stmt): Only leave out rtl for unused
2735         artificials, and set DECL_IGNORED_P on them as well.
2736         * decl.c (wrapup_globals_for_namespace): Likewise.
2737
2738 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
2739
2740         * decl.c (maybe_commonize_var): Skip all artificial decls.
2741         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
2742
2743 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
2744
2745         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
2746         * cp-tree.h: Declare flag_enforce_eh_specs.
2747         * decl.c (store_parm_decls, finish_function): Check it.
2748
2749         C library functions don't throw.
2750         * Makefile.in (cfns.h): New target.
2751         (except.o): Depend on it.
2752         * Make-lang.in (cc1plus): Depend on cfns.gperf.
2753         * cfns.gperf: New file.
2754         * cfns.h: Generated.
2755         * except.c: Include it.
2756         (nothrow_libfn_p): New fn.
2757         * decl.c (grokfndecl): Use it.
2758         * cp-tree.h: Declare it.
2759         
2760         * decl.c (push_overloaded_decl_1, auto_function, 
2761         define_function): Lose.
2762         (build_library_fn_1): New static fn.
2763         (builtin_function): Use it.
2764         (get_atexit_node): Use build_library_fn_ptr.
2765         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
2766         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
2767         push_void_library_fn, push_throw_library_fn): New fns.
2768         * cp-tree.h: Declare them.
2769         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
2770         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
2771         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
2772         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
2773         * rtti.c (build_runtime_decl): Lose.
2774         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 
2775         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
2776         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
2777
2778         * call.c (build_call): Remove result_type parm.
2779         Call mark_used on unused artificial fns.
2780         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
2781
2782 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
2783
2784         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
2785         appropriate.
2786         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
2787         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
2788         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
2789         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
2790         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
2791         expand_generic_desc): Likewise.
2792
2793 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2794
2795         * exception.cc (__cp_pop_exception): Cleanup the original object.
2796
2797 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2798
2799         * decl.c (grok_op_properties): Merge conversion to void warning
2800         with other silly op warnings.
2801
2802 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
2803
2804         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
2805         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
2806
2807 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2808
2809         * decl.c (cp_make_fname_decl): New function.
2810         (wrapup_globals_for_namespace): Don't emit unused static vars.
2811         (init_decl_processing): Remove comment about use of
2812         array_domain_type. Set make_fname_decl.
2813         (cp_finish_decl): Remove __FUNCTION__ nadgering.
2814         * semantics.c (begin_compound_stmt): Remove
2815         current_function_name_declared flagging.
2816         (expand_stmt): Don't emit unused local statics.
2817         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
2818         specially.
2819
2820 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2821
2822         * typeck.c (convert_for_assignment): Don't look at array
2823         initializer.
2824         * call.c (convert_like_real): Likewise. 
2825
2826 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
2827
2828         Add initial support for '\uNNNN' specifier.
2829         * lex.c (read_ucs): New fn.
2830         (readescape, skip_white_space): Call it.
2831         (is_extended_char, is_extended_char_1): New fns.
2832         (utf8_extend_token): New fn, #if 0'd out.
2833         (real_yylex): Treat extended chars like letters.
2834
2835         * search.c (note_debug_info_needed): Walk the bases even if we 
2836         weren't deferring the type itself.
2837
2838 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2839
2840         * decl2.c (finish_objects): Constify a char*.
2841
2842         * method.c (emit_thunk): Likewise.
2843
2844 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
2845
2846         * typeck.c (dubious_conversion_warnings): Look through
2847         REFERENCE_TYPE.
2848
2849 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2850
2851         * class.c (dfs_modify_vtables): I is now unsigned.
2852         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
2853         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
2854         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
2855         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
2856         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
2857         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
2858         Call integer_all_onesp.
2859         * typeck2.c (process_init_constructor): Use compare_tree_int.
2860
2861         * lang-specs.h (as): Don't call if -syntax-only.
2862
2863 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
2864
2865         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
2866         RTL_EXPR_HAS_NO_SCOPE after all.
2867
2868 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
2869
2870         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
2871         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
2872         RTL_EXPR_HAS_NO_SCOPE.
2873
2874         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
2875         later.
2876         
2877         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
2878
2879 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
2880
2881         * call.c (convert_like): Macrofy.
2882         (convert_like_with_context): New macro.
2883         (convert_like_real): Renamed from convert_like.  Add calling
2884         context parameters, for diagnostics. Add recursive flag.  Call 
2885         dubious_conversion_warnings for outer conversion.
2886         (build_user_type_conversion): Use convert_like_with_context.
2887         (build_over_call): Likewise. Don't warn about dubious
2888         conversions here. Adjust convert_default_arg calls.
2889         (convert_default_arg): Add context parameters for diagnostics.
2890         Pass throught to convert_like_with_context.
2891         * cp-tree.h (convert_default_arg): Add context parameters.
2892         (dubious_conversion_warnings): Prototype new function.
2893         * typeck.c (convert_arguments): Adjust convert_default_arg call.
2894         (dubious_conversion_warnings): New function, broken
2895         out of convert_for_assignment. 
2896         (convert_for_assignment): Adjust.
2897
2898 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
2899
2900         * decl2.c (key_method): Break out from...
2901         (import_export_vtable, import_export_class): ...here.
2902
2903         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
2904         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
2905
2906         * search.c (note_debug_info_needed, dfs_debug_mark, 
2907         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
2908         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
2909
2910 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
2911
2912         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
2913         typos.
2914
2915 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
2916
2917         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
2918         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
2919         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
2920         (lang_type): Split gets_new into has_new and has_array_new.
2921         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2922         (TYPE_GETS_NEW): Split into ...
2923         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
2924         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
2925         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
2926         (build_op_new_call): Don't declare.
2927         (build_new_1): Likewise.
2928         * call.c (build_op_new_call): Remove.
2929         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2930         instead of TYPE_NEEDS_DESTRUCTOR.
2931         (finish_struct_bits): Likewise.
2932         (add_implicitly_declared_members): Likewise.
2933         (check_field_decl): Likewise.
2934         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
2935         correctly under the new ABI.
2936         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2937         instead of TYPE_NEEDS_DESTRUCTOR.
2938         (initialize_local_var): Likewise.
2939         (destroy_local_var): Likewise.
2940         (cp_finish_decl): Likewise.
2941         (register_dtor_fn): Likewise.
2942         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
2943         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
2944         TYPE_VEC_DELETE_TAKES_SIZE here.
2945         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
2946         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
2947         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2948         (finish_destructor_body): Likewise.
2949         (maybe_build_cleanup_1): Likewise.
2950         * decl2.c (do_static_destruction): Likewise.
2951         * init.c (build_new_1): Make it static.
2952         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2953         (expand_cleanup_for_base): Likewise.
2954         (get_cookie_size): New function.
2955         (build_new_1): Handle array-new cookies correctly under the new
2956         ABI.
2957         (build_vec_delete_1): Likewise.
2958         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2959         (build_delete): Likewise.
2960         (build_vec_delete): Handle array-new cookies correctly under the new
2961         ABI.
2962         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2963         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
2964         TYPE_HAS_ARRAY_NEW_OPERATOR.
2965         * ptree.c (print_lang_type): Check them.
2966         * search.c (context_for_name_lookup): Fix typo in comment.
2967         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2968         * tree.c (break_out_cleanups): Likewise.
2969         (build_cplus_array_test_1): Likewise.
2970         (cp_build_qualified_type_real): Likewise.
2971         * typeck.c (complete_type): Likewise.
2972         
2973         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
2974         the command-line, not the end.
2975         
2976 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
2977
2978         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
2979
2980 2000-03-02  Tom Tromey  <tromey@cygnus.com>
2981
2982         * cp-tree.h (build_java_class_ref): Declare.
2983         * init.c (build_java_class_ref): No longer static.
2984         * except.c (expand_throw): Generate a Java-style `throw' if the
2985         thrown object is a "Java" object.
2986         (initialize_handler_parm): Generate a Java-style lookup of
2987         exception info if the caught object is a "Java" object.
2988         (catch_language, catch_language_init): New globals.
2989         (decl_is_java_type): New function.
2990         (expand_start_catch_block): Don't call push_eh_info() or
2991         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
2992         class reference to build_catch_block.
2993
2994 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2995
2996         * typeck.c (comptypes): Treat sizetype like its language equivalent.
2997
2998 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
2999
3000         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
3001         to merge reference/pointer code and fix incorrect warnings.
3002
3003 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
3004
3005         * search.c (protected_accessible_p): Use context_for_name_lookup.
3006
3007         * init.c (construct_virtual_bases): Fix thinko.
3008         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
3009
3010 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3011
3012         * decl.c (current_function_decl): Move to toplev.c.
3013
3014 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
3015
3016         * pt.c (fn_type_unification): Unify return type, whenever
3017         provided.
3018         (get_bindings_real): Only pass return type when necessary.
3019         Remove explicit return type check.
3020         * class.c (resolve_address_of_overloaded_function): Pass desired
3021         return type to fn_type_unification.
3022
3023 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3024
3025         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
3026         DECL_FIELD_SIZE.
3027         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
3028         DECL_FIELD_SIZE.
3029         * rtti.c (expand_class_desc): Likewise.
3030         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
3031         (THUNK_VCALL_OFFSET): Likewise.
3032         (THUNK_DELTA): Reflect changes in ../tree.h.
3033
3034 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
3035
3036         * search.c (protected_accessible_p): Also allow the access if
3037         the member is public in DERIVED.  Lose TYPE parm.
3038         (friend_accessible_p): Lose TYPE parm.
3039         (accessible_p): Adjust.
3040
3041 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3042
3043         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
3044         on things that are not sizes; ssize_binop deleted.
3045         Call size_diffop when appropriate.
3046         (dfs_build_vcall_offset_vtbl_entries): Likewise.
3047         (build_primary_vtable, build_secondary_vtable): Likewise.
3048         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
3049         Variable I is HOST_WIDE_INT.
3050         (get_vfield_offset): Pass proper types to size_binop.
3051         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
3052         (finish_struct_1): Likewise.
3053         (skip_rtti_stuff): Arg N is now pointer to signed.
3054         (layout_class_type): Use size_zero_node.
3055         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
3056         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
3057         * decl.c (complete_arry_type): Pass proper types to size_binop.
3058         (xref_basetypes): BINFO_OFFSET is sizetype.
3059         * error.c (dump_expr): Don't use size_binop non-sizes.
3060         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
3061         * init.c (construct_virtual_bases): Fix type error.
3062         (build_vec_delete_1): Pass proper type to size_binop and don't
3063         fold result.
3064         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
3065         * rtti.c (get_base_offset): Pass proper type to size_binop.
3066         * search.c (dfs_find_vbases): Fix type error.
3067         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
3068         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
3069         * tree.c (debug_binfo): Variable N is signed.
3070         Use HOST_WIDE_INT_PRINT_DEC.
3071         * typeck.c (comptypes): sizetype is same as equivalent integer type.
3072         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
3073         size_one_node and size_zero_node.
3074         (c_alignof): Use size_one_node.
3075         (build_component_addr): Pass proper types to size_binop.
3076         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
3077
3078 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
3079
3080         Implement class scope using-declarations for functions.
3081         * class.c (handle_using_decl): Call add_method for used functions.
3082         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
3083         (add_method): Used functions are hidden by local functions.
3084         (check_bases_and_members): Handle using-decls before finalizing
3085         CLASSTYPE_METHOD_VEC.
3086         * call.c (add_function_candidate): Add ctype parm; if non-zero,
3087         override the type of 'this' accordingly.
3088         (add_template_candidate, add_template_candidate_real): Add ctype parm.
3089         (convert_class_to_reference, build_user_type_conversion_1, 
3090         build_new_function_call, build_object_call, build_new_op,
3091         build_new_method_call): Pass ctype parm.
3092
3093         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
3094         the baselink.
3095         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
3096         build_new_function_call, build_object_call, build_new_op,
3097         build_new_method_call, build_op_delete_call): Don't get basetype_path
3098         from a baselink.
3099         * typeck.c (build_component_ref): Likewise.
3100         * init.c (build_offset_ref): Likewise.
3101         (resolve_offset_ref): Don't call enforce_access.  
3102         Call build_scoped_ref.
3103         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
3104         would cause an error or if -pedantic.
3105         * class.c (alter_access): Lose binfo parm.
3106
3107 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
3108
3109         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
3110         types.
3111
3112 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
3113
3114         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
3115         pseudo_type_info creation into the std namespace
3116
3117 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
3118
3119         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
3120         (import_export_class): Remove declaration.
3121         * decl2.c (import_export_class): Make it static.
3122         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
3123         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
3124         EXPR_WITH_FILE_LOCATION.
3125         * lex.c (check_newline): Tweak filename/lineno setting.
3126         * semantics.c (begin_while_stmt): Fix typo in comment.
3127         
3128 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3129
3130         * lang-options.h (-fmessage-length=): Add missing option.
3131
3132         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
3133
3134 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
3135
3136         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
3137
3138 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
3139
3140         * optimize.c (expand_call_inline): Emit the return label before
3141         evaluating the return value.
3142
3143 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
3144
3145         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
3146         than duplicating functionality here.
3147         * optimize.c: Include input.h.
3148         (expand_call_inline): Use push_srcloc and pop_srcloc.
3149         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
3150         * parse.c: Regenerated.
3151         * Makefile.in (lex.o): Depend on input.h.
3152         (optimize.o): Likewise.
3153         
3154 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
3155
3156         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
3157         function type, rather than ICE.
3158
3159 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
3160
3161         * decl.c (grokdeclarator): Call decl_type_access_control.
3162         * parse.y (parse_end_decl): Don't call decl_type_access_control if
3163         decl is null.
3164
3165 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
3166
3167         * decl.c (decls_match): Remove obsolete static member nadgering.
3168
3169 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3170
3171         * decl.c (grokdeclarator): Change ANSI to ISO.
3172         * lex.c (consume_string, readescape, do_identifier): Likewise.
3173         (parse_float, real_yylex): Likewise.
3174         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
3175         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
3176         new_type_id, maybe_label_decls, simple_stmt, 
3177         for.init.statement): Likewise.
3178         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
3179         * semantics.c (finish_named_return_value): Likewise.
3180         * parse.c: Regenerate.
3181
3182 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
3183
3184         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
3185         (CPTI_CLASS_STAR_TYPE): Remove.
3186         (vtable_index_type): Likewise.
3187         (class_star_type_node): Remove.
3188         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
3189         (build_binary_op_nodefault): Remove.
3190         * call.c (build_new_op): Use build_binary_op instead of
3191         build_binary_op_nodefault.
3192         * decl.c (init_decl_processing): Remove class_star_type_node
3193         initialization.  Make delta_type_node ptrdiff_type_node under the
3194         new ABI.  Initialize vtable_index_type.
3195         (build_ptrmemfunc_type): Build different structures for the new
3196         ABI.
3197         (build_enumerator): Use build_binary_op instead of
3198         build_binary_op_nodefault.
3199         * method.c (build_overload_value): Mangle pointers-to-members
3200         appropriately under the new ABI.
3201         * typeck.c (build_array_ref): Use build_binary_op instead of
3202         build_binary_op_nodefault.
3203         (get_member_function_from_ptrfunc): Adjust for the new ABI.
3204         (build_binary_op_nodefault): Rename to ...
3205         (build_binary_op): ... this.  Remove old version.  Adjust for
3206         pointer-to-member comparisons under the new ABI.
3207         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
3208         (build_ptrmemfunc): Adjust for the new ABI.
3209         (expand_ptrmemfunc_cst): Likewise.
3210         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
3211         (pfn_from_ptrmemfunc): Adjust for the new ABI.
3212         
3213 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
3214
3215         * call.c (build_object_call): Compress consecutive calls to
3216         cp_error.
3217         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
3218         (build_op_delete_call): Adjust message formatting.
3219
3220         * class.c (check_bases): Compress consecutive calls to
3221         cp_pedwarn. 
3222         (finish_struct_anon): Say 'ISO C++'.
3223
3224         * decl.c (start_decl): Same here.
3225         (grok_reference_init): Likewise.
3226         (grokfndecl): Correct message formatting.
3227         (grokfndecl): Improve diagnostic.
3228         (check_static_variable_definition): Likewise. Say 'ISO C++'
3229         (compute_array_index_type): Say 'ISO C++'
3230         (create_array_type_for_decl): Compress consecutive calls to
3231         cp_error. 
3232         (grokdeclarator): Say 'ISO C++'
3233         (grok_op_properties): Likewise.
3234
3235         * decl2.c (delete_sanity): Clairify diagnostic.
3236         (check_member_template): Same here.
3237         (grok_function_init): Use consistent terminology.
3238
3239         * expr.c (do_case): Say 'ISO C++'
3240
3241         * friend.c (do_friend): Compress consecutive calls to warning.
3242         
3243 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
3244
3245         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
3246         * class.c (build_secondary_vtable): Reorganize.  Don't create a
3247         new vtable under the new ABI.
3248         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
3249         computing the size.
3250         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
3251         the initializing elements.
3252         (initialize_vtable): New function.
3253         (dfs_finish_vtbls): Use it.
3254         (dfs_accumulate_vtbl_inits): New function.
3255         (finish_vtbls): Merge primary and secondary vtables under the new
3256         ABI.
3257         (finish_struct_1): Remove redundant call to layout_vtable_decl.
3258         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
3259         aren't VAR_DECLs.
3260
3261         * class.c (build_vtable): New function, split out from ...
3262         (get_vtable_decl): ... here, and ...
3263         (build_secondary_vtable): ... here.
3264
3265         * pt.c (tsubst_decl): Fix formatting.
3266         
3267 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3268
3269         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
3270         (avoid_overlap, build_base_field): Likewise.
3271         (build_base_field, build_base_fields, is_empty_class): 
3272         Test DECL_SIZE with integer_zero.
3273         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
3274         * cp-tree.h (struct lang_type): New field size_unit.
3275         (CLASSTYPE_SIZE_UNIT): New macro.
3276         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
3277         (cp_finish_decl): Delete -Wlarger-than processing.
3278         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
3279         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
3280         * tree.c (make_binfo): binfo vector is one entry longer.
3281         (walk_tree): Walk DECL_SIZE_UNIT.
3282
3283 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
3284
3285         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
3286         comment.
3287         (build_vtable_entry): Don't assume all vtable entries are
3288         functions.
3289         (build_vtbl_initializer): Adjust accordingly.
3290         (get_vtable_decl): Fix formatting.
3291         
3292 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
3293
3294         * semantics.c (deferred_type_access_control): Walk the entire
3295         type_lookups list.
3296         (save_type_access_control): Rename from 
3297         initial_deferred_type_access_control.  Just remember the value.
3298         (decl_type_access_control): New fn.
3299         (begin_function_definition): Use deferred_type_access_control, after
3300         we've started the function.  Set type_lookups to error_mark_node.
3301         * parse.y (frob_specs, fn.def1): Adjust.
3302         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
3303         (parse_end_decl, parse_bitfield0, parse_method): New fns.
3304         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
3305         (after_type_component_declarator0): Likewise.
3306         (after_type_component_declarator): Likewise.
3307         (notype_component_declarator): Likewise.
3308         * cp-tree.h: Adjust.
3309
3310         * decl.c (redeclaration_error_message): Allow redeclaration of 
3311         namespace-scope decls.
3312
3313 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3314
3315         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
3316
3317 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
3318
3319         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
3320         * decl2.c (grokclassfn): Likewise.
3321
3322         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
3323
3324         * decl2.c (lang_decode_option): Don't set default message length
3325         here.
3326         * lex.c (lang_init_options): Set it here.
3327
3328 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
3329
3330         Make DECL_CONTEXT mean the class in which a member function was
3331         declared, even for a virtual function.
3332         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
3333         (DECL_FRIEND_CONTEXT): New macro.
3334         (DECL_REAL_CONTEXT): Remove.
3335         (SET_DECL_FRIEND_CONTEXT): Likewise.
3336         (DECL_VIRTUAL_CONTEXT): Adjust.
3337         (DECL_CLASS_SCOPE_P): Use TYPE_P.
3338         (add_friends): Remove.
3339         (hack_decl_function_context): Likewise.
3340         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
3341         CP_DECL_CONTEXT.
3342         (build_over_call): Fix indentation.  Use DECL_CONTEXT
3343         instead of DECL_CLASS_CONTEXT.
3344         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
3345         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
3346         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3347         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
3348         (build_base_field): Likewise.
3349         (finish_struct_1): Likewise.
3350         (build_self_reference): Likewise.
3351         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
3352         DECL_REAL_CONTEXT.
3353         (pushtag): Use decl_function_context, not
3354         hack_decl_function_context.
3355         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3356         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
3357         (pushdecl): Remove bogus code.
3358         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
3359         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3360         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3361         Use decl_function_context, nothack_decl_function_context.
3362         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
3363         (grokdeclarator): Likewise.  Use decl_function_context, not
3364         hack_decl_function_context.
3365         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
3366         (start_function): Use DECL_FRIEND_CONTEXT, not
3367         DECL_CLASS_CONTEXT.  Use decl_function_context, not
3368         hack_decl_function_context.
3369         (finish_function): Use decl_function_context, not
3370         hack_decl_function_context.
3371         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
3372         DECL_CLASS_CONTEXT.
3373         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
3374         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
3375         (grokfield): Likewise.
3376         (finish_builtin_type): Likewise.
3377         (finish_vtable_vardec): Use decl_function_context, not
3378         hack_decl_function_context.
3379         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3380         (start_static_initialization_or_destruction): Likewise.
3381         (finish_static_initialization_or_destruction): Likewise.
3382         (mark_used): Adjust logic for deciding when to synthesize methods.
3383         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
3384         DECL_REAL_CONTEXT.
3385         * error.c (dump_function_decl): Use DECL_CONTEXT, not
3386         DECL_CLASS_CONTEXT.
3387         * friend.c (is_friend): Likewise.
3388         (add_friends): Remove.
3389         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
3390         * lex.c (begin_definition_of_inclass_inline): Use
3391         decl_function_context, not hack_decl_function_context.
3392         (process_next_inline): Likewise.
3393         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3394         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
3395         DECL_CLASSS_CONTEXT.
3396         (hack_identifier): Likewise.
3397         (synthesize_method):  Use decl_function_context, not
3398         hack_decl_function_context.
3399         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
3400         DECL_REAL_CONTEXT.
3401         (is_member_template): Use decl_function_context, not
3402         hack_decl_function_context.  Use DECL_CONTEXT, not
3403         DECL_CLASS_CONTEXT.
3404         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
3405         DECL_CLASS_CONTEXT.
3406         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
3407         DECL_REAL_CONTEXT.
3408         (push_template_decl_real): Likewise.
3409         (instantiate_class_template): Don't call add_friends.
3410         (tsubst_default_argument): Use DECL_CONTEXT, not
3411         DECL_REAL_CONTEXT.
3412         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
3413         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3414         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
3415         DECL_CLASS_CONTEXT.
3416         * repo.c (repo_inline_used): Likewise.
3417         * search.c (current_scope): Adjust for new _CONTEXT macros.
3418         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
3419         DECL_REAL_CONTEXT.
3420         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3421         (lookup_fnfields_here):Likewise.
3422         (check_final_overrider): Likewise.
3423         (init_vbase_pointers): Likewise.
3424         (virtual_context): Likewise.
3425         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
3426         (expand_body): Use decl_function_context, not
3427         hack_decl_function_context.
3428         * tree.c (hack_decl_function_context): Remove.
3429         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
3430         DECL_CLASS_CONTEXT.
3431         * typeck2.c (error_not_base_type): Likewise.
3432         
3433 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
3434
3435         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
3436
3437 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3438
3439         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
3440
3441 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
3442
3443         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
3444
3445 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
3446
3447         * decl2.c (lang_decode_option): Enable automatic line wrapping.
3448
3449 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
3450
3451         * parse.y (frob_specs): Split out...
3452         (parse_decl): From here.
3453         (fn.def2): Call initial_deferred_type_access_control.
3454         (after_type_component_declarator0): Call frob_specs.
3455         (notype_component_declarator0): Likewise.
3456         * search.c (friend_accessible_p): Nested classes are friends of their
3457         enclosing classes.
3458
3459 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
3460
3461         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
3462         used to create an implicit temporary.
3463
3464         * class.c (dfs_modify_vtables): Tweak calculation of functions to
3465         override.
3466
3467 2000-02-08  Nathan Sidwell  <nathan@acm.org>
3468
3469         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
3470         strip array element qualifiers too.
3471
3472 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
3473
3474         * decl.c (store_parm_decls): Don't build cleanups for parameters
3475         while processing_template_decl.
3476
3477 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
3478
3479         * cp-tree.h (struct saved_scope): Add incomplete field.
3480         (namespace_scope_incomplete): New macro.
3481         * decl.c (pushdecl): Use it.
3482         (hack_incomplete_structures): Use it.  See through artificial
3483         binding levels.
3484         (mark_saved_scope): Mark it.
3485
3486         Implement access control for nested types.
3487         * search.c (type_access_control): New fn.
3488         (accessible_p): Now we do perform access control for types.
3489         * semantics.c (deferred_type_access_control): New fn.
3490         (initial_deferred_type_access_control): New fn.
3491         (begin_function_definition): Call it.  Add lookups parm.
3492         * decl.c (struct binding_level): Add this_class field.
3493         (pushlevel_class): Set it.
3494         (mark_binding_level): Mark it.
3495         (lookup_name_real): Use it.  Call type_access_control.
3496         (mark_saved_scope): Mark lookups field.
3497         * cp-tree.h (flagged_type_tree): Add lookups field.
3498         (struct saved_scope): Add lookups field.
3499         (type_lookups): New macro.
3500         * parse.y (declmods): Now <ftype>.
3501         (parse_decl): Add lookups parm.  Call 
3502         initial_deferred_type_access_control.
3503         (lang_extdef): Clear type_lookups.
3504         (typed_declspecs, declmods, typespec): Set lookups field.
3505         (initdcl): Call deferred_type_access_control.
3506         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
3507         component_decl_1, named_parm): Adjust.
3508         * friend.c (is_friend): Nested classes are friends of their
3509         enclosing classes.
3510
3511         * class.c (currently_open_derived_class): New fn.
3512         * method.c (hack_identifier): Use it.
3513
3514         * lex.c (do_identifier): Remove obsolete code.
3515
3516         * parse.y (typed_typespecs): Propagate new_type_flag properly.
3517
3518 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
3519
3520         * tinfo.h: Remove apostrophes from C++ comment (xgettext
3521         thinks this file is plain C).
3522
3523 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3524
3525         * Makefile.in (call.o): Depend on $(EXPR_H).
3526
3527         * call.c: Include "expr.h".
3528
3529         * class.c (dump_class_hierarchy): Add prototype.
3530
3531         * search.c (dfs_get_pure_virtuals): Likewise.
3532
3533 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
3534
3535         * parse.y (simple_stmt): Allow :: token in asm parameter list.
3536         * parse.c: Rebuilt.
3537
3538 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
3539
3540         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
3541         Store it in DECL_FCONTEXT.
3542         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
3543
3544 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
3545
3546         * tinfo.h (old abi): #include "tconfig.h".
3547         * tinfo.cc (convert_to_base): Move into old abi section.
3548
3549 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
3550
3551         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
3552         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
3553         (BINFO_PRIMARY_BINFO): New macro.
3554         (BF_DELTA): Rename to ...
3555         (BV_DELTA): ... this.
3556         (BF_VCALL_INDEX): Rename to ...
3557         (BV_VCALL_INDEX): ... this.
3558         (BF_FN): Rename to ...
3559         (BV_FN): ... this.
3560         * class.c (build_vbase_path): Adjust for changes to reverse_path.
3561         (set_rtti_entry): Rename BF_ macros to BV_ variants.
3562         (modify_vtable_entry): Simplify.
3563         (add_virtual_function): Rename BF_ macros to BV_ variants.
3564         (build_vtable_initializer): Likewise.
3565         (get_class_offset_1): Remove.
3566         (dfs_get_class_offset): Likewise.
3567         (get_class_offset): Likewise.
3568         (dfs_find_final_overrider): New function.
3569         (find_final_overrider): Likewise.
3570         (modify_one_vtable): Remove.
3571         (dfs_find_base): New function.
3572         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
3573         find_final_overrider.
3574         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
3575         virtuals.
3576         (dfs_fixup_vtable_deltas): Remove.
3577         (override_one_vtable): Remove.
3578         (merge_overrides): Likewise.
3579         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
3580         unreal chilren of virtual bases.
3581         (finish_struct_1): Don't use merge_overrides.  Don't use
3582         dfs_fixup_vtable_deltas.
3583         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
3584         BINFOs.
3585         
3586 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3587             Jason Merrill  <jason@yorick.cygnus.com>
3588
3589         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
3590
3591 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
3592
3593         * exception.cc (__throw_bad_typeid): Add missing std::.
3594
3595 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3596
3597         * cp-tree.h (make_thunk): PROTO -> PARAMS.
3598
3599 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
3600
3601         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
3602
3603         Runtime support for new-abi rtti.
3604         * inc/typeinfo (type_info::operator!=): Define in class.
3605         (type_info::before, type_info::name, type_info::operator==,
3606         type_info::operator!=): Define new ABI implementations.
3607         (type_info::is_pointer_p, type_info::is_function_p): Declare
3608         new virtual functions.
3609         (type_info::do_catch, type_info::do_upcast): Likewise.
3610         
3611         * tinfo.h (__base_class_info): Define new class.
3612         (__class_type_info): Likewise.
3613         (__si_class_type_info): Likewise.
3614         (__vmi_class_type_info): Likewise.
3615         (__dynamic_cast): Prototype.
3616         
3617         * tinfo.cc: Conditionalize old and new rtti mechanisms.
3618         (type_info::is_pointer_p): Define new function.
3619         (type_info::is_function_p): Likewise.
3620         (type_info::do_catch): Likewise.
3621         (type_info::do_upcast): Likewise.
3622         (vtable_prefix): New structure for vtable access.
3623         (adjust_pointer): Define new template function.
3624         (contained_p, public_p, virtual_p, contained_public_p,
3625         contained_nonpublic_p, contained_nonvirtual_p): Define new
3626         functions.
3627         (nonvirtual_base_type): New local variable.
3628         (__class_type_info::~__class_type_info): Define.
3629         (__si_class_type_info::~__si_class_type_info): Likewise.
3630         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
3631         (__class_type_info::do_catch): Define new function.
3632         (__class_type_info::do_upcast): Likewise.
3633         (__class_type_info::find_public_src): Likewise.
3634         (__class_type_info::do_find_public_src): Likewise.
3635         (__si_class_type_info::do_find_public_src): Likewise.
3636         (__vmi_class_type_info::do_find_public_src): Likewise.
3637         (__class_type_info::do_dyncast): Likewise.
3638         (__si_class_type_info::do_dyncast): Likewise.
3639         (__vmi_class_type_info::do_dyncast): Likewise.
3640         (__class_type_info::do_upcast): Likewise.
3641         (__si_class_type_info::do_upcast): Likewise.
3642         (__vmi_class_type_info::do_upcast): Likewise.
3643         (__dynamic_cast): Likewise.
3644         
3645         * tinfo2.cc (__fundamental_type_info): Define new class.
3646         (__pointer_type_info): Likewise.
3647         (__reference_type_info): Likewise.
3648         (__array_type_info): Likewise.
3649         (__function_type_info): Likewise.
3650         (__enum_type_info): Likewise.
3651         (__ptr_to_member_type_info): Likewise.
3652         (__fundamental_type_info::~__fundamental_type_info): Define.
3653         (__pointer_type_info::~__pointer_type_info): Likewise.
3654         (__reference_type_info::~__reference_type_info): Likewise.
3655         (__array_type_info::~__array_type_info): Likewise.
3656         (__function_type_info::~__function_type_info): Likewise.
3657         (__enum_type_info::~__enum_type_info): Likewise.
3658         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
3659         (__pointer_type_info::do_catch): Define new function.
3660         (__ptr_to_member_type_info::do_catch): Define new function.
3661         
3662         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
3663         (__is_pointer): Likewise.
3664
3665         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
3666
3667 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
3668
3669         * cp/class.c (build_vtable): Rename to build_primary_vtable.
3670         (prepare_fresh_vtable): Rename to build_secondary_vtable.
3671         (make_new_vtable): New function.
3672         (modify_vtable_entry): Handle generation of new vtables correctly.
3673         (modify_one_vtable): Remove unused parameter.
3674         (dfs_fixup_vtable_deltas): Likewise.
3675         (override_one_vtable): Use build_secondary_vtable.
3676         (finish_struct_1): Use build_primary_vtable and
3677         build_secondary_vtable.
3678         
3679 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
3680
3681         * cp/decl.c: Adjust variable names, comments, help strings.
3682
3683 2000-01-29  Nathan Sidwell  <nathan@acm.org>
3684
3685         * new2.cc (operator delete[]): Use operator delete, don't assume
3686         implementation.
3687
3688 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
3689
3690         * class.c (build_vtbl_initializer): Add argument to
3691         build_vtable_entry call.
3692
3693 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
3694
3695         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
3696         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
3697         (BF_DELTA): New macro.
3698         (BF_VCALL_INDEX): Likewise.
3699         (BF_FN): Likewise.
3700         (THUNK_VCALL_OFFSET): Likewise.
3701         (make_thunk): Change prototype.
3702         * class.c (build_vtable_entry): Integrate
3703         build_vtable_entry_for_fn.  Handle vcall indices.
3704         (build_vtable_entry_for_fn): Remove.
3705         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
3706         BF_VCALL_INDEX, BF_FN.
3707         (modify_vtable_entry): Integrate common code from
3708         modify_one_vtable and dfs_fixup_vtable_deltas.
3709         (add_virtual_function): Set BF_VCALL_INDEX.
3710         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
3711         and BF_FN.
3712         (modify_one_vtable): Simplify.
3713         (dfs_fixup_vtable_deltas): Likewise.
3714         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
3715         * method.c (make_thunk): Handle vcall indices.
3716         
3717 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
3718
3719         Compiler side new abi rtti (not enabled).
3720         * cp-tree.h (new_abi_rtti_p): New macro.
3721         (emit_support_tinfos): Prototype new function.
3722         (tinfo_decl_p): Likewise.
3723         (emit_tinfo_decl): Likwise.
3724         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
3725         macros.
3726         (doing_runtime): New local static.
3727         (init_rtti_processing): Add new-abi initializer.
3728         (get_tinfo_decl): Add new-abi logic.
3729         (tinfo_from_decl): Likewise.
3730         (build_dynamic_cast_1): Likewise.
3731         (qualifier_flags): New static function.
3732         (tinfo_base_init): Likewise.
3733         (generic_initializer): Likewise.
3734         (ptr_ref_initializer): Likewise.
3735         (ptmd_initializer): Likewise.
3736         (class_hint_flags): Likewise.
3737         (class_initializer): Likewise.
3738         (synthesize_tinfo_var): Likewise.
3739         (create_real_tinfo_var): Likewise.
3740         (create_pseudo_type_info): Likewise.
3741         (get_vmi_pseudo_type_info): Likewise.
3742         (create_tinfo_types): Likewise.
3743         (emit_support_tinfos): New global function.
3744         (tinfo_decl_p): New global predicate.
3745         (emit_tinfo_decl): New global function.
3746         * class.c (set_rtti_entry): Generalize for old and new rtti.
3747         (build_vtbl_initializer): Likewise.
3748         * decl2.c (finish_file): Likewise.
3749
3750 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
3751
3752         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
3753         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
3754
3755 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
3756
3757         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
3758         for scopes.
3759
3760 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
3761
3762         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
3763
3764 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
3765
3766         * optimize.c (calls_setjmp_r): Supply new argument
3767         to special_function_p.
3768
3769 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3770
3771         * call.c: PROTO -> PARAMS.
3772         * class.c: Likewise.
3773         * cp-tree.h: Likewise.
3774         * cvt.c: Likewise.
3775         * decl.c: Likewise.
3776         * decl.h: Likewise.
3777         * decl2.c: Likewise.
3778         * dump.c: Likewise.
3779         * errfn.c: Likewise.
3780         * error.c: Likewise.
3781         * except.c: Likewise.
3782         * expr.c: Likewise.
3783         * init.c: Likewise.
3784         * input.c: Likewise.
3785         * lex.c: Likewise.
3786         * lex.h: Likewise.
3787         * method.c: Likewise.
3788         * optimize.c: Likewise.
3789         * parse.y: Likewise.
3790         * pt.c: Likewise.
3791         * repo.c: Likewise.
3792         * rtti.c: Likewise.
3793         * search.c: Likewise.
3794         * semantics.c: Likewise.
3795         * spew.c: Likewise.
3796         * tree.c: Likewise.
3797         * typeck.c: Likewise.
3798         * typeck2.c: Likewise.
3799         * xref.c: Likewise.
3800
3801 2000-01-25  Richard Henderson  <rth@cygnus.com>
3802
3803         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
3804
3805 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
3806
3807         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
3808         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
3809         (struct vcall_offset_data_s): New type.
3810         (dfs_vcall_offset_queue_p): New function.
3811         (dfs_build_vcall_offset_vtbl_entries): Likewise.
3812         (build_vcall_offset_vtbl_entries): Likewise.
3813         (layout_vtable_decl): Likewise.
3814         (num_vfun_entries): Likewise.
3815         (num_extra_vtbl_entries): Add the entries for vcall offsets.
3816         (build_vtbl_initializer): Likewise.
3817         (dfs_finish_vtabls): Use layout_vtable_decl.
3818         (modify_one_vtables): Always duplicate vtables under the new ABI.
3819         (finish_struct_1): Use layout_vtable_decl.
3820         
3821 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3822
3823         * decl.c (member_function_or_else): Change third arg from a format
3824         specifier to an `enum overload_flags'.  Callers changed.
3825
3826 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
3827
3828         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
3829         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
3830         build_const_cast, get_delta_difference, check_return_expr): Avoid
3831         ANSI string concatenation usage.  
3832
3833 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
3834
3835         * class.c (layout_class_type): Put the fields required to make a
3836         class non-empty at the end, not the beginning, of the TYPE_FIELDs
3837         list.
3838
3839 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
3840
3841         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
3842         template.
3843
3844         * decl2.c (mark_used): Do instantiate inlines that have been
3845         explicitly instantiated.
3846
3847 2000-01-24  Richard Henderson  <rth@cygnus.com>
3848
3849         * call.c (build_over_call): Use expand_tree_builtin.
3850         * typeck.c (build_function_call_real): Likewise.
3851         (build_binary_op_nodefault): Handle unordered compares.
3852
3853 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
3854
3855         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
3856         cp_tree_index values.
3857         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
3858         New global node #defines for them.
3859         * rtti.c (call_void_fn): Replace with ...
3860         (build_runtime_decl): ... new static function.
3861         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
3862         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
3863         (build_dynamic_cast_1): Always produce correctly typed result.
3864         Explicitly produce type_info addresses. Use dynamic_cast_node.
3865         * exception.cc (__throw_bad_cast): Return `void *'.
3866         (__throw_bad_typeid): Return `const type_info &'.
3867
3868 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
3869
3870         * cp-tree.h (get_vtable_decl): Prototype new function.
3871         * class.c (get_vtable_decl): New function. Broken out from ...
3872         (build_vtable): ... here. Use it.
3873         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
3874         by get_vtable_decl.
3875
3876 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
3877
3878         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
3879         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
3880         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
3881         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
3882         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
3883         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
3884         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
3885         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
3886         (CPTI_TINFO_VAR_ID): New enumeration.
3887         (__tp_desc_type_node, __access_mode_type_node,
3888         __bltn_desc_type_node, __user_desc_type_node,
3889         __class_desc_type_node, __ptr_desc_type_node,
3890         __attr_desc_type_node, __func_desc_type_node,
3891         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
3892         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
3893         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
3894         enum_desc_type_node, class_desc_type_node,
3895         si_class_desc_type_node, vmi_class_desc_type_node,
3896         ptmd_desc_type_node, base_desc_type_node): New #defines.
3897         (tinfo_fn_id, tinfo_fn_type): Rename to ...
3898         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
3899         (tinfo_var_id): New enumeration.
3900         (DECL_TINFO_FN_P): Augment comment.
3901         * decl.c (cp_global_trees): Adjust documentation.
3902         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
3903         tinfo_decl_type and tinfo_var_id.
3904         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
3905         (build_typeid): Remove unused variable.
3906         (get_tinfo_var): Use tinfo_var_id.
3907         (tinfo_name): New static function.
3908         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
3909         (tinfo_from_decl): Likewise.
3910         (get_base_offset): New static function, broken out of
3911         expand_class_desc.
3912         (expand_si_desc): Use tinfo_name.
3913         (expand_class_desc): Likewise. Lose local static variable.
3914         Use base_desc_type_node. Use get_base_offset.
3915         (expand_ptr_desc): Use tinfo_name.
3916         (expand_attr_desc): Likewise.
3917         (expand_generic_desc): Likewise.
3918
3919         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
3920         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
3921
3922 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
3923
3924         * cp-tree.h (__eprintf): Remove declaration.
3925         * tree.c (__eprintf): Remove definition.
3926
3927 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
3928             Mark Mitchell  <mark@codesourcery.com>
3929
3930         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3931         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
3932
3933 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
3934
3935         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
3936
3937 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
3938
3939         * cp-tree.h (register_dtor_fn): New function.
3940         * decl.c (destroy_local_static): Rename to ...
3941         (register_dtor_fn): ... this.  Give it external linkage.
3942         (expand_static_init): Use it.
3943         * decl2.c (do_static_initialization): Likewise, if using
3944         __cxa_atexit.
3945         (do_static_destruction): Check that __cxa_atexit is not in use.
3946         (finish_file): Don't call do_static_destruction if using
3947         __cxa_atexit.
3948
3949         * typeck.c (convert_arguments): Restore two-message error
3950         reporting.
3951         
3952 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
3953
3954         Remap dynamic cast hint values to be consistent across ABIs.
3955         * search.c (dynamic_cast_base_recurse): Remap generated value.
3956         (get_dynamic_cast_base_type): Adjust documentation.
3957         * tinfo.h (__user_type_info::dyncast): Likewise.
3958         (__user_type_info::find_public_subobj): Remap BOFF meaning.
3959         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
3960         (__class_type_info::do_dyncast): Likewise.
3961         (__class_type_info::do_find_public_subobj): Likewise.
3962         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
3963
3964 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
3965
3966         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
3967
3968         * typeck2.c (incomplete_type_error): Restore previous
3969         cp_error and cp_error_at call sequence.
3970         
3971 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
3972
3973         * class.c (dump_class_hierarchy): Make format agree with argument;
3974         cast pointer to unsigned long and print with %lx.
3975         
3976 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
3977
3978         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
3979         
3980         * typeck.c (composite_pointer_type, common_type,
3981         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
3982         build_function_call_real, convert_arguments,
3983         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
3984         build_unary_op, mark_addressable, build_compound_expr,
3985         build_static_cast, build_reinterpret_cast, build_const_cast,
3986         build_c_cast, build_modify_expr, get_delta_difference,
3987         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
3988         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
3989         into a single one.
3990         * typeck2.c (readonly_error, abstract_virtuals_error,
3991         process_init_constructor, check_for_new_type): Likewise.
3992
3993 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
3994
3995         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
3996         VAR_DECLs.
3997
3998 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
3999
4000         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
4001         (build_x_typeid): Likewise.
4002         (get_tinfo_fn): Likewise.
4003         (get_tinfo_fn_unused): Rename to ...
4004         (get_tinfo_decl): ... here.
4005         * rtti.c (build_headof): Replace logic error with assertion.
4006         (get_tinfo_fn_dynamic): Rename to ...
4007         (get_tinfo_decl_dynamic): ... here. Make static. Use
4008         complete_type_or_else.
4009         (build_x_typeid): Move into ...
4010         (build_typeid): ... here. Adjust call to
4011         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
4012         throw_bad_typeid expression.
4013         (get_tinfo_fn_unused): Rename to ...
4014         (get_tinfo_decl): ... here. Adjust comment.
4015         (get_tinfo_fn): Delete.
4016         (tinfo_from_decl): New static function.
4017         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
4018         (get_typeid): Use complete_type_or_else.
4019         (build_dynamic_cast_1): Adjust calls to
4020         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
4021         * parse.y (primary): Adjust call to build_typeid.
4022         * except.c (build_eh_type_type_ref): Adjust call to
4023         get_tinfo_decl. Mark as used.
4024         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
4025         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
4026         * parse.c: Regenerated.
4027
4028 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
4029
4030         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
4031         calling convention.
4032         (resolves_to_fixed_type_p): Document calling convention.
4033         * rtti.c (build_x_typeid): Initialize NONNULL.
4034
4035         * cp-tree.h (build_shared_int_cst): New function.
4036         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
4037         * class.c (modify_vtable_entry): Likewise.
4038         (add_virtual_function): Split out code to generated shared
4039         INTEGER_CSTs to build_share_int_cst.
4040         (modify_all_vtables): Handle all the overridden functions here.
4041         Add overridden functions from non-primary virtual bases to the
4042         primary vtable.
4043         (finish_struct_1): Adjust call to modify_all_vtables.  Add
4044         overridden functions from non-primary bases to the vtable.
4045         * tree.c (build_shared_int_cst): New function.
4046         
4047         * cp-tree.h (scratchalloc): Remove.
4048         (build_scratch_list): Likewise.
4049         * call.c (convert_class_to_reference): Replace build_scratch_list
4050         and build_expr_list with build_tree_list.
4051         (add_candidate): Replace scratchalloc with expralloc.  Note memory
4052         leak.
4053         (build_user_type_conversion_1):  Replace build_scratch_list
4054         and build_expr_list with build_tree_list.
4055         (build_new_op): Likewise.
4056         (build_op_delete_call): Likewise.
4057         (convert_like): Likewise.
4058         * cvt.c (ocp_convert): Likewise.
4059         * decl.c (start_decl): Likewise.
4060         (start_function): Likewise.
4061         (finish_destructor_body): Likewise.
4062         (maybe_build_cleanup_1): Likewise.
4063         * decl2.c (reparse_decl_as_expr): Likewise.
4064         * init.c (perform_member_init): Likewise.
4065         (expand_cleanup_for_base): Likewise.
4066         (build_builtin_delete_call): Likewise.
4067         (build_new_1): Likewise.
4068         (build_delete): Likewise.
4069         * method.c (do_build_assign_ref): Likewise.
4070         * parse.y (already_scoped_stmt): Likewise.
4071         (nontrivial_exprlist): Likewise.
4072         (net_initializer): Likewise.
4073         (initlist): Likewise.
4074         * parse.c: Regenerated.
4075         * rtti.c (build_x_typeid): Likewise.
4076         (build_dynamic_cast_1): Likewise.
4077         * typeck.c (build_x_compound_expr): Likewise.
4078         (build_static_cast): Likewise.
4079         (build_modify_expr): Likewise.
4080         
4081         * cp-tree.h (DECL_VINDEX): Add documentation.
4082         * class.c (build_vtable_entry): Likewise.
4083         (start_vtable): Add comment.
4084         (add_virtual_function): Replace pending_hard_virtuals with
4085         overridden_virtuals and pending_virtuals with new_virtuals.
4086         Replace redundant assignments with assertions.
4087         (check_for_override): Add comment.
4088         (check_bases_and_members): Replace pending_hard_virtuals with
4089         overridden_virtuals and pending_virtuals with new_virtuals.
4090         (create_vtbl_ptr): Likewise.
4091         (layout_class_type): Likewise.
4092         (finish_struct_1): Likewise.  Add comments.
4093         
4094 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
4095
4096         * class.c (finish_struct_1): Replace redundant code with
4097         assertions.
4098
4099         * cp-tree.h (flag_new_abi): Move.
4100         (flag_use_cxa_atexit): Likewise.
4101         (flag_honor_std): Likewise.
4102         (flag_rtti): Likewise.
4103         (vbase_offsets_in_vtable_p): Define.
4104         (vptrs_present_everywhere_p): Likewise.
4105         (TYPE_CONTAINS_VPTR_P): Likewise.
4106         (dfs_walk_real): Declare.
4107         * class.c (build_vbase_pointer_fields): Check
4108         vbase_offsets_in_vtable_p.
4109         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
4110         BINFO_VPTR_FIELD.
4111         (build_vbase_offset_vtbl_entries): Simplify.
4112         (build_vbase_offset_vtbl_entries): Adjust.
4113         (build_vbase_pointer): Add ability to look up vbase offsets in
4114         vtable. 
4115         (start_vtable): New function.
4116         (add_virtual_function): Use it.
4117         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
4118         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
4119         (build_vtbl_initializer): Take the type of the complete object as
4120         input.  Use it to correctly calculate vbase offsets.
4121         (dfs_finish_vtbls): Pass the complete type to
4122         build_vtbl_initializer.
4123         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
4124         (create_vtable_ptr): Create a vtable even if there are no
4125         new virtual functions, under the new ABI.
4126         (finish_struct_1): Likewise.
4127         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
4128         * decl.c (exapnd_static_init): Remove call to
4129         preserve_initializer.
4130         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
4131         vtables.
4132         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
4133         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
4134         (construct_virtual_bases): Don't initialize virtual base pointers
4135         under the new ABI.
4136         (build_aggr_init): Clean up comment.
4137         (expand_aggr_init_1): Likewise.
4138         * rtti.c (expand_class_desc): Store the virtual function table
4139         index where the vbase offset lives in the offset field.
4140         * search.c (dfs_walk_real): Make it global.
4141         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
4142         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
4143         
4144         * tinfo.h (USItype): Make it signed under the new ABI.
4145         * tinfo.cc (convert_to_base): New function.  Encapsulate base
4146         conversion logic here.
4147         (__class_type_info::do_upcast): Use it.
4148         (__class_type_info::do_dyncast): Likewise.
4149         (__class_type_info::do_find_public_subobj): Likewise.
4150         
4151         * init.c (construct_virtual_bases): Don't look up the addresses of
4152         virtual bases at run-time.
4153
4154         * class.c (build_vbase_pointer): Relocate.
4155         (build_vbase_pointer_fields): Likewise.
4156         (dfs_build_vbase_offset_vtbl_entries): Likewise.
4157         (build_vbase_offset_vtbl_entries): Likewise.
4158
4159         * decl.c (init_decl_processing): Complain if -fnew-abi
4160         -fno-vtable-thunks is used.
4161
4162         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
4163         flag_new_abi.
4164
4165 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
4166
4167         * cp-tree.h (num_extra_vtbl_entries): New function.
4168         (size_extra_vtbl_entries): Likewise.
4169         (dfs_vtable_path_unmark): Likewise.
4170         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
4171         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
4172         * class.c (num_extra_vtbl_entries): New function.
4173         (size_extra_vtbl_entries): Likewise.
4174         (dfs_build_vbase_offset_vtbl_entries): New function.
4175         (build_vbase_offset_vtbl_entries): Likewise.
4176         (build_vtbl_initializer): Use it.
4177         (finish_struct_1): Adjust vtable sizes (using
4178         num_extra_vtbl_entries).
4179         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
4180         THUNK_DECL is non-NULL before expanding it.
4181         * init.c (expand_virtual_init): Adjust the vtable pointer by
4182         size_extra_vtbl_entries before storing it.
4183         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
4184         Handle TREE_LIST parameters here, not in the dfs_* functions.
4185         (dfs_unmarked_real_bases_queue_p): Adjust.
4186         (dfs_marked_real_bases_queue_p): Likewise.
4187         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
4188         (dfs_vtable_path_marked_real_bases_queue_p): New function.
4189         (dfs_vtable_path_unmark): Likewise.
4190         
4191 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
4192
4193         * optimize.c (copy_body_r): Clear the operand three of a
4194         TARGET_EXPR when copying it.
4195
4196 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4197
4198         * method.c (build_decl_overload_real): Check whether we are in ::
4199         before returning __builtin_new/delete.
4200
4201 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
4202
4203         * pt.c (tsubst_friend_function): Improve comment.
4204         (instantiate_decl): Avoid crashing when a "nested" function is
4205         instantiated from the top level.
4206         
4207         * dump.c (dqeueue_and_dump): Dump
4208         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
4209
4210 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4211
4212         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
4213
4214 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
4215
4216         * g++spec.c (lang_specific_driver): Add -fnew-abi if
4217         ENABLE_NEW_GXX_ABI defined.
4218         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
4219         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
4220         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
4221
4222 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
4223
4224         * decl.c (start_cleanup_fn): Call pushdecl.
4225
4226         * call.c (convert_class_to_reference): Fix typos.
4227         (build_conditional_expr): Handle errors gracefully.
4228         * class.c (push_nested_class): Likewise.
4229         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
4230         (DECL_THIS_EXTERN): Use it.
4231         (DECL_THIS_STATIC): Likewise.
4232         * cvt.c (convert_to_void): Handle errors gracefully.
4233         (build_expr_type_conversion): Likewise.
4234         * decl.c (maybe_push_decl): Likewise.
4235         (start_decl_1): Likewise.
4236         (require_complete_types_for_parms): Likewise.
4237         * parse.y (structsp): Likewise.
4238         (base_class): Likewise.
4239         * parse.c: Regenerated.
4240         * pt.c (finish_member_template_decl): Likewise.
4241         * typeck.c (decay_conversion): Likewise.
4242         
4243         * cp-tree.h (dfs_skip_vbases): New function.
4244         (find_vbase_instance): Likewise.
4245         * class.c (determine_primary_base): Allow a nearly empty base to
4246         serve as a primary base class under the new ABI.
4247         (get_class_offset_1): Rename to ...
4248         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
4249         messages here.
4250         (get_class_offset): Use it.  Issue error messages here.
4251         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
4252         find the right copies of virtual bases.
4253         (fixup_vtable_deltas1): Rename to ...
4254         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
4255         bases as primary bases.
4256         (fixup_vtable_deltas): Remove.
4257         (override_one_vtable): Handle virtual bases as primary bases.
4258         (merge_overrides): Likewise.
4259         (finish_struct_1): Likewise.
4260         (dump_class_hierarchy): Dump primary-ness of bases as well.
4261         * search.c (mark_primary_bases): Use a pre-order traversal to
4262         handle primary virtual bases.
4263         (dfs_skip_vbases): New fiunction.
4264         (expand_upcast_fixups): Adjust to handle primary virtual bases.
4265         (fixup_virtual_upcast_offsets): Likewise.
4266         (fixup_all_virtual_upcast_offsets): Likewise.
4267         (dfs_find_vbase_instances): New function.
4268         (find_vbase_instance): Likewise.
4269         
4270 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
4271
4272         * lex.c (DIR_SEPARATOR): Delete macro.
4273
4274 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
4275  
4276        * decl2.c (lang_decode_option): Handle automatic line wrapping
4277        option.
4278         
4279 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
4280
4281         * friend.c (do_friend): Don't resolve scopes when processing
4282         template declarations, even if the qualifying scope doesn't
4283         involve template parameters.
4284
4285 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
4286
4287         * class.c (dfs_modify_vtables_queue_p): Remove.
4288         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
4289         and dfs_marked_real_bases_queue_p instead of
4290         dfs_modify_vtables_queue_p.
4291
4292         * class.c (build_vbase_path): Simplify.
4293         (dfs_propagate_binfo_offsets): New function.
4294         (propagate_binfo_offsets): Use it.
4295         (remove_base_field): Simplify.
4296         (dfs_set_offset_for_vbases): Remove.
4297         (dfs_set_offset_for_shared_vbases): New function.
4298         (dfs_set_offset_for_unshared_vbases): Likewise.
4299         (layout_virtual_bases): Use them.
4300         (layout_basetypes): Don't call propagate_binfo_offsets.
4301         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
4302         for the vbases.
4303         
4304         * class.c (build_base_field): New function, split out from ...
4305         (build_base_fields): ... here.  Use it.  Allocate primary bases
4306         first, under the new ABI.
4307         (get_vtable_entry): Remove.
4308         (remove_base_field): New function, split out from ...
4309         (remove_base_fields): ... here.  Adjust since primary bases come
4310         first under the new ABI.
4311         
4312         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
4313         (initialize_vtbl_ptrs): New function.
4314         (expand_indirect_vtbls_init): Change prototype.
4315         (convert_pointer_to_vbase): Declare.
4316         * init.c (expand_direct_vtbls_init): Remove.
4317         (dfs_initialize_vtbl_ptrs): New function.
4318         (initialize_vtbl_ptrs): Likewise.
4319         (emit_base_init): Use initialize_vtbl_ptrs.
4320         * search.c (convert_pointer_to_vbase): Make it global.
4321         (expand_indirect_vtbls_init): Remove vtable initialization code.
4322         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
4323         
4324         * class.c (dfs_finish_vtbls): New function.
4325         (finish_vtbls): Use it.
4326         (dump_class_hierarchy): New function.
4327         
4328         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
4329         (BINFO_VBASE_PRIMARY_P): New macro.
4330         (BINFO_VIRTUALS): Add to documentation.
4331         (SET_BINFO_PRIMARY_MARKED_P): Remove.
4332         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4333         (dfs_mark_primary_bases_queue_p): Likewise.
4334         (dfs_unmarked_real_bases_queue_p): New function.
4335         (dfs_marked_real_bases_queue_p): Likewise.
4336         * search.c (dfs_mark_primary_bases): Adjust.
4337         (mark_primary_bases): Likewise.
4338         (get_shared_vbase_if_not_primary): New function.
4339         (dfs_unmarked_real_bases_queue_p): Likewise.
4340         (dfs_marked_real_bases_queue_p): Likewise.
4341         (dfs_get_pure_virtuals): Simplify.
4342         (get_pure_virtuals): Likewise.
4343         
4344 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4345
4346         * lex.c: Include tm_p.h.
4347
4348 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
4349
4350         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
4351
4352 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
4353
4354         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
4355         * pt.c (instantiate_decl): Defer comdat templates that might not be
4356         needed.
4357         
4358         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
4359         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
4360         (finish_file): Likewise.
4361
4362         * decl2.c (import_export_class): Undo 12/14 change.
4363
4364         * error.c (dump_decl): operator new, not operatornew.
4365
4366         * class.c (field_decl_cmp): A nontype is "greater" than a type.
4367         * search.c (lookup_field_1): Look for the last field with the
4368         desired name.
4369
4370 2000-01-05  Nathan Sidwell  <nathan@acm.org>
4371
4372         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
4373         FUNCTION_DECL.
4374
4375 2000-01-05  Nathan Sidwell  <nathan@acm.org>
4376
4377         * typeck.c (build_static_cast): Don't strip target qualifiers
4378         when casting from a class.
4379
4380 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4381
4382         * class.c (warn_hidden): Initialize variable `fndecl'.
4383
4384 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
4385
4386         * decl.c (flag_isoc9x): New variable to be able to use code in
4387         c-common.c.  For now always zero.
4388
4389 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
4390
4391         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4392         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
4393         or unshare_base_binfos for virtual bases here.
4394         * search.c (dfs_get_vbase_types): Do it here.
4395         (get_vbase_types): Adjust.
4396         
4397 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
4398
4399         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
4400         (BINFO_PRIMARY_MARKED_P): Use flag 5.
4401         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4402         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4403         (unmark_primary_bases): Remove declaration.
4404         (unmarkedp): Declare.
4405         (dfs_vbase_unmark): Likewise.
4406         * class.c (determine_primary_base): Return immediately if there
4407         are no base classes.  Call mark_primary_bases here.
4408         (modify_all_direct_vtables): Remove.
4409         (modify_all_indirect_vtables): Remove.
4410         (dfs_modify_vtables_queue_p): New function.     
4411         (dfs_modify_vtables): New function.
4412         (modify_all_vtables): Use them.
4413         (build_base_fields): Build FIELD_DECLs for primary virtual base
4414         classes.
4415         (create_vtable_ptr): Don't call determine_primary_base here.
4416         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
4417         (dfs_set_offset_for_vbases): ... this.
4418         (layout_virtual_bases): Use it.
4419         (layout_class_type): Call determine_primary_base here.
4420         * search.c (unmarkedp): Make it global.
4421         (shared_marked_p): Simplify.
4422         (shared_unmarked_p): Likewise.
4423         (dfs_primary_bases_queue_p): Remove.
4424         (dfs_unmark_primary_bases): Likewise.
4425         (unmark_primary_bases): Likewise.
4426         (mark_primary_bases): Simplify.
4427         (get_pure_virtuals): Don't call mark_primary_bases here.
4428         (dfs_vbase_unmark): New function.
4429         (get_vbase_types): Simplify.
4430
4431         * class.c (struct base_info): Remove.
4432         (determine_primary_base): Take has_virtual_p rather than a
4433         base_info as input.  Don't calculate max_has_virtual.
4434         (finish_struct_bits): Remove max_has_virtual argument.
4435         (create_vtable_ptr): Remove max_has_virtual_p argument.
4436         (layout_virtual_bases): Remove max argument.
4437         (layout_basetypes): Likewise.
4438         (layout_class_type): Remove max_has_virtual_p argument.
4439         (finish_struct_1): Remove max_has_virtual.
4440
4441         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
4442         (layout_basetypes): Remove.
4443         * class.c (propagate_binfo_offsets): Moved here from tree.c.
4444         Update to handle primary virtual bases.
4445         (remove_base_fields): New function, split out from
4446         layout_basetypes.
4447         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
4448         (layout_virtual_bases): New function, split out from
4449         layout_basetypes.  Update to handle primary virtual bases.
4450         (layout_basetypes): Moved here from tree.c.  Use
4451         remove_base_fields and layout_virtual_bases.
4452         * search.c (dfs_mark_primary_bases_queue_p): New function.
4453         (mark_primary_bases): Use it.
4454         * tree.c (CEIL): Remove.
4455         (propagate_binfo_offsets): Remove.
4456         (layout_basetypes): Remove.
4457         
4458 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
4459
4460         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
4461         (BINFO_PRIMARY_MARKED_P): New macro.
4462         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4463         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4464         (mark_primary_bases): New function.
4465         (unmark_primary_bases): Likewise.
4466         * search.c (get_abstract_virtuals_1): Remove.
4467         (dfs_mark_primary_bases): New function.
4468         (mark_primary_bases): Likewise.
4469         (dfs_unmark_primary_bases): Likewise.
4470         (unmark_primary_bases): Likewise.
4471         (dfs_get_pure_virtuals): Likewise.
4472         
4473 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
4474
4475         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
4476         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
4477         (modify_one_vtable): Adjust.
4478         (fixup_vtable_deltas1): Likewise.
4479         (override_one_vtable): Likewise.
4480         * search.c (get_abstract_virtuals_1): Likewise.
4481         (get_pure_virtuals): Likewise.
4482         (expand_upcast_fixups): Likewise.
4483         * tree.c (debug_binfo): Likewise.
4484         
4485         * class.c (build_vtable): Don't return a value.  Don't rebuild
4486         vtables for bases that have already been handled.
4487         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
4488         already been handled.
4489         (modify_one_vtable): Adjust accordingly.
4490         (fixup_vtable_deltas1): Likewise.
4491         (finish_struct_1): Likewise.
4492
4493 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4494
4495         * call.c (build_new_method_call): Also check destructors.
4496
4497 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
4498
4499         * cp-tree.h (VF_NORMAL_VALUE): Remove.
4500         * class.c (struct base_info): Remove vfield, vfields, and rtti.
4501         (set_primary_base): New function, split out from ...
4502         (finish_base_struct): ... here.  Rename to ...
4503         (determine_primary_base): ... this.  Simplify.
4504         (create_vtable_ptr): Tweak accordingly.
4505         (finish_struct_1): Simplify.
4506         
4507         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
4508         (CLASSTYPE_N_BASECLASSES): Likewise.
4509         (BINFO_FOR_VBASE): New macro.
4510         (get_vbase_types): Change prototype.
4511         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
4512         (prepare_fresh_vtable): Likewise.
4513         (finish_vtbls): Likewise.
4514         (get_class_offset_1): Likewise.
4515         (modify_all_indirect_vtables): Likewise.
4516         (build_vbase_pointer_fields): Likewise.
4517         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
4518         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
4519         (expand_member_init): Likewise.
4520         * search.c (get_base_distance): Likewise.
4521         (lookup_field_queue_p): Likewise.
4522         (virtual_context): Likewise.
4523         (get_vbase_types): Don't return a value.  Set
4524         CLASSTYPE_VBASECLASSES here.
4525         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
4526         
4527 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
4528
4529         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
4530
4531 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
4532
4533         * class.c (create_vtable_ptr): Put the vtable at the beginning of
4534         the class, not the end, in the new ABI.
4535         * tree.c (propagate_binfo_offsets): Do the right thing for the new
4536         ABI.
4537
4538 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
4539
4540         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
4541         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
4542         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
4543         (check_field_decls): Likewise.
4544         (check_bases_and_members): Likewise.
4545
4546 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
4547
4548         * cp-tree.h (do_inline_function_hair): Remove.
4549         * class.c (layout_class_type): New function, split out from
4550         finish_struct_1.
4551         (fixup_pending_inline): Likewise.
4552         (fixup_inline_methods): New function.
4553         * method.c (fixup_pending_inline): Remove.
4554         (do_inline_function_hair): Likewise.
4555         
4556         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
4557         new ABI.
4558         
4559         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
4560         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
4561         (CLASSTYPE_PURE_VIRTUALS): ... this.
4562         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
4563         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
4564         (DECL_PURE_VIRTUAL_P): ... this.
4565         (get_abstract_virtuals): Rename to ...
4566         (get_pure_virtuals): ... this.
4567         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
4568         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
4569         CLASSTYPE_PURE_VIRTUALS.
4570         * class.c (build_vtable_entry): Likewise.
4571         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
4572         get_abstract_virtuals.
4573         (build_vtbl_initializer): Likewise.
4574         (override_one_vtable): Likewise.
4575         (check_methods): Likewise.
4576         * decl.c (duplicate_decls): Likewise.
4577         (redeclaration_error_message): Likewise.
4578         (lang_mark_tree): Likewise.
4579         * decl2.c (grok_function_init): Likewise.
4580         (import_export_vtable): Likewise.
4581         (import_expor_class): Likewise.
4582         * typeck2.c (abstract_virtuals_error): Likewise.
4583         * xref.c (GNU_xref_member): Likewise.
4584         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
4585         
4586 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
4587
4588         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
4589         throughout.
4590
4591 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
4592
4593         * decl.c (store_return_init): Use mode of old RTL generated for
4594         DECL_RESULT, not the mode of DECL_RESULT itself.
4595         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
4596         for functions that used named return values.
4597         
4598 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
4599
4600         * semantics.c (expand_body): Use
4601         note_deferral_of_defined_inline_function.
4602
4603 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
4604
4605         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
4606
4607 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
4608
4609         * error.c (dump_decl): Support named return values.
4610
4611 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
4612
4613         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
4614         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
4615         (CLASSTYPE_PRIMARY_BINFO): Likewise.
4616         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
4617         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
4618         (check_bases_and_members): Set them here instead.
4619         (create_vtable_ptr): New function, split out from ...
4620         (finish_struct_1): ... here.  Use it.  Tidy.  Use
4621         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
4622         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
4623         the first field in the class.
4624         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
4625         seeing TYPE_VFIELD as the first field in the class.
4626         
4627         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
4628         (TYPE_POLYMORPHIC_P): ... this.
4629         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
4630         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
4631         (TREE_CALLS_NEW): Remove.
4632         (TREE_MANGLED): Likewise.
4633         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
4634         and TYPE_POLYMORPHIC_P.
4635         * class.c (check_bases): Likewise.
4636         (finish_base_struct): Likewise.
4637         (finish_struct_bits): Likewise.
4638         (check_for_override): Likewise.
4639         (finish_struct_1): Likewise.
4640         (get_vfield_name): Likewise.
4641         * decl.c (xref_basetypes): Likewise.
4642         * decl2.c (import_export_class): Likewise.
4643         (import_export_decl): Likewise.
4644         * error.c (dump_function_decl): Likewise.
4645         * pt.c (instantiate_class_template): Likewise.
4646         * repo.c (repo_inline_used): Likewise.
4647         * rtti.c (build_headof): Likewise.
4648         (get_tinfo_fn_dynamic): Likewise.
4649         (build_x_typeid): Likewise.
4650         (get_tinfo_var): Likewise.
4651         (build_dynamic_cast_1): Likewise.
4652         (synthesize_tinfo_fn): Likewise.
4653         * search.c (lookup_field_1): Likewise.
4654         (dfs_debug_mark): Likewise.
4655         (maybe_suppress_debug_info): Likewise.
4656         * typeck.c (build_component_ref): Likewise.
4657         (build_component_addr): Likewise.
4658         * typeck2.c (process_init_constructor): Likewise.
4659         
4660 1999-12-20  Nathan Sidwell  <nathan@acm.org>
4661
4662         * typeck.c (strip_all_pointer_quals): New static function.
4663         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
4664
4665 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
4666
4667         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
4668         (dso_handle_node): New macro.
4669         (flag_use_cxa_atexit): New variable.
4670         (declare_global_var): New function.
4671         (start_anon_func): Remove declaration.
4672         (end_anon_func): Likewise.
4673         * decl.c (get_atexit_node): New function, split out from
4674         destroy_local_static.  Handle flag_use_cxa_atexit.
4675         (get_dso_handle_node): Likewise.
4676         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
4677         except.c.  Handle flag_use_cxa_atexit.
4678         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
4679         except.c.
4680         (declare_global_var): New variable.
4681         (destroy_local_static): Handle flag_use_cxa_atexit.
4682         * decl2.c (flag_use_cxa_atexit): New variable.
4683         (lang_f_options): Likewise.
4684         * except.c (start_anon_func): Remove.
4685         (end_anon_func): Liekwise.
4686         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
4687         * rtti.c (get_tinfo_var): Use declare_global_var.
4688
4689 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
4690
4691         * class.c (check_field_decls): Don't return a value.
4692         (avoid_overlap): Moved here from tree.c.
4693         (build_base_fields): Likewise.
4694         (check_bases): New function, split out from finish_base_struct.
4695         (check_bases_and_members): New function, split out from 
4696         finish_struct_1.
4697         (struct base_info): Remove cant_have_default_ctor,
4698         cant_have_const_ctor, cant_have_asn_ref.
4699         (finish_base_struct): Split semantic analysis into check_bases.
4700         (finish_struct_methods): Fix bogus assertion.
4701         (check_field_decls): Call finish_struct_anon here.
4702         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
4703         (finish_struct_1): Use check_bases_and_members.  Reorganize.
4704         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4705         (build_base_fields): Don't declare.
4706         * tree.c (avoid_overlap): Remove.
4707         (build_base_fields): Likewise.
4708         
4709         * optimize.c (struct inline_data): Remove scope_stmt.
4710         (remap_block): Don't use insert_block_after_note.  Don't update
4711         scope_stmt.
4712         (expand_call_inline): Don't update scope_stmt.
4713         (optimize_function): Don't initialize scope_stmt.
4714         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
4715         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
4716
4717 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
4718
4719         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
4720         out of the class, rather than taking them as parameters.
4721         (build_vbase_pointer_fields): Move here from tree.c.
4722         (build_vtbl_or_vbase_field): New function.
4723         (check_methods): Likewise.
4724         (remove_zero_width_bitfields): Likewise.
4725         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
4726         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
4727         USING_DECLs here.
4728         (finish_struct_methods): Handle the case where there are no
4729         methods here.
4730         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
4731         (check_field_decls): Call delete_duplicate_fields here.
4732         (finish_struct_1): Tidy.  Use check_methods and
4733         remove_zero_width_bitfields.
4734         * cp-tree.h (build_vbase_pointer_fields): Remove.
4735         * decl.c (grokdeclarator): Use tree_cons instead of
4736         temp_tree_cons.
4737         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
4738         instead of temp_tree_cons.
4739         * lex.c (cons_up_default_function): Remove dead code.
4740         * method.c (fixup_pending_inline): New function, split out from ...
4741         (do_inline_function_hair): ... here.
4742         * tree.c (build_vbase_pointer_fields): Remove.
4743         
4744 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
4745
4746         * tree.c (walk_tree): Walk operand subtrees in forward order.
4747         * optimize.c (expand_call_inline): Likewise.
4748         (optimize_function): Initialize id->scope_stmt to something useful.
4749         (remap_block): Assume id->scope_stmt has a useful value.
4750
4751 1999-12-15  Nathan Sidwell  <nathan@acm.org>
4752
4753         * typeck.c (build_c_cast): Expand warning message. Move pointer
4754         alignment warning to after the cast. Don't warn about pointer
4755         alignment when given a pointer to incomplete.
4756
4757 1999-12-15  Richard Henderson  <rth@cygnus.com>
4758
4759         * cp-tree.h (make_aggr_type): Declare.
4760         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
4761         (make_aggr_type): New.
4762
4763         * decl.c (build_typename_type, init_decl_processing): Use it.
4764         (build_ptrmemfunc_type, xref_tag): Likewise.
4765         * except.c (call_eh_info): Likewise.
4766         * init.c (init_init_processing): Likewise.
4767         * pt.c (process_template_parm, lookup_template_class): Likewise.
4768         * rtti.c (expand_class_desc): Likewise.
4769         * semantics.c (begin_class_definition, finish_typeof): Likewise.
4770         * tree.c (copy_template_template_parm): Likewise.
4771
4772 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
4773
4774         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
4775         sizeof (struct tree_common).
4776
4777 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
4778
4779         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
4780         outermost block to point to the inlined function decl.
4781
4782         * error.c (dump_decl): operator==, not operator ==.
4783         (op_to_string): Likewise.
4784
4785         * decl.c (compute_array_index_type): Handle null name.
4786
4787         * decl2.c (ambiguous_decl): Fix to match comment.
4788         (lookup_using_namespace): Adjust.
4789
4790         * decl2.c (import_export_class): Don't ignore dllimport.
4791
4792 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
4793
4794         * class.c (check_field_decls): Split out from ...
4795         (finish_struct_1): ... here.  Use it.  Tidy.
4796
4797         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
4798         * optimize.c (copy_body_r): Pass it.
4799         * tree.c (remap_save_expr): Clear walk_subtrees for an
4800         already-handled SAVE_EXPR.
4801         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
4802
4803         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
4804         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
4805
4806         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
4807
4808 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
4809
4810         * class.c (finish_base_struct): Allow multiple COM base classes
4811         as well as non-COM bases as long as it's not the leftmost.
4812
4813 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
4814
4815         * lex.c (saving_parse_to_obstack): New global.
4816         (reinit_parse_for_block): Use.
4817         (reinit_parse_for_expr): Use.
4818         (check_newline): Use.
4819
4820 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
4821
4822         * optimize.c (initialize_inlined_parameters): Take FN to which the
4823         parameters belong as an argument.
4824         (expand_call_inline): Expand calls into the parameter
4825         initializations before pushing the function onto the list of
4826         functions we are presently expanding.
4827
4828 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4829
4830         * class.c (get_vtable_name): Use a literal format string and
4831         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
4832         (prepare_fresh_vtable): Likewise.
4833
4834         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
4835         VTABLE_NAME_FORMAT.
4836
4837         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
4838
4839         * init.c (build_vec_init): Initialize variable `try_body'.
4840
4841         * lex.c (yyerror): Don't call a variadic function with a
4842         non-literal format string.
4843
4844         * optimize.c (optimize_function): Call memset, not bzero.
4845
4846         * pt.c (for_each_template_parm_r): Add static prototype.
4847
4848 1999-12-09  Andreas Jaeger  <aj@suse.de>
4849
4850         * except.c (expand_throw): Add static attribute to match
4851         prototype.
4852
4853         * Makefile.in (semantics.o): Add dependency on output.h.
4854         * semantics.c: Include output.h for declaration of
4855         make_function_rtl.
4856
4857 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
4858
4859         * decl.c (init_decl_processing): Reenable inlining on trees.
4860         (finish_function): Likewise.
4861         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
4862         * semantics.c (simplify_aggr_init_exprs): New function.
4863         (expand_body): Use it.
4864         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
4865         sometimes present the same sub-tree twice.
4866         
4867         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
4868         `csl'.
4869
4870         * semantics.c (finish_switch_cond): Do conversions here, not ...
4871         * typeck.c (c_expand_start_case): Here.
4872
4873         * semantics.c (do_poplevel): Remove unused variable.
4874         
4875 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
4876
4877         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
4878         unless we're declaring the variable in question.
4879
4880 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
4881
4882         * decl.c (init_decl_processing): #if 0 last patch.
4883         (finish_function): Likewise.
4884
4885 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
4886
4887         * decl.c (init_decl_processing): Set flag_inline_trees if
4888         !flag_no_inline.
4889
4890         * cp-tree.h (calls_setjmp_p): Declare.
4891         * decl.c (finish_function): Mark functions that call setjmp as
4892         uninlinable.
4893         * optimize.c (calls_setjmp_r): New function.
4894         (calls_setjmp_p): Likewise.
4895
4896 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
4897
4898         * optimize.c (expand_call_inline): Wrap the expanded call in an
4899         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
4900         inlined functions.
4901
4902         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
4903         in_target_cleanup_p.
4904         (remap_decl): New function.
4905         (remap_block): Likewise.
4906         (copy_scope_stmt): Likewise.
4907         (copy_body_r): Use remap_decl and copy_scope_stmt.
4908         (copy_body): Use VARRAY_TOP_TREE.
4909         (initialize_inlined_parameters): Likewise.
4910         (declare_return_variable): Likewise.
4911         (inlinable_function_p): Check flag_inline_trees.
4912         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
4913         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
4914         parameters of the inlined function.
4915         (optimize_function): Prevent recursion into partially complete
4916         functions.
4917         
4918         * cp-tree.def (SCOPE_STMT): Take one operand.
4919         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
4920         (SCOPE_NULLIFIED_P): Redefine.
4921         (SCOPE_NO_CLEANUPS_P): New macro.
4922         (add_scope_stmt): Change prototype.
4923         * decl.c (poplevel): Tidy.  Warn about unused variables here.
4924         Record SCOPE_STMT_BLOCKs.
4925         (finish_function): Keep DECL_INITIAL for functions that might be
4926         inlined.
4927         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
4928         * semantics.c: Include rtl.h.
4929         (add_scope_stmt): Return the new scope statement and, for an
4930         end-of-scope statement, its matching begin statement.  Don't set
4931         SCOPE_NULLIFIED_P.
4932         (do_pushlevel): Simplify, now that we are always
4933         function-at-a-time.
4934         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
4935         (expand_stmt): Don't call expand_start_bindings or
4936         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
4937         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
4938         SCOPE_NULLIFIED_P.
4939         * Makefile.in (semantics.o): Depend on RTL_H.
4940         
4941         * decl2.c (pending_statics_used): Make it a macro.
4942         (saved_inlines_used): Likewise.
4943         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
4944         (mark_inline_for_output): Likewise.
4945         (ssdf_decls_used): Remove.
4946         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
4947         (generate_ctor_or_dtor_function): Adjust accordingly.
4948         
4949 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
4950             Greg McGary  <gkm@gnu.org>
4951
4952         * decl.c (duplicate_decls): Merge
4953         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
4954         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
4955
4956 1999-12-02  Mike Stump  <mrs@wrs.com>
4957
4958         * init.c (perform_member_init): Handle parse errors better.
4959
4960 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
4961
4962         * cp-tree.h (min_tree_cons): Remove.
4963         (scratch_ovl_cons): Likewise.
4964         * decl.c (saveable_obstack): Don't declare.
4965         (duplicate_decls): Tweak error-message.
4966         (initialize_local_var): Explicitly mark the definition as static.
4967         (finish_function): Call permanent_allocation, just so
4968         that the middle-end sees the obstacks it expects.
4969         (mark_cp_function_context): Likewise.
4970         * init.c (build_new): Don't use min_tree_cons.
4971         * lex.c (permanent_obstack): Don't declare.
4972         (current_obstack, saveable_obstack): Likewise.
4973         * spew.c (current_obstack, saveable_obstack): Likewise.
4974         * tree.c (current_obstack, saveable_obstack): Likewise.
4975         (scratch_ovl_cons): Remove.
4976         (build_min_nt): Don't mess with obstacks.
4977         (build_min): Likewise.
4978         (min_tree_cons): Remove
4979         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
4980         (build_x_function_call): Likewise.
4981         (build_c_cast): Don't use min_tree_cons.
4982         
4983 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
4984
4985         * pt.c (tsubst_decl): Robustify.
4986
4987 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
4988
4989         * decl2.c (finish_file): Call expand_body for inline functions
4990         that will be written out but that do not yet have RTL.
4991         * semantics.c (expand_body): Do not generate RTL For inline
4992         functions that do not yet need to be written out.
4993
4994 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
4995
4996         * Make-lang.in (CXX_SRCS): Add optimize.c.  
4997         * Makefile.in (CXX_OBJS): Add optimize.o.
4998         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
4999         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
5000         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
5001         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
5002         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
5003         (dump.o): Likewise.
5004         (optimize.o): New target.  
5005         * class.c: Don't include splay-tree.h.
5006         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
5007         * cp-tree.h: Include splay-tree.h.
5008         (DECL_UNINLINABLE): New macro.
5009         (CTOR_BEGIN_P, CTOR_END_P): New macros.
5010         (flag_inline_trees): New variable.
5011         (local_variable_p): New function.
5012         (nonstatic_local_decl_p): Likewise.
5013         (optimize_function): Likewise.
5014         (cplus_unsave_expr_now): Remove.
5015         (copy_tree_r): Declare.
5016         (remap_save_expr): Likewise.  
5017         * decl.c (local_variable_p): Don't
5018         make it static.
5019         (local_variable_p_walkfn): New function.
5020         (make_rtl_for_local_static): Remove code to try to avoid writing
5021         out static constants.
5022         (emit_local_var): Fix indentation.
5023         (nonstatic_local_decl_p): New function.
5024         (check_default_argument): Use local_variable_p_walkfn, not
5025         local_variable_p, when walking the tree.
5026         (start_function): Set the DECL_CONTEXT for automatically generated
5027         labels.
5028         (finish_constructor_body): Use CTOR_STMT to mark the end of a
5029         constructor.  
5030         * decl2.c: Don't include splay-tree.h.
5031         (flag_inline_trees): Define.  
5032         * dump.c: Don't include
5033         splay-tree.h.  
5034         * except.c (expand_end_catch_block): Fix comment formatting.
5035         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
5036         (expand_throw): Tidy comment.  
5037         * init.c (build_vec_delete_1): Use create_temporary_var.  
5038         * lex.c (cplus_tree_code_type): Make it static.
5039         (cplus_tree_code_length): Likewise.
5040         (cplus_tree_code_name): Likewise.  
5041         * optimize.c: New file.  
5042         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
5043         with computed gotos.
5044         (setup_vtbl_ptr): Mark the beginnings of constructors with
5045         CTOR_STMT.
5046         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
5047         (expand_body): Call optimize_function.  Save bodies if we're doing
5048         inlining on trees.
5049         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
5050         integrate.h.
5051         (copy_tree_r): Make it public.
5052         (statement_code_p): New function.
5053         (mark_local_for_remap_r): Likewise.
5054         (cp_usave_r): Likewise.
5055         (cp_unsave): Likewise.
5056         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
5057         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
5058         (copy_tree_r): Handle 's' class nodes.  Restore chains for
5059         statements.  Nullify scopes.  Don't copy types.
5060         (init_tree): Set lang_unsave to cp_unsave.
5061         (remap_save_expr): Define.
5062         * ir.texi: Document CTOR_STMT.
5063         
5064 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
5065
5066         * search.c (note_debug_info_needed): Do perform this optimization
5067         for dwarf2.  
5068         (maybe_suppress_debug_info): Likewise.  Start by clearing
5069         TYPE_DECL_SUPPRESS_DEBUG.
5070
5071 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
5072
5073         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
5074
5075         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
5076
5077 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5078
5079         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
5080         function with a non-literal format string.
5081
5082         * lex.c (do_identifier): Likewise.
5083
5084         * typeck.c (build_unary_op): Likewise.
5085
5086 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
5087
5088         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
5089
5090 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
5091
5092         * cp-tree.def (CTOR_COMPLETE): New tree node.
5093         * decl.c (finish_constructor_body): Add it, to mark the end of the
5094         constructor.
5095         (finish_function): Don't call end_protect_partials here.
5096         * ir.texi (CTOR_COMPLETE): Document it.
5097         * semantics.c (expand_stmt): Handle it.
5098         
5099         * cp-tree.def (FUNCTION_NAME): New tree node.
5100         * cp-tree.h (current_function_name_declared): Tweak documentation.
5101         (lang_decl_flags): Add pretty_function_p, adjust dummy.
5102         (DECL_PRETTY_FUNCTION_P): New macro.
5103         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
5104         etc., in a template function.  Use at_function_scope_p instead of
5105         expanding it inline.
5106         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
5107         specially.
5108         (tsubst): Handle FUNCTION_NAME.
5109         (tsubst_copy): Likewise.
5110         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
5111         etc. in instantiation.
5112         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
5113         even in template functions.
5114         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
5115         conditional scope at the top of a destructor.
5116         
5117         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
5118         specializations too.
5119
5120 1999-11-22  Nathan Sidwell  <nathan@acm.org>
5121
5122         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
5123         when actually negative.
5124
5125         * typeck.c (convert_for_assignment): Expand comment about
5126         strange NULL check, moved from ...
5127         (convert_for_initialization): ... here. Remove unneeded
5128         code.
5129
5130 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
5131
5132         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
5133         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
5134         Always destruct virtual bases of array components, but never
5135         delete them.
5136         (build_vec_init): Adjust invocations.
5137         (build_delete): Likewise.
5138         * decl2.c (delete_sanity): Likewise.
5139
5140 1999-11-19  Nathan Sidwell  <nathan@acm.org>
5141
5142         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
5143         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
5144         * decl2.c (grok_method_quals): Accept `restrict' as applying to
5145         the object pointer. Return such qualifiers.
5146         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
5147         variables.
5148
5149 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
5150
5151         * except.c (expand_end_catch_block): Fix typo.
5152         (expand_exception_blocks): Simplify.  Don't call
5153         expand_leftover_cleanups.
5154
5155 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
5156
5157         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
5158         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
5159         Check uses_template_parms.
5160
5161         * class.c (finish_struct): If we're a local class in a template
5162         function, add a TAG_DEFN.
5163         * pt.c (lookup_template_class): If this is a local class in a
5164         template function, call pushtag.
5165         (tsubst_expr, case TAG_DEFN): Handle classes, too.
5166
5167         Emit debug info with the vtable.
5168         * search.c (maybe_suppress_debug_info): New function...
5169         * class.c (finish_struct_1): ...split out from here.
5170         * cp-tree.h: Declare it.
5171         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
5172         if we're writing out the vtable.
5173         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
5174         note_debug_info_needed): #if 0 out.
5175
5176 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
5177
5178         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
5179         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
5180         TREE_PERMANENT.
5181         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
5182         * decl2.c (lookup_arg_dependent): Use it.
5183         
5184         * cp-tree.h (cp_finish_decl): Change prototype.
5185         (finish_static_data_member_decl): Likewise.
5186         (push_permanent_obstack): Remove declaration.
5187         (push_expression_obstack): Likewise.
5188         (push_scratch_obstack): Likewise.
5189         (DECL_TEMPLATE_PARM_P): Robustify.
5190         (SET_DECL_TEMPLATE_PARM_P): New macro.
5191         * class.c (add_method): Don't manipulate obstacks.
5192         (finish_vtbls): Likewise.
5193         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
5194         * decl.c (binding_for_name): Don't manipulate obstacks.
5195         (maybe_push_to_top_level): Likewise.
5196         (pop_from_top_level): Likewise.
5197         (duplicate_decls): Likewise.
5198         (pushdecl): Likewise.
5199         (implicitly_declare): Likewise.
5200         (build_typename_type): Likewise.
5201         (start_decl): Likewise.
5202         (cp_finish_decl): Likewise.
5203         (finish_decl): Likewise.
5204         (destroy_local_static): Likewise.
5205         (expand_static_init): Likewise.
5206         (complete_array_type): Likewise.
5207         (grokvardecl): Likewise.
5208         (build_ptrmemfnc_type): Likewise.
5209         (grokdeclarator): Likewise.
5210         (xref_tag): Likewise.
5211         (xref_basetypes): Likewise.
5212         (start_enum): Likewise.
5213         (finish_enum): Likewise.
5214         (start_function): Likewise.
5215         (finish_function): Likewise.
5216         (start_method): Adjust call to cp_finish_decl.
5217         * decl2.c (finish_static_data_member_decl): Don't manipulate
5218         obstacks.
5219         (grokfield): Likewise.
5220         (grokbitfield): Likewise.
5221         (get_temp_name): Likewise.
5222         (get_sentry): Likewise.
5223         (fnish_file): Likewise.
5224         (lookup_arg_dependent): Likewise.
5225         * except.c (call_eh_info): Likewise.
5226         (push_eh_info): Likewise.
5227         (do_pop_exception): Likewise.
5228         (initialize_handler_parm): Likewise.
5229         (expand_end_eh_spec): Likewise.
5230         (alloc_eh_object): Likewise.
5231         (expand_throw): Likewise.
5232         * expr.c (extract_scalar_init): Likewise.
5233         * init.c (build_java_class_ref): Likewise.
5234         * lex.c (get_time_identifier): Likewise.
5235         (snarf_defarg): Likewise.
5236         (add_defarg_fn): Likewise.
5237         (is_global): Simplify.
5238         (do_identifier): Don't check TREE_PERMANENT.
5239         * method.c (emit_thunk): Don't manipulate obstacks.
5240         * parse.y (condition): Adjust call to cp_finish_decl.
5241         (primary): Likewise.
5242         (initdcl): Likewise.
5243         (initdcl0_innards): Likewise.
5244         (nomods_initdcl0): Likewise.
5245         * pt.c (push_inline_template_parms_recursive): Use
5246         SET_DECL_TEMPLATE_PARM_P.
5247         (process_template_parm): Likewise.
5248         (lookup_template_class): Don't manipulate obstacks.
5249         (instantiate_class_template): Adjust call to
5250         finish_static_data_member_decl.
5251         (tsubst_decl): Don't manipulate obstacks.
5252         (tsubst_expr): Likewise.
5253         (instantiate_template): Likewise.
5254         (instantiate_decl): Adjust calls to cp_finish_decl.
5255         * rtti.c (call_void_fn): Don't manipulate obstacks.
5256         (get_tinfo_var): Likewise.
5257         (get_tinfo_fn_unused): Likewise.
5258         (build_dynamic_cast_1): Likewise.
5259         (expand_si_desc): Likewise.
5260         (expand_class_desc): Likewise.
5261         (expand_ptr_desc): Likewise.
5262         (expand_attr_desc): Likewise.
5263         (expand_generic_desc): Likewise.
5264         (synthesize_tinfo_fn): Likewise.
5265         * search.c (expand_upcast_fixups): Likewise.
5266         * semantics.c (finish_asm_stmt): Likewise.
5267         (finish_named_return_value): Likewise.
5268         (begin_class_definition): Likewise.
5269         (finish_class_definition): Likewise.
5270         (finish_typeof): Likewise.
5271         * tree.c (build_cplus_method_type): Likewise.
5272         (reverse_path): Likewise.
5273         (copy_template_template_parm): Likewise.
5274         (build_expr_ptr_wrapper): Likewise.
5275         (push_expression_obstack): Remove.
5276         (push_permanent_obstack): Likewise.
5277         * typeck.c (mark_addressable): Likewise.
5278         
5279 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
5280
5281         * call.c (build_conditional_expr): Use build_target_expr_with_type.
5282         (convert_like): Likewise.
5283         (build_over_call): Likewise.
5284         * cp-tree.h (build_target_expr): Remove.
5285         (build_target_expr_with_type): New function.
5286         * cvt.c (build_up_reference): Use get_target_expr.
5287         * decl.c (build_target_expr): Move to ...
5288         * tree.c (build_target_expr): Here.  Make it static.
5289         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
5290         the temporary VAR_DECLs.
5291         (get_target_expr): Use it.
5292
5293 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
5294
5295         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
5296         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
5297         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
5298         * class.c (set_rtti_entry): Use it.
5299
5300 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
5301
5302         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
5303         here.
5304         * semantics.c (finish_expr_stmt): Call it here instead.  Move
5305         default_conversion logic to semantic-analysis time.
5306
5307 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
5308
5309         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
5310
5311 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
5312
5313         * init.c (init_init_processing): Re-instated Nov 11 patch after
5314         approval.
5315
5316 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
5317
5318         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
5319         Patch had not been approved yet.
5320
5321 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
5322
5323         * decl.c (compute_array_index_type): New function, split out from
5324         grokdeclarator.
5325         (create_array_type_for_decl): Likewise.
5326         (grokdeclarator): Use them.
5327
5328         * semantics.c (expand_stmt): Don't suspend_momentary or
5329         resume_momentary.
5330
5331 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
5332
5333         * init.c (init_init_processing): Header information for
5334         arrays allocated via `new' should have the same alignment used by
5335         malloc.
5336
5337 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
5338
5339         * error.c (dump_function_name): Don't crash if given a friend
5340         pseudo-instantiation.
5341
5342         * cp-tree.h (build_enumerator): Change prototype.
5343         * decl.c (enum_next_value): Remove.
5344         (enum_overflow): Likewise.
5345         (init_decl_processing): Don't register enum_next_value as a root.
5346         (start_enum): Clear TYPE_VALUES for a redefined enum.
5347         (finish_enum): Reset the type of enumeration constants.
5348         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
5349         we don't need to.  Maintain the TYPE_VALUES list and look there
5350         for the previously defined enumeration constant.  Let enumeration
5351         constants have the type of their values until the enumeration type
5352         is complete.
5353         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
5354         (structsp): Adjust.
5355         * parse.c: Regenerated.
5356         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
5357         
5358 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
5359                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5360
5361         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
5362
5363 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
5364
5365         * cp-tree.h (language_function): Remove x_last_dtor_insn and
5366         x_last_parm_cleanup_insn.
5367         * decl.c (last_dtor_insn): Remove.
5368         (last_parm_cleanup_insn): Likewise.
5369         (expand_start_early_try_stmts): Don't set them.
5370         (store_parm_decls): Likewise.
5371         (save_function_data): Or save them.
5372         (mark_lang_function): Or mark them.
5373
5374 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
5375
5376         * decl.c (store_parm_decls): Generate cleanup code at
5377         semantic-analysis time.  Destroy objects in the correct order.
5378
5379 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
5380
5381         * cp-tree.h (begin_new_placement): Remove.
5382         (finish_new_placement): Likewise.
5383         * class.c (finish_struct_1): Don't suspend_momentary or
5384         resume_momentary.
5385         * decl.c (grokdeclarator): Likewise.
5386         (maybe_build_cleanup_1): Likewise.
5387         * except.c (push_eh_cleanup): Likewise.
5388         (build_terminate_handler): Likewise.
5389         * init.c (build_new_1): Likewise.
5390         * parse.y (parse_decl): Change prototype.
5391         (initdecls, notype_initdecls, initdcl): Don't return int.
5392         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
5393         (.begin_new_placement): Remove.
5394         (.finish_new_placement): Likewise.
5395         (nonmomentary_expr): Likewise.
5396         (suspend_mom): Likewise.
5397         (condition): Don't suspend_momentary, resume_momentary, or keep
5398         track of need to resume.
5399         (unary_expr): Likewise.
5400         (new_placement): Likewise.
5401         (decl): Likewise.
5402         (structsp): Likewise.
5403         (new_type_id): Likewise.
5404         (maybe_parmlist): Likewise.
5405         (direct_after_type_declaration): Likewise.
5406         (direct_new_declarator): Likewise.
5407         (direct_abstract_declaration): Likewise.
5408         * parse.c: Regenerated.
5409         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
5410         * semantics.c (begin_new_placement): Remove.
5411         (finish_new_placement): Likewise.
5412         
5413 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5414
5415         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
5416         (DECL_TEMPLATE_INFO): Use it.
5417         * decl.c (warn_extern_redeclared_static): Do nothing for
5418         TEMPLATE_DECLs.
5419         * decl2.c (mark_used): Explicitly check for function or variable.
5420         * semantics.c (finish_unary_op_expr): Check whether result is also
5421         an INTEGER_CST.
5422
5423 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
5424
5425         * Makefile.in (typeck2.o): Depend on output.h.
5426         * typeck2.c: Include output.h.
5427
5428         * decl.c (flag_ansi): Remove declaration.
5429
5430         * pt.c (tinst_level_tick): Make it static.
5431         (last_template_error_tick): Likewise.
5432         
5433         * cp-tree.h (mapcar): Remove declaration.
5434         (search_tree): Likewise.
5435         (walk_tree_fn): New typedef.
5436         (walk_tree): New function.
5437         * tree.c (bot_manip): Change prototype.  Adjust to be called via
5438         walk_tree.
5439         (bot_replace): Likewise.
5440         (no_linkage_helper): Likewise.
5441         (copy_tree_r): New function.
5442         (search_tree): Rename, and adjust, to become ...
5443         (walk_tree): New function.
5444         (mapcar): Remove.
5445         (target_remap): Remove.
5446         (target_remap_count): Likewise.
5447         (break_out_target_exprs): Use walk_tree.
5448         * decl.c (local_variable_p): Change prototype.
5449         (check_default_argument): Use walk_tree.
5450         * pt.c (for_each_template_parm_r): New function, split out from ...
5451         (for_each_template_parm): Here.  Use it, via walk_tree.
5452         
5453 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
5454
5455         * class.c (check_bitfield_decl): New function, split out from
5456         finish_stuct_1.
5457         (check_field_decl): Likewise.  Recursively examine members of
5458         anonymous structs.
5459         (finish_struct_1): Use them.
5460         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
5461         
5462 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
5463
5464         * decl.c (grokfndecl): Remove dead code.
5465
5466         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
5467
5468 1999-11-02  Scott Snyder  <snyder@fnal.gov>
5469
5470         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
5471         IMAGPART_EXPR.
5472         * pt.c (tsubst_copy): Likewise.
5473
5474 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
5475
5476         * decl2.c (maybe_make_one_only): Always make things comdat on
5477         ELF targets, too.
5478
5479 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
5480
5481         * decl.c (finish_function): Call free_after_parsing for functions
5482         we are not immediately turning into RTL.
5483
5484 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
5485
5486         * cp-tree.h (flag_dump_translation_unit): Add decl.
5487
5488 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
5489
5490         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
5491
5492 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
5493
5494         * decl.c (pop_cp_function_context): Don't call free on a NULL
5495         pointer.
5496         * semantics.c: Include ggc.h.
5497         (expand_body): Do garbage-collection after processing a template
5498         function.  Clear DECL_SAVED_TREE after generating RTL for a
5499         function.
5500         * Makefile.in (semantics.o): Depend on ggc.h.
5501         
5502 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
5503
5504         * cp-tree.h (make_typename_type): Change prototype.
5505         * decl.c (make_typename_type): Only complain if so requested.
5506         * parse.y (nested_name_specifier): Adjust calls.
5507         (typename_sub0): Likewise.
5508         (typename_sub1): Likewise.
5509         * parse.c: Regenerated.
5510         * pt.c (convert_template_argument): Pass complain to
5511         make_typename_type.
5512         (tsubst): Likewise.
5513         
5514 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
5515
5516         * semantics.c (finish_handler): End the scope of the handler
5517         before attaching it to the statement-tree.
5518
5519 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
5520
5521         * rtti.c (build_dynamic_cast_1): Give a better error message for
5522         an attempt to dynamic_cast from a non-polymorphic type.
5523
5524 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
5525
5526         * cp-tree.h (make_temp_vec): Remove.
5527         (make_scratch_vec): Likewise.
5528         * call.c (add_function_candidate): Use make_tree_vec.
5529         (add_conv_candidate): Likewise.
5530         (build_builtin_candidate): Likewise.
5531         (add_template_candidate_real): Likewise.
5532         * class.c (resolve_address_of_overloaded_function): Likewise.
5533         * decl.c (start_function): Don't fool with the momentary obstack.
5534         (finish_function): Likewise.
5535         * init.c (expand_direct_vtbls_init): Likewise.
5536         (begin_init_stmts): Likewise.
5537         (finish_init_stmts): Likewise.
5538         * pt.c (add_to_template_args): Use make_tree_vec.
5539         (check_explicit_specialization): Likewise.
5540         (coerce_template_parms): Likewise.
5541         (lookup_template_class): Don't fool with the momentary obstack.
5542         (instantiate_class_template): Likewise.
5543         (tsubst_template_arg_vector): Use make_tree_vec.
5544         (tsubst_aggr_type): Don't fool with the momentary obstack.
5545         (tsubst_decl): Likewise.  Use make_tree_vec.
5546         (try_one_overload): Likewise.
5547         (try_class_unification):  Don't fool with the momentary obstack.
5548         (get_bindings_real): Use make_tree_vec.
5549         (set_mangled_name_for_template_decl): Likewise.
5550         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
5551         * semantics.c (finish_expr_stmt): Likewise.
5552         (finish_do_stmt): Likewise.
5553         (finish_for_expr): Likewise.
5554         (finish_switch_cond): Likewise.
5555         (do_pushlevel): Likewise.
5556         (do_poplevel): Likewise.
5557         * tree.c (make_temp_vec): Remove.
5558         
5559         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
5560         CLEANUP_P for a TRY_BLOCK.
5561         * ir.texi: Document SAVE_EXPR.
5562
5563 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
5564
5565         * call.c (build_over_call):  Check that the built-in function is
5566         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
5567         * typeck.c (build_function_call_real): Similarly. 
5568
5569 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
5570
5571         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
5572         remember_end_note.
5573
5574 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
5575
5576         * decl.c (push_overloaded_decl_1): Use pushdecl.
5577         
5578         * decl.c (auto_function): Replace #ifdef'd __inline with just
5579         plain inline.
5580         * lex.c (my_get_run_time): Likeise.
5581         (yyprint): Likewise.
5582         (identifier_type): Likewise.
5583         * method.c (start_squangling): Likewise.
5584         (end_squangling): Likewise.
5585         (icat): Likewise.
5586         (old_backref_index): Likewise.
5587         (flush_repeats): Likewise.
5588         (issue_ktype): Likewise.
5589         * parse.y (empty_parms): Likewise.
5590         * parse.c: Regenerated.
5591         
5592 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
5593
5594         * dump.c (dequeue_and_dump): Replace several uses of
5595         queue_and_dump_index with dump_child.
5596
5597 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5598
5599         * expr.c: Include tm_p.h.
5600
5601 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
5602
5603         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
5604         (pushlevel_temporary): Remove.
5605         (add_scope_stmt): New function.
5606         * decl.c (pushlevel_temporary): Remove.
5607         (poplevel): Use add_scope_stmt.
5608         (start_decl_1): Likewise.
5609         * semantics.c (add_scope_stmt): New function.
5610         (do_pushlevel): Use it.
5611         (do_poplevel): Use it.
5612         (expand_stmt): Check SCOPE_PARTIAL_P.
5613         
5614         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
5615         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
5616         * expr.c (cplus_expand_expr): Expand it.
5617         * ir.texi: Document EMPTY_CLASS_EXPR.
5618         
5619 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
5620
5621         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
5622         parameters as having namespace scope.
5623
5624 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
5625
5626         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
5627         (mangling_flags): New type.
5628         (build_overload_int): Change prototype.
5629         (build_overload_value): Likewise.
5630         (numeric_output_need_bar): Improve comment.
5631         (mangle_expression): New function, broken out from ...
5632         (build_overload_int): Here.
5633         (build_overload_value): Adjust for use of mangling flags.  Don't
5634         warn about real-valued template parameters here.  Do handle
5635         complex expressions involving real-valued template parameters.
5636         (build_template_parm_names): Encase non-type template parameters
5637         in underscores, if necessary.
5638         (process_overload_item): Remove conditional on
5639         PARM_CAN_BE_ARRAY_TYPE.
5640
5641 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
5642
5643         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
5644
5645         * ir.texi: Clean up documentation of RETURN_INIT.
5646         
5647 1999-10-15  Greg McGary  <gkm@gnu.org>
5648
5649         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
5650         (lang_init): Set default for flag_bounds_check if still "unspecified".
5651
5652 1999-10-13  Andrew Haley  <aph@cygnus.com>
5653
5654         * class.c (finish_struct_1): Force alignment of non-bitfields to
5655         BITS_PER_UNIT.
5656
5657 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5658
5659         * typeck2.c (process_init_constructor): Handle empty constructors.
5660
5661 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
5662
5663         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
5664
5665         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
5666         array error.
5667
5668 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
5669
5670         * decl.c (make_rtl_for_local_static): Don't create register RTL
5671         for addressable constants.
5672
5673 1999-10-13  Nathan Sidwell  <nathan@acm.org>
5674
5675         * cp-tree.h (build_x_va_arg): Prototype new function.
5676         * call.c (build_x_va_arg): Define it.
5677         * parse.y (unary_expr): Call build_x_va_arg.
5678         
5679         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
5680         * call.c (convert_type_from_ellipsis): Define it.
5681         * decl.c (init_decl_processing): Set lang_type_promotes_to.
5682
5683         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
5684
5685 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
5686
5687         * class.c (fixed_type_or_null): Always set *nonnull.
5688
5689 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5690
5691         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
5692         __GNUC__ and __GNUC_MINOR__.
5693
5694 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
5695
5696         * cp-tree.h (make_rtl_for_local_static): New function.  
5697         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
5698         local statics ...
5699         (make_rtl_for_local_static): Here.
5700         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
5701         
5702 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5703
5704         * method.c: Include tm_p.h.
5705
5706 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5707
5708         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
5709         * lex.c (cp_make_lake_type): Likewise.
5710         * tree.c (init_tree): Init make_lang_type_fn.
5711         
5712 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
5713
5714         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
5715         paramter.
5716         
5717         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
5718         local statics if we don't really have them.
5719
5720         * ir.texi: Improve documentation for STMT_EXPR.  Describe
5721         CLEANUP_POINT_EXPR.
5722
5723 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
5724
5725         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
5726
5727 1999-10-07  Greg McGary  <gkm@gnu.org>
5728
5729         * class.c (finish_struct_1): Use simpler method of
5730         removing elements of a singly-linked list which doesn't
5731         lose for classes without data members.
5732
5733 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
5734
5735         * friend.c (make_friend_class): Robustify.
5736
5737         * semantics.c (finish_object_call_expr): Reject calls to template
5738         types.
5739
5740 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
5741
5742         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
5743
5744         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
5745         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
5746         CLASSTYPE_VFIELD.
5747         * class.c (get_vfield_offset): Likewise.
5748         (finish_base_struct): Likewise.
5749         (modify_one_vtable): Likewise.
5750         (fixup_vtable_deltas): Likewise.
5751         (finish_struct_1): Likewise.
5752         * init.c (expand_virtual_init): Likewise.
5753         * search.c (lookup_field_1): Likewise.
5754         (expand_upcast_fixups): Likewise.
5755         * typeck.c (build_component_ref): Likewise.
5756         (build_binary_op_nodefault): Likewise.
5757         
5758         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
5759         * ir.texi: Document TYPE_VFIELD.
5760
5761 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
5762
5763         * decl.c (grokdeclarator): Only warn about non-zero arrays if
5764         !in_system_header (linux socketbits.h can give this for
5765         __cmsg_data, which is using a GNU extension).
5766
5767 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
5768
5769         * decl2.c (start_static_storage_duration_function): Push the
5770         function declaration so it ends up in namespace scope.
5771
5772         * dump.c (DUMP_CHILDREN): Remove.
5773         (DUMP_BINFO): Adjust.
5774         (struct dump_node_info): Remove dump_children_p.
5775         (queue_and_dump_type): Remove dump_children_p parameter.
5776         (queue): Don't set dump_children_p.
5777         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
5778         queue_and_dump_index.
5779         (dequeue_and_dump): Unconditionally print children.  Adjust calls
5780         to functions mentioned above.
5781         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
5782         
5783         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
5784         * dump.c (dequeue_and_dump): Dump them.
5785         
5786         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
5787
5788         * decl.c (start_function): Set current_in_charge_parm for
5789         constructors, too, where appropriate.
5790         * search.c (fixup_all_virtual_upcast_offsets): New function.
5791         (expand_indirect_vtbls_init): Use it.
5792         
5793 1999-10-04  Nathan Sidwell  <nathan@acm.org>
5794
5795         * decl2.c (grok_alignof): Don't decay lvalues.
5796         
5797         * init.c (build_new): Remove unused variable.
5798
5799 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
5800
5801         * cp-tree.h (struct language_function): Remove static_labelno.
5802         (static_labelno): Remove macro.
5803         * method.c (build_overload_nested_name): Make static_labelno
5804         static here.
5805         
5806         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
5807         to decide whether or not a function is defined.
5808
5809         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
5810         situations where make_node will do it automatically.
5811         * decl.c (grok_reference_init): Likewise.
5812         (expand_static_init): Likewise.
5813         (do_static_initialization): Likewise.
5814         * init.c (perform_member_init): Likewise.
5815         (expand_aggr_init_1): Likewise.
5816         (build_new_1): Likewise.
5817         * method.c (do_build_copy_constructor): Likewise.
5818         (do_build_assign_ref): Likewise.
5819         * search.c (expand_upcast_fixups): Likewise.
5820         * semantics.c (finish_stmt_expr): Likewise.
5821         * typeck.c (build_unary_op): Likewise.
5822         (check_return_expr): Likewise.
5823
5824 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
5825
5826         * init.c (build_vec_delete_1): Fold COND_EXPRs.
5827
5828 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
5829
5830         * cp-tree.def (VEC_INIT_EXPR): Remove.
5831         * cp-tree.h (struct stmt_tree): New type.
5832         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
5833         x_stmt_tree.
5834         (class_cache_firstobj): Remove.
5835         (struct language_function): Remove stmts_are_full_exprs_p,
5836         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
5837         (current_stmt_tree): New macro.
5838         (last_tree): Adjust.
5839         (last_expr_type): Likewise.
5840         (doing_semantic_analysis_p): Simplify.
5841         (stmts_are_full_exprs_p): Adjust.
5842         (begin_tree): Remove prototype.
5843         (end_tree): Likewise.
5844         (begin_stmt_tree): Change prototype.
5845         (finish_stmt_tree): Likewise.
5846         (building_stmt_tree): Simplify.
5847         * decl.c (mark_stmt_tree): New function.
5848         (mark_saved_scope): Use it.
5849         (start_function): Rearrange slightly to call begin_stmt_tree 
5850         earlier.
5851         (save_function_data): Tweak.
5852         (finish_function): Adjust call to finish_stmt_tree.
5853         (mark_lang_function): Use mark_stmt_tree.
5854         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
5855         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
5856         (build_vec_init): Remove creation of stand-in intializer.
5857         * pt.c (begin_tree): Remove.
5858         (end_tree): Likewise.
5859         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
5860         (begin_compound_stmt): Handle a compound-statement outside of a
5861         function.
5862         (begin_stmt_expr): Handle a statement-expression outsidef of a
5863         function.
5864         (finish_stmt_expr): Likewise.
5865         (begin_class_definition): Don't call begin_tree.
5866         (finish_inline_definitions): Don't call end_tree.
5867         (begin_stmt_tree): Take a pointer to tree, not a function as input.
5868         (finish_stmt_tree): Likewise.
5869         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
5870         (mapcar): Likewise.
5871         
5872         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
5873         * parse.c: Regenerated.
5874         
5875         * dump.c (dqueue_and_dump): Dump bitfieldness.
5876         
5877         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
5878         bitfields, rather than DECL_BIT_FIELD.
5879         * ir.texi: Document how to tell whether or not a field is a
5880         bitfield.
5881         
5882         * lex.c (make_lang_type): Fix typo in comment.
5883
5884 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
5885
5886         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
5887
5888 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
5889
5890         * pt.c (tsubst_decl): If the type of a template instantiation is
5891         bogus, so is the whole instantiation.
5892
5893 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
5894
5895         * decl.c (initialize_local_var): Handle static variables here.
5896         (cp_finish_decl): Tweak handling of function-scope static
5897         variables.
5898         * semantics.c (expand_stmt): Handle DECL_STMTs for static
5899         variables.
5900
5901         * method.c (emit_thunk): Don't crash when -fsyntax-only.
5902
5903         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
5904         global_dtor_p.  Add init_priority.
5905         (DECL_ACCESS): Adjust accordingly.
5906         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
5907         (GLOBAL_INIT_PRIORITY): Likewise.
5908         * decl.c (lang_mark_tree): Adjust accordingly.
5909         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
5910         and GLOBAL_INIT_PRIORITY.
5911         * dump.c (dequeue_and_dump): Print them.
5912         * ir.texi: Document them.
5913
5914         * decl2.c (struct priority_info_s): Remove initialization_sequence
5915         and destruction_sequence.
5916         (start_static_storage_duration_function): Return the body of the
5917         function.  Convert for function-at-a-time mode.
5918         (generate_inits_for_priority): Remove.
5919         (finish_static_storage_duration_function): Change prototype.
5920         Adjust for function-at-a-time mode.
5921         (do_static_initialization): Likewise.
5922         (do_static_destruction): Likewise.
5923         (do_static_initialization_and_destruction): Remove.
5924         (start_static_initialization_or_destruction): New function.
5925         (finish_static_initialization_or_destruction): Likewise.
5926         (get_priority_info): Don't manipulation initialization_sequence or
5927         destruction_sequence.
5928         (prune_vars_needing_no_initialization): New function.
5929         (write_out_vars): Likewise.
5930         (finish_file): Use the various new functions instead of the old.
5931         
5932 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
5933
5934         * cp-tree.h (warn_float_equal): Declare.
5935         * decl2.c (warn_float_equal): Define.
5936         (lang_decode_option): Recognize -W[no-]float-equal.
5937         * typeck.c (build_binary_op_nodefault): Conditionally warn
5938         about equality tests of floating point types.
5939
5940 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
5941
5942         Support normal type_info-based EH mechanisms with -fno-rtti.
5943         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
5944         (build_eh_type_type_ref): Likewise.
5945         (build_eh_type): Remove.
5946         (expand_throw): Call build_eh_type_type, not build_eh_type.
5947         * decl2.c (import_export_decl): Don't associate the tinfo fn with
5948         the vtable if -fno-rtti.
5949         * decl.c (init_decl_processing): Always init_rtti_processing.
5950
5951         * rtti.c (get_typeid): Don't complain about -fno-rtti.
5952
5953         * class.c (class_cache_obstack, class_obstack): Remove.
5954         (init_class_processing): Don't initialize class_obstack.
5955         (push_cache_obstack): Remove.
5956         (pushclass): Don't call it.
5957         * cp-tree.h: Remove prototype for push_cache_obstack.
5958         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
5959         (pushlevel_class): Don't push_decl_level.
5960         (poplevel_class): Don't pop_stack_level.
5961         (push_class_level_binding): Don't push_cache_obstack.
5962         (init_decl_processing): Don't intialize decl_obstack.
5963         * search.c (push_class_decls): Don't push_cache_obstack.
5964         * tree.c (list_hash_add): Put hash node on permanent_obstack.
5965         (hash_tree_cons): Don't mess with obstacks.
5966         (print_lang_statistics): Don't print stats for class_obstack and
5967         decl_obstack.
5968
5969 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
5970
5971         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
5972         * ir.texi: Document DECL_EXTERNAL.
5973
5974         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
5975         * ir.texi: Document THUNK_DECLs.
5976
5977         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
5978         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5979         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5980         * error.c (dump_template_bindings): Remove unused parameter.
5981         Handle multiple levels of template parameters.
5982         (dump_template_decl): Use `parms', not `args', for template
5983         parameters.  Fix thinko.
5984         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
5985         flags to dump_template_bindings.
5986         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
5987         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5988         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5989         (tsubst_copy): Clarify variable name.
5990         (most_general_template): Robustify.
5991         
5992 1999-09-29  Nathan Sidwell  <nathan@acm.org>
5993
5994         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
5995         to change primary template rendering.
5996
5997 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
5998
5999         * cp-tree.h (UPT_TEMPLATE): Remove.
6000         (UPT_PARMS): Likewise.
6001         (DECL_NEEDED_P): New macro.
6002         * decl2.c (finish_vtable_vardecl): Use it.
6003         (finish_objects): Don't crash with -fsyntax-only.
6004         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
6005         -fsyntax-only.
6006         * pt.c (tsubst_friend_function): Remove FIXME that talks about
6007         obstacks.
6008         (tsubst_expr): Correct handling of function try-blocks.
6009         * semantics.c: Include flags.h.
6010         (expand_body): Don't do RTL generation if -fsyntax-only.
6011         * Makefile.in (semantics.o): Depends on flags.h.
6012         
6013 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
6014
6015         * pt.c (most_general_template): Adjust declaration.
6016
6017         * cp-tree.h: (most_general_template): Declare.
6018
6019         * error.c (dump_template_value): Rename to ...
6020         (dump_template_argument): This.
6021         (dump_template_argument_list): New function.
6022         (dump_type): Use it.
6023         (dump_template_parameter): New function.
6024         (dump_template_decl): Use it.
6025         (dump_template_bindings): New function.
6026         (dump_function_decl): Use it. Pretty print function template
6027         instantiations.
6028
6029 1999-09-28  Nathan Sidwell  <nathan@acm.org>
6030
6031         * decl.c (grokdeclarator): Distinguish parameter context for
6032         diagnostics. Tidy up missing type diagnostic.
6033         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
6034
6035 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
6036
6037         * ir.texi: Improve documentation for TARGET_EXPR.
6038
6039 1999-09-27  Nathan Sidwell  <nathan@acm.org>
6040
6041         Augment stringification of trees.
6042         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
6043         (fndecl_as_string, type_as_string_real, args_as_string,
6044         code_as_string, language_as_string, parm_as_string,
6045         op_as_string, assop_as_string, cv_as_string): Remove.
6046         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
6047         (context_as_string): Declare new function.
6048         * error.c (cp_printers): Move definition.
6049         (OB_UNPUT): Remove.
6050         (OB_END_TEMPLATE_ID): Adjust.
6051         (interesting_scope_p): Remove.
6052         (dump_scope): New static function.
6053         (dump_qualifiers): Adjust prototype, reimplement.
6054         (dump_template_value): Use tree_string_flags.
6055         (dump_type_real): Move back to dump_type.
6056         (dump_type): Adjust prototype. Use tree_string_flags.
6057         (dump_aggr_type): Likewise. Use dump_template_parms.
6058         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
6059         Return pad flag.
6060         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
6061         (dump_simple_decl): Likewise.
6062         (dump_decl): Likewise. Use dump_template_decl.
6063         (dump_template_decl): New static function broken out of dump_decl.
6064         (dump_function_decl): Adjust prototype. Use tree_string_flags.
6065         (dump_parameters): Likewise. Prefix space.
6066         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
6067         (dump_function_name): Likewise. Use dump_template_parms.
6068         (dump_template_parms): New static function broken out of
6069         dump_function_name.
6070         (dump_expr_list): Adjust prototype. Use tree_string_flags.
6071         (dump_expr): Likewise.
6072         (fndecl_as_string): Removed
6073         (type_as_string_real): Removed
6074         (dump_binary_op): Adjust prototype. Use tree_string_flags.
6075         (dump_unary_op): Likewise.
6076         (type_as_string): Likewise.
6077         (expr_as_string): Likewise.
6078         (decl_as_string): Likewise.
6079         (context_as_string): New function.
6080         (lang_decl_name): Adjust.
6081         (decl_to_string): New static print callback.
6082         (expr_to_string): Likewise.
6083         (fndecl_to_string): Likewise.
6084         (code_as_string): Renamed to ...
6085         (code_to_string): ... here. Adjust.
6086         (language_as_string): Renamed to ...
6087         (language_to_string): ... here. Adjust.
6088         (parm_as_string): Renamed to ...
6089         (parm_to_string): ... here.
6090         (op_as_string): Renamed to ...
6091         (op_to_string): ... here.
6092         (assop_as_string): Renamed to ...
6093         (assop_to_string): ... here.
6094         (type_to_string): New static print callback.
6095         (args_as_string): Renamed to ...
6096         (args_to_string): ... here. Adjust.
6097         (cv_as_string): Renamed to ...
6098         (cv_to_string): ... here. Adjust.
6099         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
6100         (print_template_context): Likewise.
6101
6102 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
6103
6104         * cp-tree.h (expand_throw): Remove prototype.
6105         * except.c (expand_throw): Make it static.  Use tree-generation
6106         functions, rather than RTL-generation functions.
6107         (build_throw): Use it.
6108         * expr.c: Include except.h.
6109         (cplus_expand_expr): Don't call expand_throw here.
6110         * Makefile.in (expr.o): Depend on except.h.
6111         * ir.texi: Update documentation for THROW_EXPR.
6112         
6113         * decl.c (start_function): Set x_dont_save_pending_sizes rather
6114         than calling get_pending_sizes.
6115         * init.c (build_new): Don't save and restore
6116         immediate_size_expand; instead, assert that it has the expected
6117         value already.
6118
6119 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6120
6121         * lex.c (compiler_error): Add missing call to va_end().
6122
6123 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
6124
6125         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
6126         * ir.texi: Document RESULT_DECL and DECL_RESULT.
6127
6128         * cp-tree.h (check_return_expr): New function.
6129         * decl.c (finish_constructor_body): New function.
6130         (pushdecl): Put global friend functions in namespace binding
6131         level, not the class binding level.
6132         (finish_destructor_body): Make sure the dtor_label is always
6133         defined.  Fix typo in comment.
6134         (finish_function): Move generation of constructor-termination code
6135         to semantic-analysis time.  Move generation of implicit `main'
6136         return value to semantic-analysis time.
6137         * semantics.c (finish_return_stmt): Generate goto's to
6138         ctor_label/dtor_label here.  Use check_return_expr to do semantic
6139         analysis on the returned expression.
6140         * typeck.c (maybe_warn_about_returning_address_of_local): New
6141         function split out from c_expand_return.
6142         (check_return_expr): Likewise.
6143         (c_expand_return): Just generate the RTL for the return.
6144         
6145 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
6146
6147         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
6148         (cleanup_type): Likewise.
6149         (search_tree): Change prototype.
6150         * decl.c (local_variable_p): Adjust for new interface to
6151         search_tree.
6152         (check_default_argument): Likewise.
6153         * error.c (dump_expr): Handle INIT_EXPR.
6154         * except.c (expand_throw): Don't make cleanup_type a local static.
6155         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
6156         * init.c (build_new): Call build_new_1 directly, rather than
6157         building a NEW_EXPR.
6158         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
6159         processing file-scope initializers.
6160         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
6161         * tree.c: Include splay-tree.h
6162         (no_linkage_helper): Adjust for new interface to search_tree.
6163         (search_tree): Pass around pointers to tree nodes, rather than the
6164         nodes themselves.  Handle VEC_INIT_EXPR.
6165         (no_linkage_check): Adjust for new interface to search_tree.
6166         (mapcar): Handle VEC_INIT_EXPR.
6167         (target_remap): New variable.
6168         (bot_manip): Use it.
6169         (bot_replace): New function.
6170         (break_out_target_exprs): Use it to remap all variables used in a
6171         default argument expression.
6172         * typeck.c (build_modify_expr): Don't crash when outside a
6173         function and presented with an INIT_EXPR assignment
6174         * Makefile.in (tree.o): Depend on splay-tree.h.
6175
6176 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6177
6178         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
6179         DECL_BUILT_IN.
6180         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
6181         callers changed.
6182         Set the builtin's DECL_BUILT_IN_CLASS.
6183
6184 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
6185
6186         * decl.c (pushdecl): Don't make local declarations of extern
6187         variables give the variable a DECL_CONTEXT for the function.
6188         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
6189         Don't accidentally make RTL for local declarations.
6190         (emit_local_var): Handle declarations with asm-specifiers here.
6191         
6192 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
6193
6194         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
6195         STMT_IS_FULL_EXPR_P.
6196
6197         * cp-tree.h (language_function): Add cannot_inline.
6198         * decl.c (start_function): Restore current_function_cannot_inline
6199         from the saved value.
6200         (save_function_data): Save current_function_cannot_inline.
6201         * decl2.c (start_objects): Change prototype.  Build the function
6202         in function-at-a-time mode.
6203         (finish_objects): Likewise.
6204         (generate_ctor_or_dtor_function): Adjust accordingly.
6205         
6206         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
6207         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
6208         Don't call expand_anon_union_decl here
6209         * semantics.c (exapnd_stmt): Call it here, instead.
6210         * typeck.c (mark_addressable): Addressed variables are implicitly
6211         used.
6212         
6213 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6214
6215         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
6216         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
6217         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
6218         * cp-tree.h: Add tree checking macros to various tree access
6219         macros. 
6220         * ptree.c (print_lang_decl): Test for function or variable
6221         before accessing template info.
6222
6223 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
6224
6225         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
6226         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
6227         * decl2.c (lang_f_options): Add -fshort-wchar.
6228         * cp-tree.h: Declare flag_short_wchar.
6229         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
6230         int' for wchar_t.
6231
6232 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6233
6234         * ir.texi: Fix formatting errors and typos.
6235
6236 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
6237
6238         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
6239
6240         * decl.c (pushdecl): Do create a binding for extern "C" functions,
6241         but not for their DECL_ASSEMBLER_NAMEs.
6242         (lookup_name_current_level): Fix formatting.
6243         (xref_tag): Likewise.
6244         * decl2.c (start_objects): Mark static constructors and
6245         destructors as used.
6246
6247 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
6248
6249         * decl.c (define_case_label): Don't crash if we're not in a switch.
6250
6251         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
6252         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
6253         for unsupported flags.
6254
6255 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
6256
6257         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
6258         Accept and warn about -fthis-is-variable.
6259
6260 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
6261
6262         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
6263         CLEANUP_STMT, and SCOPE_STMT.
6264
6265         * decl2.c (lang_decode_option): Adjust, in the wake of recent
6266         changes to option processing.
6267
6268 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6269
6270         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
6271         function pointer from pmfs with no object given.
6272         (convert_for_assignment): Do not return error when converting
6273         pmfs.
6274
6275 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
6276
6277         * lex.c (internal_filename): New variable.
6278         (INTERNAL_FILENAME): New macro.
6279         (init_parse): Allocate internal_filename and mark as root.  Use it
6280         instead of a string constant.
6281
6282 1999-09-21  Nathan Sidwell  <nathan@acm.org>
6283
6284         Reimplement dynamic cast and catch matching.
6285         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
6286         * search.c (dynamic_cast_base_recurse): New function.
6287         (get_dynamic_cast_base_type): New function for dynamic cast.
6288         * rtti.c (build_dynamic_cast_1): Determine source and target
6289         class relationship. Call __dynamic_cast_2.
6290         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
6291         (__user_type_info::dyncast): New dynamic cast dispatcher.
6292         (__user_type_info::sub_kind): New nested enumeration.
6293         (__user_type_info::contained_p): sub_kind predicate.
6294         (__user_type_info::contained_public_p): Likewise.
6295         (__user_type_info::contained_nonpublic_p): Likewise.
6296         (__user_type_info::contained_nonvirtual_p: Likewise.
6297         (__user_type_info::upcast_result): New nested struct.
6298         (__user_type_info::dyncast_result): New nested struct.
6299         (*::do_upcast): New catch function.
6300         (*::do_dyncast): New dynamic cast function.
6301         (__user_type_info::find_public_subobj): New dynamic cast
6302         helper dispatcher.
6303         (*::do_find_public_subobj): New dynamic cast helper function.
6304         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
6305         (__user_type_info::dyncast): Define dynamic cast dispatcher.
6306         (*::do_upcast): Define catch function.
6307         (*::do_dyncast): Define dynamic cast function.
6308         (*::do_find_public_subobj): Define dynamic cast helper function.
6309         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
6310         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
6311         (__dynamic_cast_2): New dynamic cast runtime.
6312
6313 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
6314
6315         * cp-tree.h (finish_stmt_expr): Change prototype.
6316         * expr.c (cplus_expand_expr): Adjust call accordingly.
6317         * init.c (finish_init_stmts): Likewise.
6318         * parse.y (primary): Likewise.
6319         * pt.c (tsubst_copy): Likewise.
6320         * semantics.c (finish_stmt_expr): Don't take two parameters.
6321         Don't remove generated BLOCKs from the block-tree.
6322
6323         Remove support for assigning to `this'.
6324         * NEWS: Note that fact.
6325         * class.c (build_vbase_path): Don't check flag_this_is_variable.
6326         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
6327         (language_function): Remove assigns_this, just_assigned_this, and
6328         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
6329         (base_init_expr): Remove.
6330         (current_vcalls_possible_p): New macro.
6331         (vtbls_set_up_p): Likewise.
6332         (emit_base_init): Change prototype.
6333         * decl.c (finish_destructor_body): New function, split out from
6334         finish_function.
6335         (current_function_assigns_this): Remove.
6336         (current_function_just_assigned_this): Likewise.
6337         (start_function): Don't set them.
6338         (finish_function): Don't check them.  Don't emit
6339         base-initialization code here.  Generate code for destructors when
6340         doing semantic analysis.
6341         (finish_stmt): Don't check current_function_just_assigned_this.
6342         * decl2.c (lang_f_options): Remove this-is-variable.
6343         (lang_decode_option): Likewise.
6344         (grokclassfn): Don't check flag_this_is_variable.
6345         * init.c (emit_base_init): Return the expression generated.
6346         (construct_virtual_bases): Don't push/pop obstacks.  Fix
6347         typo.
6348         (build_new_1): Don't check flag_this_is_variable.
6349         (get_temp_regvar): Don't set DECL_REGISTER.
6350         (build_vec_init): Don't call use_variable.
6351         * lang-options.h: Remove "-fthis-is-variable" and
6352         "-fno-this-is-variable".
6353         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
6354         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
6355         expand_expr_stmt.
6356         * semantics.c (finish_expr_stmt_real): Rename to ...
6357         (finish_expr_stmt): This.  Remove assigned_this parameter.
6358         (begin_if_stmt): Call do_pushlevel before starting the statement.
6359         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
6360         blocks.
6361         (setup_vtbl_ptr): Emit initialization code for bases and members
6362         at semantic-analysis time.  Emit code to initialize vtables in
6363         destructors here.
6364         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
6365         Don't handle CTOR_INITIALIZER any more.
6366         * typeck.c (build_modify_expr): Don't check for assignments to
6367         this.
6368         (c_expand_return): Don't suggest assigning to `this'.
6369         
6370         * Makefile.in (decl.o): Depend on RTL_H.
6371         (decl2.o): Likewise.
6372         (class.o): Likewise.
6373         (call.o): Likewise.
6374         (method.o): Likewise.
6375         (search.o): Likewise.
6376         (tree.o): Likewise.
6377         (pt.o): Likewise.
6378
6379         * decl.c (duplicate_decls): When a builtin function is redeclared
6380         as static, make sure it is mangled correctly.
6381
6382         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
6383         detail about the statement-tree.
6384         
6385 1999-09-20  Nathan Sidwell  <nathan@acm.org>
6386
6387         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
6388
6389 1999-09-20  Nick Clifton  <nickc@cygnus.com>
6390
6391         * decl2.c (lang_decode_option): Extend comment.
6392
6393 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6394
6395         * typeck.c: Include "tm_p.h".
6396
6397 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
6398
6399         * ir.texi: New file.
6400
6401 1999-09-19  Paul Burchard <burchard@pobox.com>
6402
6403         * semantics.c (expand_stmt): Initialize return value.
6404
6405 1999-09-18  Paul Burchard <burchard@pobox.com>
6406
6407         * gxxint.texi: G++ now implements namespaces.
6408         
6409 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
6410
6411         * decl.c (pop_label): Don't warn about unused labels more than
6412         once.
6413         * semantics.c (finish_goto_stmt): Always marked used labels as
6414         used.
6415
6416         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
6417         even when the declaration is external.
6418         (cp_finish_decl): Adjust call to layout_var_decl.
6419         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
6420
6421 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6422
6423         * typeck.c (get_member_function_from_ptrfunc): Always consider
6424         virtuality inside member pointer.
6425
6426 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
6427
6428         Turn on function-at-a-time processing.  
6429         * cp-tree.h (doing_semantic_analysis_p): New macro.
6430         (SF_DEFAULT): Define to zero, not SF_EXPAND.
6431         (start_handler_parms): Change prototype.
6432         (expand_start_catch_block): Likewise.
6433         (expand_end_catch_block): Likewise.
6434         (expand_start_eh_spec): Likewise.
6435         (expand_end_eh_spec): Declare.
6436         (finish_handler_parms): Change prototype.
6437         (begin_catch_block): Declare.
6438         (finish_handler): Change prototype.
6439         (do_pushlevel): Declare.
6440         (do_poplevel): Likewise.  
6441         * decl.c (pushlevel): Don't create
6442         binding levels when not doing semantic analysis.
6443         (poplevel): Don't pop them.
6444         (pushdecl): Assert that we are never called when not doing
6445         semantic analysis.
6446         (pushdecl_top_level): Use push_to_top_level.
6447         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
6448         label when expanding.
6449         (cp_finish_decl): Only inject for-scope variables when doing
6450         semantic analysis.  Add comments.
6451         (start_handler_parms): Return the handler parm.
6452         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
6453         already set.  Reinitialize from saved function data if available.
6454         Don't pushlevel when not doing semantic analysis.
6455         (store_parm_decls): Only generate RTL when expanding.  Only
6456         pushdecl when doing semantic analysis.  Set
6457         current_eh_spec_try_block if appropriate.
6458         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
6459         Combine common code.  Don't poplevel when not doing semantic
6460         analysis.
6461         (push_cp_function_context): Don't expand functions without an
6462         explicit call to expand_body.
6463         (mark_lang_function): Make eh_spec_try_block and
6464         x_scope_stmt_stack.  
6465         * except.c (expand_end_eh_spec): Don't
6466         declare.
6467         (process_start_catch_block): Likewise.
6468         (push_eh_cleanup): Use finish_decl_cleanup.
6469         (initialize_handler_parm): New function.
6470         (expand_start_catch_block): Use it.
6471         (expand_end_catch_block): Use tree-generation functions, not
6472         RTL-generation functions.
6473         (expand_start_eh_spec): Likewise.
6474         (expand_end_eh_spec): Likewise.
6475         (expand_exception_blocks): Simplify.
6476         (start_anon_func): Use do_pushlevel.
6477         (end_anon_func): Use do_poplvel.  Call expand_body for the
6478         function.  
6479         * expr.c (do_case): Don't call define_case_label.  
6480         * init.c (create_temporary_var): Set DECL_CONTEXT for local
6481         variables.  
6482         * method.c (emit_thunk): Call expand_body for the
6483         thunk.
6484         (sythesize_method): Likewise.  
6485         * parse.y (handler_args): Give it ttype.
6486         (eat_saved_input): Call expand_body.
6487         (base_init): Use do_pushlevel.
6488         (pending_inline): Call expand_body.
6489         (handler): Adjust calls to finish_handler_parms and
6490         finish_handler.
6491         (handler_args): Don't call expand_start_catch_block.  Return the
6492         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
6493         * parse.c: Regenerated.
6494         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
6495         * semantics.c (do_pushlevel): Give it external linkage.  Build
6496         SCOPE_STMTs.
6497         (do_poplevel): Likewise.
6498         (finish_case_label): Call define_case_label when doing semantic
6499         analysis.
6500         (finish_goto_stmt): Create RTL for labels.
6501         (finish_function_try_block): Set in_function_try_handler
6502         unconditionally.
6503         (finish_function_handler_sequence): Unset it.
6504         (finish_handler_parms): Use expand_start_catch_block even when
6505         building a statement-tree.
6506         (begin_catch_block): New function.
6507         (finish_handler): Move a little RTL-generation logic here.
6508         (finish_decl_cleanup): Allow cleanups for empty declarations.
6509         (finish_named_return_value): Don't pushdecl when not doing
6510         semantic analysis.
6511         (expand_stmt): Don't do semantic analysis for variable
6512         declarations.  Handle START_CATCH_STMT.  Call expand_label
6513         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
6514         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
6515         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
6516         RETURN_INIT and function try blocks.
6517         
6518         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
6519         x_scope_stmt_stack.  Add x_in_charge_parm.
6520         (current_eh_spec_try_block): New macro.
6521         (current_scope_stmt_stack): Likewise.
6522         (current_in_charge_parm): Likewise.
6523         * decl.c (start_function): Initialize current_in_charge_parm.
6524         (finish_function): Use current_in_charge_parm rather than looking
6525         up __in_chrg.
6526         * search.c (expand_indirect_vtbls_init): Likewise.
6527
6528         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
6529         (TRY_BLOCK): Likewise.
6530         (HANDLER): Likewise.
6531         (START_CATCH_STMT): New tree node.
6532         (SCOPE_STMT): Likewise.
6533         * cp-tree.h (SCOPE_BEGIN_P): New macro.
6534         (SCOPE_NULLIFIED_P): Likewise.
6535         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
6536         (struct lang_decl): Add saved_language_function.
6537         (DECL_PENDING_INLINE_INFO): Adjust documentation.
6538         (DECL_PENDING_INLINE_P): New macro.
6539         (TYPE_TI_ARGS): Fix typo in comment.
6540         (DECL_SAVED_TREE): Add to documentation.
6541         (DECL_SAVED_FUNCTION_DATA): New macro.
6542         (START_CATCH_TYPE): Likewise.
6543         (SCOPE_END_P): New macro.
6544         (declare_parm_level): Don't declare.
6545         * decl.c (mark_lang_function): New function, split out from
6546         mark_cp_function_context.
6547         (save_function_data): New function.
6548         (declare_parm_level): Remove.
6549         (finish_function): Use save_function_data to squirrel away
6550         important stuff for later use.
6551         (mark_cp_function_context): Use mark_function_data.
6552         (lang_mark_tree): Likewise.
6553         * lex.c (begin_definition_of_inclass_inline): Set
6554         DECL_PENDING_INLINE_P.
6555         (store_pending_inline): Clear it.
6556         * pt.c (tsubst_decl): Likewise.
6557
6558 1999-09-17  Nathan Sidwell  <nathan@acm.org>
6559
6560         * call.c (perform_implicit_conversion): Deal with error_mark_node.
6561
6562 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
6563
6564         * decl.c (warn_extern_redeclared_static): Don't get confused by
6565         static member functions.
6566         (duplicate_decls): Merge DECL_THIS_STATIC.
6567
6568         * decl.c (expand_static_init): Make sure assignments to local
6569         statics actually occur.
6570
6571 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
6572
6573         * cp-tree.h (poplevel_class): Declare.
6574         * class.c (popclass): Use poplevel_class, not poplevel.
6575         * decl.c (poplevel_class): Don't make it static.  Don't return a
6576         value.
6577         (poplevel): Don't call poplevel_class; abort in a class
6578         binding level is seen.
6579         * semantics.c (finish_translation_unit): Use pop_everything.
6580         * parse.y (member_init): Allow errors.
6581         (pending_inline): Call finish_function.
6582         * parse.c: Regenerated.
6583         * Makefile.in (CONFLICTS): Adjust.
6584
6585 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
6586         
6587         * error.c: Reduce code duplication.
6588         (dump_template_value): New function.
6589         (dump_type_real): Use it.
6590         (dump_decl): Likewise.
6591         (dump_function_name): Likewise.
6592         (dump_function_decl): Don't be too talkative about function return
6593         type variety.
6594
6595 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6596
6597         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
6598
6599         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
6600
6601 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
6602
6603         * decl2.c (finish_file): Also call check_global_declarations for
6604         the pending_statics list.
6605
6606 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
6607
6608         * lex.c (cp_pragma_implementation): Allow #pragma implementation
6609         in header files.
6610
6611 1999-09-15  Richard Henderson  <rth@cygnus.com>
6612
6613         * lex.c (mark_impl_file_chain): Follow the next chain.
6614
6615 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
6616
6617         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
6618         problems with extern "C" functions redeclared as static.
6619         (duplicate_decls): When a builtin is redeclared static, make the
6620         new function have internal linkage.
6621         
6622 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
6623
6624         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
6625         * pt.c (tsubst_copy): Likewise.
6626         * tree.c (search_tree): Likewise.
6627         (mapcar): Likewise.
6628
6629 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6630
6631         * typeck2.c (ack): Don't declare progname.
6632
6633 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
6634
6635         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
6636         filenames with ggc_alloc_string.
6637
6638 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
6639
6640         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
6641         TARGET_EXPR.
6642         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
6643         the TARGET_EXPR.
6644         * cvt.c (build_up_reference): Likewise.
6645         * tree.c (build_cplus_new): Likewise.
6646         (get_target_expr): Likewise.
6647         
6648 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
6649
6650         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
6651
6652 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
6653
6654         * cp-tree.h (build_target_expr): New function.
6655         * call.c (build_conditional_expr): Use build_target_expr.
6656         (convert_like): Likewise.
6657         (build_over_call): Likewise.
6658         * cvt.c (build_up_reference): Likewise.
6659         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
6660         (destroy_local_var): Here.
6661         (build_target_expr): New function.
6662         * tree.c (build_cplus_new): Use it.
6663         (get_target_expr): Likewise.
6664
6665 1999-09-13  Nathan Sidwell  <nathan@acm.org>
6666
6667         * typeck.c (expr_sizeof): Don't decay arrays and functions.
6668         Remove misleading comment.
6669         (build_compound_expr): Don't decay arrays.
6670
6671 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
6672
6673         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
6674         class rvalues again.
6675
6676 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6677
6678         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
6679
6680         * g++spec.c: Include gcc.h.
6681         (lang_specific_driver): Constify a char*.  Call xcalloc, not
6682         xmalloc/bzero.  All calls to the function pointer parameter now
6683         explicitly call `fatal'.
6684
6685 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
6686
6687         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
6688         * cvt.c (ocp_convert): Complete the from and destination types.
6689         Adjust warning about functions always being `true' in conditionals.
6690         * decl.c (duplicate_decls): Don't play funny games with abort.
6691         * error.c (dump_expr): Handle OVERLOADs.
6692         * spew.c (probe_obstack): Remove.
6693         * typeck.c (condition_conversion): Use perform_implicit_conversion.
6694         
6695 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
6696
6697         * cp-tree.h (auto_function, define_function): Adjust prototypes.
6698         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
6699         changed.
6700         (auto_function): Likewise, for CODE arg.
6701         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
6702         (builtin_function): ... here.
6703
6704 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
6705
6706         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
6707         (init_decl_processing): Don't set TREE_PERMANENT for the
6708         error_mark_node.
6709         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
6710         (grokdeclarator): Likewise.
6711         (grokparms): Don't check TREE_PERMANENT when building up lists.
6712         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
6713         (mark_inline_for_output): Likewise.
6714         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
6715         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
6716         * lex.c (check_newline): Don't check ggc_p; it is always one.
6717         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
6718         * spew.c (yylex): Don't copy_node or probe_obstacks for
6719         non-permanent CONSTANTs and STRINGs.
6720         * tree.c (build_cplus_array_type_1): Don't fuss with
6721         TREE_PERMANENT on ARRAY_TYPEs.
6722         
6723         * cp-tree.def (CLEANUP_STMT): New node.
6724         * cp-tree.h (language_function): Add name_declared.
6725         (current_function_name_declared): New macro.
6726         (CLEANUP_DECL): New macro.
6727         (CLEANUP_EXPR): Likewise.
6728         (emit_local_var): Likewise.
6729         (finish_decl_cleanup): New function.
6730         * cvt.c (build_up_reference): Simplify.
6731         (ocp_convert): Remove dead code.
6732         * decl.c (start_decl): Remove call to add_decl_stmt.
6733         (grok_reference_init): Adjust, to handle bindings temporaries to
6734         references.  Remove dead code.
6735         (initialize_local_var): Don't generate RTL for
6736         declarations here, or build cleanups here.  Don't fuss with
6737         obstacks.  Replace expand_start_target_temps calls with explicit
6738         setting of stms_are_full_exprs_p.
6739         (destroy_local_var): New function.
6740         (emit_local_var): Likewise.
6741         (cp_finish_decl): Use them, as appropriate.
6742         (start_function): Announce template functions.
6743         (store_parm_decls): Don't call declare_function_name here.
6744         (finish_stmt): Don't start emit base-initialization code when just
6745         building the statement-tree.
6746         * init.c (create_temporary_var): Move add_decl_stmt call ...
6747         (get_temp_regvar): Here.
6748         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
6749         cp_finish_decl would expect.  Don't call add_decl_stmt.
6750         * semantics.c (begin_compound_stmt): Call declare_function_name,
6751         if appropriate.
6752         (finish_decl_cleanup): New function.
6753         (expand_stmt): Use emit_local_var to output variables.          
6754         (expand_body): Set current_funtion_name_declared.
6755         
6756 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
6757
6758         * cp-tree.h (finish_cleanup_try_block): New function.
6759         * semantics.c (finish_cleanup_try_block): Add comment.
6760
6761 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6762
6763         * cp-tree.h: Delete declarations for all tree nodes now moved to
6764         global_trees.
6765         * decl.c: Delete their definitions.
6766         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
6767         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
6768         provide defaults.
6769         (init_decl_processing): Call build_common_tree_nodes and
6770         build_common_tree_nodes_2 instead of building their nodes here.
6771         Don't add gc roots for them.
6772
6773 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
6774
6775         * cp-tree.h (language_function): Rename expanding_p to
6776         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
6777         (expanding_p): Adjust accordingly.
6778         (TREE_VIA_PRIVATE): Fix typo in comment.
6779         (DECL_REFERENCE_SLOT): Remove.
6780         (SET_DECL_REFERENCE_SLOT): Likewise.
6781         * decl.c (named_label_uses): Adjust. Remove chicken comment.
6782         (push_overloaded_decl): Don't truncate the chain of bindings when
6783         adding an overloaded function.
6784         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
6785         (initialize_local_var): Fix typo in comment.
6786         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
6787         * decl2.c (start_objects): Make the fact that we are expanding
6788         the generated function right away explicit.
6789         (start_static_storage_duration_function): Likewise.
6790         (finish_file): Fix typo in comment.
6791         * init.c (build_vec_init): Correct bugs in handling cleanups.
6792         * semantics.c (maybe_convert_cond): New function.
6793         (FINISH_COND): Always store the condition, even if there's
6794         a declaration.
6795         (finish_if_stmt_cond): Use maybe_convert_cond.
6796         (finish_while_stmt_cond): Likewise.
6797         (finish_do_stmt): Likewise.
6798         (finish_for_cond): Likewise.
6799         (expand_cond): Adjust.
6800         
6801         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
6802         * init.c (perform_member_init): Remove obstack machinations.
6803         (expand_cleanup_for_base): Likewise.
6804         (finish_init_stmts): Mark the statement-expression as used.
6805         * method.c (emit_thunk): Use tree-generating functions, not
6806         RTL.
6807         (do_build_copy_constructor): Likewise.
6808         (do_build_assign_ref): Likewise.
6809         (synthesize_method): Likewise.  Keep track of line numbers.
6810         * pt.c (tsubst_expr): Handle various kinds of try blocks.
6811         * semantics.c (expand_stmts): Remove.
6812         (begin_function_try_block): Set FN_TRY_BLOCK_P.
6813         (finish_function_try_block): Be careful rechaining 
6814         function try blocks.
6815         (expand_stmt): Loop through all the statements at a given level.
6816         (exapnd_body): Be careful with line-numbers here too.  Prepare for
6817         being called directly from the parser.
6818
6819         * cp-tree.h (finish_function): Adjust prototype.
6820         * decl.c (finish_function): Return the function compiled.
6821         * pt.c (instantiate_decl): Don't play games with obstacks.
6822         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
6823         (search_tree): Likewise.
6824         * typeck.c: Fix typo in comment.
6825         * typeck2.c (store_init_value): Add comment.
6826
6827         * cp-tree.h (CPTI_ATEXIT): New macro.
6828         (atexit_node): Likewise.
6829         * decl.c (destroy_local_static): New function, broken out from ...
6830         (expand_static_init): Here.
6831
6832         * rtti.c (get_tinfo_var): These should always be global
6833         (expand_si_desc): Use tree, not RTL, functions to generate code.
6834         (expand_class_desc): Likewise.
6835         (expand_ptr_desc): Likewise.
6836         (expand_attr_desc): Likewise.
6837         (expand_generic_desc): Likewise.
6838         (synthesize_tinfo_fn): Likewise.
6839
6840 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
6841
6842         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
6843         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
6844         RECHAIN_STMTS. 
6845         (RECHAIN_STMST_FROM_CHAIN): Likewise.
6846
6847         * parse.y (simple_stmt): Fix typo in last change.
6848
6849         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
6850         (STMT_IS_FULL_EXPR_P): Likewise.
6851         (STMT_LINENO_FOR_FN_P): Likewise.
6852         (prep_stmt): New function.
6853         (building_stmt_tree): Tweak for safety.
6854         * pt.c (tsubst_expr): Use prep_stmt throughout.
6855         (add_tree): Move it to semantics.c
6856         * semantics.c (add_tree): Move it here.
6857         (finish_expr_stmt_real): New function.
6858         (finish_expr_stmt): Use it.
6859         (finish_if_stmt_cond): Use FINISH_COND.
6860         (finish_while_stmt_cond): Likewise.
6861         (finish_for_cond): Likewise.
6862         (finish_stmt_tree): Tweak line-number handling.
6863         (prep_stmt): New function.
6864         (expand_stmt): Use it.
6865         
6866         * cp-tree.h (begin_switch_stmt): Adjust prototype.
6867         (finish_switch_cond): Likewise.
6868         * parse.y (simple_stmt): Adjust accordingly.
6869         * parse.c: Regenerated.
6870         * pt.c (tsubst_expr): Adjust accordingly.
6871         * semantics.c (expand_cond): New function.
6872         (FINISH_COND): New macro.
6873         (begin_switch_stmt): Build the SWITCH_STMT here.
6874         (finish_switch_stmt_cond): Not here.
6875         (expand_stmt): Adjust calls to begin_switch_stmt and
6876         finish_switch_cond.  Use expand_cond throughout.
6877
6878         * dump.c (dequeue_and_dump): Dump types for constants.
6879         Describe DECL_ARG_TYPE more intuitively.
6880         Handle ARRAY_REF.
6881
6882         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
6883         (lang_cleanup_tree): Remove.
6884         * lex.c (make_lang_type): Use ggc_alloc to allocate
6885         TYPE_LANG_SPECIFIC.
6886
6887         Reorganize per-function data.
6888         * cp-tree.h (saved_scope): Add function_decl, bindings.
6889         (language_function): Rename binding_level to bindings.
6890         (cp_function_chain): Use the current_function, not the
6891         outer_function_chain.
6892         (current_class_ptr): Make it work, even when there's no 
6893         current function.
6894         (current_class_ref): Likewise.
6895         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
6896         macros.
6897         (clear_temp_name): Remove.
6898         * decl.c (check_function_type): New function, broken out from
6899         start_function.
6900         (current_binding_level): Adjust definition.
6901         (pushlevel): Simplify.
6902         (poplevel): Don't use named_label_uses when we're outside
6903         a function scope.
6904         (mark_saved_scope): Mark function_decl and bindings.
6905         (maybe_push_to_top_level): Don't unconditionally push a new
6906         function context.  Save bindings and the current_function_decl.
6907         Don't clear named_labels.
6908         (pop_from_top_level): Pop function context if appropriate.
6909         (init_decl_processing): Set init_lang_status and free_lang_status,
6910         rather than save_lang_status and restore_lang_status.
6911         (start_function): Take SF_* flags.  Don't clear per-function data.
6912         Reorder and simplify to use new per-function data code.  Add
6913         asserts.
6914         (store_parm_decls): Don't call init_function_start here.
6915         (finish_function): Adjust for new handling of per-function data.
6916         (push_cp_function_context): Simplify.
6917         (mark_cp_function_context): Change binding_level to bindings.
6918         * decl2.c (clear_temp_name): Remove.
6919         (start_objects): Use SF flags to start_function.
6920         (start_static_storage_duration_function): Likewise.
6921         * except.c (start_anon_func): Remove redundant calls to 
6922         push_function_context_to.  Use SF flags to start function.
6923         (end_anon_func): Remove redundant call to pop_function_context
6924         from.
6925         * lex.c (reinit_parse_for_function): Don't initialize per-function 
6926         data.
6927         * method.c (emit_thunk): Clear current_function after calling
6928         assemble_end_function.  Use SF flags for start_function.
6929         (synthesize_method): Use SF flags for start_function.
6930         * parse.c: Regenerated.
6931         * parse.y (fn.defpen): Likewise.
6932         (pending_inline): Clear current_function, even if something goes
6933         wrong.
6934         * pt.c (instantiate_decl): Use SF flags to start_function.
6935         Don't save and restore expanding_p.
6936         (add_tree): Handle the case where we are outside any function.
6937         (end_tree): Likewise.
6938         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
6939         * semantics.c (begin_function_definition): Likewise.
6940         (expand_body): Likewise.
6941         
6942 1999-09-09  Nathan Sidwell  <nathan@acm.org>
6943
6944         * cp-tree.h (convert_to_void): Prototype new function.
6945         (require_complete_type_in_void): Remove prototype.
6946         * cvt.c (convert_to_void): New function.
6947         (ocp_convert): Use convert_to_void.
6948         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
6949         expressions.
6950         * typeck.c (require_complete_type_in_void): Remove function.
6951         (build_compound_expr): Use convert_to_void.
6952         (build_static_cast): Likewise.
6953         (build_c_cast): Likewise.
6954         * semantics.c (finish_expr_stmt): Do not decay full expressions.
6955         
6956         * typeck.c (build_x_compound_expr): Add FIXME.
6957
6958 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
6959
6960         * cp-tree.h (scratch_tree_cons): Remove.
6961         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
6962         and perm_tree_cons with plain tree_cons.
6963         * class.c: Likewise.
6964         * decl.c: Likewise.
6965         * decl2.c: Likewise.
6966         * except.c: Likewise.
6967         * expr.c: Likewise.
6968         * init.c: Likewise.
6969         * lex.c: Likewise.
6970         * method.c: Likewise.
6971         * parse.y: Likewise.
6972         * pt.c: Likewise.
6973         * repo.c: Likewise.
6974         * rtti.c: Likewise.
6975         * search.c: Likewise.
6976         * typeck.c: Likewise.
6977         * parse.c: Regenerated.
6978         * tree.c (build_srcloc): Simplify.
6979         
6980 1999-09-08  Bruce Korb  autogen@linuxbox.com
6981
6982         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
6983
6984 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
6985
6986         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
6987         Remove next.
6988         (LANG_DECL_PERMANENT): Remove.
6989         * decl.c (duplicate_decls): Don't mess about with obstacks trying
6990         to free memory.
6991         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
6992         * lex.c (free_lang_decl_chain): Remove.
6993         (build_lang_decl): Don't use obstacks.
6994         (retrofit_lang_decl): Likewise.
6995         (copy_lang_decl): Likewise.
6996
6997         * cp-tree.h (saved_scope): Remove old_binding_level and 
6998         function_decl.  Tidy up.
6999         * decl.c (mark_saved_scope): Don't set them.
7000         (maybe_push_to_top_level): Clear memory.
7001
7002         * decl.c (layout_var_decl): Change prototype.  Don't complete
7003         types for external objects.
7004         (check_initializer): Likewise.  Tidy.
7005         (initialize_local_var): Complete types here.
7006         (cp_finish_decl): Not here.  Reorganize a little.
7007         (grokvardecl): Don't complete types here.
7008
7009         * decl.c (start_function): Clear last_dtor_insn and
7010         last_parm_cleanup_insn. 
7011         (push_cp_function_context): Just copy over a little of
7012         the old context, not all of it.
7013
7014         * cp-tree.h (copy_to_permanent): Remove.
7015         (permanent_p): Likewise.
7016         * decl.c (building_typename_type): Don't use copy_to_permanent.
7017         (start_decl): Likewise.
7018         (grok_reference_init): Likewise.
7019         (cp_finish_decl): Likewise.
7020         * init.c (build_new_1): Don't use mapcar.
7021         (build_vec_delete_1): Don't use copy_to_permanent.
7022         (build_vec_init): Likewise.
7023         * parse.y (primary): Likewise.
7024         * parse.c: Regenerated.
7025         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
7026         (lookup_template_class): Likewise.
7027         (tsubst_friend_function): Likewise.
7028         (instantiate_class_template): Likewise.
7029         (tsubst_decl): Likewise.
7030         (tsubst): Likewise.
7031         (instantiate_template): Likewise.
7032         (unify): Likewise.
7033         * rtti.c (get_tinfo_fn): Likewise.
7034         (build_dynamic_cast): Likewise.
7035         * semantics.c (finish_if_stmt_cond): Likewise.
7036         (finish_while_stmt_cond): Likewise.
7037         (finish_do_stmt): Likewise.
7038         (finish_for_cond): Likewise.
7039         (finish_for_expr): Likewise.
7040         (finish_cleanup): Likewise.
7041         (add_decl_stmt): Likewise.
7042         (finish_named_return_value): Likewise.
7043         (finish_qualified_call_expr): Likewise.
7044         * tree.c (perm_manip): Remove.
7045         (build_exception_variant): Don't use copy_to_permanent.
7046         (permanent_p): Remove.
7047         (copy_to_permament): Remove.
7048         (build_min_nt): Don't use copy_to_permanent.
7049         (build_min): Likewise.
7050         (min_tree_cons): Likewise.
7051         * typeckc.c (build_static_cast): Likewise.
7052         (build_reinterpret_cast): Likewise.
7053         (build_const_cast): Likewise.
7054         
7055 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
7056
7057         * decl.c (ggc_p): Set it to 1.
7058         (mark_saved_scope): Add prototype.
7059
7060 1999-09-07  Richard Henderson  <rth@cygnus.com>
7061
7062         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
7063         * typeck.c (self_promoting_args_p): Delete.
7064
7065 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
7066
7067         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
7068         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
7069
7070 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
7071
7072         * Makefile.in (tree.o): Depend on ggc.h.
7073         * class.c (make_method_vec): Remove.
7074         (free_method_vec): Likewise.
7075         (free_method_vecs): Remove.
7076         (add_method): Don't use them.
7077         * cp-tree.def (PTRMEM_CST): Make it longer.
7078         (TEMPLATE_PARM_INDEX): Make it shorter.
7079         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
7080         (template_parm_index): Remove RTL field.
7081         (ptrmem_cst): Add RTL field.
7082         (finish_function): Removed parameter.
7083         (process_next_inline): Change prototype.
7084         (init_cplus_unsave): Rename to init_tree.
7085         (binding_init): Remove.
7086         * decl.c (free_binding_nodes): Remove.
7087         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
7088         (pop_binding): Don't use free_binding_nodes.
7089         (free_binding_vecs): Remove.
7090         (store_bindings): Don't use them.
7091         (pop_from_top_level): Likewise.
7092         (lookup_namespace_name): Simplify.
7093         (build_typename_type): Don't use obstack_free.
7094         (unqualified_namespace_lookup): Simplify.
7095         (lookup_name_real): Simplify.
7096         (start_function): Remove comment about leaks.
7097         (finish_function): Removed nested parameter.  Call
7098         expand_end_bindings even when building_stmt_tree.
7099         Call ggc_push_context and ggc_pop_context around
7100         rest_of_compilation, if necessary.
7101         (mark_cp_function_context): Handle a NULL language-context.
7102         (lang_mark_false_label_stack): Fix typo.
7103         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
7104         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
7105         pointer to method types.
7106         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
7107         * decl2.c (finish_objects): Adjust call to finish_function.
7108         (finish_static_store_duration_function): Likewise.
7109         (do_nonmember_using_decl): Remove call to binding_init.
7110         * except.c (end_anon_func): Adjust call to finish_function.
7111         * lex.c (mark_impl_file_chain): New function.
7112         (init_parse): Call init_tree, not init_cplus_unsave.
7113         Add GC roots.
7114         (cp_pramga_interface): Use xmalloc, not permalloc.
7115         (cp_pragma_implementation): Likewise.
7116         (begin_definition_of_inclass_inline): Simplify.
7117         (process_next_inline): Adjust prototype.
7118         (do_scoped_id): Don't call binding_init.
7119         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
7120         * method.c (emit_thunk): Adjust call to finish_function.
7121         (synthesize_method): Likewise.
7122         * parse.y (%union): Add a new `pi' variant.
7123         (PRE_PARSED_FUNCTION_DECL): Use it.
7124         (fn.defpen): Likewise.
7125         (fndef): Adjust call to finish_function.
7126         * pt.c (instantiate_decl): Likewise.
7127         * rtti.c (syntheisze_tinfo_fn): Likewise.
7128         * semantics.c (expand_body): Likewise.
7129         * tree.c: Include ggc.h.
7130         (mark_list_hash): New function.
7131         (binding_init): Remove.
7132         (init_cplus_unsave): Rename to ...
7133         (init_tree): This.  Add GC roots.
7134         
7135 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
7136
7137         Get ready for garbage collection.
7138         * Makefile.in (CXX_TREE_H): Add varray.h
7139         (lex.o): Depend on ggc.h.
7140         (decl.o): Likewise.
7141         (decl2.o): Likewise.
7142         (method.o): Likewise.
7143         (search.o): Likewise.
7144         (pt.o): Likewise.
7145         (repo.o): Likewise.
7146         * class.c: Include ggc.h.
7147         (current_class_name): Remove.
7148         (current_class_type): Likewise.
7149         (current_access_specifier): Likewise.
7150         (previous_class_type): Likewise.
7151         (previous_class_values): Likewise.
7152         (class_cache_firstobj): Likewise.
7153         (current_lang_base): Likewise.
7154         (current_lang_stack): Likewise.
7155         (current_lang_stacksize): Likewise.
7156         (lang_name_c): Likewise.
7157         (lang_name_cplusplus): Likewise.
7158         (lang_name_java): Likewise.
7159         (current_lang_name): Likewise.
7160         (base_layout_decl): Likewise.
7161         (access_default_node): Likewise.
7162         (access_public_node): Likewise.
7163         (access_protected_node): Likewise.
7164         (access_private_node): Likewise.
7165         (access_default_virtual_node): Likewise.
7166         (access_public_virtual_node): Likewise.
7167         (access_protected_virtual_node): Likewise.
7168         (access_private_virtual_node): Likewise.
7169         (signed_zero_node): Likewise.
7170         (init_class_processing): Don't build base_layout_decl.
7171         (push_lang_context): Adjust now that current_lang_base is a varray.
7172         (pop_lang_context): Likewise.
7173         * cp-tree.h: Include varray.h.
7174         (cp_global_trees): Add access_default, access_public,
7175         access_protected, access_private, access_default_virtual,
7176         access_public_virtual, access_protected_virtual,
7177         access_private_virtual, ctor_identifier, delta2_identifier, 
7178         delta_identifier, dtor_identifier, in_charge_identifier,
7179         index_identifier, nelts_identifier, this_identifier,
7180         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
7181         lang_name_c, lang_name_cplusplus, lang_name_java,
7182         empty_except_spec, null, jclass, minus_one, terminate.
7183         (saved_scope): Move here from decl.c.  Define globals in terms of
7184         saved_scope: current_namespace, current_class_name,
7185         current_class_type, current_access_specifier, current_lang_stack,
7186         current_lang_base, current_lang_name, current_function_parms,
7187         current_template_parms, processing_template_decl,
7188         processing_specialization, processing_explicit_instantiation,
7189         previous_class_type, previous_class_values, class_cache_firstobj.
7190         (scope_chain): New variable.
7191         (init_pt): New function.
7192         * decl.c (current_namespace): Remove.
7193         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
7194         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
7195         (delta_identifier, delta2_identifier): Likewise.
7196         (pfn_or_delta2_identifier, tag_identifier): Likewise
7197         (vt_off_identifier, empty_except_spec, null_node): Likewise.
7198         (current_function_parms, current_lang_base): Remove.
7199         (current_lang_stack, previous_class_values): Remove.
7200         (class_binding_level): Macroize.
7201         (saved_scope): Remove.
7202         (current_saved_scope): Rename to scope_chain.
7203         (mark_saved_scope): Adjust for new scope structure.
7204         (maybe_push_to_top_level): Likewise.
7205         (pop_from_top_level): Likewise.
7206         (duplicate_decls): Adjust now that current_lang_base is a varray.
7207         (build_typename_type): Call ggc_add_tree_hash_table_root.
7208         (init_decl_processing): Call init_pt.  Call push_to_top_level to
7209         set up globals.  Add GC roots.
7210         (xref_basetypes): Adjust now that current_lang_base is a varray.
7211         * decl.h (this_identifier): Remove.
7212         (in_charge_identifier): Likewise.
7213         * decl2.c: Don't include varray.h.
7214         (current_namespace): Remove.
7215         (init_decl2): Add GC roots.
7216         * except.c (Terminate): Remove. 
7217         (init_exception_processing): Use terminate_node instead.
7218         (build_terminate_handler): Likewise.
7219         * init.c (nc_nelts_field_id): Remove.
7220         (minus_one): Likewise.
7221         (init_init_processing): Use minus_one_node and nelts_identifier
7222         instead.  Add GC roots.
7223         (jclass_node): Remove.
7224         (build_new_1): Use nelts_identifier.
7225         (build_vec_init): Likewise.
7226         (build_vec_delete): Likewise.
7227         * lex.c: Include ggc.h.
7228         (defarg_fn): Move declaration early.
7229         (defarg_parms): Likewise.
7230         (init_parse): Add GC roots.
7231         (handle_cp_pragma): Remove redundant declaration of
7232         pending_vtables.
7233         * method.c: Include ggc.h.
7234         (btypelist): Make it a varray.  All uses changed.
7235         (ktypelist): Likewise.
7236         (init_method): Add GC roots.
7237         * pt.c: Don't include varray.h.  Include ggc.h.
7238         (current_template_parms): Remove.
7239         (processing_template_decl): Likewise.
7240         (processing_specialization): Likewise.
7241         (processing_explicit_instantiation): Likewise.
7242         (init_pt): New function.
7243         * repo.c: Include ggc.h.
7244         (init_repo): Add GC roots.
7245         * search.c: Don't include varray.h.
7246         (_vptr_name): Remove.
7247         (lookup_field_1): Use vtpr_identifier instead.
7248         (expand_indirect_vtbls_init): Remove redundant declaration of
7249         in_charge_identifier.
7250         (init_search_processing): Use vptr_identifier.
7251         
7252 1999-09-05  Richard Henderson  <rth@cygnus.com>
7253             Bernd Schmidt <bernds@cygnus.co.uk>
7254             Mark Mitchell  <mark@codesourcery.com>
7255
7256         * Makefile.in (parse.o): Depend on ggc.h.
7257         (decl2.o): Depend on ggc.h.
7258         (init.o): Depend on ggc.h.
7259         * cp-tree.h (init_decl2): Declare.
7260         (cp_parse_init): Likewise.
7261         * decl.c (ggc_p): Define to zero.
7262         (mark_saved_scope): New function.
7263         (init_decl_processing): Call cp_parse_init, and cp_decl2.
7264         Register GC roots.
7265         (expand_static_init): Add GC roots.
7266         * decl2.c: Include ggc.h.
7267         (init_decl2): New function.
7268         * init.c: Include ggc.h.
7269         (init_init_processing): Add GC roots.
7270         * parse.y: Include ggc.h.
7271         (cp_parse_init): New function.
7272         
7273 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
7274
7275         * decl.c (init_decl_processing): Set mark_lang_status.
7276         (lang_mark_false_label_stack): Adjust prototype.
7277         * decl2.c (grok_function_init): Remove extraneous declaration of
7278         abort_fndecl.
7279
7280         * Make-lang.in (cc1plus): Remove dependency on GGC.
7281         * Makefile.in (OBJS): Don't mention ggc-simple.o.
7282         (OBJDEPS): Don't mention ggc-simple.o.
7283
7284         * Make-lang.in (cc1plus): Depend on $(GGC).
7285         * Makefile.in (OBJS): Add ggc-simple.o.
7286         (OBJDEPS): Likewise.
7287         * cp-tree.h (language_function): Rename members to `x_' versions;
7288         we now have x_named_labels, x_ctor_label, x_dtor_label,
7289         x_base_init_list, x_member_init_list, x_base_init_expr,
7290         x_current_class_ptr, x_current_class_ref, x_last_tree,
7291         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
7292         x_result_rtx. 
7293         (dtor_label, ctor_label, current_base_init_list,
7294         current_member_init_list, base_init_expr, current_class_ptr,
7295         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
7296         * decl.c: Include ggc.h.
7297         (last_dtor_insn): Adjust to use x_ names.
7298         (last_parm_cleanup_insn): Likewise.
7299         (original_result_rtx): Likewise.
7300         (named_labels): Likewise.
7301         (mark_binding_level): New function.
7302         (mark_cp_function_context): Likewise.
7303         (mark_false_label_stack): Likewise.
7304         (lang_mark_tree): Likewise.
7305         (lang_cleanup_tree): Likewise.
7306         
7307 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
7308
7309         * Makefile.in (CXX_TREE_H): Include function.h.
7310         (decl.o): Don't depend on function.h.
7311         (decl2.o): Likewise.
7312         (typeck.o): Likewise.
7313         (init.o): Likewise.
7314         (method.o): Likewise.
7315         * cp-tree.h: Include function.h.
7316         (cp_function): Rename to language_function.  Remove next.
7317         (cp_function_chain): Make it a macro, not a variable.
7318         (push_cp_function_context): Don't declare.
7319         (pop_cp_function_context): Likewise.
7320         * decl.c: Don't include function.h.
7321         (push_cp_function_context): Make it static.  Make it suitable for
7322         a save_lang_status callback.
7323         (pop_cp_function_context): Likewise.
7324         (maybe_push_to_top_level): Call push_function_context_to, not
7325         push_cp_function_context.
7326         (pop_from_top_level): Call pop_function_context_from, not
7327         pop_cp_function_context.
7328         (init_decl_processing):  Set save_lang_status and
7329         restore_lang_status.  Call push_function_context_to, not
7330         push_cp_function_context.
7331         (cp_function_chain): Remove.
7332         * decl2.c: Don't include function.h.
7333         * except.c: Don't include function.h.
7334         (start_anon_func): Call push_function_context_to, not
7335         push_cp_function_context.
7336         (end_anon_func):  Call pop_function_context_from, not
7337         pop_cp_function_context.
7338         * init.c: Don't include function.h.
7339         * lex.c (begin_definition_of_inclass_inline): Call
7340         push_function_context_to, not push_cp_function_context. 
7341         (process_next_inline):  Call pop_function_context_from, not
7342         pop_cp_function_context.
7343         * method.c: Don't include function.h.
7344         (synthesize_method): Call push_function_context_to, not
7345         push_cp_function_context.  Call pop_function_context_from, not
7346         pop_cp_function_context.
7347         * typeck.c: Don't include function.h.
7348         
7349         * decl.c (expand_static_init): Tweak handling of static
7350         initializations for objects without constructors.
7351
7352 1999-09-03  Nathan Sidwell  <nathan@acm.org>
7353
7354         * typeck.c (build_indirect_ref): Reject dereference of pointer to
7355         void.
7356
7357 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
7358
7359         * cp-tree.h (cp_function): Move here, from decl.c.
7360         (cp_function_chain): Declare.
7361         (dtor_label): New macro, instead of variable.
7362         (ctor_label): Likewise.
7363         (current_base_init_list): Likewise.
7364         (current_member_init_list): Likewise.
7365         (base_init_expr): Likewise.
7366         (current_class_ptr): Likewise.
7367         (current_class_ref): Likewise.
7368         (last_tree): Likewise.
7369         (last_expr_type): Likewise.
7370         (current_function_returns_value): Likewise.
7371         (current_function_returns_null): Likewise.
7372         (current_function_just_assigned_this): Likewise.
7373         (current_function_parms_stored): Likewise.
7374         (temp_name_counter): Likewise.
7375         (static_labelno): Likewise.
7376         (expanding_p): Likewise.
7377         (stmts_are_full_exprs_p): Likewise.
7378         (in_function_try_handler): Likewise.
7379         (lang_type): Remove nested type_flags.  All uses changed.
7380         * call.c (ctor_label): Remove.
7381         (dtor_label): Likewise.
7382         * class.c (current_class_ptr): Remove.
7383         (current_class_ref): Likewise.
7384         * decl.c (static_labelno): Remove.
7385         (dtor_label): Likewise.
7386         (last_dtor_insn): New macro, instead of variable.
7387         (last_parm_cleanup_insn): Likewise.
7388         (original_result_rtx): Likewise.
7389         (in_function_try_handler): Remove.
7390         (named_label_uses): New macro, instead of variable.
7391         (named_labels): Likewise.
7392         (current_function_returns_value): Remove.
7393         (current_function_returns_null): Likewise.
7394         (current_function_assigns_this): New macro, instead of variable.
7395         (current_function_just_assigned_this): Likewise.
7396         (current_binding_level): Likewise.
7397         (init_decl_processing): Call push_cp_function_context.
7398         (cp_function): Move to cp-tree.h
7399         (cp_function_chain): Make it global.
7400         (temp_name_counter): Remove.
7401         (push_cp_function_context): Simplify.
7402         (pop_cp_function_context): Likewise.
7403         * decl2.c (temp_name_counter): Remove.
7404         * init_c (current_base_init_list): Likewise.
7405         (current_member_init_list): Likewise.
7406         (base_init_expr): Likewise.
7407         * method.c (static_labelno): Likewise.
7408         * pt.c (last_tree): Likewise.
7409         * semantics.c (expanding_p): Likewise.
7410         (stmts_are_full_exprs_p): Likewise.
7411         (last_expr_type): Likewise.
7412         * typeck.c (dtor_label): Likewise.
7413         (ctor_label): Likewise.
7414         
7415 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
7416
7417         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
7418         (arg_assoc_class): Use arg_assoc_template_arg for template
7419         arguments. 
7420         (arg_assoc): Likewise.
7421         * pt.c (mangle_class_name_for_template): Allow member template
7422         template arguments.
7423
7424 1999-09-02  Nathan Sidwell  <nathan@acm.org>
7425
7426         * call.c (build_conditional_expr): Warn on enum mismatches.
7427         (convert_arg_to_ellipsis): Move non-pod check to after
7428         conversion.
7429
7430 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7431
7432         * gxx.gperf (hash, is_reserved_word): Add prototypes.
7433
7434         * init.c (build_vec_init): Initialize variable `try_block'.
7435
7436         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
7437         Likewise for bzero/memset.
7438         (token_getch, token_put_back): Add static prototypes.  Remove
7439         `inline' from the definitions.
7440         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
7441
7442 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
7443
7444         * cp-tree.h (lang_type): Move align into type_flags.
7445         (CLASSTYPE_ALIGN): Adjust accordingly.
7446         * call.c (direct_reference_binding): Remove misleading comment.
7447
7448 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7449
7450         * parse.y (language_string): Constify.
7451
7452 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7453
7454         * repo.c (getpwd): Don't prototype.
7455         * xref.c (getpwd): Likewise
7456
7457 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7458
7459         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
7460         Remove hacks for stuff which now comes from libiberty.
7461
7462 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
7463
7464         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
7465
7466 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
7467
7468         * cp-tree.h (begin_init_stmts): Declare.
7469         (finish_init_stmts): Likewise.
7470         * cvt.c (build_up_reference): Wrap the declaration of a temporary
7471         in a statement-expression so that we will see it when expanding
7472         tree structure later.
7473         * init.c (begin_init_stmts): Don't make it static.
7474         (finish_init_stmts): Likewise.
7475
7476         * cp-tree.h (start_handler_parms): New function.
7477         (expand_start_catch_block): Take only one parameter.
7478         (start_handler_parms): New function.
7479         * decl.c (start_handler_parms): Define it.
7480         * except.c (process_start_catch_block): Take only one parameter.
7481         Don't call grokdeclarator here.
7482         (expand_start_catch_block): Don't call grokdeclarator here,
7483         either.
7484         * parse.y (handler_args): Adjust call to
7485         expand_start_catch_block.  Use start_handler_parms.
7486         * pt.c (push_template_decl_real): Make permanent lists have
7487         permanent elements.
7488         (tsubst_expr): Adjust calls to expand_start_catch_block
7489         appropriately.
7490         * semantics.c (expand_stmt): Likewise.
7491         
7492 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
7493
7494         * pt.c (push_template_decl_real): Use template declaration from
7495         class type if it exists.
7496
7497 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
7498
7499         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
7500         (maybe_inject_for_scope_var): Declare it.
7501         (initialize_local_var): Likewise.
7502         * decl.c (maybe_inject_for_scope_var): Make it global.
7503         (initialize_local_var): Likewise.  Move cleanup handling here,
7504         from cp_finish_decl.
7505         (make_rtl_for_nonlocal_decl): Use
7506         push_obstacks_nochange/pop_obstacks, rather than
7507         end_temporary_allocation/resume_temporary_allocation.
7508         (cp_finish_decl): Try to complete the type of a variable when it
7509         is declared.  Move cleanup-handling to initialize_local_var.
7510         (expand_static_init): Use tree-building code, rather than
7511         RTL-building code.
7512         * decl2.c (get_temp_name): Assert non-initializedness of
7513         temporaries.
7514         * init.c (create_temporary_var): Move RTL-assigning code to ...
7515         (get_temp_regvar): Here.
7516         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
7517         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
7518         call initialize_local_var to generate initialization code.
7519         
7520 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7521
7522         * cp-tree.h (fndecl_as_string, type_as_string,
7523         type_as_string_real, args_as_string, decl_as_string,
7524         expr_as_string, code_as_string, language_as_string,
7525         parm_as_string, op_as_string, assop_as_string, cv_as_string,
7526         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
7527
7528         * errfn.c (cp_printer): Likewise.
7529
7530         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
7531         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
7532         cp_file_of, code_as_string, language_as_string, parm_as_string,
7533         op_as_string, assop_as_string, args_as_string, cv_as_string):
7534         Likewise.
7535
7536         * tree.c (lang_printable_name): Likewise.
7537
7538 1999-08-28  Richard Henderson  <rth@cygnus.com>
7539
7540         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
7541
7542 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
7543
7544         * cp-tree.h (strip_array_types): New function.
7545         * decl.c (maybe_deduce_size_from_array_init): New function, split
7546         out from cp_finish_decl.
7547         (layout_var_decl): Likewise.
7548         (maybe_commonize_var): Likewise.
7549         (maybe_inject_for_scope_var): Likewise.
7550         (initialize_local_var): Likewise.
7551         (build_cleanup_on_safe_obstack): Likewise.
7552         (check_initializer): Likewise.
7553         (make_rtl_for_nonlocal_decl): Likewise.
7554         (cp_finish_decl): Use them.
7555         * typeck.c (strip_array_types): New function.
7556         
7557         * cp-tree.def (LABEL_STMT): New tree node.
7558         * cp-tree.h (LABEL_STMT_LABEL): New macro.
7559         (shadow_label): Remove.
7560         (declare_local_label): New function.
7561         (finish_label_decl): Likewise.
7562         * decl.c (make_label_decl): New function, split out from
7563         lookup_label.
7564         (shadowed_labels): Remove.
7565         (binding_level): Add shadowed_labels.
7566         (clear_binding_level): Remove.
7567         (push_binding_level): Just bzero the new binding level.
7568         (pushlevel): Fix indentation.
7569         (pop_label): New function.
7570         (pop_labels): Likewise, split out from poplevel.
7571         (poplevel): Pop local labels.  Use pop_labels.
7572         (maybe_push_to_top_level): Don't clear shadowed_labels.
7573         (lookup_label): Use make_label_decl.
7574         (shadow_label): Remove.
7575         (declare_local_label): New function.
7576         (define_label): Simplify.
7577         (start_function): Don't clear shadowed_labels.
7578         (cp_function): Remove shadowed_labels.
7579         (push_cp_function_context): Don't save shadowed_labels.
7580         (pop_cp_function_context): Don't restore it.
7581         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
7582         * parse.y (label_decl): Use finish_label_decl.
7583         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
7584         declarations.
7585         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
7586         building_stmt_tree.
7587         (finish_label_decl): New function.
7588         (expand_stmt): Handle LABEL_STMTs and local label declarations.
7589         
7590 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
7591
7592         * decl.c (lookup_label): Build labels on the permanent obstack
7593         when building statement trees.  Don't build RTL for labels when
7594         building statement trees.
7595         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
7596         building statement trees.
7597         (finish_label_stmt): Likewise.
7598         (expand_stmt): Adjust accordingly.
7599         * pt.c (tsubst_expr); Likewise.
7600         (do_decl_instantiation): Robustify.
7601         
7602         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
7603         * tree.c (build_cplus_new): Set it.
7604         * expr.c (cplus_expand_expr): Use it.
7605         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
7606         
7607         * decl.c (store_parm_decls): Reset immediate_size_expand.
7608         (finish_function): Likewise.
7609         
7610         * tree.c (cplus_unsave_expr_now): Don't return a value.
7611
7612         * semantics.c (do_poplevel): Always initialize the return value.
7613
7614 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
7615
7616         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
7617         * tree.h (cplus_unsave_expr_now) : Same.
7618
7619 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
7620
7621         * decl.c (grokdeclarator): Amend comment.
7622         * except.c (expand_start_catch_block): Call push_template_decl for
7623         catch-block parameters.
7624         * method.c (synthesize_method): Build an empty compound statement
7625         for the body of a constructor.
7626
7627 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7628
7629         * tree.c (cp_build_qualified_type_real): If we're asking for the
7630         same quals we already have, just return.
7631
7632 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
7633
7634         * cp-tree.def (SUBOBJECT): New tree node.
7635         * cp-tree.h (CLEANUP_P): New macro.
7636         (SUBOBJECT_CLEANUP): Likewise.
7637         (keep_next_level): Add parameter.
7638         (get_temp_regvar): Don't declare.
7639         (emit_base_init): Remove parameter.
7640         (expand_aggr_init): Rename to build_aggr_init.
7641         (expand_vec_init): Rename to build_vec_init.
7642         (do_pushlevel): Remove.
7643         (do_poplevel): Likewise.
7644         (finish_cleanup): New function.
7645         (finish_subobject): Likewise.
7646         (stmts_are_full_exprs_p): New variable.
7647         * decl.c (keep_next_level): Add parameter.
7648         (cp_finish_decl): Use build_aggr_init, not
7649         expand_aggr_init.  Use finish_expr_stmt to expand the code.
7650         (expand_static_init): Use tree-generating, not RTL-generating,
7651         functions to handle the initialization.
7652         (start_function): Remove dead code.  Always have a momentary
7653         obstack inside the function, even before hitting the first curly
7654         brace.
7655         (cplus_expand_expr_stmt): Move calls to
7656         expand_{start,end}_target_temps into semantics.c.
7657         (cp_function): Add stmts_are_full_exprs_p.
7658         (push_cp_function_context): Save it.
7659         (pop_cp_function_context): Restore it.
7660         * decl2.c (get_temp_regvar): Move to init.c.
7661         (do_static_initialization): Use build_{aggr,vec}_init.
7662         (do_static_destruction): Fix typo in comment.
7663         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
7664         * except.c (expand_throw): Use create_temporary_var.
7665         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
7666         * init.c (expand_vec_init_try_block): Remove.
7667         (expand_vec_init_catch_clause): Likewise.
7668         (get_temp_regvar): New function.
7669         (begin_init_stmts): Likewise.
7670         (finish_init_stmts): Likewise.
7671         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
7672         structure here.
7673         (emit_base_init): Likewise.  Remove unused parameter.
7674         (expand_virtual_init): Likewise.
7675         (expand_cleanup_for_base): Use finish_subobject.
7676         (expand_aggr_vbase_init_1): Simplify.
7677         (construct_virtual_bases): Use tree-generating functions to build
7678         up initialization.
7679         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
7680         (expand_default_init): Likewise.
7681         (expand_aggr_init_1): Likewise.
7682         (expand_vec_init): Rename to build_vec_init.
7683         * method.c (do_build_copy_constructor): Use tree-generating
7684         functions.  Don't call clear_last_expr.
7685         (do_build_assign_ref): Likewise.
7686         (synthesize_method): Call clear_last_expr here.
7687         * parse.y (base_init): Don't call clear_last_expr here.
7688         (nodecls): Likewise.
7689         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
7690         * semantics.c (do_pushlevel): Move to here.
7691         (do_poplevel): Likewise.
7692         (stmts_are_full_exprs_p): New variable.
7693         (finish_expr_stmt): Handle logic for temoprary cleanup here.
7694         (finish_for_stmt): Use finish_expr_stmt.
7695         (finish_cleanup): New function.
7696         (finish_function_try_block): Fix indentation.
7697         (finish_subobject): New function.
7698         (setup_vtbl_ptr): Call keep_next_level here.
7699         (finish_stmt_expr): Handle a block with no scope inside the
7700         statement-expression.
7701         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
7702         SUBOBJECT.
7703         * tree.c (search_tree): Handle INIT_EXPR.
7704         (mapcar): Likewise.
7705         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
7706         * typeck2.c (store_init_value): Change expand_aggr_init to
7707         build_aggr_init in comment.
7708         
7709 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
7710
7711         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
7712
7713 1999-08-25  Nathan Sidwell  <nathan@acm.org>
7714
7715         * decl2.c (handle_class_head): Be graceful about additional
7716         scope qualifiers. Adjust comments to reflect reality.
7717
7718 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7719
7720         * call.c (build_conditional_expr): Fix typo.
7721         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
7722         lvalue before trying to mess with the sides.
7723
7724         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
7725
7726 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
7727
7728         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
7729
7730 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
7731
7732         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
7733         Return arbitrary pointer or NULL.
7734         (check_eh_spec): Call __throw_type_match_rtti_2.
7735         * tinfo.h (*::dcast): Return int.  Add valp parm.
7736         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
7737         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
7738         (__throw_type_match_rtti): Now just a wrapper.
7739
7740         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
7741         (init_exception_processing): Don't initialize them.
7742
7743 1999-08-23  Paul Burchard <burchard@pobox.com>
7744
7745         * decl.c (check_default_argument): Fix typo.
7746
7747 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
7748
7749         * cp-tree.def (STMT_EXPR): Fix typo in node name.
7750
7751         * dump.c (dump_next_stmt): New function.
7752         (dequeue_and_dump): Use it.
7753         
7754         * pt.c (tsubst_copy): Make sure to initialize return value for a
7755         STMT_EXPR, even when processing_template_decl.
7756         * semantics.c (finish_stmt_expr): A statement-expression whose
7757         last statement is not an expression-statement has type `void'.  
7758         
7759 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
7760
7761         * semantics.c (finish_stmt_expr): Fix typo in comment.
7762         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
7763         (mapcar): Likewise.
7764         * init.c (build_vec_delete_1): Make the children of a permanent
7765         BIND_EXPR permanent.
7766         * pt.c (register_specialization): Don't register a specialization
7767         more than once.
7768         
7769 1999-08-18  Andrew Haley  <aph@cygnus.com>
7770
7771         * method.c (process_overload_item): Call build_mangled_C9x_name ()
7772         for all integer parameter types larger than long long.
7773
7774 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
7775
7776         * pt.c (redeclare_class_template): Merge default template
7777         arguments in both directions.
7778
7779         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
7780         compiler_error message.
7781
7782 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
7783
7784         * cp-tree.h: Declare flag_use_repository.
7785         * pt.c (do_decl_instantiation): Don't complain about duplicate
7786         instantiation with -frepo.
7787         (do_type_instantiation): Likewise.
7788
7789         * pt.c (push_template_decl_real): Complain about everything
7790         that isn't a valid template.
7791
7792         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
7793         affect inlines.
7794
7795 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
7796
7797         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
7798         * decl2.c (build_expr_from_tree): Handle it.
7799         * error.c (dump_expr): Likewise.
7800         * pt.c (for_each_template_parm): Likewise.
7801         (tsubst_copy): Likewise.
7802         * tree.c (search_tree): Likewise.
7803         * semantics.c (finish_pseudo_destructor_call): Create it.
7804         
7805 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
7806
7807         * search.c (setup_class_bindings): Robustify.
7808         * typeck.c (common_type): Use same_type_p, not pointer equality,
7809         to compare types.
7810
7811         * cp-tree.h (build_lang_field_decl): Remove.
7812         * class.c (build_vtable): Replace calls to build_lang_field_decl
7813         with build_lang_decl.
7814         (prepare_fresh_vtable): Likewise.
7815         (finish_struct_1): Likewise.
7816         (init_class_processing): Likewise.
7817         * decl.c (push_using_decl): Likewise.
7818         (init_decl_processsing): Likewise.
7819         (grokvardecl): Likewise.
7820         (build_ptrmemfunc_type): Likewise.
7821         (grokdeclarator): Likewise.
7822         (build_enumerator): Likewise.
7823         * decl2.c (grok_x_components): Likewise.
7824         (do_class_using_decl): Likewise.
7825         * except.c (call_eh_info): Likewise.
7826         * init.c (init_init_processing): Likewise.
7827         * rtti.c (expand_class_decl): Likewise.
7828         * tree.c (build_base_fields): Likewise.
7829         (build_vbase_pointer_fields): Likewise.
7830         * lex.c (build_lang_decl): Build declarations on the permanent
7831         obstack if we're building statmeent trees.
7832         (retrofit_lang_decl): Handle both the full lang_decl and also the
7833         smaller lang_decl_flags here.
7834         (build_lang_field_decl): Remove.
7835         * pt.c (push_template_decl_real): Issue errors for variable
7836         declarations that are not static members.
7837
7838 1999-08-18  Richard Henderson  <rth@cygnus.com>
7839
7840         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
7841         (mapcar): Likewise.
7842
7843 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
7844
7845         * cp-tree.h (back_end_hook): New variable.
7846         * decl2.c (back_end_hook): Define it.
7847         (finish_file): If it's non-NULL, call it.
7848
7849         * decl.c (add_decl_to_level): New function.
7850         (push_local_binding): Use it.
7851         (find_binding): Fix typo in comment.
7852         (pushdecl): Use add_decl_to_level.  Put templates on the
7853         corresponding namespace-scope binding levels.
7854         * dump.c (dequeue_and_dump): Print the specializations of a
7855         template.
7856         * pt.c (push_template_decl_real): Don't push a template multiple
7857         times.
7858
7859 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
7860
7861         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
7862         (CALL_DECLARATOR_QUALS): Likewise.
7863         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
7864         * decl.c (grokdeclarator): Adjust to use them.
7865         * decl2.c (grokfield): Likewise.
7866         (reparse_absdcl_as_casts): Likewise.
7867         * lex.c (make_call_declarator): Likewise.
7868         (set_quals_and_spec): Likewise.
7869         * pt.c (tsubst): Likewise.
7870         * tree.c (mapcar): Remove special hack to handle third operand of
7871         a CALL_EXPR.
7872
7873 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
7874
7875         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
7876         * class.c (build_vtable): Use build_lang_field_decl to build the
7877         VAR_DECLs for vtables.
7878         (prepare_fresh_vtable): Likewise.
7879         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
7880         CAN_HAVE_FULL_LANG_DECL_P.
7881         (push_using_decl): Use build_lang_decl to build USING_DECLs.
7882         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
7883         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
7884         (build_lang_field_decl): Likewise.
7885         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
7886         to copy.
7887         
7888         * cp-tree.def (STMT_EXPR): New tree node.
7889         * cp-tree.h (STMT_EXPR_STMT): New macro.
7890         (store_return_init): Change prototype.
7891         (finish_named_return_value): New function.
7892         (expand_stmt): Likewise.
7893         (expand_body): Likewise.
7894         (begin_stmt_tree): Likewise.
7895         (finish_stmt_tree): Likewise.
7896         (expanding_p): New variable.
7897         (last_expr_type): Likewise.
7898         (building_stmt_tree): New macro.
7899         * decl.c (start_function): Use building_stmt_tree, not
7900         processing_template_decl, where appropriate.
7901         (store_parm_decls): Likewise.
7902         (store_return_init): Move most of the body to semantics.c.
7903         (finish_function): Use building_stmt_tree.
7904         (finish_stmt): Clear last_expr_type here.
7905         (cp_function): Add expanding_p, last_tree, last_expr_type.
7906         (push_cp_function_context): Save them.
7907         (pop_cp_function_context): Restore them.
7908         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
7909         * error.c (dump_expr): Handle STMT_EXPR.
7910         * except.c (expand_start_catch_block): Use building_stmt_tree.
7911         Use add_decl_stmt.
7912         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
7913         (do_case): Move add_tree call to semantics.c.
7914         * parse.y (return_init): Use finish_named_return_value.
7915         (for.init.statement): Use finish_expr_stmt.
7916         * parse.c: Regenerated.
7917         * pt.c (do_pushlevel): Move to semantics.c.
7918         (do_poplevel): Likewise.
7919         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
7920         (tsubst_expr): Don't expand all the way to RTL here.  Handle
7921         RETURN_INIT and CTOR_INITIALIZER.
7922         (instantiate_decl): Call expand_body after tsubst'ing into
7923         DECL_SAVED_TREE.
7924         * semantics.c (expand_stmts): New function.
7925         (expanding_p): New variable.
7926         (last_expr_type): Likewise.
7927         (finish_expr_stmt): Use building_stmt_tree.
7928         (begin_if_stmt): Likewise.
7929         (finish_if_stmt_cond): Likewise.
7930         (finish_then_clause): Likewise.
7931         (begin_else_clause): Likewise.
7932         (finish_else_clause): Likewise.
7933         (begin_while_stmt): Likewise.
7934         (finish_while_stmt_cond): Likewise.
7935         (finish_while_stmt): Likewise.
7936         (finish_do_body): Likewise.
7937         (finish_do_stmt): Likewise.
7938         (finish_return_stmt): Likewise.
7939         (begin_for_stmt): Likewise.
7940         (fnish_for_init_stmt): Likewise.
7941         (finish_for_cond): Likewise.
7942         (finish_for_expr): Likewise.
7943         (finish_for_stmt): Likewise.
7944         (finish_break_stmt): Likewise.
7945         (finish_continue_stmt): Likewise.
7946         (finish_switch_cond): Likewise.
7947         (finish_switch_stmt): Likewise.
7948         (finish_case_label): Call add_tree here if necessary.
7949         (finish_goto_statement): Use building_stmt_tree.
7950         (begin_try_block): Likewise.
7951         (begin_function_try_block): Likewise.
7952         (finish_try_block): Likewise.
7953         (finish_function_try_block): Likewise.
7954         (finish_handler_sequence): Likewise.
7955         (finish_function_handler_sequence): Likewise.
7956         (begin_handler): Likewise.
7957         (finish_handler_parms): Likewise.
7958         (finish_handler): Likewise.
7959         (begin_compound_stmt): Likewise.
7960         (finish_compound_stmt): Likewise.
7961         (finish_asm_stmt): Likewise.
7962         (finish_label_stmt): Likewise.
7963         (finish_named_return_value): New function.
7964         (setup_vtbl_ptr): Moved here from decl2.c.
7965         (do_pushlevel): Moved here from pt.c.
7966         (do_poplevel): Likewise.
7967         (begin_stmt_expr): Use building_stmt_tree.
7968         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
7969         when building_stmt_tree.
7970         (begin_stmt_tree): New function.
7971         (finish_stmt_tree): Likewise.
7972         (expand_stmt): Likewise.
7973         (expand_body): Likewise.
7974         * tree.c (build_cplus_method_type): Make sure the argument types
7975         end up on the same obstack as the METHOD_TYPE.
7976         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
7977         THROW_EXPR, STMT_EXPR.
7978         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
7979         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
7980         sorry, if an unsupported node is encountered.
7981         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
7982         (c_expand_return): Don't call add_tree here.
7983         
7984 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
7985
7986         * pt.c (check_default_tmpl_args): Don't check in local scopes.
7987         (tsubst_decl): Make sure the declaration is on a saveable
7988         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
7989         variable.
7990         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
7991         
7992 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
7993
7994         Speed up Koenig lookup.
7995         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
7996         to return namespaces we've looked at.
7997         * decl2.c (lookup_using_namespace): Likewise.
7998         (add_function): Don't call ovl_member.
7999         (lookup_arg_dependent): Initialize k.namespaces to the list of 
8000         namespaces seen in unqualified lookup.
8001         * call.c (equal_functions): Move here from tree.c.
8002         (joust): Use it to handle duplicate candidates.
8003         * tree.c (ovl_member): Use ==.
8004
8005 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
8006
8007         * cp-tree.def (DECL_STMT): Make it smaller.
8008         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
8009         (lang_decl): ... here.  Add next.
8010         (DECL_SAVED_TREE): Adjust accordingly.
8011         (DECL_IMPLICIT_TYPEDEF_P): New macro.
8012         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8013         (DECL_STMT_DECL): Likewise.
8014         (create_implicit_typedef): New function.
8015         (maybe_push_decl): Likewise.
8016         (tsubst_default_argument): New function.
8017         (at_function_scope_p): Likewise.
8018         (add_decl_stmt): Likewise.
8019         (push_permanent_obstack): Likewise.
8020         * call.c (convert_default_arg): Use tsubst_default_argument.
8021         * class.c (add_method): Use push_permanent_obstack.
8022         (build_self_reference): Create a TEMPLATE_DECL for the
8023         self-reference, if necessary.
8024         * decl.c (pseudo_global_level_p): Only look at the current binding
8025         level.
8026         (push_binding): Use push_permanent_obstack.
8027         (create_implicit_typedef): New function.
8028         (pushtag): Use it.
8029         (duplicate_decls): Use push_permanent_obstack.
8030         (maybe_push_decl): New function.
8031         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
8032         (start_decl_1): Remove dead code.
8033         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
8034         pseudo_global_level_p.
8035         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
8036         template.
8037         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
8038         pseudo_global_level_p.
8039         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
8040         a template.
8041         (get_sentry): Use push_permanent_obstack.
8042         * dump.c (dequeue_and_dump): Enable DECL_STMT.
8043         * except.c (call_eh_info): Use push_permanent_obstack.
8044         (build_eh_type_ref): Likewise.
8045         (do_pop_exception): Likewise.
8046         (expand_eh_spec): Likewise.
8047         (alloc_eh_object): Likewise.
8048         (expand_throw): Likewise.
8049         * init.c (build_java_class_ref): Likewise.
8050         * lex.c (get_time_identifier): Likewise.
8051         (free_lang_decl_chain): Correct type.
8052         (retrofit_lang_decl): Adjust accordingly.
8053         (build_lang_field_decl): Likewise.
8054         * lex.h (free_lang_decl_chain): Likewise.
8055         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
8056         * parse.c: Regenerated.
8057         * pt.c (tsubst_default_arguments): New function.
8058         (retrieve_local_specialization): Likewise.
8059         (register_local_specialization): Likewise.
8060         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
8061         pseudo_global_level_p to determine whether or not a template is
8062         primary.
8063         (lookup_template_class): Likewise.  Use create_implicit_typedef.
8064         (instantiate_class_template): Call tsubst_default_arguments for
8065         member functions, if appropriate.
8066         (tsubst_default_argument): New function.
8067         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
8068         * search.c (at_function_scope_p): New function.
8069         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
8070         (finish_label_stmt): Likewise.
8071         (add_decl_stmt): New function.
8072         (begin_class_definition): Likewise.
8073         (finish_typeof): Likewise.
8074         * tree.c (copy_template_template_parm): Likewise.
8075         (copy_to_permanent): Likewise.
8076         (push_permanent_obstack): Define.
8077         (mark_addressable): Use it.
8078         * typeck.c (mark_addressable): Likewise.
8079         
8080 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
8081
8082         * cp-tree.h (init_cplus_unsave): New.
8083         (cplus_unsave_expr_now): New.
8084         * lex.c (init_parse): Call init_cplus_unsave.
8085         * tree.c (init_cplus_unsave): New.
8086         (cplus_unsave_expr_now): New.
8087
8088 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
8089
8090         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
8091         decl_constant_value to simplify array bounds.
8092
8093 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
8094
8095         * lang-options.h: Add -fms-extensions.
8096         * cp-tree.h: Declare flag_ms_extensions.
8097         * decl2.c: Define it.
8098         * class.c (instantiate_type): Don't complain about taking the address
8099         of a bound member function if -fms-extensions.
8100         * typeck.c (build_unary_op): Likewise.
8101         * decl.c (grokdeclarator): Or about implicit int.
8102         * init.c (resolve_offset_ref): Or about implicit '&'.
8103
8104 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
8105
8106         * cp-tree.h (minimal_parse_mode): Remove.
8107         (finish_label_stmt): New function.
8108         * decl.c (saved_scope): Remove minimal parse mode.
8109         (maybe_push_to_top_level): Don't save it.
8110         (pop_from_top_level): Don't restore it.
8111         (define_label): Split out template-handling code to semantics.c.
8112         (start_decl): Don't use minimal_parse_mode.
8113         (cp_finish_decl): Likewise.
8114         (start_function): Don't increment it.
8115         (store_return_init): Don't use it.
8116         (finish_function): Don't decrement it.
8117         * parse.y (label_colon): Use finish_label_stmt throughout.
8118         * parse.c: Regenerated.
8119         * pt.c (minimal_parse_mode): Don't define it.
8120         (tsubst_expr): Use finish_label_stmt.
8121         * semantics.c (finish_label_stmt): New function.
8122
8123         * dump.c (queue): Be careful when computing bitmasks.
8124         (dequeue_and_dump): Describe binfos as binfos, not as
8125         vectors.
8126         
8127         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
8128         throughout.     
8129         * parse.c: Regenerated.
8130         
8131         * Make-lang.in (CXX_SRCS): Remove sig.c.
8132         * Makefile.in (CXX_OBJS): Remove sig.o.
8133         (sig.o): Remove.
8134         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
8135         (CPTI_SIGNATURE_TYPE): Likewise.
8136         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
8137         (opaque_type_node): Likewise.
8138         (signature_type_node): Likewise.
8139         (sigtable_entry_type): Likewise.
8140         (flag_handle_signatures): Likewise.
8141         (lang_type): Remove is_signature, is_signature_pointer,
8142         is_signature_reference, has_opaque_typedecls,
8143         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
8144         signature_pointer_to, signature_reference_to.
8145         (IS_SIGNATURE): Remove.
8146         (SET_SIGNATURE): Remove.
8147         (CLEAR_SIGNATURE): Remove.
8148         (IS_SIGNATURE_POINTER): Remove.
8149         (IS_SIGNATURE_REFERENCE): Remove.
8150         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
8151         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
8152         (CLASSTYPE_SIGNATURE): Remove.
8153         (SIGNATURE_TYPE): Remove.
8154         (SIGNATURE_METHOD_VEC): Remove.
8155         (SIGNATURE_POINTER_TO): Remove.
8156         (SIGNATURE_REFERENCE_TO): Remove.
8157         (lang_decl_flags): Remove is_default_implementation.  Rename
8158         memfunc_pointer_to to saved_tree.
8159         (IS_DEFAULT_IMPLEMENTATION): Remove.
8160         (DECL_MEMFUNC_POINTER_TO): Remove.
8161         (DECL_MEMFUNC_POINTING_TO): Remove.
8162         (DECL_SAVED_TREE): Adjust definition.
8163         (tag_types): Remove signature_type_node.
8164         (SIGNATURE_FIELD_NAME): Remove.
8165         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
8166         (SIGNATURE_OPTR_NAME): Likewise.
8167         (SIGNATURE_SPTR_NAME): Likewise.
8168         (SIGNATURE_POINTER_NAME): Likewise.
8169         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
8170         (SIGNATURE_REFERENCE_NAME): Likewise.
8171         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
8172         (SIGTABLE_PTR_TYPE): Likewise.
8173         (SIGTABLE_NAME_FORMAT): Likewise.
8174         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
8175         (SIGTABLE_TAG_NAME): Likewise.
8176         (SIGTABLE_VB_OFF_NAME): Likewise.
8177         (SIGTABLE_VT_OFF_NAME): Likewise.
8178         (finish_base_specifiers): Change prototype.
8179         (build_signature_pointer_type): Remove.
8180         (build_signature_reference_type): Remove.
8181         (build_signature_pointer_constructor): Remove.
8182         (build_signature_method_call): Remove.
8183         (build_optr_ref): Likewise.
8184         (append_signature_fields): Likewise.
8185         (signature_error): Likewise.
8186         * call.c (build_this): Remove signature support.
8187         (build_over_call): Likewise.
8188         (build_new_method_call): Likewise.
8189         * class.c (add_implicitly_declared_members): Likewise.
8190         (finish_struct_1): Likewise.
8191         (finish_struct): Likewise.
8192         * cvt.c (cp_convert_to_pointer): Likewise.
8193         (convert_to_pointer_force): Likewise.
8194         (ocp_convert): Likewise.
8195         * decl.c (sigtable_decl_p): Remove.
8196         (init_decl_processing): Remove support for signatures.
8197         (cp_finish_decl): Likewise.
8198         (grokdeclarator): Likewise.
8199         (grokparms): Likewise.
8200         (xref_tag): Likewise.
8201         (start_function): Likewise.
8202         (start_method): Likewise.
8203         * decl2.c (finish_sigtable_vardecl): Remove.
8204         (flag_handle_signatures): Remove.
8205         (lang_f_options): Remove handle-signatures.
8206         (grokfield): Remove support for signatures.
8207         (grokbitfield): Likewise.
8208         (finish_file): Likewise.
8209         (reparse_absdcl_as_casts): Likewise.
8210         * error.c (dump_type_real): Likewise.
8211         (dump_function_decl): Likewise.
8212         * friend.c (make_friend_class): Likewise.
8213         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
8214         * hash.h: Regenerated.
8215         * init.c (build_new_1): Remove support for signatures.
8216         * lang-options.h: Remove -fhandle-signatures,
8217         -fno-handle-signatures. 
8218         * lex.c (init_parse): Remove support for signatures.
8219         (yyprint): Likewise.
8220         * lex.h (rid): Remove RID_SIGNATURE.
8221         * method.c (build_decl_overload_real): Remove support for
8222         signatures. 
8223         (hack_identifier): Likewise.
8224         * parse.y (base_class): Likewise.
8225         (base_class.1): Likewise.
8226         (access_specifier): Likewise.
8227         * search.c (lookup_member): Likewise.
8228         * semantics.c (finish_qualified_object_call_expr): Likewise.
8229         (finish_template_type_parm): Likewise.
8230         (begin_class_definition): Likewise.
8231         (finish_base_specifier): Likewise.
8232         * sig.c: Remove.
8233         * tree.c (build_cplus_method_type): Remove support for signatures.
8234         * typeck.c (require_complete_type): Likewise.
8235         (c_sizeof): Likewise.
8236         (c_alignof): Likewise.
8237         (build_object_ref): Likewise.
8238         (build_component_ref): Likewise.
8239         (build_indirect_ref): Likewise.
8240         (build_c_cast): Likewise.
8241         (build_modify_expr): Likewise.
8242         (convert_for_initialization): Likewise.
8243         * typeck2.c (signature_error): Remove.
8244         (store_init_value): Remove support for signatures.
8245         (digest_init): Likewise.
8246         (build_x_arrow): Likewise.
8247         (build_functional_cast): Likewise.
8248         * xref.c (GNU_xref_decl): Likewise.
8249         
8250 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
8251
8252         * lex.c (do_identifier): Remove unnecessary lookup of class field.
8253
8254 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
8255
8256         * decl2.c (set_decl_namespace): Do not complain about non-matching
8257         decls if processing a template.
8258
8259 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
8260
8261         * decl.c (build_ptrmemfunc_type): Handle qualified
8262         pointer-to-member types here.
8263         * tree.c (cp_build_qualified_type_real): Simplify handling here.
8264
8265 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8266
8267         * lex.c (lang_identify): Likewise.
8268
8269 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
8270
8271         * Makefile.in: Update dependencies.
8272         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
8273         NULL_RTX.
8274         * decl.c: Include "function.h"
8275         (cleanup_label, return_label): Delete declarations.
8276         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
8277         (finish_function): Rename last_parm_insn variable to
8278         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
8279         * decl2.c: Include "function.h".
8280         (rtl_expr_chain): Delete declaration.
8281         * method.c: Include "function.h"
8282         * tree.c (build_vbase_pointer_fields): Don't initialize
8283         DECL_SAVED_INSNS with NULL_RTX.
8284         * typeck.c: Include "function.h"
8285
8286 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
8287
8288         * semantics.c (begin_function_try_block, finish_function_try_block,
8289         finish_function_handler_sequence): New fns.
8290         * parse.y (function_try_block): Use them.
8291         * pt.c (instantiate_decl): Likewise.
8292
8293         * cp-tree.h: Declare in_function_try_handler.
8294         * decl.c: Define it.
8295         (start_function): Clear it.
8296         (struct cp_function, push_cp_function_context): Save it.
8297         (pop_cp_function_context): Restore it.
8298         * parse.y (function_try_block): Set and clear it.
8299         * except.c (expand_end_catch_block): Rethrow if we reach the end
8300         of a function-try-block handler in a ctor or dtor.
8301         * typeck.c (c_expand_return): Complain about returning from a
8302         function-try-block handler of a ctor.
8303
8304         * parse.y (function_try_block): Call end_protect_partials
8305         before expand_start_all_catch.
8306
8307 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
8308
8309         * decl.c (struct binding_level): Add eh_region field.
8310         (push_binding_level): Set it.
8311         (define_label): Complain about jumping into an EH block.
8312
8313         * ptree.c (print_lang_type): Print the real type of a PMF.
8314         Print what exceptions a fn type throws.
8315
8316 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8317
8318         * class.c (count_fields, add_fields_to_vec): Add static prototype.
8319
8320         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
8321         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
8322         char*.
8323
8324         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
8325         Constify a char*.
8326
8327         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
8328         char*.
8329
8330         * dump.c (queue_and_dump_index, dump_int, dump_string,
8331         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
8332         a char*.
8333         (dump_stmt): Add static prototype.
8334
8335         * errfn.c (cp_thing): Constify a char*.
8336
8337         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
8338         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
8339         dump_expr): Constify a char*.
8340
8341         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
8342         read_line_number): Add static prototype.
8343         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
8344         (real_yylex): Move label `letter' into the scope where it is used.
8345
8346         * method.c (build_mangled_template_parm_index, build_overload_int,
8347         build_decl_overload_real, get_id_2): Constify a char*.
8348
8349         * search.c (check_final_overrider): Make static.
8350
8351         * typeck.c (composite_pointer_type): Constify a char*.
8352
8353 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
8354
8355         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
8356         we're looking at a class.
8357
8358         * decl.c (lookup_name_real): Set the complain flag if we're
8359         looking for a namespace member.
8360
8361         * lex.c (real_yylex): We can have a number with no digits.
8362
8363         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
8364
8365         * search.c (binfo_from_vbase): New fn.
8366         * cp-tree.h: Declare it.
8367         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
8368         from pointer to member of virtual base.  
8369         * typeck.c (get_delta_difference): Likewise.
8370
8371 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
8372
8373         * pt.c (tsubst): Use build_index_type to build in-template array
8374         index type.  Fixes g++.oliva/dwarf1.C.
8375         * decl.c (grokdeclarator): Likewise, just for consistency, as it
8376         doesn't seem to trigger the bug without it.
8377
8378 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
8379
8380         * typeck2.c (add_exception_specifier): Use complete_type.
8381
8382 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
8383
8384         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
8385         (dump_binary_op): Bulletproof.
8386         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
8387         * tree.c (search_tree): Don't enumerate all the nodes of classes
8388         `1', `2', and `<'; handle them generically.  Don't be sorry about
8389         "unrecognized tree codes"; just abort.
8390         (no_linkage_check): Don't do linkage checks for templates.
8391         
8392         * tree.c (cp_build_qualified_type_real): Handle
8393         pointer-to-member-function types correctly.
8394
8395 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
8396
8397         * decl.c (pushdecl): Only give an error for shadowing a parm 
8398         from *this* function.
8399
8400 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
8401
8402         * typeck2.c: Update URLs and mail addresses.
8403
8404 1999-08-04  Nathan Sidwell  <nathan@acm.org>
8405
8406         * cp-tree.h (empty_except_spec): New global var.
8407         (compexcepttypes): Remove prototype.
8408         (comp_except_specs): Prototype new global function.
8409         (add_exception_specifier): Prototype new global function.
8410         * decl.c (empty_except_spec): Define new global var.
8411         (duplicate_decls): Use comp_except_specs, reword error message.
8412         (init_decl_processing): Initialize empty_except_spec.
8413         Adjust build_exception_variant calls.
8414         * parse.y (exception_specification_opt): Use empty_except_spec.
8415         (ansi_raise_identifier): Call check_for_new_type.
8416         (ansi_raise_identifiers): Use add_exception_specifier.
8417         * pt.c (tsubst): Use add_exception_specifier to build exception
8418         specifier.
8419         * search.c (check_final_overrider): New static function, broken
8420         out of get_matching_virtual. Check throw specifiers, reword
8421         diagnostics.
8422         (get_matching_virtual): Use check_final_overrider.
8423         * tree.c (build_exception_variant): Use comp_except_specs.
8424         * typeck.c (compexcepttypes): Remove.
8425         (comp_except_types): New static function, helper for
8426         comp_except_specs. Compare two types as exception specifiers.
8427         (comp_except_specs): New global function, compare two exception
8428         specifiers.
8429         (comptypes): Adjust for comp_except_specs.
8430         * typeck2.c (add_exception_specifier): New global function.
8431         
8432         * class.c (check_for_override): Reword error message.
8433
8434 1999-08-03  Nathan Sidwell  <nathan@acm.org>
8435
8436         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
8437         * cp-tree.h (struct lang_type): Added non_pod_class flag.
8438         (CLASSTYPE_NON_POD_P): New macro to access it.
8439         * class.c (finish_struct_1): Determine non-PODness.
8440         Check for arrays of pointers (-Weffc++).
8441         Remove array inspection duplicated code.
8442         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
8443         Use CLASSTYPE_NON_POD_P.
8444
8445 1999-08-03  Nathan Sidwell  <nathan@acm.org>
8446
8447         * class.c (duplicate_tag_error): Preserve template information.
8448
8449 1999-08-03  Nathan Sidwell  <nathan@acm.org>
8450
8451         * decl.c (start_enum): Show location of previous definition.
8452         * parse.y (enumlist_opt): New reduction.
8453         (structsp): Simplify enum rules to use enumlist_opt.
8454
8455 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
8456
8457         * lex.c (yyprint): Handle PFUNCNAME.
8458
8459         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
8460         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
8461
8462 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
8463
8464         * decl.c (start_decl): Set attributes before duplicate_decls call.
8465
8466 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
8467
8468         * Make-lang.in (CXX_SRCS): Add dump.c.
8469         * Makefile.in (CXX_OBJS): Add dump.o.
8470         (dump.o): New target.
8471         * cp-tree.h (DECL_CONV_FN_P): Document.
8472         (DECL_OVERLOADED_OPERATOR_P): New function.
8473         (TYPE_PTRMEM_CLASS_TYPE): New macro.
8474         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8475         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
8476         (ASM_VOLATILE_P): New macro.
8477         (STMT_LINENO): Likewise.
8478         (cp_namespace_decls): New function.
8479         (dump_node_to_file): New function.
8480         * decl.c (cp_namespace_decls): New function.
8481         (walk_namespaces_r): Use it.
8482         (wrapup_globals_for_namespace): Likewise.
8483         * decl2.c (flag_dump_translation_unit): New variable.
8484         (lang_decode_option): Handle -fdump-translation-unit.
8485         (finish_file): If flag_dump_translation_unit is set, dump the
8486         translation unit.
8487         * dump.c: New file.
8488         * lang-options.h: Add -fdump-translation-unit.
8489         * pt.c (tsubst_template_parms): Robustify.
8490         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
8491         (tsubst_expr): Use STMT_LINENO.
8492         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
8493         for invalid cv-qualifiers even while building templates.
8494         
8495 1999-08-02  Richard Henderson  <rth@cygnus.com>
8496
8497         * call.c: Include defaults.h instead of expr.h.
8498         * decl.c: Likewise.
8499         * pt.c: Likewise.
8500         * typeck.c: Include defaults.h.
8501
8502 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
8503
8504         * lex.c (errorcount, sorrycount): Don't declare.
8505         * repo.c (errorcount, sorrycount): Likewise.
8506         * typeck2.c (errorcount, sorrycount): Likewise.
8507
8508 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
8509
8510         * call.c (convert_default_arg, build_over_call): Change all uses of
8511         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
8512         Ensure expr.h is included.
8513         * decl.c (grokparams): Ditto.
8514         * pt.c (tsubst_decl): Ditto.
8515         * typeck.c (convert_arguments): Ditto.
8516
8517 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
8518
8519         * class.c (mark_overriders): Fix order of args to overrides.
8520         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
8521         functions with the same name.
8522
8523 1999-08-02  Richard Henderson  <rth@cygnus.com>
8524
8525         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
8526
8527 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
8528
8529         * call.c (build_conditional_expr): Fix typo in comment.
8530
8531 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
8532
8533         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
8534         case_stack; use in_control_zone_p.
8535         * typeck.c (c_expand_return): Likewise.
8536
8537 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
8538
8539         * except.c (catch_clauses): Delete declaration.
8540
8541 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
8542
8543         * call.c (build_conditional_expr): Call convert_from_reference to
8544         avoid reference/non-reference type confusion.  Fix typo.
8545
8546 1999-07-30  Richard Henderson  <rth@cygnus.com>
8547
8548         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
8549         * cp-tree.h (initializer_constant_valid_p): Remove.
8550
8551 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
8552
8553         * call.c (conditional_conversion): Don't build BASE_CONVs for
8554         conversions between things that have the same type.
8555         (build_conditional_expr): Tweak.
8556         (convert_like): Some BASE_CONVs really do require the generation
8557         of code.
8558         
8559         * init.c (perform_member_init): Don't go through build_modify_expr
8560         for simple initializations.
8561
8562 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
8563
8564         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
8565         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
8566         virtual functions and MI.  Simplify.
8567
8568         * method.c: Remove prototype for largest_union_member.
8569         * pt.c (determine_specialization): Fix uninitialized warning.
8570         * lex.c (real_yylex): Likewise.
8571
8572 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
8573
8574         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
8575         here too.
8576
8577         * cp-tree.h (BINFO_VIRTUALS): Document new format.
8578         * class.c (modify_one_vtable): Change prototype accordingly.
8579         (modify_all_vtables): Likewise.
8580         (modify_all_direct_vtables): Likewise.
8581         (modify_all_indirect_vtables): Likewise.
8582         (build_vtable_entry_for_fn): New function.
8583         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
8584         (modify_vtable_entry): Likewise.
8585         (add_virtual_function): Likewise.
8586         (build_vtbl_initializer): New function.
8587         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
8588         (fixup_vtable_deltas1): Likewise.
8589         (fixup_vtable_deltas): Likewise.
8590         (override_one_vtable): Likewise.
8591         (finish_struct_1): Likewise.
8592
8593         * error.c (dump_expr): Likewise.
8594         * search.c (get_abstract_virtuals_1): Likewise.
8595         (get_abstract_virtuals): Likewise.
8596         (expand_upcast_fixups): Likewise.
8597         * tree.c (debug_binfo): Likewise.
8598         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
8599         __pure_virtual here.
8600         
8601 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
8602
8603         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
8604         as per 1999-07-26 change.
8605
8606         * typeck.c (c_sizeof): Don't allow non-static data members.
8607         (expr_sizeof): Likewise.
8608
8609 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
8610
8611         * input.c (feed_input): Only touch lineno and input_filename
8612         if !USE_CPPLIB.  Save the old values before setting the new ones.
8613
8614         * input.c (feed_input): Add file, line parms.
8615         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
8616         (real_yylex): Check linemode before input_redirected().
8617
8618         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
8619         from op new to warning.
8620
8621 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
8622
8623         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
8624         * call.c: All uses changed.
8625         * typeck.c: Likewise.
8626
8627 1999-07-26  Nathan Sidwell  <nathan@acm.org>
8628
8629         * exception.cc (__cplus_type_matcher): Match __eh_matcher
8630         prototype.
8631
8632 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
8633
8634         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
8635         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
8636         (strip_top_quals): Declare.
8637         (ncp_convert): Likewise.
8638         (type_after_usual_arithmetic_converions): Likewise.
8639         (composite_pointer_type): Likewise.
8640         * call.c (strip_top_quals): Don't make it static.
8641         (promoted_arithmetic_type_p): New function.
8642         (conditional_conversion): Likewise.
8643         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
8644         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
8645         for converting a type to itself.
8646         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
8647         (implicit_conversion): Make sure the from and to types are
8648         complete.
8649         (add_builtin_candidate): Correct handling of ?: operator.
8650         (add_builtin_candidates): Improve documentation.
8651         (build_conditional_expr): New function.
8652         (can_convert): Implement in terms of can_convert_arg.
8653         (ncp_convert): New function.
8654         * typeck.c (type_after_usual_arithmetic_conversions): New
8655         function, split out from common_type.
8656         (composite_pointer_type): New function, split out from
8657         build_conditional_expr.
8658         (common_type): Use type_after_usual_arithmetic_conversions.
8659         Remove redundant attribute merging.
8660         (comptypes): Tidy.  Handle COMPLEX_TYPE.
8661         (build_binary_op_nodefault): Use null_ptr_cst_p.
8662         (build_conditional_expr): Remove.
8663         (convert_for_assignment): Use new conversion functions.
8664         
8665         * cp-tree.h (abstract_virtuals_error): Change declaration.
8666         * typeck2.c (abstract_virtuals_error): Check to see if an error
8667         ocurred, and return a boolean value accordingly.
8668         (build_functional_cast): Adjust accordingly.
8669         * class.c (finish_struct_1): Likewise.
8670         * cvt.c (ocp_convert): Likewise.
8671         * decl.c (cp_finish_decl): Likewise.
8672         (grokparams): Likewise.
8673         (grok_op_properties): Likewise.
8674         (start_function): Likewise.
8675         * init.c (build_new_1): Likewise.
8676
8677         * pt.c (unify): Don't get confused by pointers-to-member functions.
8678
8679         * search.c (build_cplus_new): Robustify.
8680         
8681 1999-07-24  Richard Henderson  <rth@cygnus.com>
8682
8683         * gxx.gperf (__builtin_va_arg): New.
8684         * parse.y (VA_ARG): New token.
8685         (unary_expr): Recognize it.
8686
8687 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
8688
8689         * g++FAQ.texi: Deleted per Joe Buck's request.
8690         * Makefile.in: Corresponding changes.
8691
8692 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8693
8694         * lex.c: Sync with C frontend.
8695         (whitespace_cr): New fn.
8696         (skip_white_space): Use it.
8697         (init_parse): Reorder.
8698         (yyprint): Support CONSTANT.
8699         (pragma_getc, pragma_ungetc): Bring back.
8700         (read_line_number): Change in_system_header directly.
8701         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
8702         (parse_float): Update to C version.
8703         (yylex): Handle '$' under the letter case.
8704         Remove looking_for_typename handling.
8705         Support hex floating point constants.
8706         Follow C's lead for choosing type of integer constants.
8707         Rearrange stuff to match C frontend.
8708         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
8709         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
8710
8711 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
8712
8713         * call.c (reference_binding): Tweak.
8714         (mayble_handle_implicit_object): Use direct_reference_binding to
8715         create the right implicit conversion sequence.
8716
8717 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
8718
8719         * pt.c (convert_nontype_argument): Don't call decl_constant_value
8720         if we're converting to a reference type.
8721
8722         * call.c (NEED_TEMPORARY_P): New macro.
8723         (standard_conversion): Set it, for derived-to-base conversions.
8724         (reference_related_p): New function.
8725         (reference_compatible_p): Likewise.
8726         (convert_class_to_reference): Likewise.
8727         (direct_reference_binding): Likewise.
8728         (reference_binding): Rework for standards-compliance.
8729         (convert_like): Adjust accordingly.
8730         (maybe_handle_ref_bind): Simplify; the right conversion sequences
8731         are now built up in reference_binding.
8732         (initialize_reference): New function.
8733         * cp-tree.h (ICS_USER_FLAG): Document.
8734         (ICS_THIS_FLAG): Likewise.
8735         (ICS_BAD_FLAG): Likewise.
8736         (NEED_TEMPORARY_P): Likewise.
8737         (cp_lvalue_kind): New type.
8738         (real_lvalue_p): Return it.
8739         * error.c (dump_expr): Provide more accurate representation for
8740         AGGR_INIT_EXPRs.
8741         * init.c (expand_default_init): Do not try to perform implicit
8742         conversions for a brace-enclosed initializer.
8743         * search.c (lookup_conversions): Document.
8744         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
8745         appropriately.
8746         (real_lvalue_p): Adjust accordingly.
8747         (lvalue_p): Likewise.
8748         (build_cplus_new): Don't allow the creation of an abstract class.
8749         * typeck.c (convert_for_initialization): Use initialize_reference.
8750         
8751 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
8752
8753         * lex.c (real_yylex) : Correct the test for overflow when lexing
8754         integer literals.
8755
8756 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
8757
8758         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
8759         not DECL_BUILT_IN, to determine if a function is internally declared.
8760         (duplicate_decls): Likewise.  Improve handling of builtins.
8761         (push_overloaded_decl): Remove special handling of builtins.
8762
8763         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
8764
8765         * decl.c (grokdeclarator): Pull out decl_constant_value in
8766         templates, too.
8767
8768         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
8769         * cp-tree.h, pt.c, semantics.c: Adjust.
8770         * method.c (largest_union_member): Remove.
8771
8772         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
8773
8774         * lex.c (token_getch, token_put_back): New fns.
8775         (real_yylex): Use them.
8776
8777         * lex.c (lang_init): Generalize.
8778         (lang_init_options): Tell cpplib this is C++.
8779         (nextchar): Remove.  Replace uses with put_back.
8780         (skip_white_space): Handle linemode here.  Optimize for cpplib.
8781         (extend_token_buffer_to): New fn.
8782         (extend_token_buffer): Use it.
8783         (read_line_number, check_newline): Just deal with tokens.
8784         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
8785         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
8786         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
8787         * parse.y (PAREN_STAR_PAREN): Remove.
8788         * input.c: Don't use the putback machinery with cpplib.
8789         (sub_getch): Fold back into getch.
8790         (getch): Don't handle linemode here.
8791         (feed_input): Unget any text in the token buffer.
8792
8793         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
8794         nextyychar, nextyylval): Remove.
8795
8796 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
8797             Jason Merrill  <jason@yorick.cygnus.com>
8798
8799         * lex.c (indent_level): New variable.
8800         (init_parse): Set cpp_token to CPP_DIRECTIVE.
8801         (consume_string): Make this smart about USE_CPPLIB.
8802         (yyungetc): Use put_back function.
8803         (pragma_getc, pragma_ungetc): Functions deleted.
8804         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
8805         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
8806         pragma_ungetc.
8807         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
8808         Also, clean up cases where we redundantly set token_buffer[0].
8809         (read_line_number): New fn.
8810         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
8811         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
8812         (sub_getch): Conditionalize out code that's not appropriate if
8813         USE_CPPLIB.
8814         (put_back): Rewrite in case USE_CPPLIB is defined.
8815         (input_redirected): Ditto.
8816
8817 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
8818
8819         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
8820         c_global_trees and accessor macros defined in c-common.h.
8821         (cp_tree_index): New enumeration.
8822         (cp_global_trees): Declare new array.  Add accessor macros for it, and
8823         delete declarations of tree nodes replaced by it.
8824         (builtin_function): Delete macro, add declaration for new function.
8825         Include c-common.h.
8826         * decl.c: Delete definitions for tree nodes that were replaced by
8827         cp_global_trees and c_global_trees.
8828         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
8829         to generate the common builtins here.
8830         (builtin_function): New function.
8831         * decl2.c (abort_fndecl): Delete declaration.
8832         * except.c (expand_builtin_return_address): Delete declaration.
8833         (builtin_return_address_fndecl): Delete variable.
8834         (const_ptr_type_node): Delete declaration.
8835         * lex.c (cons_up_default_function): Delete declaration of
8836         void_list_node.
8837         * parse.y (void_list_node): Delete declaration.
8838         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
8839         Delete variables.
8840         (const_string_type_node): Delete declaration.
8841         * search.c (abort_fndecl): Delete declaration.
8842         * Makefile.in: Update dependencies.
8843
8844 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
8845
8846         * pt.c (check_default_tmpl_args): Move test for missing default
8847         arguments here, from ...
8848         (end_template_parm_list): Here.
8849
8850 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
8851
8852         * decl.c (lookup_nested_type): Remove.
8853         (pushtag): Don't call it.
8854
8855 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
8856
8857         * Makefile.in (INTERFACE): Bump to 2.
8858
8859 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
8860         
8861         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
8862         instructions to gcc.gnu.org.  Removed e-mail address.
8863
8864 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
8865
8866         * pt.c (determine_specialization): Tighten error-checking.
8867         (end_template_parm_list): Likewise.
8868
8869 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
8870
8871         * pt.c (check_default_tmpl_args): Handle friends defined in the
8872         class just like member functions defined in the class.
8873
8874 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
8875             Jason Merrill  <jason@yorick.cygnus.com>
8876
8877         * cp-tree.h (struct lang_decl): Added field for storing sorted
8878         FIELD_DECLs (used in TYPE_DECLs).
8879         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
8880         (DECL_SORTED_FIELDS): New macro.
8881         * class.c (method_name_cmp): New function.
8882         (finish_struct_methods): Modified to support sorting and searching
8883         methods.
8884         (finish_struct_anon): Changed code in inner loop to use ELT rather 
8885         than UELT (which required an extra indirection for every reference).
8886         (field_decl_cmp): New function to support sorting FIELD_DECLs.
8887         (finish_struct_1): Sort fields.
8888         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
8889         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
8890         Also, switch to using array indexing rather than a changing pointer.
8891         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
8892         DECL_SORTED_FIELDS.
8893
8894 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
8895
8896         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
8897         casts in system headers or extern "C" blocks.
8898
8899         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
8900         errors to pedwarn.
8901
8902 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
8903
8904         * decl2.c (write_virtuals): Deleted declaration.
8905         * cp-tree.h (write_virtuals): Deleted extern declaration.
8906         * class.c (finish_struct_1): Removed #if 0'd code that mentions
8907         write_virtuals.
8908         * semantics.c (begin_class_definition): Rewrite code to not depend
8909         on write_virtuals.
8910
8911         * lex.c (cp_pragma_interface): New function.
8912         (cp_pragma_implementation): Likewise.
8913         (handle_cp_pragma): Call them.
8914
8915         * typeck.c (comptypes): Simplify C code in look_hard.
8916
8917         * xref.c (PALLOC): Use xcalloc, not calloc.
8918         (SALLOC): Use xmalloc, not malloc.
8919
8920         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
8921
8922         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
8923         is NO_DEBUG.
8924
8925         * decl.c (duplicate_decls): If a redeclaration doesn't match the
8926         initial declaration, then don't save the inline info and by all
8927         means don't mark the function as a builtin function.
8928
8929         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
8930         CURRENT_CLASS_TYPE is 0.
8931
8932         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
8933         NULL_TREE.
8934
8935         * ptree.c (print_lang_type): Added vtable-needs-writing.
8936
8937 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
8938
8939         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
8940
8941 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
8942
8943         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8944         Merged into c-common.
8945
8946 1999-07-05  Dave Brolley  <brolley@cygnus.com>
8947
8948         * lex.c (errorcount): Declare it.
8949         (finish_parse): Update errorcount for when using CPPLIB.
8950
8951 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
8952
8953         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
8954         parameters.
8955         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
8956         * decl.c (push_class_binding): Use it.
8957         (lookup_name_real): Likewise.
8958
8959 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
8960
8961         * cp-tree.h (widest_integer_literal_type_node,
8962         widest_unsigned_literal_type) : New.
8963         * decl.c (widest_integer_literal_type_node,
8964         widest_unsigned_literal_type) : New.
8965         (init_decl_processing): Handle/use the two new types.
8966         * lex.c (real_yylex): Same.
8967         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8968         Same. 
8969
8970 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
8971
8972         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
8973         to anonymous cv-qualified types.
8974
8975 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
8976
8977         * lex.c (real_yylex) : Change integer literal overflow handling to
8978         be like c-lex.c.
8979
8980         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
8981
8982 1999-06-28  Richard Henderson  <rth@cygnus.com>
8983
8984         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
8985
8986 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
8987
8988         * error.c (dump_type_real): Handle TREE_LIST again.
8989
8990         * typeck.c (comp_target_parms): Don't complain about 
8991         converting from () to (...) if !flag_strict_prototype.
8992
8993         * decl.c (grokdeclarator): Update the names of all variants when
8994         de-anonymizing.
8995
8996 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
8997
8998         * init.c (expand_aggr_vbase_init): Rename to
8999         construct_virtual_bases.  Conditionalize construction here, 
9000         rather than ...
9001         (emit_base_init): Here.
9002
9003 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
9004
9005         * semantics.c (finish_asm_stmt): Apply decay conversions to
9006         input operands.
9007
9008         * decl.c (expand_static_init): When building an anonymous function
9009         for use with atexit, compute its body before and after entering
9010         the function.
9011
9012         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
9013         EXIT_EXPR.
9014         
9015 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
9016
9017         * init.c (expand_aggr_vbase_init): Add flag parameter.
9018         (build_partial_cleanup_for): Remove, inlining into ..
9019         (expand_cleanup_for_base): ... here.  Take flag parameter.
9020         (emit_base_init): Pass the in_chrg parameter to
9021         emit_aggr_vbase_init. 
9022         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
9023         
9024 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
9025
9026         * decl2.c (import_export_decl): Use same_type_p, rather than
9027         relying on pointer-equality for types.
9028
9029         * method.c (do_build_copy_constructor): Simplify.
9030
9031         * call.c (build_method_call): Remove bogus code for two-argument
9032         delete.
9033         * init.c (build_new_1): Expand on comment, and remove dead code.
9034
9035         * init.c (expand_cleanup_for_base): New function, split out
9036         from ...
9037         (emit_base_init): Here.
9038         (expand_aggr_vbase_init): Use it.
9039
9040 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
9041
9042         * cp-tree.h (class_cache_firstobj): Declare.
9043         (maybe_push_cache_obstack): Rename to push_cache_obstack.
9044         * class.c (permanent_obstack): Remove declaration.
9045         (class_cache_firstobj): Make it global.
9046         (add_method): Don't use permanent_obstack directly.
9047         (pushclass): Only free the class_cache_obstack if we know how far
9048         back to free it.
9049         (maybe_push_cache_obstack): Rename to push_cache_obstack.
9050         * decl.c: Remove dead comment.
9051         (saved_scope): Add class_cache_firstobj.
9052         (push_to_top_level): Save it.
9053         (pop_from_top_level): Restore it.
9054         (push_class_level_binding): Use push_cache_obstack, not
9055         maybe_push_cache_obstack.
9056         * search.c (push_class_decls): Likewise.
9057         
9058 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9059
9060         * pt.c (tsubst_friend_function): Push into namespace of friend
9061         function before pushdecl'ing it.
9062
9063 1999-06-14  Nathan Sidwell  <nathan@acm.org>
9064
9065         * call.c (build_new_op): Remove REF_BIND from all operands.
9066
9067 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
9068
9069         * init.c (build_new_1): Look up operator delete even if there was
9070         no explicit new placement.
9071
9072 1999-06-08  Nathan Sidwell  <nathan@acm.org>
9073
9074         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
9075         of ...
9076         (build_throw): ... here. Call it.
9077         (process_start_catch_block): Call it.
9078
9079 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
9080
9081         * search.c (convert_pointer_to_single_level): Reimplement without
9082         using get_binfo.
9083
9084 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
9085
9086         * method.c (is_back_referenceable_type): Back-reference bools when
9087         not squangling.
9088
9089 1999-06-07  Dave Brolley  <brolley@cygnus.com>
9090
9091         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
9092         * input.c (putback_buffer): New structure type.
9093         (putback): Replaces putback_char member.
9094         (putback): Replaces putback_char static variable.
9095         (feed_input): Use putback.
9096         (end_input): Use putback.
9097         (sub_getch): Use putback.
9098         (put_back): Use putback.
9099
9100 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
9101
9102         * decl.c (grokdeclarator): Fix typo in last change.
9103
9104 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
9105
9106         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
9107         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
9108
9109 1999-06-04  Nathan Sidwell  <nathan@acm.org>
9110
9111         * except.c (build_throw): Check throw expression validity.
9112
9113 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
9114
9115         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
9116         just because flag_signed_bitfields is false.
9117
9118 1999-06-03  Nathan Sidwell  <nathan@acm.org>
9119
9120         * semantics.c (begin_class_definition): Update the struct's
9121         location here ...
9122         * class.c (finish_struct): ... rather than here.
9123
9124         * decl.c (make_typename_type): Don't rely on uninitialized
9125         variable.
9126
9127 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9128
9129         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
9130
9131 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
9132
9133         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
9134         and friends rather than messing with current_obstack directly.
9135         (cp_build_qualified_type_real): Rework ARRAY_TYPE
9136         allocation to match practice throughout the rest of the 
9137         compiler.
9138
9139 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
9140
9141         * lex.c (make_lang_type): Create TYPE_BINFO for
9142         TEMPLATE_TYPE_PARMs just like for non-template types.
9143
9144         * decl.c (start_decl): Move checks on initialization to ...
9145         (cp_finish_decl): Here.  Tidy formatting slightly.
9146
9147 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
9148
9149         * decl.c (add_binding): Don't complain about a redeclaration of a
9150         semantically identical typedef in a local scope.
9151
9152 1999-05-28  Nathan Sidwell  <nathan@acm.org>
9153
9154         * decl.c (complete_array_type): Allocate off same obstack. Fix
9155         DO_DEFAULT comment to match reality.
9156
9157         * friend.c (make_friend_class): Fix diagnostic typo.
9158
9159 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
9160
9161         * decl.c (lookup_namespace_name): Handle getting a
9162         TEMPLATE_ID_EXPR.
9163         (expand_static_init): Don't call pushdecl for implicitly declared
9164         `atexit' used to register destructors.
9165
9166 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
9167
9168         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
9169         intialize a vtable.
9170
9171         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
9172         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
9173         by combining TEMPLATE_INFO and LEVEL into a single union.
9174         (DECL_TEMPLATE_INFO): Reformat.
9175         (DECL_SAVED_TREE): Document.
9176         (DECL_TEMPLATE_INJECT): Remove.
9177         * class.c (finish_struct): Remove code to deal with
9178         DECL_TEMPLATE_INJECT. 
9179
9180         * decl.c (maybe_process_template_type_declaration): Handle all new
9181         types in templates uniformly.
9182         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
9183         DECL_CONTEXT.
9184         * pt.c (lookup_template_class): Inject template instantiations of
9185         forward-declarations.
9186         (instantiate_class_template): Remove code processing
9187         DECL_TEMPLATE_INJECT.
9188         
9189         * pt.c (lookup_template_class): Tweak lookup to find member
9190         templates.
9191
9192         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
9193         ASM_CV_QUAL.
9194         * semantics.c (finish_asm_stmt): Make strings permanent if they're
9195         used in a template.
9196         
9197 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
9198
9199         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
9200         parts of pointer to data member types.
9201
9202 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
9203
9204         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
9205         and then make it look like `abort'.  Just use `abort' instead.
9206         
9207         * typeck.c (build_static_cast): Don't allow static_casts that cast
9208         away constness.
9209         (casts_away_constness_r): New function.
9210         (casts_away_constness): Likewise.
9211
9212         * decl.c (lookup_tag): Remove code no longer needed after
9213         name-lookup improvements.
9214         * decl2.c (handle_class_head): Make error-recovery more robust.
9215         * friend.c (make_friend_class): Reject templated typename types.
9216         * lex.c (is_global): A template parameter isn't global.
9217         * parse.y (class_head): Robustify.
9218         * parse.c: Regenerated.
9219         
9220 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
9221
9222         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
9223         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
9224         
9225         * cp-tree.h (push_nested_namespace): Declare.
9226         (pop_nested_namespace): Likewise.
9227         * decl.c (push_nested_namespace): New function.
9228         (pop_nested_namespace): Likewise.
9229         * pt.c (instantiate_class_template): Use them.
9230
9231         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
9232
9233         * cp-tree.h (cplus_expand_constant): Declare.
9234         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
9235         converted from one pointer-to-object type to another.
9236         * expr.c (cplus_expand_constant): Don't make it static.
9237         * typeck.c (build_component_ref): Don't crash when presented with
9238         a component which is a TEMPLATE_DECL.
9239         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
9240         cast from a pointer-to-member constant to its own type does not
9241         result in a valid non-type template argument.
9242
9243 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
9244             Nathan Sidwell  <nathan@acm.org>
9245         
9246         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
9247         * cp-tree.h: Fix typo in documentation on pointers-to-members.
9248         (cp_build_qualified_type): Make it a macro.
9249         (cp_build_qualified_type_real): Declare.
9250         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
9251         problem with template parameters and restrict-qualification.
9252         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
9253         * hash.h: Regenerated.
9254         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
9255         the enumeration.
9256         (NORID): Remove definition.
9257         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
9258         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
9259         (fn_type_unification): Check that the function type resulting from
9260         the deduction is legal.
9261         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
9262         (unify): Use cp_build_qualified_type_real.
9263         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
9264         (cp_build_qualified_type): Rename to ...
9265         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
9266         and modify appropriately.
9267         
9268         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
9269         reveal optimization opportunities.
9270
9271         * pt.c (tsubst): Don't issue error messages when we're not
9272         complaining, even if we see a qualified function type.
9273         (check_cv_quals_for_unify): Don't allow a qualified function
9274         type.
9275
9276 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9277
9278         * class.c (instantiate_type): Downgrade errors for object-dependent
9279         memfn refs to pedwarn.
9280
9281 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
9282
9283         * decl.c (grokdeclarator): Don't treat [] as indicating a
9284         zero-sized array in a typedef.
9285
9286         * call.c (build_object_call): Don't look at DECL_NAME for a type.
9287         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
9288         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
9289
9290         * pt.c (for_each_template_parm): Rework to match documentation.
9291         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
9292
9293 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9294
9295         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
9296
9297         * class.c (finish_base_struct): Allow non-COM bases for COM classes
9298         except at the leftmost position.
9299         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
9300         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
9301         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
9302
9303         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
9304         (build_cplus_new): Make sure that what we return is of the right type.
9305
9306 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
9307
9308         * cp-tree.h (make_ptrmem_cst): New function.
9309         * expr.c (cplus_expand_constant): Split out from ...
9310         (cplus_expand_expr): Here.  Use cplus_expand_constant.
9311         (init_cplus_expand): Set lang_expand_constant.
9312         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
9313
9314         * tree.c (make_ptrmem_cst): Define.
9315         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
9316         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
9317
9318 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
9319
9320         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
9321
9322         * decl2.c (start_static_storage_duration_function): Fix comment.
9323         (finish_file): Create static storage duration functions lazily.
9324
9325 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
9326
9327         Implement anonymous structs.
9328         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
9329         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
9330         * class.c (finish_struct_1): Remove redundant check for anon struct.
9331         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
9332         (check_tag_decl): Check for anonymous struct here.
9333         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
9334         * init.c (sort_member_init, emit_base_init): Handle getting fields
9335         as well as names in current_member_init_list.
9336         (perform_member_init): Handle getting an anon aggr.
9337         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
9338         (do_build_copy_constructor): Likewise.
9339
9340 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
9341
9342         * tree.c (cp_build_qualified_type): Don't allow qualified function
9343         types.
9344
9345 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
9346
9347         * gxxint.texi: Fix typo.
9348
9349 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
9350
9351         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
9352         * class.c (finish_struct_1): Use CLASS_TYPE_P.
9353         * ptree.c (print_lang_type): Likewise.
9354         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
9355         IS_AGGR_TYPE_CODE.
9356         * typeck2.c (digest_init): Likewise.
9357
9358 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
9359
9360         * call.c (joust): Compare the types of the conv ops, not the
9361         target types of the conversions.
9362
9363 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9364
9365         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
9366         was not given.
9367
9368 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
9369
9370         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
9371         * decl.c (grokfndecl): Don't allow inline declarations of friend
9372         template specializations, or friend template specializations with
9373         default arguments.
9374         * pt.c (tsubst): Handle substitution into array types that does
9375         not yield a fixed upper bound, even when not processing a
9376         template.
9377         (tsubst_copy): Deal with the fact that the second operand to a
9378         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
9379         * search.c (marked_pushdecls_p): Don't descend into
9380         TEMPLATE_TYPE_PARMs and the like.
9381         (unmarked_pushdecls_p): Likewise.
9382         
9383         * call.c (build_over_call): Don't throw away
9384         initializations/copies of empty classes; use MODIFY_EXPR and
9385         INIT_EXPR as for non-empty classes.
9386         * class.c (finish_struct_1): Put the padding byte for an empty
9387         class on the TYPE_NONCOPIED_PARTS list for the class.
9388
9389 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
9390
9391         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
9392         indicate a reference to a field that is a qualified name.
9393
9394 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
9395
9396         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
9397         ASM_OUTPUT_CONSTRUCTOR.
9398
9399         * friend.c (do_friend): Add attrlist arg.  Remove support for
9400         getting a non-decl as 'decl'.
9401         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
9402         rtl.
9403         (grokdeclarator): Adjust.
9404         * cp-tree.h: Adjust.
9405
9406 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
9407
9408         * cp-tree.h (permanent_p): New function.
9409         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
9410         possibly complex tree node.
9411         * tree.c (mapcar): Adjust comments, and follow coding standards in
9412         conditional.
9413         (permanent_p): New function.
9414
9415 1999-05-13  Per Bothner  <bothner@cygnus.com>
9416
9417         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
9418         primitive Java types, if we actually see `extern "Java"'.
9419
9420 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9421
9422         * lang-specs.h: Pass -$ to the preprocessor.
9423
9424 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
9425
9426         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
9427         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
9428         (resolve_offset_ref): Don't handle a raw baselink.
9429         * cvt.c (build_expr_type_conversion): Likewise.
9430         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
9431         convert_for_initialization): Likewise.
9432         * class.c (instantiate_type): Handle seeing a baselink under an
9433         OFFSET_REF.
9434         * error.c (dump_expr): Likewise.        
9435         * pt.c (for_each_template_parm): Likewise.
9436         (resolve_overloaded_unification): Likewise.
9437         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
9438         * typeck.c (expr_sizeof): Also complain about other permutations
9439         of overloaded functions.
9440
9441 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
9442
9443         * init.c (resolve_offset_ref): Don't return a raw method.
9444         Use BASELINK_P.
9445         * typeck.c (decay_conversion): Don't handle a raw method.
9446         Resolve all OFFSET_REFs.
9447         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
9448         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
9449         same_type_p for pmf bits.  Don't use build_binary_op to compare
9450         raw pointers to methods.
9451         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
9452         to decide when to call resolve_offset_ref.
9453         (build_c_cast, convert_for_initialization): Likewise.
9454         * cvt.c (build_expr_type_conversion): Likewise.
9455
9456 1999-05-06  Nathan Sidwell  <nathan@acm.org>
9457
9458         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
9459
9460 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
9461
9462         * decl2.c (start_objects): Don't let static constructors and
9463         destructors get inlined.
9464
9465         * parse.y (nested_name_specifier): Make sure ordinary types are
9466         complete, just like template types.
9467         * parse.c: Regenerated.
9468
9469         * pt.c (check_explicit_specialization): Improve error messages.
9470
9471 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9472
9473         * typeck.c (string_conv_p): Use same_type_p to check whether we
9474         try to convert between char and wchar_t.
9475
9476 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
9477
9478         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
9479         lookup to error_mark_node here.
9480         (lookup_member): Revise documentation.  Add comments.  Don't set
9481         the TREE_TYPE to error_mark_node here, and don't build up an extra
9482         TREE_LIST for ambiguous lookups.
9483         (setup_class_bindings): Adjust accordingly.
9484         (push_class_decls): Revise out-of-date comments.
9485         
9486         * typeck.c (build_const_cast): Tighten checks for legality.
9487
9488 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9489
9490         * init.c (build_member_call): Lookup names coming from
9491         namespace-scoped LOOKUP_EXPR.
9492
9493 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
9494
9495         * gxxint.texi: Add documentation for 'I'.
9496
9497 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9498
9499         * tinfo.cc (operator==): Qualify type_info with std::.
9500
9501 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
9502
9503         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
9504         (DECL_COMDAT): Remove definition.
9505
9506 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
9507
9508         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
9509         change.
9510
9511 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
9512
9513         * class.c (build_vtable): Use build_lang_decl when building
9514         vtables, not just build_decl.
9515         (prepare_fresh_vtable): Likewise.
9516         * decl.c (wrapup_globals_for_namespace): Mark vtables as
9517         DECL_EXTERNAL when calling wrapup_global_declarations.
9518         * decl2.c (priority_info_s): Add initializations_p and
9519         destructions_p members.
9520         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
9521         when deciding what vtables to write out.
9522         (ssdf_decls): New variable.
9523         (ssdf_decls_used): Likewise.
9524         (start_static_storage_duration_function): Deal with being called
9525         multiple times.  Avoid inlining this function.
9526         (generate_inits_for_priority): Deal with reuse of priority map.
9527         (get_priority_info): Clear initializations_p and destructions_p.
9528         (do_static_initialization): Tweak comment.
9529         (do_static_destruction): Likewise.  Fix condition on sentries for
9530         destruction.
9531         (generate_ctor_or_dtor_function): Call all of the static storage
9532         duration functions.
9533         (generate_ctor_or_dtor_function_for_priority): Check
9534         initializations_p and destructions_p to see what priorities need
9535         initialization functions.
9536         (finish_file): Rework to generate multiple static storage duration
9537         functions, rather than just one.
9538
9539         * typeck.c (build_const_cast): Tweak last change to handle
9540         templates correctly.
9541
9542         * typeck.c (build_const_cast): Disallow use of const_cast to
9543         anything but a pointer or reference type.
9544
9545 1999-04-30  Nathan Sidwell  <nathan@acm.org>
9546
9547         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
9548         signature type.
9549
9550 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
9551
9552         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
9553         (finish_file): Indent comments properly.
9554
9555 1999-04-29  Richard Henderson  <rth@cygnus.com>
9556
9557         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
9558         (do_static_destruction): Likewise.
9559
9560 1999-04-29  Nathan Sidwell  <nathan@acm.org>
9561
9562         * cp-tree.h (TYPE_NOTHROW_P): New macro.
9563         * decl2.c (delete_sanity): Warn on deleting void *.
9564         * init.c (build_new_1): Use TYPE_NOTHROW_P.
9565         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
9566         throwing operator new.
9567
9568 1999-04-28  Nathan Sidwell  <nathan@acm.org>
9569
9570         * cp-tree.h (build_component_addr): Remove prototype.
9571         * typeck.c (build_component_addr): Make static. Remove MSG
9572         argument.
9573         (build_component_addr): Remove MSG parameter, clean up
9574         comment.
9575         (build_x_function_call): Use cp_error.
9576         (build_unary_op): Adjust call of build_component_addr.
9577
9578 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
9579
9580         * pt.c (tsubst_friend_class): Check for NULL.
9581
9582 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
9583
9584         * search.c (binfo_for_vtable): Initialize bfvi.var.
9585
9586 1999-04-27  Nathan Sidwell  <nathan@acm.org>
9587
9588         * rtti.c (build_x_typeid): Check rtti is enabled.
9589
9590 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
9591
9592         * search.c (is_subobject_of_p): Make sure we're looking at the
9593         right baseclasses.
9594
9595 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
9596
9597         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
9598
9599 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
9600
9601         * decl2.c (finish_file): Tweak handling of extern inlines so that
9602         they are not unnecessarily put out.
9603
9604         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
9605         such as base classes.
9606
9607 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
9608
9609         * tree.c (build_exception_variant): Fix typo: use the chain of U,
9610         not trying V, while cycling through U.
9611
9612 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
9613
9614         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
9615         preserves_first_arg.  Enlarge dummy accordingly.
9616         (DECL_TINFO_FN_P): New macro.
9617         (SET_DECL_TINFO_FN_P): Likeiwse.
9618         (DECL_RETURNS_FIRST_ARG): Remove.
9619         (DECL_PRESERVES_THIS): Likewise.
9620         (DECL_INIT_PRIORITY): New macro.
9621         (finish_struct_1): Change prototype.
9622         (cat_namespace_levels): Remove prototype.
9623         (vtable_decl_p): New prototype.
9624         (vtype_decl_p): Likewise.
9625         (sigtable_decl_p): Likewise.
9626         (walk_globals_pred): New typedef.
9627         (walk_globals_fn): Likewise.
9628         (walk_globals): New prototype.
9629         (walk_namespaces_fn): New typedef.
9630         (walk_namespaces): New prototype.
9631         (wrapup_globals_for_namespace): Likewise.
9632         (walk_vtables): Remove prototype.
9633         (walk_sigtables): Likewise.
9634         (instantiate_pending_templates): New prototype.
9635         * class.c (finish_struct_1): Don't return a value.
9636         * decl.h (pending_statics): Remove declaration.
9637         * decl.c (walk_namespaces_r): New function.
9638         (walk_globals_r): Likewise.
9639         (vtable_decl_p): Likewise.
9640         (vtype_decl_p): Likewise.
9641         (sigtable_decl_p): Likewise.
9642         (walk_namespaces): Likewise.
9643         (walk_globals_data): New type.
9644         (walk_globals): New function.
9645         (wrapup_globals_for_namespace): Likewise.
9646         (expand_static_init): Remove assertion.  Remove redundancy in
9647         conditional.  Don't put static data members in static_aggregates
9648         Tidy.
9649         (finish_function): Remove redundancy in conditional.  Don't set
9650         DECL_RETURNS_FIRST_ARG.
9651         (cat_namespace_levels): Remove.
9652         * decl2.c: Include splay-tree.h and varray.h.
9653         (priority_info_s): New structure.
9654         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
9655         conventions.
9656         (prune_vtable_vardecl): Likewise.
9657         (finish_sigtable_vardecl): Likewise.
9658         (setup_initp): Remove.
9659         (do_dtors): Remove.
9660         (do_ctors): Remove.
9661         (start_static_storage_duration_function): New function.
9662         (generate_inits_for_priority): Likewise.
9663         (finish_static_storage_duration_function): Likewise.
9664         (get_priority_info): Likewise.
9665         (do_static_initialization): Likewise.
9666         (do_static_destruction): Likewise.
9667         (do_static_initialization_and_destruction): Likewise.
9668         (generate_ctor_or_dtor_function): Likewise.
9669         (generate_ctor_and_dtor_functions_for_priority): Likewise.
9670         (pending_statics): Make it a varray.
9671         (pending_statics_used): New variable.
9672         (saved_inlines): Make it a varray.
9673         (saved_inlines_used): New variable.
9674         (finish_static_data_member): Change method of updating
9675         pending_statics.
9676         (mark_inline_for_output): Remove #if 0'd code.  Change method of
9677         updating saved_inlines.
9678         (walk_vtables): Remove.
9679         (walk_sigtables): Likewise.
9680         (import_export_decl): Use DECL_TINFO_FN_P.
9681         (pending_templates): Remove declaration.
9682         (maybe_templates): Likewise.
9683         (static_aggregates_initp): Likewise.
9684         (setup_initp): Likewise.
9685         (finish_objects): Simplify.
9686         (INITIALIZE_P_IDENTIFIER): New macro.
9687         (PRIORITY_IDENTIFIER): New macro.
9688         (SSDF_IDENTIFIER): New macro.
9689         (initialize_p_decl): New variable.
9690         (priority_decl): Likewise.
9691         (ssdf_decl): Likewise.
9692         (priority_info_map): Likewise.
9693         (finish_file): Recode output of static intializers and other
9694         file-scope finalization tasks.
9695         * error.c (OB_END_TEMPLATE_ID): New macro.
9696         (dump_type_real): Use it.
9697         (dump_decl): Likewise.
9698         (dump_function_name): Likewise.
9699         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
9700         interface.
9701         (check_newline): Use walk_globals, not walk_vtables.
9702         * pt.c (pending_tempalte_expansions): Remove.
9703         (set_vardecl_interface_info): Likewise.
9704         (pending_templates): Make static.
9705         (maybe_templates): Likewise.
9706         (instantiate_class_template): Adjust call to finish_struct_1.
9707         (instantiate_pending_templates): New function.
9708         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
9709         * tree.c (static_aggregates_initp): Remove.
9710         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
9711         instead.
9712         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
9713
9714         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
9715         with the RTL code RETURN.
9716         * hash.h: Regenerated.
9717         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
9718         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
9719         * parse.c: Regenerated.
9720         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
9721         it.
9722         (inline_parm_levels): New variable.
9723         (inline_parm_levels_used): Likewise.
9724         (maybe_begin_member_template_processing): Update them.
9725         (maybe_end_member_template_processing): Use them, rather than
9726         guessing how many levels to pop.
9727
9728         * decl.c (make_typename_type): Tighten error-checking.
9729
9730 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
9731
9732         * cp-tree.h (build_binary_op): Remove unneeded parameter.
9733         * class.c (build_vrable_entry_ref): Adjust call to
9734         build_binary_op.
9735         * decl.c (expand_static_init): Likewise.
9736         (grokdeclarator): Likewise.
9737         (finish_function): Likewise.
9738         * decl2.c (delete_sanity): Likewise.
9739         (do_dtors): Likewise.
9740         (do_ctors): Likewise.
9741         * error.c (dump_type_suffix): Likewise.
9742         * expr.c (cplus_expand_expr): Likewise.
9743         * init.c (resolve_offset_ref): Likewise.
9744         (build_new): Likewise.
9745         (build_new_1): Likewise.
9746         (build_vec_delete_1): Likewise.
9747         (expand_vec_init_catch_clause): Likewise.
9748         (build_delete): Likewise.
9749         * pt.c (tsubst): Likewise.
9750         * rtti.c (synthesize_tinfo_fn): Likewise.
9751         * search.c (expand_upcast_fixups): Likewise.
9752         (expand_direct_vtbls_init): Likewise.
9753         * typeck.c (get_member_function_from_ptrfunc): Likewise.
9754         (build_binary_op_nodefault): Likewise.
9755         (point_int_sum): Likewise.
9756         (pointer_diff): Likewise.
9757         (build_unary_op): Likewise.
9758         (build_modify_expr): Likewise.
9759         (get_delta_difference): Likewise.
9760         (build_ptrmemfunc): Likewise.
9761         (expand_ptrmemfunc_cst): Likewise.
9762
9763 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
9764
9765         * decl.c (grokfndecl): Always call cplus_decl_attributes.
9766         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
9767
9768 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
9769
9770         * cp-tree.h (finish_static_data_member_decl): New function.
9771         * decl2.c (finish_static_data_member_decl): Split out from ...
9772         (grokfield): Here.
9773         * pt.c (instantiate_class_template): Use it here instead of
9774         trying to fake it.
9775         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
9776         finish_static_data_member_decl will do that.  Explicit set
9777         DECL_EXTERNAL to match non-template processing.
9778
9779 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
9780
9781         * cp-tree.h (finish_class_definition): Add parameter.
9782         * parse.y (structsp): Use it.  Don't call pop_scope here.
9783         * parse.c: Regenerated.
9784         * semantics.c (finish_class_definition): Pop it here.
9785
9786 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
9787
9788         * decl.c (xref_tag): Revise handling of nested template
9789         declarations.
9790         * pt.c (check_explicit_specialization): Tweak handling of friend
9791         templates in template classes.
9792         (tsubst_friend_class): Handle friend declarations for nested
9793         member template classes.
9794
9795 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
9796
9797         * class.c (finish_struct): Remove unused variable.
9798         (pushclass): Likewise.
9799         (invalidate_class_lookup_cache): Likewise.
9800         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
9801         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
9802         doesn't get obliterated.
9803         (make_typename_type): Handle template classes correctly.
9804
9805         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
9806         (storetags): Declare.
9807         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
9808         (pushclass): Likewise.  Use storetags to install tag declarations,
9809         not pushtag.
9810         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
9811         * decl.c (storetags): Make it global.
9812         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
9813         implicit typename declaration.
9814         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
9815         * method.c (hack_identifier): Likewise.
9816         * search.c (lookup_member): Likewise.
9817
9818         * decl.c (warn_about_implicit_typename_lookup): New function.
9819         (lookup_name_real): Use it.  Rework handling of implicit typename
9820         extension.
9821
9822 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
9823
9824         * cp-tree.h (lookup_nested_field): Remove.
9825         * class.c (push_nested_class): Handle UNION_TYPEs.
9826         (pop_nested_class): Likewise.
9827         * decl.c (lookup_name_real): Don't call lookup_nested_field.
9828         (start_decl): Use push_nested_class, not just pushclass.
9829         (cp_finish_decl): Use pop_nested_class, not just popclass.
9830         * search.c (lookup_nested_field): Remove.
9831
9832         * cp-tree.h (lang_type): Add documentation.
9833         * decl2.c (handle_class_head): Create template declarations here,
9834         as appropriate.
9835         * parse.y (class_head): Return whether or not we entered a new
9836         scope, as well as the type named.
9837         (named_class_head): Likewise.
9838         (named_complex_class_head_sans_basetype): Likewise.
9839         (structsp): Adjust accordingly.  Pop scope when required.
9840         * parse.c: Regenerated.
9841         * pt.c (check_default_tmpl_args): Robustify.
9842         (redeclare_class_template): Likewise.
9843         (instantiate_class_template): An instantiation of an
9844         anonymous union is itself an anonymous union.
9845         * semantics.c (begin_class_definition): Don't create template
9846         declarations here.
9847
9848 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
9849
9850         * parse.y (after_type_declarator_intern): New nonterminal.
9851         (after_type_declarator): Use it.
9852         (direct_after_type_declarator): Likewise.  Move above
9853         nonnested_type to fix reduce/reduce conflict resolution.
9854         (declmods): Reducing from just 'attributes' has EMPTY precedence.
9855         * Makefile.in (CONFLICTS): Update.
9856
9857         * decl.c (define_label): Downgrade error for jumping over a
9858         non-POD decl to pedwarn.
9859
9860 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
9861
9862         * cp-tree.h (popclass): Change declaration.
9863         (pop_nested_class): Likewise.
9864         (poplevel_class): Remove declaration.
9865         * call.c (convert_default_argument): Pass no arguments to
9866         popclass.
9867         * class.c (finish_struct_1): Likewise.
9868         (finish_struct): Likewise.
9869         (popclass): Remove argument.  Simplify code accordingly.
9870         (pop_nested_class): Likewise.
9871         * decl.c (poplevel_class): Declare it here, and make it static.
9872         (poplevel): Handle class scopes.
9873         (poplevel_class): Don't take an rgument.  Simplify.
9874         (pop_everything): Pass no arguments to pop_nested_class.
9875         (cp_finish_decl): Pass no arguments to popclass.
9876         (grokdeclarator): Pass no arguments to pop_nested_class.
9877         (finish_function): Likewise.
9878         * decl2.c (grokfield): Likewise.
9879         (pop_scope): Pass no arguments to popclass.
9880         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
9881         * pt.c (instantiate_class_template): Move call to pushclass, and
9882         document.  Pass no arguments to popclass.
9883         (regenerate_decl_from_template): Likewise.
9884
9885 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
9886
9887         * typeck.c (build_unary_op): Handle taking the address of a unique
9888         bound non-static member function.
9889
9890 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9891
9892         * lang-options.h (-Wdeprecated): New flag.
9893         * decl2.c (warn_deprecated): New flag.
9894         (lang_decode_option): Deprecated this-is-variable,
9895         external-templates, alt-external-templates.
9896         Support -Wdeprecated.
9897         * errfn.c (cp_deprecated): New function.
9898
9899 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
9900
9901         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
9902         of the decls themselves.
9903
9904         * pt.c (tsubst_function_type): Copy attributes over.
9905
9906         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
9907         and com_interface.
9908         * cp-tree.h: Add prototype.
9909         * decl.c (init_decl_processing): Set valid_lang_attribute.
9910
9911 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
9912
9913         * class.c (finish_struct_1): Look at the const-ness of the field's
9914         type, not the TREE_READONLY-ness of the declaration.
9915         * method.c (synthesize_method): Likewise.
9916         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
9917         creating new declarations.
9918
9919 1999-04-13  Mike Stump  <mrs@wrs.com>
9920
9921         * decl2.c (import_export_decl): Because vtables always reference
9922         virtual functions, even if they are inlined, don't allow
9923         -fno-implement-inlines to not emit them, instead, emit them with
9924         the vtable.
9925         * decl.c (start_function): Likewise.
9926
9927 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
9928
9929         * cp-tree.h (struct lang_type): Add com_interface.
9930         (CLASSTYPE_COM_INTERFACE): New macro.
9931         * class.c (set_rtti_entry): COM interface classes have no RTTI
9932         entries in their vtables; adjust.
9933         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
9934         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
9935         finish_struct_1): Likewise.
9936         * decl2.c (mark_vtable_entries): Likewise.
9937         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
9938         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
9939         expand_upcast_fixups): Likewise.
9940         * tree.c (debug_binfo): Likewise.
9941
9942         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
9943         * typeck.c (comptypes): If we get it, ignore attributes.
9944         * class.c (instantiate_type): Use BASELINK_P.  Change complain
9945         parameter to flags; 2 means ignore attributes.
9946         * call.c (build_op_delete_call): Pass it.
9947
9948         * decl.c (xref_tag): Only complain once about using a typedef-name
9949         with 'struct'.  Downgrade to pedwarn.
9950
9951         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
9952
9953         * parse.y (absdcl_intern): New nonterminal.
9954         (absdcl, direct_abstract_declarator): Use it.
9955
9956         * pt.c (lookup_template_class): Look through implict typename.
9957
9958 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
9959
9960         * friend.c (add_friend): Deal gracefully with error_mark_node.
9961         * method.c (build_overload_value): Handle pointers-to-members as
9962         template parameters.
9963
9964         * decl.c (push_binding): Fix typo in comment.
9965
9966 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
9967
9968         * error.c (dump_type_real): If a typename is a template-id, put
9969         out the template arguments.
9970         (dump_expr): Handle TEMPLATE_ID_EXPR.
9971         * pt.c (lookup_template_class): Now that full arguments are
9972         available everywhere, remove code that tried to guess them.
9973
9974 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
9975
9976         * decl.c (make_typename_type): Complain if we don't find a type
9977         when trying to make a typename type for a non-template type.
9978
9979 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
9980
9981         * decl.c (start_decl): Pass attributes to grokdeclarator.
9982         (grokdeclarator): Handle attributes on constructor-syntax
9983         initializers.
9984
9985 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
9986
9987         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
9988         don't have types.
9989
9990         * search.c (template_self_reference_p): Tweak.
9991
9992 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
9993
9994         * init.c (build_offset_ref): Don't build yet another weird data
9995         structure to describe overloaded functions.
9996
9997 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
9998
9999         * cp-tree.h (BASELINK_P): New macro.
10000         (SET_BASELINK_P): Likewise.
10001         * init.c (build_member_call): Remove needless assignment in if
10002         statement.
10003         * search.c (lookup_field_r): Fix handling when we are looking
10004         specifically for a type; these are not hidden by functions and
10005         variables.
10006         (lookup_member): Use SET_BASELINK_P.
10007         * tree.c (is_overloaded_fn): Use BASELINK_P.
10008         (really_overloaed_fn): Likewise.
10009         (get_first_fn): Likewise.
10010
10011 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
10012
10013         * decl.c (lookup_name_current_level): Tweak, and improve
10014         documentation.
10015
10016         * class.c (maybe_fixup_vptrs): Remove declaration.
10017         (build_class_init_list): Likewise.
10018         * decl.c (pushdecl_class_level): Call check_template_shadow here
10019         ...
10020         (push_class_level_binding): ... not here.
10021         * search.c (dfs_push_type_decls): Only avoid
10022         template-self-reference TYPE_DECLs if they are from base classes.
10023
10024 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
10025
10026         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
10027         nodes.  Tidy.
10028
10029 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
10030
10031         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
10032         (finish_struct_1): Don't call build_class_init_list.
10033
10034 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
10035
10036         * tinfo.h (__class_type_info): Fix illegal declaration.
10037
10038         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
10039         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
10040         (IDENTIFIER_CLASS_VALUE): Improve documentation.
10041         (is_properly_derived_from): Declare.
10042         (invalidate_class_lookup_cache): Likewise.
10043         (maybe_maybe_note_name_used_in_class): Likewise.
10044         (note_name_declared_in_class): Likewise.
10045         (push_using_decl): Remove duplicate declaration.
10046         (id_in_current_class): Remove declaration.
10047         (push_class_binding): Change prototype.
10048         (clear_identitifer_class_values): Declare.
10049         * call.c (is_properly_derived_from): Make it global.
10050         (build_new_function_call): Be careful about updating candidates.
10051         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
10052         asked to make illegal calls.
10053         * class.c: Include splay-tree.h.
10054         (class_stack_node): Add names_used slot.
10055         (check_member_decl_is_same_in_complete_scope): Remove.
10056         (add_method): Fix comment.  Push the declaration into class
10057         scope.
10058         (finish_struct_1): When popping the class, pop the bindings too.
10059         Remove check for data member/function member conflict.
10060         (finish_struct): Remove calls to
10061         check_member_decl_is_same_in_complete_scope.  Change calls to
10062         popclass.
10063         (pushclass): Clear names_used in the class stack entry.
10064         Use invalidate_class_lookup_cache to remove cached entries, rather
10065         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
10066         before entering a new class.  Remove dead code.  Don't mess with
10067         current_function_decl when pushing declarations.
10068         (invalidate_class_lookup_cache): New function, split out from ...
10069         (popclass): Here.  Clean up names_used on our way out.
10070         (instantiate_type): Adjust.
10071         (build_self_reference): Don't push the declaration here.
10072         (maybe_note_name_used_in_class): New function.
10073         (note_name_declared_in_class): Likewise.
10074         * decl.c (add_binding): Change prototype.
10075         (find_class_binding_level): New function.
10076         (innermost_nonclass_level): Likewise.
10077         (current_binding_level): Update documentation.
10078         (inner_binding_level): Remove.  Replace with current_binding_level
10079         throughout.
10080         (push_binding_level): Remove special handling of
10081         class_binding_level.
10082         (pop_binding_level): Likewise.  Use find_class_binding_level.
10083         (suspend_binding_level): Likewise.
10084         (global_bindings_p): Use innermost_nonclass_level.
10085         (toplevel_bindings_p): Likewise.
10086         (namespace_bindings_p): Likewise.
10087         (pseudo_global_level_p): Likewise.
10088         (push_binding): Clear INHERITED_VALUE_BINDING_P.
10089         (add_binding): Check for illegal multiple declarations.  Return a
10090         value indicating whether or not the new binding was legal.
10091         (push_local_binding): Skip over class binding levels.  Check
10092         return value from add_binding.
10093         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
10094         note_name_declared_in_class.
10095         (pushlevel_class): Remove "fake out the rest of the compiler"
10096         code.
10097         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
10098         (clear_identifier_class_values): New function.
10099         (pop_from_top_level): Use it.
10100         (pop_everything): Tweak.
10101         (maybe_process_template_type_declaration): Don't push the
10102         declaration for the template here.
10103         (pushtag): Don't push tag declarations into class scope here.
10104         (pushdecl): Apply DeMorgan's law for readability.
10105         (pushdecl_class_level): Remove special-case code for
10106         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
10107         (push_class_level_bindng): Deal with inherited bindings.
10108         (lookup_name_real): Remove special-case code for
10109         TYPE_BEING_DEFINED, and some implicit typename magic.
10110         (grokdeclarator): Handle COMPONENT_REF for a template function.
10111         (build_enumerator): Don't call pushdecl_class_level here.
10112         (id_in_current_class): Remove.
10113         * decl2.c (grokfield): Don't call pushdecl_class_level or
10114         check_template_shadow.
10115         * errfn.c (cp_file_of): Don't declare.
10116         (cp_line_of): Likewise.
10117         * error.c (dump_decl): Handle an OVERLOAD.
10118         (cp_file_of): Likewise.
10119         (cp_line_of): Likewise.
10120         * init.c (build_member_call): Handle a COMPONENT_REF.
10121         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
10122         pushdecl_class_level.
10123         * method.c (hack_identifier): Build COMPONENT_REFs for references
10124         to member templates as well as member functions.  Remove dead
10125         code.
10126         * parse.y (left_curly): Remove.
10127         (nonnested_type): Call maybe_note_name_used_in_class, not
10128         pushdecl_class_level.
10129         * parse.c: Regenerated.
10130         (nested_name_specifier_1): Likewise.
10131         * pt.c (check_explicit_specialization): Adjust, for robustness.
10132         (check_template_shadow): Handle OVERLOADs.
10133         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
10134         TEMPLATE_DECL, if appropriate.
10135         * search.c (envelope_add_decl): Remove.
10136         (dfs_pushdecls): Likewise.
10137         (dfs_compress_decls): Likewise.
10138         (dfs_push_decls): New function.
10139         (dfs_push_type_decls): Likewise.
10140         (setup_class_bindings): Likewise.
10141         (template_self_reference_p): Likewise.
10142         (lookup_field_r): Use it.
10143         (looup_member): Remove old comment.  Deal with ambiguity.
10144         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
10145         and remove envelope processing.
10146         * semantics.c (begin_class_definition): Let pushclass push
10147         declarations for base classes.
10148         (finish_member_declaration): Push declarations into class scope.
10149         * typeck.c (build_component_ref): Just put an OVERLOAD into the
10150         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
10151         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
10152         * Makefile.in (class.o): Depend on splay-tree.h.
10153
10154 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
10155
10156         * cvt.c (convert_pointer_to_real): Use same_type_p.
10157         * typeck.c (comp_target_types): Use same_type_p.
10158
10159 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
10160
10161         * semantics.c (begin_inline_definitions,
10162         finish_inline_definitions): Rename from finish_default_args and
10163         begin_inline_definitions, respectively, to something that isn't a
10164         total lie.  :)
10165         * parse.y (structsp): Adjust.
10166
10167         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
10168         (list_hash_lookup): Likewise.
10169         (hash_tree_chain): Adjust.
10170         * pt.c (tsubst): Adjust.
10171         (tsubst_arg_types): Use plain hash_tree_cons.
10172         * cp-tree.h (hash_tree_cons_simple): Lose.
10173         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
10174
10175 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10176
10177         * Makefile.in (hash.h): Generate using gperf language 'C', not
10178         'KR-C', so gperf uses the `const' keyword on strings.
10179
10180         * gxx.gperf (resword): Const-ify a char*.
10181
10182 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
10183
10184         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
10185         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
10186         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
10187         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
10188         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
10189         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
10190         tree.c: Adjust.
10191
10192 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
10193
10194         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
10195
10196 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
10197
10198         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
10199
10200 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
10201
10202         * cp-tree.h (add_friend): Declare.
10203         (add_friends): Likewise.
10204         * friend.c (add_friend): Make it global.  Don't add to
10205         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
10206         (add_friends): Make it global.
10207         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
10208         befriending class is a template.
10209         * parse.y (component_decl_1): Fix typo in comment.
10210         * parse.c: Regenerated.
10211         * pt.c (instantiate_class_template): Use add_friend and
10212         add_friends rather that duplicating some of their functionality
10213         here.
10214
10215 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
10216
10217         * call.c (build_field_call): Unify 'this' and non-'this' cases.
10218
10219         * typeck.c (build_indirect_ref): Check for 'this' sooner.
10220
10221 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10222
10223         * call.c (op_error): Const-ify a char*.
10224         (add_candidate, source_type, add_warning): Add static prototype.
10225         (print_z_candidates): Const-ify a char*.
10226
10227         * class.c (resolve_address_of_overloaded_function,
10228         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
10229         (get_vtable_name, finish_struct_1): Const-ify a char*.
10230
10231         * cvt.c (convert_to_reference): Likewise.
10232
10233         * decl.c (redeclaration_error_message, record_builtin_type,
10234         record_unknown_type, member_function_or_else, bad_specifiers):
10235         Likewise.
10236         (find_binding, select_decl, unqualified_namespace_lookup,
10237         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
10238         Add static prototype.
10239         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
10240         implicitly_declare, record_builtin_java_type, define_function,
10241         grok_op_properties, tag_name): Const-ify a char*.
10242
10243         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
10244         (define_function, finish_builtin_type): Const-ify a char*.
10245         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
10246         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
10247         (file_name_nondirectory): Const-ify a char*.
10248         (init_filename_times): Don't prototype.
10249         (compiler_error): Prototype.
10250         (yyerror, init_repo): Const-ify a char*.
10251         (build_srcloc): Don't prototype.
10252         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
10253         Const-ify a char*.
10254         (warn_for_assignment): Don't prototype.
10255         (convert_for_initialization, readonly_error, check_for_new_type,
10256         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
10257         Const-ify a char*.
10258
10259         * decl2.c (acceptable_java_type, output_vtable_inherit,
10260         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
10261         merge_functions, decl_namespace, validate_nonmember_using_decl,
10262         do_nonmember_using_decl): Add static prototype.
10263         (lang_f_options): Const-ify a char*.
10264         (finish_builtin_type): Likewise.
10265         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
10266         prototype.
10267
10268         * errfn.c: Include cp-tree.h.
10269         (cp_thing): Add static prototype.
10270         (compiler_error): Don't protoptype.
10271         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
10272         passing it to `cp_thing'.
10273
10274         * error.c (interesting_scope_p): Add static prototype.
10275
10276         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
10277         a char*.
10278
10279         * init.c (compiler_error): Don't prototype.
10280         (member_init_ok_or_else): Const-ify a char*.
10281         (build_java_class_ref): Add static prototype.
10282
10283         * lex.c (compiler_error): Don't prototype.
10284         (get_time_identifier, interface_strcmp, extend_token_buffer,
10285         handle_cp_pragma): Const-ify a char*.
10286         (is_global, init_filename_times): Add static prototype.
10287         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
10288         (compiler_error): Change from fixed args to variable args.
10289         (yyerror): Const-ify a char*.
10290
10291         * parse.y (cond_stmt_keyword): Const-ify a char*.
10292         (parse_decl): Add static prototype.
10293
10294         * pt.c (template_args_equal, print_template_context): Likewise.
10295         (print_candidates, check_default_tmpl_args): Const-ify a char*.
10296         (instantiate_class_template): Likewise.
10297
10298         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
10299
10300         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
10301         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
10302
10303         * search.c (lookup_field_info, lookup_member): Likewise.
10304         (lookup_member): Cast the first argument of `bzero' to a PTR.
10305
10306         * sig.c (compiler_error): Don't prototype.
10307         (build_signature_pointer_or_reference_nam): Const-ify a char*.
10308         (get_sigtable_name, build_member_function_pointer): Likewise.
10309
10310         * tree.c (compiler_error): Don't prototype.
10311         (no_linkage_helper, build_srcloc): Add static prototype.
10312         (build_vbase_pointer_fields): Const-ify a char*.
10313         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
10314
10315         * typeck.c (compiler_error): Don't prototype.
10316         (convert_for_assignment): Const-ify a char*.
10317         (comp_cv_target_types): Add static prototype.
10318         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
10319         build_component_addr, build_unary_op, convert_for_initialization):
10320         Const-ify a char*.
10321
10322         * typeck2.c (ack): Add static prototype and change from fixed args
10323         to variable args.
10324         (readonly_error, check_for_new_type): Const-ify a char*.
10325
10326         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
10327         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
10328         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
10329         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
10330         gen_assign, GNU_xref_member): Const-ify a char*.
10331
10332 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10333
10334         * gxxint.texi: Remove old discussion on copying virtual bases.
10335
10336 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
10337
10338         * Make-lang.in: Remove all references to g++.o/g++.c.
10339         Link g++ from gcc.o.
10340
10341 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
10342
10343         * decl2.c (comdat_linkage): Treat vtables like functions.
10344
10345 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
10346
10347         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
10348
10349 1999-03-25  Nathan Sidwell  <nathan@acm.org>
10350
10351         * decl.c (init_decl_processing): Add `signed' type as a synonym
10352         for `int'.
10353
10354 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
10355
10356         * typeck.c (common_type): Handle cv-qual unification for pointers
10357         to members.
10358
10359         * decl.c (unqualified_namespace_lookup): Return error_mark_node
10360         on error.
10361         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
10362         * lex.c (do_identifier): If we got error_mark_node, call
10363         lookup_name again.
10364
10365 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10366
10367         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
10368         classes.
10369
10370 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
10371
10372         * decl.c (lookup_name_real): Do nested field lookup regardless of
10373         TYPE_BEING_DEFINED.
10374
10375 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
10376
10377         * cp-tree.h (lang_type): Remove has_assignment and
10378         has_real_assignment.  Add befriending_classes.
10379         (TYPE_HAS_ASSIGNMENT): Remove.
10380         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
10381         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
10382         (lang_decl): Document.
10383         (DECL_BEFRIENDING_CLASSES): New macro.
10384         (FRIEND_NAME): Move declaration to more obvious location.
10385         (FRIEND_DECLS): Likewise.
10386         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
10387         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
10388         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
10389         (grok_op_properties): Likewise.
10390         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
10391         (add_friend): Likewise.  Don't do weird things with assignment
10392         operators.  Update DECL_BEFRIENDING_CLASSES.
10393         (add_friends): Don't do weird things with assignment operators.
10394         (make_friend_class): Likewise.  Update
10395         CLASSTYPE_BEFRIENDING_CLASSES.
10396         * pt.c (instantiate_class_template): Don't set
10397         TYPE_HAS_ASSIGNMENT.
10398         (tsubst_copy): Substitute the TREE_TYPE for more unary
10399         expressions.
10400         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
10401         * search.c (protected_accessible_p): New function.
10402         (friend_accessible_p): Likewise.
10403         (accessible_p): Use them.
10404
10405 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
10406
10407         * pt.c (convert_nontype_argument): Don't create things that aren't
10408         PTRMEM_CSTs when applying a qualification conversion to a
10409         PTRMEM_CST.
10410
10411 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
10412
10413         * Makefile.in (OBJS): Don't mention hash.o.
10414         (OBJDEPS): Likewise.
10415
10416 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
10417
10418         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
10419         * decl.c (expand_static_init): Make sure we don't add any after
10420         then.
10421
10422         * decl.c (cp_finish_decl): Move intelligence about handling
10423         DECL_COMDAT for variables from here...
10424         * decl2.c (comdat_linkage): ...to here.
10425         (maybe_make_one_only): Tweak.
10426         (import_export_decl): Call comdat_linkage for variables, too.
10427         (finish_file): Handle template statics properly.
10428
10429 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
10430
10431         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
10432         Document internals of pointer-to-member-functions.
10433         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
10434         (PFN_FROM_PTRMEMFUNC): Likewise.
10435         (build_type_conversion): Remove unused parameter.
10436         (build_ptrmemfunc1): Declare.
10437         (expand_ptrmemfunc_cst): New function.
10438         (delta2_from_ptrmemfunc): Likewise.
10439         (pfn_from_ptrmemfunc): Likewise.
10440         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
10441         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
10442         (convert_to_reference): Remove unused parameter to
10443         build_type_conversion.
10444         (ocp_convert): Likewise.
10445         (build_user_type_conversion): Likewise.
10446         * error.c (dump_expr): Handle NULL pointer-to-member functions.
10447         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
10448         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
10449         open when handling pointer-to-member functions.
10450         * pt.c (convert_nontype_argument): Clean up error messages.  Be
10451         more stringent with pointers-to-members.
10452         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
10453         (build_unary_op): Tidy ever-so-slightly.
10454         (build_conditional_expr): Remove extra parameter to
10455         build_type_conversion.
10456         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
10457         we're using.
10458         (expand_ptrmemfunc_cst): Define.
10459         (delta2_from_ptrmemfunc): Likewise.
10460         (pfn_from_ptrmemfunc): Likewise.
10461
10462 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
10463
10464         * init.c (build_member_call): Handle template-id expressions
10465         correctly.
10466         * typeck.c (build_x_function_call): Likewise.
10467
10468 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
10469
10470         * friend.c (make_friend_class): Avoid core dump when
10471         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
10472
10473 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
10474
10475         * decl.c (start_function): Suppress normal linkage heuristics
10476         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
10477
10478 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
10479
10480         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
10481         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
10482
10483 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10484
10485         * parse.y (named_complex_class_head_sans_basetype):
10486         Do not push a scope for error_mark_node.
10487         (maybe_base_class_list): Likewise.
10488
10489         * decl.c (start_decl): Check for error_mark_node as a type.
10490         Detected by g++.brendan/array-refs.C.
10491         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
10492         (maybe_build_cleanup_1): Likewise.  Detected by
10493         g++.jason/incomplete1.C.
10494
10495         * tree.c (build_dummy_object): Use void_zero_node instead of the
10496         error_mark_node.
10497         (is_dummy_object): Check for such a node.
10498         Detected by g++.bob/inherit1.C
10499
10500 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
10501
10502         * method.c (old_backref_index): Split out...
10503         (flush_repeats): From here.  Rename back from try_old_backref.
10504         (build_mangled_name): Put back some old-style repeat handling.
10505
10506 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10507
10508         * lex.c: Don't include setjmp.h.
10509         (parse_float): New static function.
10510         (pf_args): New struct.
10511         (real_yylex): Use them in call to `do_float_handler'.
10512
10513 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
10514
10515         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
10516         * tree.c (layout_basetypes): Not here.
10517         * search.c (dfs_search): Remove; no longer used.
10518
10519 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
10520
10521         * decl2.c (validate_nonmember_using_decl): Issue sensible
10522         error-messages on bogus qualifiers.
10523
10524 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
10525
10526         * call.c (add_function_candidate): Fix uninitialized variable.
10527
10528         * Makefile.in (search.o): Add dependency on varray.h.
10529
10530 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
10531
10532         * decl.c (duplicate_decls): Use same_type_p.
10533         * method.c (try_old_backref): Renamed from flush_repeats.  Use
10534         same_type_p.  Don't try to handle repeats.  Return success.
10535         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
10536         calls from old-style code, too.
10537         (check_ktype): Use same_type_p.
10538         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
10539         (build_qualified_name): Simplify logic.
10540         (process_overload_item): Strip typedefs and quals at the top.
10541         (build_mangled_name_for_type_with_Gcode): Remove call to
10542         type_canonical_variant.
10543         (build_mangled_name): Likewise.  Remove support for old-style
10544         repeats, which have been disabled since 2.7.2.  Don't mess with
10545         TREE_USED.
10546         (build_decl_overload_real): Don't mess with TREE_USED.
10547
10548 1999-03-13  Nathan Sidwell  <nathan@acm.org>
10549
10550         * error.c (cp_printers): Add 'F' escape character.
10551         (dump_type_real): Remove TREE_LIST (fnargs) printing.
10552         Functionality moved to dump_parameters.
10553         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
10554         (dump_function_decl): Extend meaning of V parameter.  Use
10555         dump_parameters and dump_exception_spec.
10556         (dump_parameters): New static function.
10557         (dump_exception_spec): New static function.
10558         (fndecl_as_string): Change argument semantics.  Use
10559         dump_function_decl directly.
10560
10561         * sig.c (build_signature_table_constructor): Use cp_error.
10562
10563 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10564
10565         * semantics.c (finish_switch_cond): Handle error cases gracefully.
10566         Detected by g++.law/enum5.C.
10567
10568         * typeck.c (build_modify_expr): Check for errors after resolving
10569         offsets.  Detected by g++.brendan/static1.C.
10570
10571         * decl.c (complete_array_type): Ignore initial_value if it is an
10572         error.  Detected by g++.benjamin/17930.C.
10573
10574         * typeck2.c (process_init_constructor): Return error if one argument
10575         is in error.  Detected by g++.benjamin/13478.C.
10576
10577 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10578
10579         * decl.c (select_decl): Allow class templates when we need types.
10580         * decl2.c (ambiguous_decl): Likewise.
10581
10582 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
10583
10584         * lex.c (do_identifier): Correct call to enforce_access.
10585         * search.c (accessible_p): Tweak comment.
10586
10587 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
10588
10589         * semantics.c (begin_class_definition): Call build_self_reference.
10590         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
10591
10592         * search.c (assert_canonical_unmarked): Fix typo in prototype.
10593
10594         * search.c (dfs_canonical_queue): New function.
10595         (dfs_assert_unmarked_p): Likewise.
10596         (assert_canonical_unmarked): Likewise.
10597         (access_in_type): Use it.
10598         (accessible_p): Likewise.  Walk the whole tree when umarking.
10599
10600         * sig.c (build_signature_table_constructor): Use accessible_p
10601         instead of compute_access.
10602
10603 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
10604
10605         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
10606
10607 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
10608
10609         * cp-tree.h (flag_access_control): Declare.
10610         (TREE_VIA_PPUBLIC): Document.
10611         (DECL_NONSTATIC_MEMBER_P): New macro.
10612         (enforce_access): Return an indication of whether or not access
10613         was permitted.
10614         (build_self_reference): Change prototype.
10615         (compute_access): Replace with ...
10616         (accessible_p): New function.
10617         (dfs_walk): Change prototype.
10618         (dfs_unmark): Likewise.
10619         (markedp): Likewise.
10620         * call.c (enforce_access): Use accessible_p.
10621         * class.c (build_self_reference): Insert the declaration into the
10622         list of members for this type, and make it public.
10623         * decl.c (xref_basetypes): Avoid ill-timed recursion.
10624         * init.c (build_offset_ref): Use lookup_member, not three separate
10625         name-lookups.  Call enforce_access rather than checking for
10626         illegal accesses here.
10627         (resolve_offset_ref): Likewise.
10628         * lex.c (do_identifier): Likewise.
10629         * method.c (hack_identifier): Likewise.
10630         * parse.y (self_reference): Remove.
10631         (opt_component_decl_list): Don't use it.
10632         * parse.c: Regenerated.
10633         * pt.c (print_candidates): Generalize to handle lists of
10634         overloaded functions.
10635         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
10636         not set.
10637         (get_template_base): Use new calling convention for dfs_walk.
10638         * search.c: Include varray.h.  Add prototypes.
10639         (dfs_walk): Accept a data pointer to pass to the work functions.
10640         All callers changed.  All work functions changed.
10641         (breadth_first_search): Rename to bfs_walk, and make consistent
10642         with dfs_walk.
10643         (dfs_walk_real): New function.
10644         (canonical_binfo): New function.
10645         (context_for_name_lookup): Likewise.
10646         (shared_marked_p): Likewise.
10647         (shared_unmarked_p): Likewise.
10648         (lokup_field_queue_p): Likewise.
10649         (lookup_field_r): Generalize to handle both functions and fields.
10650         (lookup_field): Just call lookup_member.
10651         (lookup_fnfields): Likewise.
10652         (lookup_member): Move body of lookup_field here and generalize.
10653         (dfs_accessible_queue_p): Likewise.
10654         (dfs_accessible_p): Likewise.
10655         (dfs_access_in_type): Likewise.
10656         (access_in_type): Likewise.
10657         (compute_access): Remove, and replace with ...
10658         (accessible_p): New function.
10659         (vbase_types): Remove.
10660         (vbase_decl_ptr_intermediate): Likewise.
10661         (vbase_decl_ptr): Likewise.
10662         (vbase_init_result): Likewise.
10663         (closed_envelopes): Likewise.
10664         (bvtable): Likewise.
10665
10666 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
10667
10668         * call.c (add_function_candidate): Check for proper number of args
10669         before checking the validity of those args.
10670
10671 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
10672
10673         * cp-tree.h (struct lang_type): Add anon_union field.
10674         (ANON_UNION_TYPE_P): Use it instead of examining type.
10675         (SET_ANON_UNION_TYPE_P): New macro.
10676         * decl.c (check_tag_decl): Use it.
10677
10678         * search.c (compute_access): Handle non-type contexts earlier, and
10679         handle NULL_TREE.
10680
10681         * tree.c (build_exception_variant): Use copy_to_permanent.
10682
10683         * decl2.c (setup_initp): Give statics with no priority the default
10684         priority here.
10685         (do_dtors, do_ctors, finish_file): Remove special handling of
10686         non-prioritized statics.
10687
10688 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
10689
10690         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
10691         * decl.c (make_typename_type): Don't issue an error if an
10692         immediate lookup fails; it migt be resolved later.
10693         * friend.c (is_friend): Add comment.
10694         * search.c (breadth_first_search): Add POSTFN and DATA
10695         parameters.  Tidy.  All callers changed.
10696         (lookup_field_queue_p): New function.
10697         (lookup_field_r): Likewise.
10698         (lookup_field_post): Likewise.
10699         (lookup_field): Use them, via breadth_first_search, instead of
10700         duplicating logic.
10701         (compute_access): Robustify.
10702         (lookup_fnfield_info): New structure.
10703
10704 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
10705
10706         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
10707
10708 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
10709
10710         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
10711         cc happy.
10712
10713         * decl2.c (import_export_class): Also return if
10714         CLASSTYPE_INTERFACE_ONLY is set.
10715
10716 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10717
10718         * decl.c (push_overloaded_decl): Only overwrite the old binding if
10719         there was one.
10720         * decl2.c (do_local_using_decl): Fix loop termination.
10721
10722 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
10723
10724         * cp-tree.h (determine_specialization): Don't declare.
10725         * pt.c (determine_specialization): Make it static.  Eliminate
10726         complain parameter.  Note that decl is always non-NULL now, and
10727         simplify accordingly.
10728
10729         * decl.c (maybe_push_to_top_level): Always call
10730         push_cp_function_context.
10731         (pop_from_top_level): Always call pop_cp_function_context.
10732
10733 1999-02-26  Nathan Sidwell  <nathan@acm.org>
10734
10735         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
10736         diagnostics.
10737         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
10738         * init.c (build_new_1): Extra arg to complete_type_or_else.
10739         (build_delete): Likewise.
10740         * typeck.c (require_complete_type): Likewise.
10741         (pointer_int_sum): Likewise.
10742         (pointer_diff): Likewise.
10743         (build_component_ref): Likewise.
10744
10745         * typeck2.c (incomplete_type_error): Always use cp_error.
10746         Show declaration of undefined type, if appropriate.
10747         Deal with UNKNOWN_TYPE nodes.
10748
10749         * typeck.c (require_complete_type): Use TYPE_SIZE as
10750         size_zero_node to mean incomplete type.
10751         (require_complete_type_in_void): New function.
10752         (build_compound_expr): Call complete_type_in_void for LHS.
10753         (build_c_cast): Call complete_type_in_void for void cast.
10754         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
10755         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
10756         require_complete_type_in_void.  Call it.
10757         * cp-tree.h (require_complete_type_in_void): Prototype new function.
10758
10759         * typeck.c (convert_arguments): Use alternative format for
10760         function decls.  Don't require_complete_type here.  Simplify
10761         diagnostic printing.
10762         (convert_for_initialization): Don't require_complete_type on RHS yet.
10763         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
10764
10765         * call.c (build_over_call): Cope with qualified void return type.
10766         * semantics.c (finish_call_expr): Likewise.
10767         * typeck.c (build_function_call_real): Likewise.
10768         (c_expand_return): Likewise.
10769         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
10770
10771         * call.c (print_z_candidates): Use alternate print format, to be
10772         consistent with (pt.c) print_candidates.
10773         * method.c (hack_identifier): List candidate members.
10774         * search.c (lookup_field): Build ambiguous list, and show it, if
10775         ambiguous.
10776
10777 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
10778
10779         * typeck.c (decay_conversion): Don't confuse constant array
10780         variables with their initializers.
10781
10782         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
10783         merging decls.
10784         * pt.c (regenerate_decl_from_template): Tweak for clarity.
10785         (instantiate_decl): Mark a decl instantiated before regenerating
10786         it to avoid recursion.
10787         * tree.c (mapcar): Don't call decl_constant_value unless we know
10788         something is TREE_READONLY_DECL_P.
10789
10790         * class.c (check_for_override): Don't stop checking when we find
10791         the first overridden function.  Delete #if 0'd code.
10792         * search.c (get_matching_virtual): Likewise.
10793
10794 1999-02-25  Richard Henderson  <rth@cygnus.com>
10795
10796         * lang-specs.h: Define __FAST_MATH__ when appropriate.
10797
10798 1999-02-24  Mike Stump  <mrs@wrs.com>
10799
10800         * typeck.c (convert_for_assignment): Allow boolean integral constant
10801         expressions to convert to null pointer.
10802
10803 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10804
10805         * decl.c (lookup_namespace_name): Resolve namespace aliases.
10806
10807         * class.c (push_nested_class): Allow namespaces.
10808
10809         * decl2.c (set_decl_namespace): Add friendp parameter.
10810         * decl.c (grokfndecl): Pass it.
10811         (grokvardecl): Likewise.
10812         * cp-tree.h: Change declaration.
10813
10814 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
10815
10816         * pt.c (tsubst): Allow an array of explicit size zero.
10817
10818 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
10819
10820         * errfn.c: Change varargs code to look like toplev.c.
10821
10822         * method.c (process_modifiers): Don't prepend 'U' for char or
10823         wchar_t.
10824
10825 1999-02-20  Craig Burley  <craig@jcb-sc.com>
10826
10827         * Make-lang.in (cplib2.ready): Don't consider updating
10828         cplib2 stuff if the current directory isn't writable, as
10829         it won't work (such as during a `make install').
10830
10831 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
10832
10833         * decl2.c (start_objects): Make file scope constructors and
10834         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
10835         ASM_OUTPUT_DESTRUCTOR are defined.
10836
10837 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
10838
10839         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
10840         (fn_type_unification): Adjust prototype.
10841         (lookup_fnfields_1): Declare.
10842         * call.c (add_template_candidate_real): Adjust call to
10843         fn_type_unification.
10844         * class.c (add_method): Don't allow duplicate declarations of
10845         constructors or destructors.
10846         (resolve_address_of_overloaded_function): Remove unused variable.
10847         Adjust call to fn_type_unification.
10848         * decl.c (grokfndecl): Be more robust in the face of illegal
10849         specializations.
10850         * decl2.c (check_classfn): Remove hokey handling of member
10851         templates.
10852         * pt.c (determine_specialization): Improve comments.  Adjust to
10853         handle template argument deduction as per the standard.
10854         (check_explicit_specialization): Fix comment spacing.  Handle
10855         type-conversion operators correctly.  Improve error-recovery.
10856         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
10857         (get_bindings_real): Simplify handling of static members.
10858         * search.c (lookup_fnfields_1): Make it have external linkage.
10859         * typeck.c (compparms): Fix comment.
10860         (build_unary_op): Don't try to figure out which template
10861         specialization is being referred to when when the address-of
10862         operator is used with a template function.
10863
10864 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10865
10866         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
10867         keyword to match an analogous change at the top level.
10868
10869         * tree.c (lvalue_or_else): Likewise.
10870
10871 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
10872
10873         * decl.c (xref_basetypes): Comment.
10874         * pt.c (instantiate_class_template): Use xref_basetypes.
10875
10876 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
10877
10878         * cp-tree.h (tsubst): Change prototype.
10879         (tsubst_expr): Likewise.
10880         (tsubst_copy): Likewise.
10881         (type_unification): Remove prototype.
10882         * call.c (convert_default_arg): Adjust call to tsubst_expr.
10883         * class.c (resolve_address_of_overloaded_function): Just use
10884         fn_type_unification.
10885         * decl.c (grokdeclarator): Adjust call to tsubst.
10886         * method.c (build_template_parm_names): Likewise.
10887         * pt.c (GTB_VIA_VIRTUAL): New macro.
10888         (GTB_IGNORE_TYPE): Likewise.
10889         (resolve_overloaded_unification): Add `complain' parameter.
10890         (try_one_overload): Likewise.
10891         (tsubst_template_arg_vector): Likewise.
10892         (tsubst_template_parms): Likewise.
10893         (tsubst_aggr_type): Likewise.
10894         (tsubst_arg_types): Likewise.
10895         (tsubst_call_declarator_parms): Likewise.
10896         (unify): Remove explicit_mask.
10897         (type_unification_real): Likewise.
10898         (get_template_base_recursive): Likewise.
10899         (coerce_template_template_parms): Provide prototype.
10900         (tsubst_function_type): Likewise.
10901         (try_class_unification): New function.
10902         All callers changed to use new complain parameter.
10903         (get_template_base): Use try_class_unification.
10904         (unify): Adjust handling of classes derived from template types.
10905         (fn_type_unification): Substitute explicit arguments before
10906         unification.
10907
10908 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10909
10910         * decl.c (pushdecl): Remove dead code.
10911
10912 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
10913
10914         * decl2.c (finish_objects): Fix code I missed in previous change.
10915
10916 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
10917
10918         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
10919         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
10920
10921         * pt.c (maybe_process_partial_specialization): Complain about
10922         'template <>' on non-specialization.
10923
10924 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
10925
10926         * decl.c (grokdeclarator): Catch wierd declarators.
10927         * decl2.c (finish_file): Don't abort because of namespace parsing
10928         failure.
10929         (check_decl_namespace): Remove.
10930
10931 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
10932
10933         * cp-tree.h (get_template_base): Don't declare.
10934         (dfs_walk): Declare.
10935         (dfs_unmark): Likewise.
10936         (markedp): Likewise.
10937         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
10938         targs to get_template_base.
10939         (get_template_base_recursive): Move here from search.c.  Check to
10940         see that the base found can be instantiated to form the desired
10941         type.
10942         (get_template_base): Likewise.
10943         (get_class_bindings): Simplify.
10944         * search.c (get_template_base_recursive): Move to pt.c.
10945         (get_template_base): Likewise.
10946         (markedp): Make it global.
10947         (dfs_walk): Likewise.
10948         (dfs_unmark): Likewise.
10949
10950 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
10951
10952         * pt.c (maybe_process_partial_specialization): Complain about
10953         specialization in wrong namespace.
10954         * tree.c (decl_namespace_context): New fn.
10955
10956 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10957
10958         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
10959         * pt.c (coerce_template_template_parms): Handle nested
10960         template template parameters.
10961
10962 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
10963
10964         * typeck2.c: Update email addresses.
10965
10966 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10967
10968         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
10969         turned off.
10970
10971 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
10972
10973         * lex.c (retrofit_lang_decl): Split out...
10974         (build_lang_decl): From here.
10975         * decl.c (pushdecl): Call it for functions generated by the middle
10976         end that don't have DECL_LANG_SPECIFIC.
10977         * cp-tree.h: Declare it.
10978
10979         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
10980         (start_objects, finish_objects): Only use special
10981         init_priority code if the user specified a priority.
10982         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
10983         objects.
10984
10985 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
10986
10987         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
10988         mkstemp.o.  Get them from libiberty now.
10989         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
10990
10991 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10992
10993         * decl2.c (lang_decode_option): Use read_integral_parameter.
10994
10995 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
10996
10997         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
10998         before calling complete_type_or_else.
10999
11000 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11001
11002         * input.c (inline): Don't define, its handled by system.h.
11003
11004 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
11005
11006         * decl2.c: Don't define flag_no_ident here.  Don't process
11007         -f(no-)ident here.
11008         * cp-tree.h: Don't declare flag_no_ident here.
11009         * lang-specs.h: Map -Qn to -fno-ident.
11010
11011 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
11012
11013         * cp-tree.h (struct tree_binding): Replace scope field with a union.
11014         (BINDING_SCOPE): Adjust.
11015         * decl.c (BINDING_LEVEL): Adjust.
11016
11017 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
11018
11019         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
11020         member constants.
11021
11022         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
11023         a ctor initializer.
11024
11025         * tree.c (equal_functions): Fix name in prototype.
11026
11027         * decl.c (push_local_binding): Add FLAGS argument.
11028         (pushdecl, push_overloaded_decl): Pass it.
11029         * decl2.c (do_local_using_decl): Likewise.
11030         * cp-tree.h: Adjust prototype.
11031         * decl.c (poplevel): Fix logic.
11032
11033         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
11034         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
11035         (cat_namespace_levels): Don't loop forever.
11036
11037 1999-01-25  Richard Henderson  <rth@cygnus.com>
11038
11039         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
11040
11041 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
11042
11043         * class.c (resolve_address_of_overloaded_function): Mark the
11044         chosen function used.
11045
11046         * call.c (build_call): Make sure that a function coming in has
11047         been marked used already.
11048         * decl.c (expand_static_init): Call mark_used instead of
11049         assemble_external.
11050         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
11051         alloc_eh_object, expand_throw): Likewise.
11052         * init.c (build_builtin_delete_call): Likewise.
11053         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
11054         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
11055         expand_generic_desc): Likewise.
11056
11057 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11058
11059         * tree.c (equal_functions): New function.
11060         (ovl_member): Call it.
11061
11062 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
11063
11064         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
11065
11066 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11067
11068         * decl.c (decls_match): Return 1 if old and new are identical.
11069         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
11070
11071 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
11072
11073         * decl.c (start_function): Make member functions one_only on windows.
11074         * decl2.c (import_export_decl): Likewise.
11075
11076         * decl.c (grokdeclarator): Don't complain about implicit int in
11077         a system header.  Change same-name field check to not complain in
11078         a system header instead of within extern "C".
11079
11080 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
11081
11082         * cp-tree.h (PUSH_GLOBAL): New macro.
11083         (PUSH_LOCAL): Likewise.
11084         (PUSH_USING): Likewise.
11085         (namespace_bindings_p): Declare.
11086         (push_overloaded_decl): Likewise.
11087         * decl.c (push_overloaded_decl): Don't make it static.  Check for
11088         illegal declarations after using declarations here.
11089         (namespace_bindings_p): Likewise.
11090         (duplicate_decls): Don't consider declarations from different
11091         namespaces to be the same.
11092         (pushdecl): Use symbolic PUSH_ constants in calls to
11093         push_overloaded_decl.
11094         (push_overloaded_decl_1): Likewise.
11095         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
11096         (do_nonmember_using_decl): Check for illegal using declarations
11097         after ordinary declarations here.
11098         (do_local_using_decl): Call pushdecl to insert declarations.
11099
11100 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
11101
11102         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
11103
11104 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
11105
11106         * tree.c (build_cplus_array_type_1): Don't call build_array_type
11107         for types involving template parameters.
11108
11109         * cp-tree.h (PARM_DECL_EXPR): Delete.
11110         (convert_default_arg): Change prototype.
11111         (check_default_argument): Declare.
11112         (search_tree): Likewise.
11113         * call.c (convert_default_arg): Take the function to which the
11114         default argument belongs as a parameter, and do any necessary
11115         instantiation here, instead of ...
11116         (build_over_call): Here.
11117         * decl.c (local_variable_p): New function.
11118         (check_default_argument): Likewise, split out and tidied from ...
11119         (grokparms): Here.
11120         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
11121         * pt.c (tsubst_call_declarator_parms): New function.
11122         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
11123         with CALL_EXPRs, rather than trying to be clever.
11124         (tsubst): Use tsubst_call_declarator_parms.
11125         * tree.c (search_tree): Don't make it static.
11126         * typeck.c (convert_arguments): Use new interface to
11127         convert_default_arg.
11128
11129 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
11130
11131         * error.c (dump_function_decl): Don't print the argument types for
11132         a function when the verbosity level is negative.
11133
11134         * call.c (build_over_call): Check format attributes at call-time.
11135
11136         * pt.c (tsubst_copy): Fix comment.
11137         (unify): Don't allow unification with variable-sized arrays.
11138
11139         * semantics.c (finish_stmt_expr): When processing a template make
11140         the BIND_EXPR long-lived.
11141
11142 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
11143
11144         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
11145         (import_export_vtable): Not here.
11146
11147 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
11148
11149         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
11150         non-static member function.
11151
11152 1999-01-18  Nathan Sidwell  <nathan@acm.org>
11153
11154         * class.c (instantiate_type): Only diagnose illegal address of member
11155         function if complaining.
11156
11157         * decl.c (lookup_name_real): Remove duplicate code.
11158
11159 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
11160
11161         * tree.c (copy_template_template_parm): Use permanent_obstack.
11162
11163 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11164
11165         * pt.c (unify): Remove restrictions on deduction of argument
11166         of template template parameters.
11167
11168 1999-01-18  Nathan Sidwell  <nathan@acm.org>
11169
11170         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
11171
11172         * class.c (resolve_address_of_overloaded_function): Show list of
11173         all candidates, when none of them match.
11174
11175 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
11176
11177         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
11178         definition of 'casting away const' in reinterpret_cast<>.
11179
11180 1999-01-18  Graham  <grahams@rcp.co.uk>
11181
11182         * cvt.c: Add include for decl.h, remove extern for
11183         static_aggregates which is now provided by decl.h.
11184
11185         * Makefile.in (cvt.o): Add dependency for decl.h and missing
11186         dependencies for convert.h and flags.h.
11187
11188 1999-01-18  Nathan Sidwell  <nathan@acm.org>
11189
11190         * decl2.c (do_dtors): Set current location to that of the
11191         decl, for sensible diagnostics and debugging.
11192         (check_classfn): Issue `incomplete type' error, if
11193         class is not defined.
11194
11195 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
11196
11197         * cp-tree.h: Add prototype for bound_pmf_p.
11198
11199 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
11200             Manfred Hollstein <manfred@s-direktnet.de>
11201
11202         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
11203         -Wreturn-type.
11204
11205 1999-01-16  Nathan Sidwell  <nathan@acm.org>
11206
11207         * cp-tree.h (struct lang_type): Added has_mutable flag.
11208         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
11209         (TYPE_HAS_MUTABLE_P): New macro to read it.
11210         (cp_has_mutable_p): Prototype for new function.
11211         * class.c (finish_struct_1): Set has_mutable from members.
11212         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
11213         it contains a mutable.
11214         * typeck.c (cp_has_mutable_p): New function.
11215
11216 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
11217
11218         * pt.c (process_template_parm): Ignore top-level qualifiers on
11219         non-type parameters.
11220
11221         * decl.c (start_function): Use current_function_parms in the call
11222         to require_complete_type_for_parms, not the probably empty
11223         DECL_ARGUMENTS.
11224
11225 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
11226
11227         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
11228
11229         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
11230         that we don't suppress the other copies.
11231         * lex.c (handle_cp_pragma): Likewise.
11232
11233 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
11234
11235         * decl.c (grokdeclarator): Undo 1998-12-14 change.
11236         * tree.c (build_cplus_array_type_1): Likewise.
11237         * pt.c (instantiate_class_template): Remove misleading comment.
11238         (tsubst_aggr_type): Substitute if there are template parameters,
11239         regardless of whether or not they use template arguments.
11240         (unify): Likewise, but for unification.
11241
11242 1999-01-12  Richard Henderson  <rth@cygnus.com>
11243
11244         * cp-tree.h (flag_permissive): Declare extern.
11245
11246 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
11247
11248         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
11249         here.
11250         (lang_type): Add is_partial_instantiation.  Decrease width of
11251         dummy.
11252         (PARTIAL_INSTANTIATION_P): New macro.
11253         (OPERATOR_TYPENAME_P): Remove.
11254         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
11255         OPERATOR_TYPENAME_P.
11256         (grok_op_properties): Likewise.
11257         * friend.c (do_friend): Handle friends that are member functions
11258         correctly.
11259         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
11260         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
11261         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
11262         any more partial instantiation than is absolutely necessary for
11263         implicit typename.  Set PARTIAL_INSTANTIATION_P.
11264         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
11265         * semantics.c (begin_class_definition): Handle partial
11266         specializations of a type that was previously partially
11267         instantiated.
11268
11269 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
11270
11271         * g++spec.c (LIBSTDCXX): Provide default definition.
11272         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
11273
11274 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11275
11276         * Make-lang.in (g++.o): Depend on prefix.h.
11277
11278 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
11279
11280         * tree.c (bound_pmf_p): New fn.
11281         * typeck.c (build_c_cast): Use it.
11282
11283         * decl.c (grok_op_properties): Use same_type_p.
11284
11285 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11286
11287         * Makefile.in (cvt.o): Depend on toplev.h.
11288
11289         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
11290
11291         * cvt.c: Include toplev.h.
11292
11293         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
11294         definitions.
11295
11296         * init.c (expand_vec_init): Initialize variable `itype'.
11297
11298         * lex.c (yyerror): Cast the argument passed to a ctype function to
11299         an unsigned char.
11300
11301         * method.c (build_mangled_C9x_name): Wrap prototype and definition
11302         in "HOST_BITS_PER_WIDE_INT >= 64".
11303
11304         * typeck.c (build_binary_op): Mark parameter `convert_p' with
11305         ATTRIBUTE_UNUSED.
11306
11307 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
11308
11309         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
11310         * tree.c (build_exception_variant): Don't crash on empty throw
11311         specs.
11312
11313 1998-12-18  DJ Delorie  <dj@cygnus.com>
11314
11315         * cvt.c (convert_to_reference): Check for both error_mark_node
11316         and NULL_NODE after call to convert_for_initialization.
11317
11318 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
11319
11320         * error.c (interesting_scope_p): New fn.
11321         (dump_simple_decl): Use it.
11322         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
11323         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
11324
11325 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
11326
11327         * class.c (resolve_address_of_overloaded_function): Do conversion
11328         to correct type here, rather than ...
11329         (instantiate_type): Here.
11330
11331         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
11332         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
11333         (decl_template_parm_p): Remove.
11334         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
11335         parameter.
11336         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
11337         * pt.c (push_inline_template_parms_recursive): Set it.
11338         (decl_template_parm_p): Remove.
11339         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
11340         (process_template_parm): Set it.
11341
11342 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
11343
11344         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
11345         if configured with cpplib.
11346
11347 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
11348
11349         * decl.c (poplevel): Make sure ns_binding is initialized.
11350
11351         * decl.c (finish_function): Undo inadvertent change in previous
11352         patch.
11353
11354 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
11355
11356         * class.c (pushclass): Tweak handling of class-level bindings.
11357         (resolve_address_of_overloaded_function): Update pointer-to-member
11358         handling.
11359         (instantiate_type): Likewise.
11360         * cvt.c (cp_convert_to_pointer): Likewise.
11361         * decl.c (pop_binding): Take the DECL to pop, not just the name.
11362         Deal with `struct stat' hack.
11363         (binding_level): Add to documentation.
11364         (push_binding): Clear BINDING_TYPE.
11365         (add_binding): New function.
11366         (push_local_binding): Use it.
11367         (push_class_binding): Likewise.
11368         (poplevel): Adjust calls to pop_binding.
11369         (poplevel_class): Likewise.
11370         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
11371         declarations to current binding level.
11372         (push_class_level_binding): Likewise.
11373         (push_overloaded_decl): Adjust handling of OVERLOADs in local
11374         bindings.
11375         (lookup_namespace_name): Don't crash when confronted with a
11376         TEMPLATE_DECL.
11377         (lookup_name_real): Do `struct stat' hack in local binding
11378         contexts.
11379         (build_ptrmemfunc_type): Adjust documentation.
11380         (grokdeclarator): Don't avoid building real array types when
11381         processing templates unless really necessary.
11382         (finish_method): Adjust calls to pop_binding.
11383         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
11384         not reparse_decl_as_expr.
11385         (build_expr_from_tree): Deal with a template-id as the function to
11386         call in a METHOD_CALL_EXPR.
11387         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
11388         (maybe_adjust_types_For_deduction): Don't do peculiar things with
11389         METHOD_TYPEs here.
11390         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
11391         pointer-to-member types where necessary.
11392         * tree.c (build_cplus_array_type_1): Don't avoid building real
11393         array types when processing templates unless really necessary.
11394         (build_exception_variant): Compare the exception lists correctly.
11395
11396 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
11397
11398         * cp-tree.def (CPLUS_BINDING): Update documentation.
11399         * cp-tree.h (LOCAL_BINDING_P): New macro.
11400         (lang_identifier): Rename local_value to bindings.
11401         (tree_binding): Make `scope' of type `void*', not `tree'.
11402         (BINDING_SCOPE): Update documentation.
11403         (IDENTIFIER_LOCAL_VALUE): Remove.
11404         (IDENTIFIER_CLASS_VALUE): Document.
11405         (IDENTIFIER_BINDING): New macro.
11406         (IDENTIFIER_VALUE): Likewise.
11407         (TIME_IDENTIFIER_TIME): Likewise.
11408         (TIME_IDENTIFIER_FILEINFO): Likewise.
11409         (IMPLICIT_TYPENAME_P): Likewise.
11410         (set_identifier_local_value): Remove.
11411         (push_local_binding): New function.
11412         (push_class_binding): Likewise.
11413         * class.c (pushclass): Update comments; use push_class_binding.
11414         * decl.c (set_identifier_local_value_with_scope): Remove.
11415         (set_identifier_local_value): Likewise.
11416         (push_binding): New function.
11417         (pop_binding): Likewise.
11418         (binding_level): Update documentation.  Remove shadowed.
11419         (BINDING_LEVEL): New macro.
11420         (free_binding_nodes): New variable.
11421         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
11422         BLOCK_VARs when doing for-scope extension.  Remove effectively
11423         dead code.
11424         (pushlevel_class): Tweak formatting.
11425         (poplevel_class): Adjust for new name-lookup scheme.
11426         (print_binding_level): Likewise.
11427         (store_bindings): Likewise.
11428         (pushdecl): Likewise.
11429         (pushdecl_class_level): Likewise.
11430         (push_class_level_binding): Likewise.
11431         (push_overloaded_decl): Update comments.  Adjust for new
11432         name-lookup scheme.
11433         (lookup_name_real): Likewise.
11434         (lookup_name_current_level): Likewise.
11435         (cp_finish_decl): Likewise.
11436         (require_complete_types_for_parms): Likewise.  Remove misleading
11437         #if 0'd code.
11438         (grok_parms): Likewise.  Don't call
11439         require_complete_types_for_parms here.
11440         (grok_ctor_properties): Don't treat templates as copy
11441         constructors.
11442         (grop_op_properties): Or as assignment operators.
11443         (start_function): Document.  Adjust for new name-lookup scheme.
11444         (finish_function): Likewise.
11445         * decl2.c (do_local_using_decl): Use push_local_binding.
11446         * lex.c (begin_definition_of_inclass_inline): New function, split
11447         out from ...
11448         (do_pending_inlines): Here, and ...
11449         (process_next_inline): Here.
11450         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
11451         (init_filename_times): Likewise.
11452         (extract_interface_info): Likewise.
11453         (ste_typedecl_interface_info): Likewise.
11454         (check_newline): Likewise.
11455         (dump_time_statistics): Likewise.
11456         (handle_cp_pragma): Likewise.
11457         (do_identifier): Adjust for new name-lookup scheme.
11458         * parse.y (function_try_block): Return ctor_initializer_opt value.
11459         (fndef): Use it.
11460         (fn.defpen): Pass appropriate values to start_function.
11461         (pending_inline): Use functor_try_block value, and pass
11462         appropriate values to finish_function.
11463         * pt.c (is_member_template): Update documentation; remove handling
11464         of FUNCTION_DECLs.  As per name, this function should deal only in
11465         TEMPLATE_DECLs.
11466         (decl_template_parm_p): Change name of olddecl parameter to decl.
11467         (check_template_shadow): Adjust for new name-lookup scheme.
11468         (lookup_template_class): Likewise.
11469         (tsubst_decl): Tweak so as not to confuse member templates with
11470         copy constructors and assignment operators.
11471         (unify): Handle UNION_TYPEs.
11472         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
11473         (lang_print_xnode): Adjust for new name-lookup scheme.
11474         * typeck.c (mark_addressable): Likewise.
11475         (c_expand_return): Likewise.
11476
11477 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
11478
11479         * decl.c (grokdeclarator): Allow field with same name as class
11480         in extern "C".
11481
11482         * decl.c (lookup_name_real): Don't limit field lookup to types.
11483         * class.c (check_member_decl_is_same_in_complete_scope): No error
11484         if icv and x are the same.
11485         * lex.c (do_identifier): Tweak error message.
11486
11487 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
11488
11489         * decl.c (start_enum): Use push_obstacks, not
11490         end_temporary_allocation.
11491         (finish_enum): Call pop_obstacks.
11492
11493 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
11494
11495         * class.c (instantiate_type): Return error_mark_node rather than
11496         junk.
11497
11498 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
11499
11500         * cp-tree.h (most_specialized_instantiation): New function.
11501         (print_candidates): Likewise.
11502         * class.c (validate_lhs): Remove.
11503         (resolve_address_of_overloaded_function): New function, split out
11504         and then substantially reworked, from ...
11505         (instantiate_type): Use it.  Simplify.
11506         * cvt.c (convert_to_reference): Complain when caller has indicated
11507         that's the right thing to do.  Don't crash if instantiate_type
11508         fails.
11509         * pt.c: Substitute `parameters' for `paramters' throughout.
11510         (print_candidates): Don't make it static.
11511         (most_specialized_instantiation): Split out from ...
11512         (most_specialized): Here.
11513
11514 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
11515
11516         * lex.c (lang_init_options): Initialize cpplib.
11517         * decl2.c (parse_options,cpp_initialized): Removed.
11518         (lang_decode_option): Move initialization of cpplib to
11519         lang_init_options.
11520
11521 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
11522
11523         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
11524         well as the TYPE_DECL, when a typedef name is assigned to a
11525         previously anonymous type.
11526
11527 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
11528
11529         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
11530         __cp_eh_info for getting the eh info pointer.  Add table_index to
11531         field list.
11532         (push_eh_cleanup): Don't increment 'handlers' data field.
11533         (process_start_catch_block): Don't set the 'caught' field.
11534
11535         * cp/exception.cc (CP_EH_INFO): New macro for getting the
11536         exception info pointer within library routines.
11537         (__cp_eh_info): Use CP_EH_INFO.
11538         (__start_cp_handler): Get exception info pointer, set caught field,
11539         and increment the handlers field.  Avoids this being done by handlers.
11540         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
11541         (uncaught_exception): Use CP_EH_INFO macro.
11542
11543 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
11544
11545         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
11546
11547 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
11548
11549         * lex.c (check_newline): Add support for \ as `natural'
11550         characters in file names in #line to be consistent with #include
11551         handling.  We support escape processing in the # 1 "..." version of
11552         the command.  See also support in cp/lex.c.
11553
11554 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
11555
11556         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
11557         structure.
11558
11559 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
11560
11561         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
11562
11563         * error.c (dump_simple_decl): Also print namespace context.
11564         (dump_function_decl): Likewise.
11565
11566         * decl2.c (ambiguous_decl): Don't print old value if it's
11567         error_mark_node.
11568
11569         * decl.c (lookup_name_real): Fix handling of local types shadowed
11570         by a non-type decl.  Remove obsolete code.
11571         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
11572
11573         * lang-options.h: Add -fpermissive.
11574         * decl2.c: Likewise.
11575         * cp-tree.h: Add flag_permissive.
11576         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
11577         were specified, set flag_pedantic_errors.
11578         * call.c (build_over_call): Turn dropped qualifier messages
11579         back into pedwarns.
11580         * cvt.c (convert_to_reference): Likewise.
11581         * typeck.c (convert_for_assignment): Likewise.
11582
11583 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
11584
11585         * decl2.c (coerce_new_type): Use same_type_p.
11586         (coerce_delete_type): Likewise.
11587
11588         * call.c (check_dtor_name): Return 1, not error_mark_node.
11589
11590 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
11591
11592         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
11593         if MULTIPLE_SYMBOL_SPACES.
11594
11595         * pt.c (check_template_shadow): New fn.
11596         * decl2.c (grokfield): Use it.
11597         * decl.c (pushdecl): Likewise.
11598         (pushdecl_class_level): Likewise.
11599         (start_method): Likewise.
11600         (xref_tag): Don't try to use 't' if we're defining.
11601
11602         * call.c (check_dtor_name): Just return an error_mark_node.
11603         * pt.c (lookup_template_class): Complain about using non-template here.
11604         * parse.y (apparent_template_type): Not here.
11605
11606         * pt.c (check_explicit_specialization): Complain about specialization
11607         with C linkage.
11608
11609         * lang-options.h: Add -f{no-,}implicit-inline-templates.
11610
11611         * pt.c (convert_nontype_argument): Don't assume that any integer
11612         argument is intended to be a constant-expression.
11613
11614 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
11615
11616         * class.c (handle_using_decl): Fix comment.  Don't lookup
11617         constructors in base classes.
11618         (validate_lhs): Fix typo in comment.
11619         * search.c (lookup_field_1): Don't return a USING_DECL.
11620
11621         * cp-tree.h (DECL_ACCESS): Improve documentation.
11622
11623         * decl.c (expand_static_init): Don't set the initialization-done
11624         flag until the initialization is done.
11625
11626 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
11627
11628         * decl2.c (validate_nonmember_using_decl): Complain about using
11629         declarations for class members.
11630
11631 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
11632
11633         * typeck2.c (process_init_constructor): Use same_type_p.
11634
11635         * decl.c (check_tag_decl): Don't warn about null decl inside a
11636         class.
11637
11638         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
11639         UNIFY_ALLOW_NONE.
11640         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
11641         (resolve_overloaded_unification): Strip baselinks.
11642
11643 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11644
11645         * g++spec.c: Don't prototype xmalloc.
11646
11647 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
11648
11649         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
11650
11651         * decl.c (check_tag_decl): Do complain about null friend decl at
11652         file scope.
11653
11654 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
11655
11656         * lex.c (make_lang_type): Clear the whole struct lang_type, not
11657         only the first multiple of sizeof (int).
11658
11659 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
11660
11661         * decl.c (start_decl): An explicit specialization of a static data
11662         member is only a definition if it has an initializer.
11663
11664         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
11665         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
11666         cp_finish_decl.
11667         * init.c (expand_default_init): Check for DIRECT_BIND instead of
11668         DECL_ARTIFICIAL.
11669
11670         * call.c (build_over_call): Use build_decl.
11671
11672         * except.c (expand_throw): Just use convert, not
11673         build_reinterpret_cast.
11674
11675         * lex.c (handle_generic_pragma): Use token_buffer.
11676
11677         * decl.c (check_tag_decl): Don't complain about null friend decl.
11678
11679 1998-11-24  Dave Pitts  <dpitts@cozx.com>
11680
11681         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
11682         first position.
11683         * lex.c (check_newline): Use ISALPHA.
11684         (readescape): Use ISGRAPH.
11685         (yyerror): Use ISGRAPH.
11686
11687 1998-11-24  Nathan Sidwell  <nathan@acm.org>
11688
11689         * search.c (get_abstract_virtuals): Do not use initial
11690         CLASSTYPE_ABSTRACT_VIRTUALS.
11691         * typeck2.c (abstract_virtuals_error): Show location of abstract
11692         declaration.
11693         * call.c (build_new_method_call): Use
11694         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
11695         * class.c (finish_struct_bits): Don't bother working out whether
11696         get_abstract_virtuals will do anything, just do it.
11697
11698 1998-11-24  Graham  <grahams@rcp.co.uk>
11699
11700         * typeck.c (build_component_ref): Remove unused statement.
11701
11702 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
11703
11704         * class.c (add_method): Catch invalid overloads.
11705
11706         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
11707         * search.c (lookup_conversions): Handle getting real OVERLOADs.
11708         (add_conversions): Likewise.  Revert last change.
11709         * call.c (add_conv_candidate): Pass totype to add_candidate instead
11710         of fn.  Don't add a new candidate if the last one was for the same
11711         type.
11712         (print_z_candidates): Handle getting a type as a function.
11713         (joust): If we got two conversion candidates to the same type,
11714         just pick one.
11715         (build_object_call): Lose 'templates'.
11716         (build_user_type_conversion_1): Handle getting real OVERLOADs.
11717
11718 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
11719
11720         * typeck2.c (process_init_constructor): If there are elements
11721         that don't have initializers and they need to have constructors
11722         run, supply them with initializers.
11723
11724         * class.c (finish_struct_1): A class with a 0-width bitfield is
11725         still empty.
11726
11727 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
11728
11729         * pt.c (instantiate_class_template): Don't try to figure out what
11730         specialization to use for a partial instantiation.  Correct
11731         typos in a couple of comments.  Avoid calling uses_template_parms
11732         multiple times.
11733
11734 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
11735
11736         * method.c (process_overload_item): Add call to
11737         build_mangled_C9x_name for intTI_type_nodes.
11738         (build_mangled_C9x_name): Add prototype, define.
11739         * decl.c (init_decl_processing): Add names for
11740         TImode_type_node.
11741
11742 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
11743
11744         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
11745
11746         * class.c (finish_struct_1): Set things up for 0-width bitfields
11747         like we do for others.
11748
11749         * decl.c (check_tag_decl): New fn.
11750         (shadow_tag): Split out from here.
11751         * decl2.c (grok_x_components): Call it.
11752
11753 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
11754
11755         * decl.c: Lose warn_about_return_type.
11756         (grokdeclarator): Always complain about implicit int, except for
11757         `main () { ... }'.
11758
11759         * decl.c (tag_name): New fn.
11760         (xref_tag): Complain about using typedef-name after class-key.
11761
11762         * init.c (expand_vec_init): Also keep going if from_array.
11763
11764         * tree.c (is_overloaded_fn): Also handle the output of
11765         build_offset_ref.
11766
11767         * decl.c (grokdeclarator): Use constructor_name when comparing
11768         field name against enclosing class.
11769         * class.c (finish_struct_anon): Likewise.
11770
11771 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
11772
11773         * decl.c (poplevel): Remove code to handle KEEP == 2.
11774         (finish_function): Don't confuse BLOCK-order when
11775         processing a destructor.
11776
11777 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
11778
11779         * decl.c (require_complete_types_for_parms): Call layout_decl
11780         after we've completed the type.
11781
11782 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11783
11784         * decl2.c (validate_nonmember_using_decl): Allow using templates
11785         from the global namespace.
11786
11787 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
11788
11789         Handle specifying template args to member function templates.
11790         * tree.c (build_overload): Always create an OVERLOAD for a template.
11791         * search.c (add_conversions): Handle finding an OVERLOAD.
11792         * decl2.c (check_classfn): Likewise.
11793         * lex.c (identifier_type): See through a baselink.
11794         * parse.y (do_id): Don't call do_identifier if we got a baselink.
11795         * class.c (instantiate_type, case TREE_LIST): Recurse.
11796
11797         * decl.c (grokdeclarator): Allow a boolean constant for array
11798         bounds, odd as that sounds.
11799
11800         * pt.c (unify): Be more strict about non-type parms, except for
11801         array bounds.
11802         (UNIFY_ALLOW_INTEGER): New macro.
11803
11804 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
11805
11806         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
11807
11808 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
11809
11810         * semantics.c (begin_class_definition): Call
11811         maybe_process_partial_specialization before push_template_decl.
11812         Don't call push_template_decl for a specialization.
11813         * search.c (lookup_field): Do return a member template class.
11814         * decl2.c (handle_class_head): Handle member template classes.
11815
11816         * decl.c (grokdeclarator): A parm type need not be complete.
11817
11818         * pt.c (convert_nontype_argument): Fix thinko.
11819
11820 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
11821
11822         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
11823         (global_delete_fndecl): New variable.
11824         * decl.c (global_delete_fndecl): Define it.
11825         (init_decl_processing): Set it.
11826         * init.c (build_builtin_delete_call): Use it.
11827         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
11828         nodes.
11829
11830 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
11831
11832         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
11833         type.
11834
11835         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
11836         * call.c (build_object_call): Also support references to functions.
11837         * typeck.c (convert_for_initialization): Don't decay a function
11838         if the target is a reference to function.
11839
11840         * search.c (add_conversions): Get all the overloads from a class.
11841
11842         * decl.c (grok_ctor_properties): Complain about any constructor
11843         that will take a single arg of the class type by value.
11844
11845         * typeck2.c (build_functional_cast): Can't create objects of
11846         abstract classes this way.
11847         * cvt.c (ocp_convert): Likewise.
11848
11849         * decl.c (grokfndecl): Member functions of local classes are not
11850         public.
11851
11852 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
11853
11854         * Make-lang.in (cc1plus): Add dependency on hash.o.
11855
11856 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
11857
11858         * search.c (get_abstract_virtuals): Complain about virtuals with
11859         no final overrider.
11860         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
11861         with no final overrider.
11862         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
11863         on virtuals with no final overrider.
11864
11865         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
11866
11867         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
11868         after layout_type.
11869
11870         * friend.c (do_friend): Don't set_mangled_name_for_decl.
11871
11872         * class.c (finish_struct_anon): Complain about non-fields.
11873         * decl2.c (build_anon_union_vars): Likewise.
11874
11875         * decl.c (grokdeclarator): Normal data members can't have the same
11876         name as the class, either.
11877         * class.c (finish_struct_anon): Neither can members of an
11878         anonymous union.
11879
11880 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
11881
11882         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
11883         (TYPE_BINFO): Likewise.
11884         (IS_AGGR_TYPE): Tweak.
11885         (SET_IS_AGGR_TYPE): New macro.
11886         (CLASS_TYPE_P): Tweak.
11887         (lang_type): Group mark bitfields together.  Remove linenum.
11888         (CLASSTYPE_SOURCE_LINE): Remove macro.
11889         (CLASSTYPE_MARKED_N): New macro.
11890         (SET_CLASSTYPE_MARKED_N): Likewise.
11891         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
11892         (CLASS_TYPE_MARKED_*): Use them.
11893         (SET_CLASSTYPE_MARKED_*): Likewise.
11894         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
11895         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11896         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
11897         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
11898         * class.c (class_cache_obstack): New variable.
11899         (class_cache_firstobj): Likewise.
11900         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
11901         (pushclass): Free the cache, when appropriate.
11902         (popclass): Tidy.
11903         (maybe_push_cache_obstack): Use class_cache_obstack.
11904         * decl.c (include hash.h).
11905         (typename_hash): New function.
11906         (typename_compare): Likewise.
11907         (build_typename_type): Check the hash table to avoid creating
11908         duplicates.
11909         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
11910         (grokdeclarator): Use CLASS_TYPE_P.
11911         (xref_basetypes): Likewise.
11912         (start_function): Likewise.  Don't put current_class_ref on the
11913         permanent obstack.
11914         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
11915         and TYPE_TI_ARGS.
11916         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
11917         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
11918         fields for types other than class types.  Do clear TYPE_ALIAS_SET
11919         for types other than class types, though.
11920         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
11921         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11922         * pt.c (process_template_parm): Don't set
11923         CLASSTYPE_GOT_SEMICOLON.
11924         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11925         Coerce arguments on the momentary obstack.
11926         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11927         (instantiate_class_template): Calculate template arguments on the
11928         momentary obstack.  Tidy.
11929         (tsubst_template_arg_vector): Use make_temp_vec.
11930         (tsubst_aggr_type): Put template arguments on the momentary
11931         obstack.
11932         (tsubst_decl): Likewise.
11933         (tsubst): Copy the array bounds index to the permanent obstack
11934         before building index types.  Use new macros.
11935         (unify): Use new macros.
11936         (do_type_instantiation): Likewise.
11937         * search.c (lookup_fnfields_1): Use new macros.
11938         (dfs_pushdecls): Build envelopes on the cache obstack.
11939         (dfs_compress_decls): Use new macros.
11940         (push_class_decls): Build on the cache obstack.
11941         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
11942         * sign.c (build_signature_pointer_or_reference_type): Use
11943         SET_IS_AGGR_TYPE.
11944         * tree.c (make_binfo): Check CLASS_TYPE_P.
11945         (copy_template_template_parm): Adjust.
11946         (make_temp_vec): Use push_expression_obstack.
11947         * typeck.c (complete_type): Use new macros.
11948         (comptypes): Likewise.
11949
11950 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
11951
11952         * pt.c (tsubst): Add diagnostics for invalid array, reference
11953         and pointer to member types.
11954
11955 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
11956
11957         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
11958
11959         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
11960         Simplify.
11961
11962         * parse.y (structsp): Fix cut-and-paste error.
11963
11964         * init.c (build_new): Complain about non-integral size.
11965
11966         * parse.y (unary_expr): Complain about defining types in sizeof.
11967
11968         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
11969
11970         * rtti.c (build_x_typeid): Complain about typeid without
11971         including <typeinfo>.
11972         (get_typeid): Likewise.  Complain about typeid of incomplete type.
11973         (get_tinfo_fn_dynamic): Likewise.
11974         (get_typeid_1): Not static anymore.
11975         * except.c (build_eh_type_type): Use get_typeid_1.
11976
11977         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
11978         ambiguous or private bases.  Fix warning for reference cast.
11979
11980 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
11981
11982         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
11983         * decl.c (duplicate_decls): Remove special-case code to deal with
11984         template friends, and just do the obvious thing.
11985         * pt.c (register_specialization): Tweak for clarity, and also to
11986         clear DECL_INITIAL for an instantiation before it is merged with a
11987         specialization.
11988         (check_explicit_specialization): Fix indentation.
11989         (tsubst_friend_function): Handle both definitions in friend
11990         declaration and outside friend declarations.
11991         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
11992         (regenerate_decl_from_template): Tweak accordingly.
11993         (instantiate_decl): Likewise.
11994
11995 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
11996
11997         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
11998         member function reference to error.
11999         * cvt.c (ocp_convert): Complain about converting an overloaded
12000         function to void.
12001
12002         * init.c (build_offset_ref): Just return a lone static member
12003         function.
12004
12005         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
12006         not internal ones.
12007
12008         * typeck.c (build_binary_op_nodefault): Improve error handling.
12009
12010         * decl.c (grokfndecl): Complain about making 'main' a template.
12011
12012         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
12013
12014         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
12015         TYPE_DECL in a template.
12016
12017 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
12018
12019         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
12020
12021         * decl.c (struct cp_function): Add named_label_uses.
12022         (push_cp_function_context): Save it.
12023         (pop_cp_function_context): Restore it.
12024         (define_label): Also complain about jumping into the scope of
12025         non-POD objects that don't have constructors.
12026         * tree.c (pod_type_p): New fn.
12027
12028         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
12029         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
12030         (get_tinfo_fn): Not here.
12031         * repo.c (repo_get_id): Abort if we get called for an incomplete
12032         type.
12033
12034 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
12035
12036         * except.c (expand_throw): Make sure first argument to
12037         __cp_push_exception is of type `void*' to avoid spurious error
12038         messages.
12039
12040 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
12041
12042         * pt.c (try_one_overload): Take orig_targs again.  Only check for
12043         mismatches against them; we don't care what a previous call found.
12044         (resolve_overloaded_unification): Adjust.
12045
12046         * search.c (lookup_field): Don't return anything for a non-type
12047         field from a dependent type.
12048         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
12049         in an array declarator.
12050         (start_decl): Push into the class before looking for the field.
12051
12052 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
12053
12054         * method.c (build_overload_value): Handle REFERENCE_TYPE.
12055
12056 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12057
12058         * decl.c (grokdeclarator): Allow namespace-scoped members if they
12059         are friends.
12060
12061 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
12062
12063         * pt.c (tsubst_decl): Don't mess with the global value of an
12064         un-mangled DECL_ASSEMBLER_NAME.
12065
12066 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
12067
12068         * decl.c (init_decl_processing): Remove CYGWIN conditional
12069         since CYGWIN is now able to deal with trapping signals.
12070
12071 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12072
12073         * cp-tree.h: Don't include gansidecl.h.
12074         * exception.cc: Include gansidecl.h (since we don't include config.h)
12075         * g++spec.c: Don't include gansidecl.h.
12076
12077 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
12078
12079         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
12080         size of dummy.
12081         (DECL_DEFINED_IN_CLASS_P): New macro.
12082         (TEMPLATE_PARMS_FOR_INLINE): Document.
12083         (check_static_variable_definition): New function.
12084         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
12085         appropriate.
12086         (check_static_variable_definition): Split out from ...
12087         (grokdeclarator): Here.
12088         * pt.c (check_default_tmpl_args): New function, split out from ...
12089         (push_template_decl_real): Here.
12090         (instantiate_template): Fix comment.
12091
12092 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
12093
12094         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
12095         (CP_TYPE_VOLATILE_P): Likewise.
12096         (CP_TYPE_RESTRICT_P): Likewise.
12097
12098 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
12099
12100         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
12101
12102 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
12103
12104         * class.c (instantiate_type): Be more helpful.
12105
12106         * decl2.c (import_export_decl): Call import_export_class.
12107
12108         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
12109         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
12110         * pt.c (tsubst_copy): Likewise.
12111
12112 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
12113
12114         * init.c (expand_vec_init): Fix off-by-one error.
12115
12116 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
12117
12118         * parse.y (apparent_template_type): New type.
12119         (named_complex_class_head_sans_basetype): Use it.
12120         * Makefile.in (CONFLICTS): One new conflict.
12121         * parse.c: Regenerated.
12122
12123 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
12124
12125         * cp-tree.h (COMPARE_STRICT): New macro.
12126         (COMPARE_BASE): Likewise.
12127         (COMPARE_RELAXED): Likewise.
12128         (COMPARE_REDECLARATION): Likewise.
12129         (same_type_p): Likewise.
12130         (same_or_base_type_p): Likewise.
12131         * call.c (standard_conversion): Use them, in place of comptypes
12132         with numeric arguments.
12133         (reference_binding): Likewise.
12134         (convert_like): Likewise.
12135         (build_over_call): Likewise.
12136         (is_subseq): Likewise.
12137         (is_properly_derived_from): Likewise.
12138         (compare_ics): Likewise.
12139         (joust): Likewise.
12140         * class.c (delete_duplicate_fields_1): Likewise.
12141         (resolves_to_fixed_type_p): Likewise.
12142         (instantiate_type): Likewise.  Remove #if 0'd code.
12143         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
12144         (pushdecl): Likewise.
12145         (lookup_name_real): Likewise.
12146         (grokdeclarator): Likewise.  Check for illegal array declarations.
12147         (grokparms): Likewise.
12148         (grok_op_properties): Likewise.
12149         * decl2.c (check_classfn): Likewise.
12150         * friend.c (is_friend): Likewise.
12151         (make_friend_class): Likewise.
12152         * init.c (expand_aggr_init): Likewise.
12153         (expand_vec_init): Likewise.
12154         * pt.c (is_member_template_class): Remove declaration.
12155         (is_specialization_of): Use COMPARE_* and new macros.
12156         (comp_template_parms): Likewise.
12157         (convert_nontype_argument): Likewise.
12158         (coerce_template_template_parms): Likewise.
12159         (template_args_equal): Likewise.
12160         (lookup_template_class): Likewise.
12161         (type_unification_real): Likewise.
12162         (unify): Likewise.
12163         (get_bindings_real): Likewise.
12164         * search.c (covariant_return_p): Likewise.
12165         (get_matching_virtual): Likewise.
12166         * sig.c (match_method_types): Likewise.
12167         * tree.c (vec_binfo_member): Likewise.
12168         (cp_tree_equal): Likewise.
12169         * typeck.c (common_type): Likewise.
12170         (comp_array_types): Likewise.  Get issues involving unknown array
12171         bounds right.
12172         (comptypes): Update comments.  Use new flags.
12173         (comp_target_types): Use new macros.
12174         (compparms): Likewise.
12175         (comp_target_parms): Likewise.
12176         (string_conv_p): Likewise.
12177         (build_component_ref): Likewise.
12178         (build_indirect_ref): Likewise.
12179         (build_conditional_expr): Likewise.
12180         (build_static_cast): Likewise.
12181         (build_reinterpret_cast): Likewise.
12182         (build_const_cast): Likewise.
12183         (build_modify_expr): Likewise.
12184         (convert_for_assignment): Likewise.
12185         (comp_ptr_ttypes_real): Likewise.
12186         (ptr_reasonably_similar): Likewise.
12187         (comp_ptr_ttypes_const): Likewise.
12188
12189 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
12190
12191         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
12192
12193 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
12194
12195         * decl2.c (delete_sanity): Pass integer_zero_node, not
12196         integer_two_node, to build_vec_delete.
12197         * init.c (build_array_eh_cleanup): Remove.
12198         (expand_vec_init_try_block): New function.
12199         (expand_vec_init_catch_clause): Likewise.
12200         (build_vec_delete_1): Don't deal with case that auto_delete_vec
12201         might be integer_two_node anymore.
12202         (expand_vec_init): Rework for initialization-correctness and
12203         exception-correctness.
12204         * typeck2.c (process_init_constructor): Make mutual exclusivity
12205         of cases more obvious.
12206
12207 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
12208
12209         * decl.c (lookup_name_real): OK, only warn if not lexing.
12210         Simplify suggested fix.
12211
12212         * cp-tree.h (IDENTIFIER_MARKED): New macro.
12213         * search.c (lookup_conversions): Use breadth_first_search.
12214         (add_conversions): Avoid adding two conversions to the same type.
12215         (breadth_first_search): Work with base binfos, rather
12216         than binfos and base indices.
12217         (get_virtual_destructor): Adjust.
12218         (tree_has_any_destructor_p): Adjust.
12219         (get_matching_virtual): Adjust.
12220
12221         * pt.c (push_template_decl_real): Generalize check for incorrect
12222         number of template parms.
12223         (is_member_template_class): #if 0.
12224
12225 1998-10-29  Richard Henderson  <rth@cygnus.com>
12226
12227         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
12228         last.
12229
12230 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
12231
12232         * lex.c: Call check_newline from lang_init always.  After
12233         calling cpp_start_read, set yy_cur and yy_lim to read from the
12234         cpplib token buffer.
12235
12236 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
12237
12238         * class.c (instantiate_type): Don't consider templates for a normal
12239         match.
12240
12241         * class.c (finish_struct_1): Don't complain about non-copy
12242         assignment ops in union members.
12243
12244         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
12245         (prepare_fresh_vtable): Likewise.
12246         (finish_struct_1): Don't call import_export_class.
12247         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
12248         (finish_prevtable_vardecl): Lose.
12249         (finish_file): Don't call it.
12250         * pt.c (instantiate_class_template): Likewise.
12251         * cp-tree.h: Remove it.
12252
12253         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
12254         * decl.c (finish_function): Not here.
12255         (start_function): Do set DECL_INITIAL.
12256
12257         * pt.c (push_template_decl_real): Complain about default template
12258         args for enclosing classes.
12259
12260         * call.c (add_function_candidate): Treat conversion functions
12261         as coming from the argument's class.
12262         * cp-tree.h (DECL_CONV_FN_P): New fn.
12263         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
12264         * class.c (add_method): Use DECL_CONV_FN_P.
12265         * decl2.c (check_classfn): Likewise.
12266         * error.c (dump_function_name): Likewise.
12267         (dump_function_decl): Likewise.
12268         * pt.c (fn_type_unification): Likewise.
12269         * search.c (add_conversions): Likewise.
12270
12271 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
12272
12273         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
12274         * method.c (hack_identifier): Also check for using RESULT_DECL
12275         from outer context.
12276
12277 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
12278
12279         * decl.c (grokdeclarator): Use type_quals, rather than constp,
12280         consistently.
12281
12282 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
12283
12284         * call.c (standard_conversion): instantiate_type here.
12285         (reference_binding): And here.
12286         (implicit_conversion): Not here.
12287         (build_op_delete_call): No need to cons up an OVERLOAD.
12288         * cvt.c (cp_convert_to_pointer): instantiate_type here.
12289         (convert_to_reference): And here.
12290         * decl.c (grok_reference_init): Not here.
12291         (grokparms): Or here.
12292         * typeck2.c (digest_init): Or here.
12293         * typeck.c (decay_conversion): Take the address of overloaded
12294         functions, too.
12295         (require_instantiated_type): Lose.
12296         (convert_arguments): Don't handle unknown types here.
12297         (build_c_cast): Likewise.
12298         (build_binary_op): Gut.
12299         (build_conditional_expr): Don't require_instantiated_type.
12300         (build_modify_expr): Likewise.
12301         (build_static_cast): Don't instantiate_type.
12302         (build_reinterpret_cast): Likewise.
12303         (build_const_cast): Likewise.
12304         (convert_for_initialization): Likewise.
12305         (build_ptrmemfunc): Use type_unknown_p.
12306         (convert_for_assignment): Also do default_conversion on overloaded
12307         functions.  Hand them off to ocp_convert.
12308
12309 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
12310
12311         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
12312         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
12313
12314         * class.c (finish_struct_1): Use build_cplus_array_type to build
12315         array types.
12316         * decl.c (init_decl_processing): Likewise.
12317         * except.c (expand_end_eh_spec): Likewise.
12318         * search.c (expand_upcast_fixups): Simplify very slightly.
12319
12320 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
12321
12322         * decl.c (grokdeclarator): Complain about a variable using
12323         constructor syntax coming back null from start_decl.
12324
12325         * friend.c (make_friend_class): Complain about trying to make
12326         a non-class type a friend.
12327
12328         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
12329         (start_function): Not here.
12330
12331 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
12332
12333         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
12334
12335 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
12336
12337         * typeck2.c (process_init_constructor): Only skip anonymous fields
12338         if they are bitfields.
12339
12340         * cp-tree.def (TYPEOF_TYPE): New code.
12341         * error.c (dump_type_real): Handle it.
12342         * pt.c (tsubst): Likewise.
12343         * tree.c (search_tree): Likewise.
12344         * semantics.c (finish_typeof): New fn.
12345         * parse.y (typespec): Use it.
12346         * cp-tree.h: Declare it.
12347
12348 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
12349
12350         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
12351
12352 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
12353
12354         * typeck.c (convert_arguments): Don't handle pmf references
12355         specially.
12356
12357         * init.c (build_member_call): Don't try to convert to the base type
12358         if it's ambiguous or pedantic.
12359
12360         * typeck2.c (check_for_new_type): Only depend on pedantic for
12361         C-style casts.
12362
12363 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
12364
12365         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
12366         non-converting constructors.
12367
12368 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12369
12370         * gxxint.texi: Correct documentation for n, N, Q, and B.
12371
12372 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12373
12374         * parse.y (condition): Convert VAR_DECL from reference to indirect
12375         reference.
12376
12377 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
12378
12379         * exception.cc (__cp_pop_exception): Free the original exception
12380         value, not the potentially coerced one.
12381
12382 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
12383
12384         * Makefile.in (hash.h): Run gperf when necessary.
12385
12386         * cp-tree.h (CP_TYPE_READONLY): Remove.
12387         (CP_TYPE_VOLATILE): Likewise.
12388         (CP_TYPE_QUALS): New macro.
12389         (CP_TYPE_CONST_P): Likewise.
12390         (CP_TYPE_VOLATILE_P): Likewise.
12391         (CP_TYPE_RESTRICT_P): Likewise.
12392         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
12393         (cp_build_type_variant): Rename to ...
12394         (cp_build_qualified_type): New function.
12395         (c_apply_type_quals_to_decl): Declare.
12396         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
12397         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
12398         (cp_type_qual_from_rid): New function.
12399         (compparms): Remove unused parameter.  All callers changed.
12400         (cp_type_quals): New function.
12401         (at_least_as_qualified_p): Likewise.
12402         (more_qualified_p): Likewise.
12403
12404         * call.c (standard_conversion): Replace calls to
12405         cp_build_type_variant with cp_build_qualified_type.  Use
12406         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
12407         compare them.  Use CP_TYPE_* macros to check qualifiers.
12408         (reference_binding): Likewise.
12409         (implicit_conversion): Likewise.
12410         (add_builtin_candidates): Likewise.
12411         (build_over_call): Likewise.
12412         * class.c (overrides): Compare all qualifiers, not just `const',
12413         on method declarations.
12414         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
12415         (convert_pointer_to_real): Likewise.
12416         (type_promotes_to): Likewise.
12417         * decl.c (check_for_uninitialized_const_var): New function.
12418         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
12419         (cp_finish_decl): Use check_for_uninitialized_const_var.
12420         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
12421         handle `restrict'.
12422         (grok_ctor_properties): Likewise.
12423         (grok_op_properties): Likewise.
12424         (start_function): Likewise.
12425         (rever_static_member_fn): Likewise.
12426         * decl2.c (grok_method_quals): Likewise.
12427         (grokfield): Likewise.
12428         * error.c (dump_readonly_or_volatile): Rename to ...
12429         (dump_qualifiers): New function.  Handle `restrict'.
12430         (dump_type_real): Use it.
12431         (dump_aggr_type): Likewise.
12432         (dump_type_prefix): Likewise.
12433         (dump_type_suffix): Likewise.
12434         (dump_function_decl): Likewise.
12435         (cv_as_string): Likewise.
12436         * gxx.gperf: Add __restrict and __restrict__.
12437         * gxxint.texi: Document `u' as used for `__restrict', and a few
12438         other previously undocumented codes.
12439         * hash.h: Regenerated.
12440         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
12441         (build_member_call): Likewise.
12442         (build_new_1): Likewise.
12443         * lex.c (init_parse): Add entry for RID_RESTRICT.
12444         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
12445         (cp_type_qual_from_rid): Define.
12446         * lex.h (enum rid): Add RID_RESTRICT.
12447         * method.c (process_modifiers): Deal with `restrict'.
12448         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
12449         * parse.c: Regenerated.
12450         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
12451         (tsubst_aggr_type): Likewise.
12452         (tsubst): Likewise.
12453         (check_cv_quals_for_unify): Likewise.
12454         (unify): Likewise.
12455         * rtti.c (init_rtti_processing): Likewise.
12456         (build_headof): Likewise.
12457         (get_tinfo_var): Likewise.
12458         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
12459         (expand_class_desc): Likewise.
12460         (expand_attr_desc): Likewise.
12461         (synthesize_tinfo_fn): Likewise.
12462         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
12463         (get_matching_virtual): Likewise.
12464         (expand_upcast_fixups): Likewise.
12465         * sig.c (build_signature_pointer_or_reference_name): Take
12466         type_quals, not constp and volatilep.
12467         (build_signature_pointer_or_reference_type): Likewise.
12468         (match_method_types): More CP_TYPE_QUALS conversion, etc.
12469         (build_signature_pointer_constructor): Likewise.
12470         (build_signature_method_call): Likewise.
12471         * tree.c (build_cplus_array_type): Likewise.
12472         (cp_build_type_variant): Rename to ...
12473         (cp_build_qualified_type): New function.  Deal with `__restrict'.
12474         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
12475         (build_exception_variant): Likewise.
12476         (mapcar): Likewise.
12477         * typeck.c (qualif_type): Likewise.
12478         (common_type): Likewise.
12479         (comptypes): Likewise.
12480         (comp_cv_target_types): Likewise.
12481         (at_least_as_qualified_p): Define.
12482         (more_qualified_p): Likewise.
12483         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
12484         (compparms): Likewise.
12485         (inline_conversion): Likewise.
12486         (string_conv_p): Likewise.
12487         (build_component_ref): Likewise.
12488         (build_indirect_ref): Likewise.
12489         (build_array_ref): Likewise.
12490         (build_unary_op): Likewise.
12491         (build_conditional_expr): Likewise.
12492         (build_static_cast): Likewise.
12493         (build_c_cast): Likewise.
12494         (build_modify_expr): Likewise.
12495         (convert_For_assignment): Likewise.
12496         (comp_ptr_ttypes_real): Likewise.
12497         (cp_type_quals): New function.
12498
12499 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
12500
12501         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
12502         (CP_TYPE_VOLATILE): Likewise.
12503         * decl.c (grokdeclarator): Use them.
12504         * tree.c (canonical_type_variant): Likewise.
12505
12506 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12507
12508         * parse.y (named_class_head): Push into class while parsing the
12509         base class list.
12510         * decl2.c (push_scope, pop_scope): New functions.
12511         * cp-tree.h: Declare them.
12512         * init.c (build_new_1): Delay cleanup until end of full expression.
12513
12514 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
12515
12516         * typeck.c (build_component_ref): Use of a type here is an error.
12517
12518 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
12519
12520         Revamp references to member functions.
12521         * method.c (hack_identifier): Call build_component_ref for a
12522         reference to a member function.
12523         * typeck.c (build_component_ref): Only return a single function
12524         if it's static.  Otherwise, return a COMPONENT_REF.
12525         (build_x_function_call): Handle a COMPONENT_REF.
12526         (build_unary_op): Handle all unknown-type things.
12527         * decl2.c (arg_assoc): Handle COMPONENT_REF.
12528         * class.c (instantiate_type): Complain if the function we get is a
12529         nonstatic member function.  Remove code for finding "compatible"
12530         functions.
12531         * pt.c (tsubst_copy): Handle NOP_EXPR.
12532         * tree.c (build_dummy_object): New fn.
12533         (maybe_dummy_object): New fn.
12534         (is_dummy_object): New fn.
12535         * cp-tree.h: Declare them.
12536         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
12537         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
12538         * init.c (build_member_call): Use maybe_dummy_object and
12539         is_dummy_object.
12540         (build_offset_ref): Use maybe_dummy_object.
12541         (resolve_offset_ref): Use is_dummy_object.
12542         * typeck.c (build_x_function_call): Call build_dummy_object.
12543         (unary_complex_lvalue): Call is_dummy_object.
12544
12545         * typeck.c (build_component_addr): Make sure field is a field.
12546
12547         * call.c (build_new_op): Delete obsolete code.
12548
12549         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
12550
12551 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12552
12553         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
12554         std if std is ignored.
12555
12556 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
12557
12558         * decl.c (grokvardecl): Fix thinko.
12559
12560         * decl.c (grokdeclarator): Embedded attrs bind to the right,
12561         not the left.
12562
12563         * parse.y (fn.def2): Fix 'attrs' format.
12564
12565 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
12566
12567         * Makefile.in (CONFLICTS): Update.
12568         * parse.y (expr_or_declarator_intern): New rule.
12569         (expr_or_declarator, direct_notype_declarator, primary,
12570         functional_cast): Use it.
12571         (notype_declarator_intern): New rule.
12572         (notype_declarator, complex_notype_declarator): Use it.
12573
12574 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
12575
12576         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
12577         (grokvardecl): Likewise.
12578
12579 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12580
12581         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
12582         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
12583
12584         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
12585
12586         * pt.c (process_partial_specialization): Cast 1st argument of
12587         `bzero' to (PTR).
12588
12589         * tree.c (build_base_fields): Cast `base_align' to (int) when
12590         comparing against one.
12591
12592 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
12593
12594         * decl.c (lookup_name_real): Handle template parameters for member
12595         templates where said parameters have the same name as the
12596         surrounding class.
12597
12598         * decl.c (expand_static_init): Build cleanups before entering the
12599         anonymous function used to do them to avoid access-checking
12600         confusion.
12601
12602         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
12603         accidentally removed by previous change, and make DECL_RTL here.
12604         * class.c (add_method): Don't make DECL_RTL here.
12605
12606         * pt.c (for_each_template_parm): Don't examine uninstantiated
12607         default arguments.
12608
12609 1998-10-16  Dave Brolley  <brolley@cygnus.com>
12610
12611         * lex.c (real_yylex): Fix unaligned access of wchar_t.
12612
12613 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
12614
12615         * class.c (add_method): Fix documentation to reflect previous
12616         changes.  Check for duplicate method declarations here.
12617         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
12618         correctly; such things never match.
12619         (grokfndecl): Don't look for duplicate methods here.
12620         * decl2.c (check_classfn): Don't assume names are mangled.
12621         Don't add bogus member function declarations to a class before the
12622         class type is complete.
12623         (grokfield): Reformat error message.
12624         * method.c (set_mangled_name_for_decl): Don't mangle names while
12625         processing_template_decl.
12626
12627 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
12628
12629         * typeck.c (build_indirect_ref): Complain about a pointer to data
12630         member, too.
12631         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
12632         data member.
12633         * init.c (resolve_offset_ref): Don't undo the above.
12634
12635         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
12636         (struct lang_decl_flags): Add `bitfield'.
12637         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
12638         DECL_BIT_FIELD.
12639         * decl2.c (grokbitfield, grok_alignof): Likewise.
12640         * init.c (build_offset_ref): Likewise.
12641         * typeck.c (build_component_addr, expr_sizeof): Likewise.
12642         * cvt.c (build_up_reference): Don't crash if taking the address
12643         returns error_mark_node.
12644
12645         * decl.c (grokfndecl): Also check ctype when checking for ::main().
12646
12647 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
12648
12649         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
12650         Do mangling here.
12651         (grokdeclarator): Instead of here.
12652         * friend.c (do_friend): Lose special handling of ::main and
12653         __builtin_*.
12654         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
12655
12656         * spew.c (yylex): Clear looking_for_typename if we got
12657         'enum { ... };'.
12658
12659 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
12660
12661         * class.c (maybe_warn_about_overly_private_class): Improve error
12662         messages for class with only private constructors.
12663
12664         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
12665         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
12666         (build_typename_type): New function.
12667         * decl.c (build_typename_type): Broken out from ...
12668         (make_typename_type): Use it.
12669         * search.c (lookup_field): Likewise.
12670
12671 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12672
12673         * pt.c (convert_nontype_argument): Check against type_referred_to.
12674         * decl.c (grokvardecl): Check for declarator name before building
12675         DECL_ASSEMBLER_NAME.
12676
12677 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
12678
12679         * pt.c (lookup_template_class): Add comment.
12680         (instantiate_class_template): Don't mark the _TYPE node for
12681         member class templates as an instantiation.
12682
12683 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
12684
12685         * decl.c (grokfndecl): Fix my thinko.
12686
12687 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
12688
12689         * tinfo2.cc (fast_compare): Remove.
12690         (before): Just use strcmp.
12691         * tinfo.cc (operator==): Just use strcmp.
12692
12693 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
12694
12695         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
12696         declarations.
12697
12698 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
12699
12700         * cp-tree.h (specializations_of_same_template_p): Remove.
12701         * search.c (get_template_base): Don't use it.
12702         (get_template_base_recursive): Likewise.
12703         * pt.c (specializations_of_same_template_p): Remove.
12704         (unify): Don't use it.
12705         (lookup_template_class): Find the correct parent when setting
12706         CLASSTYPE_TI_TEMPLATE.
12707
12708 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
12709
12710         * tinfo.cc (operator==): Always compare names.
12711
12712 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
12713
12714         * decl.c (start_function): Fix cut-and-paste error.
12715
12716 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
12717
12718         * inc/typeinfo: Add #pragma interface.
12719         (operator!=): Just call operator==.
12720         * tinfo.cc: Add #pragma implementation.
12721         (operator==): Move from inc/typeinfo and tinfo2.cc.
12722         Check __COMMON_UNRELIABLE instead of _WIN32.
12723
12724         * typeck2.c (my_friendly_abort): Add URL.
12725
12726 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
12727
12728         * decl.c (start_method): Added extra parameter for attributes.
12729         * cp-tree.h (start_method): Update prototype.
12730         * parse.y (fn.def2): Update start_method parameter list.
12731
12732 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
12733
12734         * cp-tree.h (specializations_of_same_template_p): Declare.
12735         * pt.c (specializations_of_same_template_p): New function.
12736         (unify): Use it.
12737         * search.c (get_template_base): Use it.
12738         (get_template_base_recursive): Likewise.
12739
12740 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
12741
12742         * decl2.c (start_objects): Add new variable `joiner' and
12743         initialize it properly.
12744
12745 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
12746
12747         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
12748         change to vtable types.
12749
12750         * cvt.c (ocp_convert): Avoid infinite recursion caused by
12751         1998-10-03 change.
12752
12753 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
12754
12755         * pt.c (resolve_overloaded_unification): New fn.
12756         (try_one_overload): Likewise.
12757         (unify): Don't fail on unknown type.
12758         (type_unification_real): Likewise.  Use resolve_overloaded_unification
12759         to handle an overloaded argument.
12760         (template_args_equal): Split out...
12761         (comp_template_args): From here.
12762         (determine_specialization): Also allow a template with more
12763         parms than were explicitly specified.
12764         * cp-tree.h: Add template_args_equal.
12765         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
12766
12767 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
12768
12769         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
12770         change.
12771
12772 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
12773
12774         * typeck.c (unsigned_type): Only return TItype nodes when
12775         HOST_BITS_PER_WIDE_INT is >= 64 bits.
12776         (signed_type): Likewise.
12777         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
12778         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12779         (init_decl_processing): Only create TItype nodes when
12780         HOST_BITS_PER_WIDE_INT is >= 64 bits.
12781         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
12782         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12783
12784 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12785
12786         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
12787         (gxx.gperf): Update comments describing invocation flags.
12788         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12789
12790 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
12791
12792         * class.c (finish_struct_1): Add commentary on previous change.
12793
12794         * cp-tree.h (vtbl_ptr_type_node): New variable.
12795         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
12796         already of the right type.
12797         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
12798         Simplify code to grow vtable.
12799         * decl.c (vtbl_ptr_type_node): Define.
12800         (init_decl_processing): Initialize it.
12801
12802 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
12803
12804         * cp-tree.def (PTRMEM_CST): New tree node.
12805         * cp-tree.h (ptrmem_cst): New type.
12806         (lang_type): Remove local_typedecls.
12807         (dummy): Increase to 12 bits from 11.
12808         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
12809         (PTRMEM_CST_CLASS): New macro.
12810         (PTRMEM_CST_MEMBER): Likewise.
12811         (current_access_specifier): New variable.
12812         (current_class_type): Remove duplicate declaration.
12813         (finish_struct): Change prototype.
12814         (unreverse_member_declarations): New function.
12815         (pushdecl_class_level): Change prototype.
12816         (grok_enum_decls): Remove.
12817         (fixup_anonymous_union): New function.
12818         (grok_x_components): Change prototype.
12819         (tsubst_chain): Remove.
12820         (finish_member_template_decl): Likewise.
12821         (check_explicit_specialization): Fix indentation.
12822         (finish_class_definition): Change prototype.
12823         (finish_member_class_template): Likewise.
12824         (finish_member_declaration): New function.
12825         (check_multiple_declarators): Likewise.
12826         * class.c (class_stack_node_t): New type.
12827         (current_class_base): Remove.
12828         (current_class_stack): Change type.
12829         (current_access_specifier): New variable.
12830         (grow_method): Remove.
12831         (check_member_decl_is_same_in_complete_scope): Break out from
12832         finish_struct.
12833         (make_method_vec): New function.
12834         (free_method_vec): Likewise.
12835         (add_implicitly_declared_members): Break out from finish_struct_1.
12836         (free_method_vecs): New variable.
12837         (add_method): Rework for direct use from parser.
12838         (handle_using_decl): Watch for NULL_TREE while iterating through
12839         CLASSTYPE_METHOD_VEC.
12840         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
12841         just do some error-checking.
12842         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
12843         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
12844         (finish_struct): Change prototype.  Simplify; fields and methods
12845         are already set up at this point.
12846         (init_class_processing): Set up current_class_stack.
12847         (pushclass): Save current_access_specifier.
12848         (popclass): Restore it.
12849         (currently_open_class): Simplify.
12850         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
12851         * decl.c (saved_scope): Add access_specifier.
12852         (maybe_push_to_top_level): Save it.
12853         (pop_from_top_level): Restore it.
12854         (maybe_process_template_type_declaration): Use
12855         finish_member_declaration.
12856         (pushtag): Likewise.
12857         (pushdecl_class_level): Don't return a value.
12858         (fixup_anonymous_union): Break out from grok_x_components.
12859         (shadow_tag): Use it.
12860         (xref_tag): Complain about using an elaborated type specifier to
12861         reference a template type parameter or typedef name.
12862         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12863         (current_local_enum): Remove.
12864         (build_enumerator): Call finish_member_declaration.
12865         (grok_enum_decls): Remove.
12866         * decl2.c (grok_x_components): Simplify.
12867         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
12868         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12869         (merge_functions): Add to comment.
12870         (arg_assoc_type): Prototype.
12871         (arg_assoc): Pass as many arguments as there are parameters.
12872         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
12873         OFFSET_REF.
12874         * expr.c (cpls_expand_expr): Remove dead code.  Handle
12875         PTRMEM_CST.
12876         * friend.c (do_friend): Lookup friends when in nested classes.
12877         Change comments.
12878         * init.c (build_offset_ref): Do lookup even for classes that are
12879         only partially defined.
12880         (decl_constant_value): Remove dead code.
12881         * method.c (build_overload_value): Remove hack where by TYPE was
12882         not a TYPE.  Handle PTRMEM_CST.
12883         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
12884         should go.
12885         * parse.y (components, notype_components, component_decl,
12886         component_decl_1, component_declarator, component_declarator0):
12887         Now all are itype rather than ttype.  Rework to add members to
12888         classes on the fly.
12889         (typesqpecqual_reserved): Use check_multiple_declarators.
12890         (structsp): Update class to finish_class_definition.
12891         (do_xref_defn): Unsplit into named_class_head.
12892         (access_specifier): Set current_access_specifier.
12893         * pt.c (set_current_access_from_decl): New function.
12894         (finish_member_template_decl): Don't take the parameters.
12895         (comp_template_args): Make more robust.
12896         (lookup_template_class): Don't use current_local_enum.
12897         (for_each_template_parm): Handle PTRMEM_CST.
12898         (instantiate_class_template): Use set_current_access_from_decl,
12899         finish_member_declaration and unreverse_member_declarations.  Set
12900         lineno/input_filename before generating implicit member functions.
12901         (type_unification_real): Don't assume back-unification happens
12902         only for the last argument.
12903         (regenerate_decl_from_template): Call pushclass a bit earlier.
12904         (tsubst_chain): Remove.
12905         (tsubst_enum): Use set_current_access_from_decl.
12906         (set_mangled_name_for_template_decl): Fix indentation.
12907         * search.c (lookup_fnfields_1): Change iteration through
12908         CLASSTYPE_METHOD_VEC.
12909         (dfs_pushdecls): Likewise.
12910         (dfs_compress_decls): Likewise.
12911         (add_conversions): Likewise.
12912         * semantics.c (finish_class_definition): Don't take components.
12913         Change call to finish_struct.
12914         (finish_member_declaration): New function.
12915         (finish_member_class_template): Don't take template parameters.
12916         Change call to grok_x_components.  Call finish_member_template_decl.
12917         (check_multiple_declarators): New function.
12918         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
12919         a passed in fieldlist.
12920         * tree.c (search_tree): Handle PTRMEM_CST.
12921         (mapcar): Likewise.
12922         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
12923         INTEGER_CSTs, for pointer-to-data members.
12924
12925         * call.c (resolve_args): Resolve template specializations, if
12926         possible.
12927
12928 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12929
12930         * Makefile.in (spew.o): Depend on toplev.h.
12931
12932         * call.c (compare_ics): Initialize variables `deref_from_type2',
12933         `deref_to_type1' and `deref_to_type2'.
12934
12935         * except.c (get_eh_type): Hide prototype and definition.
12936         (process_start_catch_block_old): Remove unused static prototype.
12937
12938         * pt.c (tsubst_decl): Initialize variable `argvec'.
12939
12940         * spew.c: Include toplev.h.
12941
12942 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
12943
12944         * pt.c (instantiate_decl): Do save and restore file position.
12945
12946 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12947
12948         * method.c (build_decl_overload_real): Clear
12949         numeric_output_need_bar after __.
12950
12951 1998-10-05  Nathan Sidwell  <nathan@acm.org>
12952
12953         * call.c (build_new_method_call): Issue 'incomplete type' error,
12954         if class is not defined.
12955
12956 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12957
12958         * call.c (build_object_call): Move declaration of variable
12959         `fn' into the scope where it is used.  Don't access variable
12960         `fn' when it is uninitialized, instead use `fns'.
12961
12962 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12963
12964         * errfn.c (cp_thing): Print buf as a string not as a printf format
12965         to avoid problems with the operator%.  Consequently, `%%' sequences
12966         in format are copied as `%' in buf.
12967
12968 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
12969
12970         * pt.c (pop_tinst_level): Call extract_interface_info.
12971         (instantiate_decl): Don't save and restore file position.
12972
12973         * decl.c (cp_finish_decl): Make statics in extern inlines and
12974         templates common, if possible and the target doesn't support weak
12975         symbols.
12976
12977         * decl.c (grokdeclarator): Remove redundant calls to
12978         build_type_variant and some duplicated code.
12979         * sig.c (build_signature_reference_type): Only take the type parm.
12980         (build_signature_pointer_type): Likewise.
12981         * tree.c (build_cplus_method_type): Adjust.
12982         * cp-tree.h: Update.
12983
12984 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
12985
12986         * call.c (build_over_call): Make pedwarns about dropped qualifiers
12987         into full-fledged errors.
12988         * cvt.c (convert_to_reference): Likewise.
12989         * typeck.c (convert_for_assignment): Likewise.
12990
12991         * search.c (expand_upcast_vtables): In addition to unsetting
12992         TREE_READONLY, remove top-level const type qualifier.
12993
12994 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
12995
12996         * class.c (current_class_ptr, current_class_ref): Clarify
12997         documentation.
12998         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
12999         NOP type conversions.
13000         * decl.c (decls_match): Use comptypes directly; ignore
13001         qualifiers on the DECL.
13002         (duplicate_decls): Remove qualifier checks on DECL.
13003         (grokdeclarator): Make the type built up include top-level
13004         qualifiers.
13005         * decl2.c (do_dtors): Fix spelling error.
13006         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
13007         when printing type information.
13008         * init.c (build_new_1): Add documentation.  Deal with the fact
13009         that type of allocated memory now contains qualifiers.
13010         * lex.c (is_global): Improve error-recovery.
13011         * sig.c (build_member_function_pointer): Don't cast away const
13012         on fields of sigtable_entry_type.
13013         * tree.c (lvalue_type): Don't look at top-level qualifiers on
13014         expressions.
13015         * typeck.c (decay_conversion): Likewise.
13016         (build_component_ref): Make sure the type of the COMPONENT_REF
13017         contains top-level qualifiers, as appropriate.  Improve
13018         error-handling.
13019         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
13020         (build_array_ref): Likewise.
13021         (build_unary_op): Improve error-recovery.
13022         (unary_complex_lvalue): Make taking the address a bound member
13023         function an error, not a sorry.
13024         (build_conditional_expr): Look at the type qualifiers, not the
13025         qualifiers on the expression itself.
13026
13027 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
13028
13029         * decl2.c (merge_functions): Remove duplicates.
13030
13031         * decl2.c: Add -f{no-,}implicit-inline-templates.
13032         (import_export_decl): Check it.
13033
13034         * decl.c (lookup_name_real): Template parms also take precedence
13035         over implicit typename.  Only warn if yylex.
13036
13037         * typeck.c (build_conditional_expr): Only fold if ifexp is an
13038         INTEGER_CST.
13039
13040         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
13041         instead of linkage.
13042
13043 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
13044
13045         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
13046         * class.c (build_vbase_pointer): Use it.
13047         * rtti.c (expand_class_desc): Likewise.
13048         * tree.c (build_vbase_pointer_fields): Likewise.
13049
13050 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
13051
13052         * decl.c (start_decl): Add invocation of
13053         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
13054         (start_function): Add invocation of
13055         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
13056
13057         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
13058         HANDLE_GENERIC_PRAGMAS.
13059
13060 1998-09-28  Anthony Green  <green@cygnus.com>
13061
13062         * semantics.c (finish_asm_stmt): Always permit volatile asms.
13063
13064 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
13065
13066         * decl.c (grokdeclarator): Tighten checks for invalid
13067         destructors.  Improve error-messages and error-recovery.
13068         * decl2.c (check_classfn): Don't assume that mangled destructor
13069         names contain type information.
13070
13071 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
13072
13073         * search.c (get_base_distance): Remove assert.
13074
13075         * decl2.c (build_anon_union_vars): Don't process a field with no
13076         name.
13077         (finish_anon_union): Also complain about local anon unions with no
13078         members.
13079
13080 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13081
13082         * decl.c (lookup_namespace_name): If the name is a namespace,
13083         return it immediately.
13084
13085 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13086
13087         * cp-tree.h (define_case_label): Remove unused parameter.
13088         (check_java_method): Likewise.
13089         (grokclassfn): Likewise.
13090         (expand_aggr_init): Likewise.
13091         (build_x_delete): Likewise.
13092         (maybe_end_member_template_processing): Likewise.
13093         (unshare_base_binfos): Add prototype.
13094         (string_conv_p): Likewise.
13095         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
13096
13097         * cvt.c (build_up_reference): Remove unused parameter
13098         `checkconst', all callers changed.
13099         (build_type_conversion): Mark parameter `code' with
13100         ATTRIBUTE_UNUSED.
13101         (build_expr_type_conversion): Initialize variable `conv'.
13102
13103         * decl.c (push_namespace): Initialize variable `d'.
13104         (define_case_label): Remove unused parameter `decl', all callers
13105         changed.
13106
13107         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
13108         `argc' with ATTRIBUTE_UNUSED.
13109         (grokclassfn): Remove unused parameter `cname', all callers
13110         changed.
13111         (check_java_method): Likewise for parameter `ctype'.
13112         (copy_assignment_arg_p): Mark parameter `virtualp' with
13113         ATTRIBUTE_UNUSED.
13114         (finish_prevtable_vardecl): Likewise for parameter `prev'.
13115
13116         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
13117
13118         * init.c (expand_aggr_init_1): Remove unused parameter
13119         `alias_this', all callers changed.
13120         (expand_aggr_init): Likewise.
13121         (expand_default_init): Likewise.
13122         (build_new_1): Initialize variable `susp'.
13123         (build_x_delete): Remove unused parameter `type', all callers
13124         changed.
13125
13126         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
13127         ATTRIBUTE_UNUSED.
13128         (readescape): Use (unsigned) value in shift.
13129         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
13130         comparing to a signed quantity.
13131
13132         * pt.c (maybe_end_member_template_processing): Remove unused
13133         parameter `decl', all callers changed.
13134         (check_explicit_specialization): Add braces around empty body in
13135         an else-statement.
13136         (current_template_args): Initialize variable `args'.
13137         (lookup_template_class): Likewise for variable `prev_local_enum'.
13138         (tsubst_decl): Likewise for variable `r'.
13139         (set_mangled_name_for_template_decl): Initialize variable
13140         `context'.
13141
13142         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
13143         Likewise for variable `i'.
13144         (yylex): Initialize variable `trrr'.
13145
13146         * typeck.c (compparms): Mark variable `strict' with
13147         ATTRIBUTE_UNUSED.
13148
13149         * xref.c (simplify_type): Cast argument of ctype function to
13150         `unsigned char'.
13151
13152 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
13153
13154         * cp-tree.h (language_lvalue_valid): Remove.
13155         * decl.c (grokdeclarator): Don't disallow references to functions.
13156         * tree.c (lvalue_p_1): New function, combining duplicated
13157         code from ...
13158         (lvalue_p): Use it.
13159         (real_lvalue_p): Likewise.
13160         * typeck.c (language_lvalue_valid): Remove.
13161         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
13162         they don't have TREE_READONLY set.
13163         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
13164
13165 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13166
13167         * spew.c (yylex): Give diagnostic.
13168         * hash.h (is_reserved_word): Add export.
13169         * gxx.gperf: Likewise.
13170         * lex.h (rid): Add RID_EXPORT.
13171         * lex.c (init_parse): Likewise.
13172
13173 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
13174
13175         * friend.c (do_friend): Make warning a full sentence.
13176
13177 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
13178
13179         * parse.y (component_decl_list): Improve error-recovery.
13180
13181 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13182
13183         * decl.c (make_typename_type): Move error to point where name
13184         variable can be used by dump_type.
13185
13186 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
13187
13188         * decl.c (grokfndecl): Improve error-recovery.
13189         * decl2.c (grokfield): Likewise.
13190         * pt.c (finish_member_template_decl): Likewise.
13191
13192 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13193
13194         * method.c (hack_identifier): Finding multiple members is always
13195         an error.
13196
13197 1998-09-21  Per Bothner  <bothner@cygnus.com>
13198
13199         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
13200
13201 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
13202
13203         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
13204
13205 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
13206
13207         * class.c (maybe_warn_about_overly_private_class): Reformat.
13208
13209 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
13210
13211         * exception.cc (__cplus_type_matcher): Realign some code.
13212
13213 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
13214
13215         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
13216         (tinfo2.o): Likewise.
13217         (exception.o): Likewise.
13218         (new.o): Likewise.
13219         (opnew.o): Likewise.
13220         (opnewnt.o): Likewise.
13221         (opvnew.o): Likewise.
13222         (opvnewnt.o): Likewise.
13223         (opdel.o): Likewise.
13224         (opdelnt.o): Likewise.
13225         (opvdel.o): Likewise.
13226         (opvdelnt.o): Likewise.
13227
13228 1998-09-16  Richard Henderson  <rth@cygnus.com>
13229
13230         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
13231
13232 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
13233
13234         * call.c (build_field_call): Handle static data members too.
13235
13236         * typeck.c (comptypes): When comparing pointer types, check
13237         whether referred types match even in strictest modes.
13238
13239 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
13240
13241         * cp-tree.h: Revert previous change.
13242         (finish_struct_methods): Remove declaration.
13243         * class.c: Revert previous change.
13244         (maybe_warn_about_overly_private_class): New function.
13245         (finish_struct_methods): Declare here, and make static.  Remove
13246         unnecessary parameters.  Tidy slightly.  Use
13247         maybe_warn_about_overly_private_class.
13248         (finish_struct_1): Adjust.  Remove check for private constructors,
13249         now done elsewhere.
13250         (finish_struct): Adjust.
13251
13252 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
13253
13254         * except.c (expand_start_catch_block): No need to check for new
13255         exception model.
13256         (process_start_catch_block_old): Deleted.
13257         (process_start_catch_block): Add call to start_decl_1().
13258         (expand_end_catch_block): Add call to end_catch_handler().
13259         * exception.cc (__cplus_type_matcher): Only check the exception
13260         language if there is an exception table.
13261
13262 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
13263
13264         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
13265         as used to prevent conflicts with virtual function tables.
13266
13267 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
13268
13269         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
13270         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
13271         * class.c (maybe_class_too_private_p): New function.
13272         (finish_struct_methods): Use it.
13273         (finish_struct_1): Likewise.
13274         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
13275         appropriate.
13276
13277         * pt.c (check_specialization_scope): Fix spelling error.
13278         (check_explicit_specialization): Remove code to handle explicit
13279         specializations in class scope; they are now correctly diagnosed
13280         as errors.
13281
13282 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
13283
13284         * decl.c (pushdecl): Don't copy types if the
13285         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
13286         type.
13287
13288 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
13289
13290         * class.c (get_enclosing_class): New function.
13291         (is_base_of_enclosing_class): Likewise.
13292         * cp-tree.h (get_enclosing_class): Declare.
13293         (is_base_of_enclosing_class): Likewise.
13294         * pt.c (coerce_template_parms): Use them.
13295
13296 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
13297
13298         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
13299         null to decide whether to use it.
13300
13301         * error.c (dump_type_real): Handle NAMESPACE_DECL.
13302         * parse.y (base_class.1): Avoid crash on error.
13303
13304 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13305
13306         * decl.c (make_typename_type): If context is a namespace, the code
13307         is in error.
13308
13309 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
13310
13311         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
13312
13313 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
13314
13315         * cp-tree.h (anonymous_namespace_name): Declare.
13316         * decl.c: Define it.
13317         (push_namespace): Use anonymous_namespace_name, rather than local
13318         static anon_name.
13319         * error.c (dump_decl): If a namespace is named
13320         anonymous_namespace_name, call it {anonymous}.
13321
13322         * decl.c (grokparms): Distinguish between references and pointers
13323         in error message.
13324
13325 1998-09-08  Richard Henderson  <rth@cygnus.com>
13326             Mark Mitchell  <mark@markmitchell.com>
13327
13328         * pt.c (process_partial_specialization): Consistently allocate
13329         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
13330         tpd.parms, where appropriate.
13331
13332 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
13333
13334         * Makefile.in (INCLUDES): Update after recent toplevel gcc
13335         reorganizations.
13336
13337 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
13338
13339         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
13340         * class.c (finish_struct): Remove hackery to deal with explicit
13341         specializations in class scope.
13342         * decl.c (grokfndecl): Improve error-recovery.
13343         * decl2.c (grokfield): Likewise.
13344         * pt.c (check_specialization_scope): New function.
13345         (begin_specialization): Call it.
13346         (process_partial_specialization): New function, split out from
13347         push_template_decl.  Check partial specializations more
13348         stringently.
13349         (push_template_decl): Call it.
13350         (check_explicit_specialization): Don't attempt to handle explicit
13351         specializations in class scope.
13352         (template_parm_data): Document.  Add current_arg and
13353         arg_uses_template_parms.
13354         (mark_template_parm): Set it.
13355         (tsubst_arg_types): Remove unused variable.
13356         * semantics.c (begin_class_definition): Tweak.
13357
13358 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
13359
13360         * inc/typeinfo (type_info::type_info(const char*)): Make
13361         `explicit'.
13362
13363         * cp-tree.h (hash_tree_cons_simple): New macro.
13364         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
13365         (coerce_template_parms): Use make_temp_vec, instead of
13366         make_tree_vec.  Document this behavior.
13367         (lookup_template_class): Likewise.
13368         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
13369         Remove dead code (and add assertion to check its deadness).  Fix
13370         bug w.r.t. exception specifications.
13371
13372 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
13373
13374         * decl2.c (import_export_vtable): Always make artificials comdat.
13375         (import_export_decl): Likewise.
13376         * pt.c (mark_decl_instantiated): Likewise.
13377
13378 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
13379
13380         * cp-tree.h (finish_globally_qualified_member_call_expr):
13381         Rename to ...
13382         (finish_qualified_call_expr).
13383         * semantics.c: Likewise.
13384         * parse.y (primary): Use it.
13385         * method.c (hack_identifier): Remove redundant code.
13386
13387         * init.c (resolve_offset_ref): Call convert_from_reference to
13388         handle members of reference type.  Improve error recovery.
13389
13390 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
13391
13392         * cp-tree.h: Declare warn_nontemplate_friend.
13393         * decl2.c (lang_decode_option): Set.
13394         * lang-options.h: Add -Wnon-template-friend.
13395         * friend.c (do_friend): Use to toggle non-template function warning.
13396
13397 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
13398
13399         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
13400         corresponding INTEGER_CSTs when processing_template_decl.
13401         * pt.c (tsubst_enum): Tweak accordingly.
13402
13403 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13404
13405         * decl.c (pushdecl_class_level): Add warning here.
13406         (pushdecl): Tweak.
13407
13408 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
13409
13410         * cvt.c (convert_pointer_to_real): Tidy.
13411         * search.c (get_base_distance_recursive): Simplify.
13412         (get_base_distance): Likewise.
13413
13414         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
13415         parms.
13416
13417 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
13418
13419         * lex.c (check_newline):  Call HANDLE_PRAGMA before
13420         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
13421         if unknown pragmas are encountered.
13422         (handle_sysv_pragma): Interpret return code from
13423         handle_pragma_token ().  Return success/failure indication rather
13424         than next unprocessed character.
13425         (pragma_getc): New function: retrieves characters from the
13426         input stream.  Defined when HANDLE_PRAGMA is defined.
13427         (pragma_ungetc): New function: replaces characters back into the
13428         input stream.  Defined when HANDLE_PRAGMA is defined.
13429
13430 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
13431
13432         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
13433         * class.c (build_vtable_entry_ref): Likewise.
13434
13435 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
13436
13437         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
13438         * decl2.c (import_export_decl): Likewise.
13439         * pt.c (instantiate_decl): Use it.
13440
13441 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
13442
13443         * decl.c (lookup_name_real): Also do implicit typename thing for
13444         artificial TYPE_DECLs.
13445         * search.c (lookup_field): Likewise.
13446         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
13447         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
13448         (enter_scope_of): Extract type from implicit typename.
13449         (begin_class_definition): Likewise.
13450         * lex.c (identifier_type): Handle implicit typename when checking
13451         for SELFNAME.
13452
13453         * cp-tree.h: Declare flag_strict_prototype.
13454         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
13455         -fstrict-prototype.
13456         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
13457         specified, set it to the value of pedantic.
13458
13459 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
13460
13461         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
13462
13463 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
13464
13465         * decl.c (finish_enum): Handle member enums of classes declared in
13466         template functions.
13467
13468         * decl2.c (grok_x_components): Strip attributes before calling
13469         groktypename.
13470
13471 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
13472
13473         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
13474         -fenum-int-equivalence and -fno-nonnull-objects.
13475         * class.c (check_for_override): Remove support for -fall-virtual.
13476         (finish_struct_1): Likewise.
13477         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
13478         * typeck.c (build_binary_op_nodefault): Likewise.
13479         * cvt.c (ocp_convert): Likewise.
13480         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
13481         * class.c (build_vbase_path): Likewise.
13482
13483 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
13484
13485         * Makefile.in (INTERFACE): New, set to 1.
13486
13487 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
13488
13489         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
13490         comparing with global_namespace.
13491         (dump_aggr_type): Likewise.
13492
13493         * decl.c (grokfndecl): Issue error on declaration of friend
13494         templates with explicit template arguments.
13495
13496         * pt.c (convert_template_argument): New function, split out
13497         from...
13498         (coerce_template_parms): Here.
13499         (tsubst): Attempt better error-recovery.
13500
13501 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13502
13503         * pt.c (decl_template_parm_p): Add checks for
13504         TEMPLATE_TEMPLATE_PARM.
13505
13506 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
13507
13508         * lex.c (do_identifier): Fix thinko in previous change.
13509
13510 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
13511
13512         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
13513         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
13514
13515 1998-08-28  Richard Henderson  <rth@cygnus.com>
13516
13517         Add support for discarding unused virtual functions.
13518         * lang-options.h: Add -fvtable-gc.
13519         * cp-tree.h: Add flag_vtable_gc.
13520         * decl2.c (output_vtable_inherit): New fn.
13521         (finish_vtable_vardecl): Call it.
13522         * class.c (build_vtable_entry_ref): New fn.
13523         (build_vtbl_ref): Call it.
13524
13525 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
13526
13527         * cp-tree.h (build_enumerator): Take the enumeration type as a
13528         parameter.
13529         * decl.c (finish_enum): Don't set the TREE_TYPE for the
13530         enumeration constant values if we're processing_template_decls.
13531         Don't set the type for the CONST_DECLs either; that's done in
13532         build_enumerator.
13533         (build_enumerator): Take the enumeration type as a
13534         parameter.
13535         * lex.c (do_identifier): Don't resolve enumeration constants while
13536         processing template declarations, even if they happen to be
13537         TEMPLATE_PARM_INDEXs.
13538
13539         * parse.y (current_enum_type): New variable.
13540         (primary): Don't allow statement-expression in local classes just
13541         as we don't in global classes.
13542         (structsp): Use current_enum_type.
13543         (enum_list): Likewise.
13544         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
13545         finish_enum; they no longer occur.
13546
13547         * cp-tree.h (finish_base_specifier): New function.
13548         * parse.y (base_class): Use it.
13549         * semantics.c (finish_base_specifier): Define it.
13550
13551         * parse.y (structsp): Warn on use of typename outside of template
13552         declarations.
13553
13554 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
13555
13556         * lex.c (handle_cp_pragma): Remove #pragma vtable.
13557         * lang-options.h: Remove +e options.
13558         * decl2.c (lang_decode_option): Likewise.
13559         (import_export_vtable): Don't check write_virtuals.
13560         (finish_vtable_vardecl, finish_file): Likewise.
13561         * search.c (dfs_debug_mark): Likewise.
13562         * semantics.c (begin_class_definition): Likewise.
13563         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
13564
13565         * call.c (build_over_call): Check flag_elide_constructors.
13566         * decl2.c: flag_elide_constructors defaults to 1.
13567         * typeck.c (convert_arguments): Remove return_loc parm.
13568         (build_function_call_real): Adjust.
13569
13570         * search.c: Tear out all mi_matrix and memoize code.
13571         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
13572         * lang-options.h: Remove documentation for -fhandle-exceptions,
13573         -fmemoize-lookups and -fsave-memoized.
13574         * cp-tree.h: Lose mi_matrix and memoize support.
13575         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
13576         * class.c: Lose struct class_level.
13577         (pushclass, popclass): Lose memoize support.
13578         * init.c (build_offset_ref): Likewise.
13579
13580         Never change BINFO_INHERITANCE_CHAIN.
13581         * init.c (emit_base_init): Change modification of
13582         BINFO_INHERITANCE_CHAIN to an assert.
13583         * search.c (get_base_distance_recursive): Likewise.
13584         (get_base_distance): Likewise.
13585         (lookup_member): Likewise.
13586         (convert_pointer_to_single_level): Likewise.
13587         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
13588         (lookup_fnfields): Likewise.
13589         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
13590         (unshare_base_binfos): Don't call propagate_binfo_offsets.
13591         (layout_basetypes): Call propagate_binfo_offsets instead of
13592         unshare_base_binfos.
13593         * decl.c (xref_basetypes): Call unshare_base_binfos.
13594         * pt.c (instantiate_class_template): Likewise.
13595         * tree.c (reverse_path): Remove 'copy' parm; always make a
13596         temporary copy.
13597         * class.c (build_vbase_path): Just call it.
13598         * search.c (compute_access): Likewise.  Don't re-reverse.
13599
13600 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
13601
13602         * class.c (build_vbase_path): Use reverse_path.
13603         (finish_base_struct): Move warnings for inaccessible bases to
13604         layout_basetypes.
13605         (modify_one_vtable): Remove check of TREE_USED (binfo).
13606         (fixup_vtable_deltas1): Likewise.
13607         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
13608         (xref_tag): Remove binfos parameter.
13609         (make_binfo): Remove chain parameter.
13610         (reverse_path): Add copy parameter.
13611         * decl.c (init_decl_processing): Change calls to xref_tag.
13612         (xref_tag): Remove binfos parameter.
13613         (xref_basetypes): Change calls to make_binfo.
13614         * decl2.c (grok_x_components): Change calls to xref_tag.
13615         (handle_class_head): Likewise.
13616         * friend.c (do_friend): Likewise.
13617         * lex.c (make_lang_type): Change calls to make_binfo.
13618         * parse.y (structsp): Change calls to xref_tag.
13619         (named_complex_class_head_sans_basetype): Likewise.
13620         (named_class_head): Likewise.
13621         * rtti.c (init_rtti_processing): Likewise.
13622         * search.c (compute_access): Change calls to reverse_path.
13623         (dfs_get_vbase_types): Change calls to make_binfo.
13624         (get_vbase_types): Remove dead code.
13625         * tree.c (unshare_base_binfos): Change calls to make_binfo.
13626         (layout_basetypes): Warn here about inaccessible bases.
13627         (make_binfo): Remove chain parameter.
13628         (reverse_path): Add copy parameter.
13629
13630 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
13631
13632         * class.c: #if 0 complete_type_p.
13633         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
13634         * method.c (process_overload_item): Likewise.
13635         * typeck.c (comp_target_types): Likewise.
13636
13637         Stop sharing binfos for indirect virtual bases.
13638         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
13639         (layout_basetypes): Likewise.
13640         (unshare_base_binfos): Copy vbases, too.
13641         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
13642         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
13643         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
13644         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
13645         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
13646         reference to BINFO_VIA_PUBLIC.
13647         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
13648         (push_class_decls): Use them.
13649         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
13650         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
13651
13652 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
13653
13654         * decl.c (build_enumerator): Set DECL_CONTEXT for the
13655         CONST_DECLs.
13656
13657 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
13658
13659         * cp-tree.h (finish_enum): Change prototype.
13660         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
13661         VALUES parameter.  Don't try to compute mins/maxs if
13662         processing_template_decl.
13663         * parse.y (structsp): Use new calling sequence for finish_enum.
13664         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
13665         (lookup_template_class): Remove unused variables.  Tweak.
13666         Register enums on instantiation list before substituting
13667         enumeration constants.
13668         (tsubst_decl): Remove unused variables.
13669         (regenerate_decl_from_template): Likewise.
13670
13671         * decl.c (duplicate_decls): Don't obliterate the
13672         DECL_TEMPLATE_INFO for a template if we're not replacing it with
13673         anything.
13674
13675         * lex.c (do_identifier): Fix typo in comment.
13676
13677 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13678
13679         * errfn.c: Remove stdarg.h/varargs.h.
13680         * tree.c: Likewise.
13681
13682 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
13683
13684         * pt.c (tsubst_copy): Only do typename overloading on an
13685         IDENTIFIER_NODE that happens to look like a typename if it actually
13686         has a type for us to use.
13687
13688 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
13689
13690         * typeck.c (comp_cv_target_types): Split out...
13691         (comp_target_types): From here.  Don't allow cv-qual changes under
13692         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
13693         (build_ptrmemfunc): Pass 1 to nptrs.
13694         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13695
13696 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
13697
13698         * search.c (dependent_base_p): Don't compare a binfo to
13699         current_class_type; use the TREE_TYPE of the binfo instead.
13700
13701         * cp-tree.h (CLASS_TYPE_P): Revise definition.
13702
13703 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
13704
13705         * decl.c (duplicate_decls): Don't complain about different
13706         exceptions from an internal decl even if pedantic.
13707
13708         * typeck.c (convert_for_assignment): Converting from pm of vbase
13709         to derived is an error, not a sorry.
13710
13711         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
13712         * class.c (fixed_type_or_null): Rename from
13713         resolves_to_fixed_type_p.  Return the dynamic type of the
13714         expression, if fixed, or null.
13715         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
13716         does not match the static type.
13717         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
13718         resolves_to_fixed_type_p again.
13719
13720 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
13721
13722         * pt.c (tsubst_decl): Move special case code for dealing with
13723         tricky friend templates here from ...
13724         (regenerate_decl_from_template): Here.
13725
13726 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
13727
13728         * decl.c (start_decl): Remove redundant linkage check.
13729
13730 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
13731
13732         * typeck.c (c_expand_return): Handle the case that valtype
13733         is wider than the functions return type.
13734
13735 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
13736
13737         * cp-tree.h (CLASS_TYPE_P): New macro.
13738         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
13739         * pt.c (process_template_parm): Undo previous change.
13740
13741 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
13742
13743         * cp-tree.h: Declare.
13744         * pt.c (decl_template_parm_p): New function.
13745         * decl.c (pushdecl): Check decls for redeclaring template parms.
13746         (xref_tag): Make redeclaration an error, print decl.
13747         * decl2.c (grokfield): Check field_decls for redeclaration as well.
13748
13749 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
13750
13751         * parse.y (primary): Fix up the type of string constants.
13752
13753 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
13754
13755         * typeck.c (convert_for_initialization): Move check for odd uses
13756         of NULL to avoid duplicate warnings.
13757
13758 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
13759
13760         * tree.c (lvalue_type): Fix for arrays.
13761         * typeck.c (string_conv_p): New fn.
13762         (convert_for_assignment): Use it.
13763         (build_unary_op): Use lvalue_type.
13764         * call.c (standard_conversion, convert_like): Use string_conv_p.
13765         (add_function_candidate): Use lvalue_type.
13766         * cvt.c (convert_to_reference): Likewise.
13767         * decl2.c (lang_decode_option): Ignore -traditional.
13768         * decl.c (init_decl_processing): flag_writable_strings inhibits
13769         flag_const_strings.
13770
13771 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
13772
13773         * lang-options.h (lang_options): Add fconst-strings to the list
13774         of valid options.
13775         * decl2.c (lang_f_options, lang_decode_option): Likewise.
13776
13777 1998-08-24  Nathan Sidwell  <nathan@acm.org>
13778
13779         * lex.c (real_yylex): Don't warn about long long constants if
13780         we're allowing long long.
13781
13782 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13783
13784         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
13785         accessing bindings directly.
13786
13787         * search.c (my_tree_cons): Reimplement.
13788
13789         * lang-specs.h: Remove __HONOR_STD.
13790         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
13791
13792 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
13793
13794         * decl.c (grokdeclarator): Complain about in-class initialization
13795         of aggregates and/or references.
13796         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
13797         TEMPLATE_TYPE_PARMs.
13798
13799         * decl2.c (grok_array_decl): Add comment.
13800         (mark_used): Don't instantiate an explicit instantiation.
13801         * friend.c (make_friend_class): Remove bogus comment.  Fix check
13802         for partial specializations.
13803         * pt.c (check_explicit_specialization): Don't
13804         SET_DECL_EXPLICIT_INSTANTIATION here.
13805         (mark_decl_instantiated): Or here.
13806         (do_decl_instantiation): Do it here, instead.  Add checks for
13807         duplicate explicit instantiations, etc.  Tidy.
13808         (do_type_instantiation): Likewise.
13809         (instantiate_decl): Improve comments.  Complain about explicit
13810         instantiations where no definition is available.
13811
13812         * cp-tree.h (ansi_null_node): Remove.
13813         * call.c (build_over_call): Warn about converting NULL to an
13814         arithmetic type.
13815         * cvt.c (build_expr_type_conversion): Likewise.  Use
13816         null_ptr_cst_p instead of expanding it inline.
13817         * decl.c (ansi_null_node): Remove.
13818         (init_decl_processing): Make null_node always have integral type.
13819         * except.c (build_throw): Warn about converting NULL to an
13820         arithmetic type.
13821         * lex.c (init_parse): Remove handling of ansi_null_node.
13822         * pt.c (type_unification_real): Don't convert NULL to void* type.
13823         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
13824         (convert_for_assignment): Warn about converting NULL to an
13825         arithmetic type.
13826         (convert_for_initialization): Likewise.
13827
13828 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
13829
13830         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
13831         * pt.c (coerce_template_parms): Use no_linkage_check.
13832         * decl.c (grokvardecl): Likewise.
13833         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
13834
13835         * method.c (process_overload_item): Remove useless code.
13836
13837 1998-08-20  Per Bothner  <bothner@cygnus.com>
13838
13839         Handle new'ing of Java classes.
13840         * init.c (build_class_classref):  New function.
13841         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
13842         constructor does not return this;  don't need to exception-protect.
13843
13844         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
13845         * decl2.c (acceptable_java_type):  Handle template-derived types.
13846
13847 1998-08-20  Per Bothner  <bothner@cygnus.com>
13848
13849         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
13850
13851 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
13852
13853         * decl.c (duplicate_decls): Always merge the old and new patterns
13854         for templates, regardless of whether or not the new one has
13855         DECL_INITIAL.  Don't throw away specializations.  Merge
13856         DECL_SAVED_TREE.
13857         * pt.c (tsubst_decl): Use the right pattern when calculating the
13858         complete args for a new template instance.
13859         (do_decl_instantiation): Fix typo in comment.
13860         (regenerate_decl_from_template): Deal with tricky friend template
13861         case.
13862         (instantiate_decl): Likewise.
13863
13864 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
13865
13866         * init.c (build_builtin_delete_call): Add missing assemble_external
13867         call.
13868
13869 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
13870
13871         * parse.y (notype_unqualified_id): Also accept ~A<int>.
13872
13873 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
13874
13875         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
13876         arithmetic.
13877         * except.c (build_throw): Warn when NULL is thrown, even with
13878         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
13879         thrown expression.
13880
13881         * cp-tree.h (ansi_null_node): New variable.
13882         * decl.c (ansi_null_node): New variable.
13883         (init_decl_processing): Initialize its type.
13884         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
13885         for null_node in non-ANSI mode.
13886         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
13887         place of null_node to avoid spurious errors.
13888
13889 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
13890
13891         * cp-tree.h (enter_scope_of): New function.
13892         * parse.y (complex_direct_notype_declarator): Use it.
13893         * semantics.c (enter_scope_of): New function.
13894
13895 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
13896
13897         * decl.c (grokparms): No, here.
13898
13899         * decl.c (grokdeclarator): Catch parm with pointer to array of
13900         unknown bound here...
13901         * method.c (process_overload_item): ...not here.
13902
13903         * gxxint.texi: Remove obsolete documentation of overloading code.
13904
13905         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
13906         * class.c (finish_struct_bits): Likewise.
13907
13908         * tree.c (lvalue_type): Fix for arrays.
13909         * typeck.c (build_unary_op): Use lvalue_type.
13910         * call.c (add_function_candidate): Likewise.
13911         * cvt.c (convert_to_reference): Likewise.
13912
13913         * decl2.c (lang_decode_option): Ignore -traditional.
13914
13915         * init.c (build_offset_ref): Don't mess with error_mark_node.
13916         * lex.c (do_scoped_id): Use cp_error.
13917
13918         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
13919
13920 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13921
13922         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
13923
13924 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
13925
13926         * cp-tree.h (set_identifier_local_value): Provide prototype.
13927
13928         * decl2.c (do_namespace_alias): Remove unused variables `binding'
13929         and `old'.
13930
13931 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
13932
13933         * Makefile.in: Rename BBISON to BISON so that it can be properly
13934         inherited from the parent makefile.
13935
13936 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
13937
13938         * lang-options.h: Add -finit-priority.
13939         * decl2.c: Likewise.  Check flag_init_priority instead of
13940         USE_INIT_PRIORITY.
13941
13942         * decl2.c (setup_initp): New fn.
13943         (start_objects, finish_objects, do_ctors): Handle init_priority.
13944         (do_dtors, finish_file): Likewise.
13945
13946 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
13947
13948         * pt.c (tsubst_copy): Hush warning.
13949
13950         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
13951
13952 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
13953
13954         * pt.c (print_template_context): Don't abort when instantiating a
13955         synthesized method.
13956
13957         * decl.c (grokdeclarator): Issue errors on namespace qualified
13958         declarators in parameter lists or in class scope.
13959
13960 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
13961
13962         * pt.c (check_explicit_specialization): Don't abort on bogus
13963         explicit instantiations.
13964
13965 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
13966
13967         * typeck.c (require_complete_type): Use complete_type_or_else.
13968         (complete_type_or_else): Always return NULL_TREE on failure, as
13969         documented.
13970
13971         * pt.c (tsubst_aggr_type): Prototype.
13972         (tsubst_decl): New function, split out from tsubst.  Set
13973         input_filename and lineno as appropriate.
13974         (pop_tinst_level): Restore the file and line number saved in
13975         push_tinst_level.
13976         (instantiate_class_template): Set input_filename and lineno as
13977         appropriate.
13978         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
13979         context for a TYPENAME_TYPE is complete.
13980
13981         * decl2.c (grokbitfield): Issue errors on bitfields declared with
13982         function type.
13983         (do_dtors): As in do_ctors, pretend to be a member of the same
13984         class as a static data member while generating a call to its
13985         destructor.
13986
13987         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
13988         conversions, even in complex virtual base class hierarchies.
13989
13990 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
13991
13992         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
13993         (TYPE_TEMPLATE_INFO): Likewise.
13994         (SET_TYPE_TEMPLATE_INFO): Likewise.
13995         (ENUM_TI_TEMPLATE): Likewise.
13996         (ENUM_TI_ARGS): Likewise.
13997         (lookup_nested_type_by_name): Remove.
13998         * decl.c (maybe_process_template_type_declaration): Handle enums.
13999         (start_enum): Don't check for primary-template enum declarations
14000         here.
14001         (finish_enum): Clean up, document.  Make sure template enum
14002         constants get the correct type.
14003         (build_enumerator): Copy initializers for template enumerations,
14004         too.
14005         (grok_enum_decls): Document.
14006         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
14007         better.  Build LOOKUP_EXPRs for local variables, even if they are
14008         TREE_PERMANENT.
14009         * pt.c (tsubst_enum): Remove field_chain parameter.
14010         (template_class_depth): Include the depth of surrounding function
14011         contexts.
14012         (push_template_decl): Check for primary-template enum declarations
14013         here.  Deal with enumeration templates.
14014         (lookup_template_class): Likewise.
14015         (for_each_template_parm): Likewise.
14016         (instantiate_class_template): Don't call tsubst_enum directly,
14017         call tsubst instead, to instantiate enums.  Deal with all
14018         field_chain issues here, not in tsubst_enum.
14019         (lookup_nested_type_by_name): Remove.
14020         (tsubst_aggr_type): Revise handling of enumeration types.
14021         (tsubst): Likewise.
14022         (tsubst_copy): Likewise.
14023         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
14024
14025 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
14026
14027         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
14028         uses template parameters.
14029         * method.c (build_template_parm_names): Use the full set of
14030         template arguments for tsubst'ing.
14031         (build_overload_identifier): Pass the full set of template
14032         arguments to build_template_parm_names, not just the
14033         innermost_args.
14034         * pt.c (TMPL_ARGS_DEPTH): Define using
14035         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
14036         (NUM_TMPL_ARGS): New macro.
14037         (add_outermost_template_args): Deal with the case where the outer
14038         args will be completely discarded.
14039         (coerce_template_parms): Use the full set of template arguments
14040         for tsubst'ing.  Simplify.  Add some asserts.  Improve
14041         error messages.
14042         (lookup_template_class): Pass the full set of template arguments
14043         to coerce_template_parms.
14044         (tsubst): Add assertion.
14045         (do_type_instantiation): Don't instantiate member template
14046         classes.
14047
14048         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
14049         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
14050
14051 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
14052
14053         * method.c (set_mangled_name_for_decl): Change return type to void.
14054
14055         * decl.c (lookup_name_real): A namespace-level decl takes priority
14056         over implicit typename.  Avoid doing the same lookup twice.
14057
14058         * search.c (dependent_base_p): New fn.
14059         (dfs_pushdecls, dfs_compress_decls): Use it.
14060
14061         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
14062         virtual functions if the type doesn't have any.
14063
14064 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
14065
14066         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
14067         uses template parameters.
14068
14069 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
14070
14071         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
14072         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
14073         * lex.c (do_identifier): Don't use a second argument, or a type,
14074         when building LOOKUP_EXPRs.
14075         (do_identifier): Likewise.
14076         (do_scoped_id): Likewise.
14077         * method.c (hack_identifier): Improve error message.
14078         * pt.c (lookup_template_function): Don't needlessly call
14079         copy_to_permanent or build_min.
14080         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
14081         necessary.
14082         (do_decl_instantiation): Improve error message.
14083         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
14084         (build_min): Copy the type to the permanent obstack, too.
14085
14086 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
14087
14088         * init.c (init_init_processing): Remove BI* handling.
14089         (build_builtin_call): Remove.
14090         (build_builtin_delete_call): New fn.
14091         (build_delete): Use it.
14092
14093 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
14094
14095         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
14096         (maybe_check_template_type): New function.
14097         * decl.c (maybe_process_template_type_declaration): New function,
14098         split out from pushtag  Call maybe_check_template_type.
14099         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
14100         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
14101         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
14102         * pt.c (template_class_depth_real): Generalization of ...
14103         (template_class_depth): Use it.
14104         (register_specialization): Use duplicate_decls for duplicate
14105         declarations of specializations.
14106         (maybe_check_template_type): New function.
14107         (push_template_decl_real): Fix comment.
14108         (convert_nontype_argument): Likewise.
14109         (lookup_template_class): Likewise.  Avoid an infinite loop on
14110         erroneous code.
14111         (tsubst_friend_function): Fix comment.
14112         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
14113         an IDENTIFIER_NODE.
14114         * semantics.c (begin_function_definition): Use
14115         reset_specialization to note that template headers don't apply
14116         directly to declarations after the opening curly for a function.
14117
14118 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
14119
14120         * decl.c (push_overloaded_decl): Use current_namespace instead of
14121         DECL_CONTEXT (decl) to determine where we go.
14122
14123         * decl.c (lookup_name_real): Fix typo.
14124
14125 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
14126
14127         * friend.c (is_friend): Be lenient with member functions to deal
14128         with nested friends.
14129
14130 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
14131
14132         * class.c (finish_struct_1): Convert integer_zero_node to
14133         ssizetype before passing it to set_rtti_entry.
14134         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
14135         of any size to a pointer.
14136
14137 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
14138
14139         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
14140         (build_template_decl_overload): Remove.
14141         (set_mangled_name_for_decl): New function.
14142         (innermost_args): Remove is_spec parameter.
14143         (most_specialized, most_specialized_class): Remove declarations.
14144         (lookup_template_class): Add entering_scope parameter.
14145         (maybe_process_partial_specialization): New function.
14146         (finish_template_decl): Likewise.
14147         (finish_template_type): Likewise.
14148         * class.c (finish_struct): Clean up processing of member template
14149         specializations.
14150         * decl.c (pushtag): Fix formatting.
14151         (lookup_tag): Improve handling of pseudo-global levels.
14152         (make_typename_type): Adjust call to lookup_template_class.
14153         (shadow_tag): Use maybe_process_partial_specialization.
14154         (xref_tag): Improve handling of member friends.
14155         (start_function): Call push_nested_class before
14156         push_template_decl.  Don't call push_template_decl for
14157         specializations.
14158         * decl2.c (grok_x_components): Don't call xref_tag for
14159         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
14160         (grokclassfn): Use set_mangled_name_for_decl.
14161         (arg_assoc_class): Adjust call to innermost_args.
14162         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
14163         * error.c (dump_function_name): Improve printing of template
14164         function names.
14165         * friend.c (is_friend): Don't compare types of decls to determine
14166         friendship, unless flag_guiding_decls.
14167         (make_friend_class): Partial specializations cannot be friends.
14168         (do_friend): Use set_mangled_name_for_decl.  Call
14169         push_template_decl_real instead of push_template_decl.
14170         * method.c (build_decl_overload_real): Remove prototype.  Give it
14171         external linkage.
14172         (build_overload_identififer): Adjust call to innermost_args.
14173         (build_template_decl_overload): Remove.
14174         (set_mangled_name_for_decl): New function.
14175         * parse.y (.finish_template_type): New non-terminal.
14176         (template_def): Use finish_template_decl.  Use template_extdef
14177         instead of extdef.
14178         (template_extdef, template_datadef): New non-terminals, containing
14179         only those rules for things which can be templates.
14180         (datadef): Tidy.
14181         (template_type, self_template_type): Use .finish_template_type.
14182         (named_class_head): Use maybe_process_partial_specialization.
14183         * pt.c (mangle_class_name_for_template): Remove context parameter.
14184         (get_class_bindings): Remove outer_args parameter.
14185         (complete_template_args): Remove.
14186         (add_outermost_template_args): New function.
14187         (register_specialization): Return the specialization.
14188         (unregister_specialization): New function.
14189         (tsubst_template_parms): Likewise.
14190         (most_specialized, most_specialized_class): Prototype here as
14191         static.
14192         (original_template): Rename to most_general_template.
14193         (tsubst_template_parms): New function.
14194         (set_mangled_name_for_template_decl): Likewise.
14195         (TMPL_ARGS_DEPTH): New macro.
14196         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
14197         (TMPL_ARGS_LEVEL): New macro.
14198         (SET_TMPL_ARGS_LEVEL): Likewise.
14199         (TMPL_ARG): Likewise.
14200         (SET_TMPL_ARG): Likewise.
14201         (TMPL_ARGS_DEPTH): Likewise.
14202         (finish_member_template_decl): Use finish_template_decl.
14203         (maybe_process_partial_specialization): New function, split out
14204         from tsubst.
14205         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
14206         (maybe_begin_member_template_processing): Use new macros.
14207         (is_member_template): Likewise.
14208         (is_member_template_class): Likewise.
14209         (add_to_template_args): Likewise.  Deal with multiple levels of
14210         args.
14211         (maybe_process_partial_specialization): New function.
14212         (retrieve_specialization): Add consistency check.
14213         (determine_specialization): Return full argument list.
14214         (check_explicit_specialization): Tweak friend handling.  Use full
14215         argument lists.  Simplify.
14216         (current_template_args): Use new macros.
14217         (push_template_decl_real): Change ill-named mainargs to specargs.
14218         Check that a partial specialization actually specializes at least
14219         one parameter.   Improve friend handling.  Modify for full
14220         template arguments.
14221         (classtype_mangled_name): Don't mangle the names of
14222         specializations.
14223         (lookup_template_class): Add entering_scope parameter.  Use it to
14224         avoid finding a template type when an instantiation is required.
14225         Simplify.  Use full template arguments.
14226         (tsubst_friend_function): Use unregister_specialization.  Use new
14227         macros.  Use full template arguments.
14228         (tsubst_friend_class): Substitute, using tsubst_template_parms,
14229         into the template parameters before passing them to
14230         redeclare_class_template.
14231         (instantiate_class_template): Simplify.  Use full template
14232         arguments.  Adjust calls to get_class_bindings.  Use
14233         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
14234         (innermost_args): Use new macros.
14235         (tsubst_aggr_type): New function, split out from tsubst.
14236         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
14237         conventions for lookup_template_class.  Refine handling of partial
14238         instantiations.   Remove calls to complete_template_args.
14239         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
14240         and set_mangled_name_for_template_decl.
14241         (tsubst_copy): Use tsubst_aggr_type.
14242         (instantiate_template): Use full template arguments.
14243         (more_specialized): Improve formatting.
14244         (more_specialized_class): Adjust calls to get_class_bindings.
14245         (get_bindings_real): Don't call complete_template_args.
14246         (most_specialized): Don't overwrite input; create a new list.
14247         (most_specialized_class): Use most_general_template.
14248         (regenerate_decl_from_template): Use unregister_specialization.
14249         Use full template arguments.
14250         (instantiate_decl): Use full template arguments.
14251         (set_mangled_name_for_template_decl): New function.
14252         * semantics.c (begin_class_definition): Use
14253         maybe_process_partial_specialization.
14254         (finish_member_class_template): New function.
14255         (finish_template_decl): Likewise.
14256         (finish_template_type): Likewise.
14257         (typeck.c): Don't crash after issuing a compiler_error.
14258         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
14259
14260 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
14261
14262         * typeck2.c (build_functional_cast): Handle default-initialization.
14263
14264         * call.c (build_over_call): Pass 1 to popclass.
14265
14266         * parse.y (direct_notype_declarator): Add precedence declaration
14267         to notype_unqualified_id case.
14268         * Makefile.in (EXPECT): Adjust.
14269
14270         * tree.c (ovl_member): Fix for single function in OVL.
14271
14272 1998-07-27  Dave Brolley  <brolley@cygnus.com>
14273
14274         * c-lex.c (yylex): Fix boundary conditions in character literal and
14275         string literal loops.
14276
14277 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
14278
14279         * decl.c (lookup_name_real): OK, do return the from_obj value
14280         unless got_object depends on template parms.
14281
14282         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
14283
14284         * pt.c (coerce_template_parms): Also complain about local enums.
14285
14286         * cp-tree.h: Add prototype for set_identifier_local_value.
14287         * decl.c (set_identifier_local_value_with_scope): Make static,
14288         prototype.
14289         * search.c (covariant_return_p): Likewise.
14290         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
14291
14292         * call.c (build_method_call): Only pull out the type of a destructor
14293         if it's a template type parm.
14294         * decl.c (lookup_name_real): Never return the from_obj value.
14295
14296 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
14297
14298         * except.c (process_start_catch_block_old): Call start_decl_1 for
14299         catch parm.
14300         * decl.c (start_decl_1): Avoid duplicate error.
14301
14302         * init.c (expand_default_init): Only perform the initialization if
14303         it will do something.
14304
14305 1998-07-23  H.J. Lu  (hjl@gnu.org)
14306
14307         * parse.y (base_class): Check for invalid base class.
14308
14309 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
14310
14311         * decl2.c (import_export_template): Fold in...
14312         (import_export_class): ...to here.  Handle dllimport/export.
14313
14314         * class.c (build_vtable): Pass at_eof to import_export_vtable.
14315         (prepare_fresh_vtable): Likewise.
14316         * decl2.c (import_export_class): Split out...
14317         (finish_prevtable_vardecl): From here.
14318         * class.c (finish_struct_1): Call import_export_class if at_eof.
14319
14320         * decl.c (start_function): #if 0 mysterious code I wrote and have
14321         forgotten why.
14322         * rtti.c (get_tinfo_fn): If this is for a class type, set
14323         DECL_CONTEXT.
14324
14325 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
14326
14327         * inc/exception: Change terminate and unexpected to ().
14328
14329         * parse.y (named_class_head_sans_basetype_defn): A
14330         named_class_head_sans_basetype followed by '{' or ':' is a defn.
14331
14332 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
14333
14334         * tree.c (canonical_type_variant): New fn to handle arrays.
14335         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
14336         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
14337         * method.c (process_overload_item): Use build_overload_value for
14338         arrays.
14339
14340 1998-07-20  Dave Brolley  <brolley@cygnus.com>
14341
14342         * lex.c (mbchar.h): #include it.
14343         (GET_ENVIRONMENT): New macro.
14344         (init_parse): Set character set based on LANG environment variable.
14345         (real_yylex): Handle multibyte characters in character literals.
14346         (real_yylex): Handle multibyte characters in string literals.
14347
14348 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
14349
14350         * lex.c (do_identifier): Look for class value even if we don't
14351         have a global value.  Do implicit declaration if parsing is 2.
14352         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
14353         lookup.
14354
14355 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
14356
14357         * decl.c (pushtag): Revert previous change.
14358         * pt.c (lookup_template_class): Don't put out debugging
14359         information for types that use template parameters.
14360
14361         * decl.c (pushtag): Don't put out debugging information for
14362         compiler-generated typedefs.
14363
14364         * error.c (dump_type_real): Don't crash when presented with
14365         intQI_type_node or the like.
14366
14367         * semantics.c (finish_translation_unit): Fix spelling error in
14368         comment.
14369
14370 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
14371
14372         * decl.c (lookup_name_real): Pull out single function here.
14373         (select_decl): Not here.
14374         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
14375
14376         * decl.c (qualify_lookup): Tweak again.
14377
14378         * pt.c (lookup_template_class): Don't mess with the context of the
14379         instantiation.
14380         * decl2.c (current_decl_namespace): Remove special handling for
14381         templates.
14382
14383         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
14384         a member template specialization.
14385
14386         * tree.c (ovl_member): Use decls_match to compare functions.
14387         * decl.c (decls_match): Check the context of a function.
14388
14389         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
14390         in Koenig lookup support rules.
14391         * semantics.c (finish_call_expr): Handle the new cases.
14392
14393         * typeck.c (build_x_function_call): Handle overloaded methods.
14394
14395         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
14396
14397 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
14398
14399         * semantics.c (finish_object_call_expr): Revert previous change.
14400         * call.c (build_new_method_call): Likewise.  Instead, convert
14401         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
14402
14403 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
14404
14405         * decl.c (qualify_lookup): Handle templates.
14406
14407         * decl2.c (do_using_directive): Don't pass ancestor.
14408         * decl.c (push_using_directive): Calculate ancestor.
14409
14410         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
14411         * decl.c (pushdecl): Move type shadowing handling from here...
14412         (duplicate_decls): ...to here.
14413         * decl.c (set_identifier_local_value_with_scope): New fn.
14414         (pushdecl): Use it.
14415         (set_identifier_local_value, lookup_type_current_level): New fns.
14416         * decl2.c (do_local_using_decl): Handle types and binding level
14417         stuff properly.
14418
14419         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
14420         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
14421         (lookup_namespace_name): Likewise.
14422         * typeck.c (build_unary_op): Not here anymore.
14423
14424         * decl2.c (do_class_using_decl): Make sure we get an identifier.
14425         * class.c (handle_using_decl): Ignore TYPE_DECLs.
14426
14427         * decl.c (qualify_lookup): New fn.
14428         (lookup_name_real): Use it.
14429
14430 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
14431
14432         * decl2.c (add_using_namespace): When directly using a namespace
14433         that was indirect before, promote it.
14434
14435         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
14436         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
14437         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
14438         * decl.c (select_decl): Replace two flag parameters by one.
14439         (unqualified_namespace_lookup): Likewise, pass flag.
14440         (lookup_flags): New function.
14441         (lookup_name_real): Compute flags, pass them.
14442         (lookup_namespace_name): Call with zero-flag.
14443         * decl2.c (ambiguous_decl): Add flag parameter, complain only
14444         according to flags.
14445         (lookup_using_namespace, qualified_lookup_using_namespace):
14446         Add flag parameter, pass them through.
14447         * lex.c (do_scoped_id): Call with zero-flag.
14448
14449 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
14450
14451         * typeck.c (convert_for_assignment): Use comptypes.
14452
14453 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
14454
14455         * semantics.c (finish_object_call_expr): Move test for the
14456         function called being a TYPE_DECL to ...
14457         * call.c (build_new_method_call): Here.
14458
14459 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
14460
14461         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
14462         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
14463
14464         * lex.c (looking_for_typename): Don't initialize.
14465
14466         * decl2.c (ambiguous_decl): Clarify error message.
14467
14468         * decl.c (push_using_directive): Iterate over namespaces used
14469         indirectly.
14470
14471 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14472
14473         * decl2.c (add_using_namespace): Iterate over namespaces used
14474         indirectly.
14475
14476         * decl.c (lookup_name_real): Accept namespace aliases as locals.
14477         (cat_namespace_levels): Ignore aliases.
14478         (duplicate_decls): Ignore duplicate aliases.
14479         * decl2.c (do_namespace_alias): Process block level namespace
14480         aliases.  Store alias with pushdecl.  Remove odr errors.
14481         * parse.y (namespace_alias): New non-terminal.
14482         (extdef): Use it.
14483
14484 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
14485
14486         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
14487         Handle TEMPLATE_TYPE_PARM.
14488         (arg_assoc): Rewrite.
14489
14490         * pt.c (complete_template_args): Don't look at the context unless
14491         we have to.
14492
14493         * method.c (build_decl_overload_real): Fix namespace handling.
14494
14495         * typeck.c (build_unary_op): Extract a lone function from an
14496         OVERLOAD.
14497
14498         * call.c (build_scoped_method_call): Handle getting a namespace
14499         for basetype in a destructor call.
14500         (check_dtor_name): Handle enums.
14501
14502         * parse.y (using_directive): New nonterminal.
14503         (extdef, simple_stmt): Use it.
14504
14505 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14506
14507         * decl2.c (add_function): Move error message ...
14508         (arg_assoc_namespace): ... from here.
14509
14510 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
14511
14512         * parse.y (namespace_qualifier): Fix multiple level handling.
14513         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
14514         (arg_assoc): Don't skip the first argument of a function.
14515
14516 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
14517
14518         * search.c (my_tree_cons): Clean up.
14519
14520 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
14521
14522         * call.c (joust): Don't warn about "confusing" conversions to the
14523         same type.
14524
14525 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14526
14527         * class.c (push_nested_class): Complain about namespaces.
14528         * decl.c (start_decl): Enter the object's namespace.
14529         (cp_finish_decl): Leave it.
14530         (grokdeclarator): Likewise.
14531         * decl2.c (check_decl_namespace): New function.
14532         (finish_file): Call it.
14533         * parse.y (complex_direct_notype_declarator): Set complexity
14534         of namespace-qualified ids to -1, enter the namespace.
14535
14536         * method.c (build_template_decl_overload): Expect _DECL as first
14537         parameter.  Put context temporarily into current_namespace.
14538         * pt.c (check_explicit_specialization): Change caller.
14539         (tsubst): Likewise.
14540
14541         * init.c (build_offset_ref): Call mark_used and
14542         convert_from_reference for namespace members.
14543
14544 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14545
14546         * search.c (my_tree_cons): The bitfield is at index 2.
14547
14548 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
14549
14550         * lang-options.h: Format changed to work with new --help support
14551         in gcc/toplev.c
14552
14553 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14554
14555         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
14556         Do Koenig lookup in CALL_EXPR.
14557         (arg_assoc): Handle error_mark.
14558         * lex.c (is_global): New function.
14559         (do_identifier): Expect arguments for Koenig lookup.
14560         * parse.y (primary): Add rules for calls of unqualified function calls.
14561         (do_id): Change call of do_identifier.
14562         * pt.c (finish_stmt_expr): Likewise.
14563         * semantics.c (finish_id_expr): Likewise.
14564         (finish_call_expr): Add integer parameter to indicate
14565         argument-dependent lookup.
14566
14567         * decl.c (struct binding_level): New field using_directives.
14568         (push_using_decl): Not sorry anymore.
14569         (push_using_directive): New function.
14570         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
14571         (unqualified_namespace_lookup): New function, code from ...
14572         (lookup_name_real): ... here.
14573         * decl2.c (lookup_using_namespace): Pass using list instead of
14574         initial scope.
14575         (validate_nonmember_using_decl): New function.
14576         (do_nonmember_using_decl): New function.
14577         (do_toplevel_using_decl): Use them.
14578         (do_local_using_decl): New function.
14579         (do_using_directive): Support block-level directives.
14580         * parse.y (simple_stmt): Support using declarations and
14581         directives.
14582         (namespace_qualifier, namespace_using_decl): New non-terminals.
14583
14584         * xref.c (classname): New function.
14585         (GNU_xref_hier): Change class and base parameters to tree.
14586         * decl.c (xref_baseypes): Change caller.
14587         * friend.c (make_friend_class): Likewise.
14588
14589 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
14590
14591         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
14592         comparison.
14593
14594         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
14595         template template parameter, record its use.
14596         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
14597         its template arguments if exists.
14598
14599         * pt.c (coerce_template_template_parms): New function equivalent
14600         to coerce_template_parms when IS_TMPL_PARM is true.
14601         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
14602         all callers changed.
14603
14604         (coerce_template_parms): Access ARGLIST properly when creating a
14605         new vector.  Only accept implicit TYPE_DECL as valid argument for
14606         a template template parameter when it is a base class of
14607         current_class_type.  Don't display error message when COMPLAIN is
14608         false.
14609
14610 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
14611
14612         * repo.c (get_base_filename): Use file_name_nondirectory.
14613         (open_repo_file): Likewise.
14614         * cp-tree.h (file_name_nondirectory): Add prototype.
14615
14616 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
14617
14618         * friend.c (do_friend): Pull the identifier out of declarator.
14619         Use cp_error and friends.
14620         * decl2.c (qualified_lookup_using_namespace): Fix call to
14621         purpose_member.
14622         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
14623         (grokvardecl): Use DECL_CLASS_SCOPE_P.
14624         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
14625         * class.c (warn_hidden): Fix for OVERLOAD.
14626         From grahams@rcp.co.uk:
14627         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
14628         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
14629
14630 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
14631
14632         * g++.1 (-traditional): Remove duplicated documentation.
14633
14634 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
14635
14636         * method.c (flush_repeats): Add nrepeats parameter.
14637         (issue_nrepeats): Likewise.
14638         (is_back_referenceable_type): New function.  Don't back-reference
14639         TEMPLATE_TYPE_PARMs as well as simple types like integers.
14640         (build_mangled_name_for_type): Likewise.
14641         (build_mangled_name_for_type_with_Gcode): Likewise.
14642         (lasttype): Remove.
14643         (nrepeats): Likewise.
14644         (Nrepeats): Likewise.
14645         (start_squangling): Don't clear the variables removed above.
14646         (end_squangling): Likewise.
14647         (flush_repeats): Tidy.  Use nrepeats parameter rather than
14648         Nrepeats global.
14649         (issue_nrepeats): Likewise, but with nrepeats global.  Use
14650         is_backreferenceable_type.
14651         (build_overload_nested_name): Tidy.  Add comment.  Use
14652         build_mangled_name_for_type.
14653         (build_underscore_int): Comment.
14654         (build_overload_scope_ref): Use build_mangled_name_for_type.
14655         (build_overload_int): Likewise.
14656         (build_template_template_parm_names): Tidy.
14657         (build_template_parm_names): Use build_mangled_name_for_type.
14658         (build_overload_identifier): Add comments.
14659         (build_mangled_name_for_type_with_Gcode): Split out from
14660         build_mangled_name.
14661         (build_mangled_name_for_type): Use it.
14662         (build_mangled_name): Rework to use build_mangled_name_for_type
14663         and to not use global nrepeats/Nrepeats.  Tidy.
14664         (process_modifiers): Tidy.
14665         (check_btype): Use is_backreferenceable_type.  Add comment.
14666         Rename `node' to `type'.
14667         (process_overload_item): Set numeric_output_need_bar here.
14668         Use build_mangled_name_for_type.  Tidy.
14669         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
14670         build_mangled_name_for_type.
14671
14672         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
14673         for TYPE_DECLs.
14674
14675 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
14676
14677         * cp-tree.h (warn_long_long): Define.
14678         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
14679         warning "ANSI C++ does not support `long long'".
14680         * decl2.c (warn_long_long): Define.
14681         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
14682
14683 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
14684
14685         * decl.c (xref_tag): Handle attributes between 'class' and name.
14686         * parse.y (aggr): Likewise.
14687         * semantics.c (finish_class_definition): Likewise.
14688         * Makefile.in (EXPECTED): Adjust.
14689
14690         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
14691         * decl2.c: Define them.
14692         (lang_decode_option): Handle them.
14693         * lang-options.h: Add -foptional-diags.
14694         * class.c (finish_struct): Don't complain about multiple meanings of
14695         name if -fno-optional-diags.
14696         * decl.c (pushdecl_class_level): Likewise.
14697         * lex.c (real_yylex): Check warn_multichar.
14698
14699 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
14700
14701         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
14702
14703         * tree.c (make_binfo): Fix length.
14704
14705 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
14706
14707         * decl2.c (lang_decode_option): Remove warn_template_debugging.
14708         * lang-options.h: Likewise.
14709
14710 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14711
14712         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
14713         (process_start_catch_block): Likewise for variables
14714         `false_label_rtx', `call_rtx' and `return_value_rtx'.
14715
14716 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
14717
14718         * tree.c (build_srcloc): Make sure we allocate this node on the
14719         permanent obstack.
14720
14721 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
14722
14723         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
14724         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
14725         (lang_specific_driver): Only add -lm automatically if need_math is
14726         nonzero.
14727
14728 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
14729
14730         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
14731
14732 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14733
14734         * Makefile.in (EXPR_H): New dependency variable.
14735         (decl2.o): Depend on $(EXPR_H).
14736         (typeck.o): Likewise.
14737         (init.o): Likewise.
14738         (expr.o): Likewise.
14739
14740 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14741
14742         * decl.c (start_enum): Put local enums on permanent_obstack.
14743
14744 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
14745
14746         * cp-tree.h (c_get_alias_set): Declare.
14747         * decl.c (init_decl_processing): Set lang_get_alias_set.
14748
14749 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
14750
14751         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
14752         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
14753         flag for all function decls which are in the exception table.
14754         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
14755         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
14756         code is emitted for any referenced rtti function.
14757
14758 1998-06-25  Dave Brolley  <brolley@cygnus.com>
14759
14760         * lang-specs.h: Use new | syntax to eliminate
14761         string concatenation.
14762
14763 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
14764
14765         * cp-tree.h (CP_DECL_CONTEXT): New macro.
14766         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
14767         * method.c (build_overload_nested_name): Likewise.
14768         * sig.c (build_signature_pointer_or_reference_type): Don't set
14769         DECL_CONTEXT.
14770
14771 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14772
14773         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
14774         * cp-tree.h (FROB_CONTEXT): New macro.
14775         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
14776         * decl.c (namespace_binding): Replace NULL_TREE with
14777         global_namespace.
14778         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
14779         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
14780         Likewise.
14781         * decl.c (pushtag): Use FROB_CONTEXT.
14782         (pushdecl, make_typename_type, define_function, grokdeclarator):
14783         Likewise.
14784         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
14785         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
14786         Likewise.
14787         * decl2.c (decl_namespace): Return global_namespace if no context.
14788         * method.c (build_overload_nested_name): Expect null as context.
14789         * pt.c (mangle_class_name_for_template): Do nothing for null
14790         contexts.
14791         (lookup_template_class): Allow for null id_context.
14792
14793 1998-06-25  Richard Henderson  <rth@cygnus.com>
14794
14795         * method.c (emit_thunk): Set current_function_is_thunk for the
14796         ASM_OUTPUT_MI_THUNK case as well.
14797
14798 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14799
14800         * exception.cc (__cplus_type_matcher): Get a match_info pointer
14801         instead of an exception table entry as a parameter.
14802
14803 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14804
14805         * parse.y (function_try_block): Don't call start_catch_handler.
14806         * except.c (call_eh_info): Remove coerced field from declaration.
14807         (build_eh_type_type_ref): New function to create an address of a
14808         rtti function for the new style exception tables.
14809         (expand_start_catch_block): Split function, this contains the
14810         common part.
14811         (process_start_catch_block_old): New function to perform the rest
14812         of expand_start_catch_block under old style exceptions.
14813         (process_start_catch_block_old): New function to perform the rest
14814         of expand_start_catch_block under new style exceptions.
14815         (expand_end_catch_block): Only pop the false label off the stack under
14816         the old style of exceptions.
14817         * semantics.c (finish_try_block): Don't call start_catch_handler.
14818         * exception.cc (struct cp_eh_info): Add original_value field.
14819         (__cplus_type_matcher): Perform type matching on the original exception
14820         value, and if we have a match, set the current value.
14821         (__cp_push_exception): Set the original exception value.
14822
14823 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
14824
14825         * call.c (joust): Fix confusing conversion warning.
14826
14827         * call.c (build_op_delete_call): Add placement parm.  Check
14828         LOOKUP_SPECULATIVELY.
14829         * cp-tree.h, decl2.c, init.c: Adjust.
14830         * decl.c (finish_function): Use it.
14831
14832         * pt.c (tsubst): Diagnose creating void fields or variables.
14833
14834 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14835
14836         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
14837
14838         * cp-tree.h (check_dtor_name): Add prototype.
14839
14840         * init.c (expand_member_init): Remove unused variables
14841         `ptr_type_node', `parm' and `rval'.
14842
14843         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
14844         in call to fprintf.
14845         (lang_print_xnode): Likewise.
14846
14847         * typeck2.c (enum_name_string): Cast argument to sprintf to long
14848         and use %ld specifier.
14849
14850         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
14851         specifier in call to fprintf.
14852         (GNU_xref_member): Cast argument to sprintf to int.
14853
14854 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14855
14856         * typeck2.c (pop_init_level): Warn about implicit zero initialization
14857         of struct members.
14858
14859 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14860
14861         * cp-tree.h: Prototype function `check_java_method'.
14862
14863 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
14864
14865         * class.c (finish_struct): Make conflicting use of id a pedwarn.
14866         * decl.c (pushdecl_class_level): Likewise.
14867
14868 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
14869
14870         * pt.c (convert_nontype_argument): Issue an error when presented
14871         with an integer (real) constant that cannot be simplified to an
14872         INT_CST (REAL_CST).
14873
14874         * cp-tree.h (c_get_alias_set): Remove declaration added in
14875         1998-06-13 change that should never have been checked in.
14876
14877 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
14878
14879         * typeck.c (build_binary_op_nodefault): Change % in format strings
14880         to %%.
14881
14882         * decl.c (grokvardecl): Don't build_static_name for decls that
14883         aren't at namespace scope.
14884
14885         * init.c (perform_member_init): Catch default-initialization of
14886         references.
14887
14888 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
14889
14890         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
14891
14892 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
14893
14894         * method.c (hack_identifier): Complain about getting a namespace
14895         or class template.
14896         * typeck.c (decay_conversion): Remove check for namespaces.
14897         * typeck2.c (incomplete_type_error): Likewise.
14898         * parse.y (template_arg): Add PTYPENAME expansion.
14899
14900 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
14901
14902         * decl.c (grokvardecl): Don't build external assembler names for
14903         TYPENAMEs in other namespaces as there is no declarator.
14904         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
14905         info from DECL_CONTEXT if it is NULL.
14906
14907 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
14908
14909         * call.c (check_dtor_name): Split out.
14910         (build_scoped_method_call): Use it.
14911         (build_method_call): Use it.
14912         * init.c (build_offset_ref): Use it.
14913
14914         * typeck.c (build_static_cast): Fix handling of pointers to members.
14915
14916         * decl.c (finish_function): Just return nothing from a constructor.
14917         * typeck.c (c_expand_return): Complain about returning a void
14918         expression from a destructor.
14919
14920 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
14921
14922         * class.c (alter_access): Accept a BINFO explaining how to get
14923         from the entity whose accessed is being altered to the type doing
14924         the altering.
14925         (handle_using_decl): New function containing code split out from ...
14926         (finish_struct_1): Here.
14927
14928         * cp-tree.h (complete_type_or_else): Declare.
14929         * init.c (build_new_1, build_delete): Use it.
14930         * typeck.c (require_complete_type): Use complete_type, rather than
14931         expanding it inline.
14932         (complete_type_or_else): New function.
14933         (build_component_ref): Use it.
14934         (pointer_int_sum): Make sure the type pointed to is complete.
14935         (pointer_diff): Likewise.
14936
14937         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
14938         types.
14939
14940         * search.c (get_matching_virtual): Note that member templates
14941         cannot override virtual functions.
14942
14943 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
14944
14945         * pt.c (check_explicit_specialization): If DECLARATOR turned into
14946         an error_mark_node from lookup_template_function, return the same.
14947         (determine_specialization): Also make sure TEMPLATE_ID isn't an
14948         error_mark_node, before we try to read its operands.
14949         * decl.c (grokdeclarator): If we got an error_mark_node from
14950         check_explicit_specialization, just return it right back.
14951
14952 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
14953
14954         * class.c (instantiate_type): Don't treat template-ids that don't
14955         specify any template arguments as equivalent to ordinary
14956         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
14957         pointer-to-members for member templates.  Tidy slightly.
14958         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
14959         * init.c (build_offset_ref): Handle template-ids like ordinary
14960         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
14961         offset part of the OFFSET_REF.
14962         * typeck.c (build_unary_op): Change check for unknown types to
14963         look for OFFSET_REFs, not SCOPE_REFs.
14964
14965 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
14966
14967         * pt.c (is_member_template_class): New function.
14968         (push_template_decl_real): Use it.
14969
14970 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
14971
14972         * friend.c (do_friend): Add support for nested classes using
14973         member functions of the enclosing class as friends.
14974
14975 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
14976
14977         * call.c (convert_default_arg): Make global, not static.
14978         (convert_arg_for_ellipsis): Split out from ...
14979         (build_over_call): Here.
14980         * cp-tree.h (convert_default_arg); Declare.
14981         (convert_arg_to_ellipsis): Likewise.
14982         (do_member_init): Remove.
14983         * init.c (do_member_init): Remove; this code is dead.
14984         (expand_member_init): Remove much of this code; it is dead.
14985         * typeck.c (convert_arguments): Use convert_default_arg and
14986         convert_arg_for_ellipsis, rather than duplicating here.
14987
14988         * call.c (convert_like): Don't fail silently if
14989         build_user_type_conversion fails.  Always return error_mark_node
14990         for failure.
14991
14992 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
14993
14994         * search.c (covariant_return_p): Complain about ambiguous base.
14995
14996         * typeck.c (build_component_ref): Diagnose ref to nested type.
14997
14998 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
14999
15000         * decl.c (grokparms): Check that INIT isn't an error_mark_node
15001         before giving error about invalid type for default arg.
15002
15003 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
15004
15005         * call.c (build_method_call): Fix thinko.
15006
15007 1998-06-10  Dave Brolley  <brolley@cygnus.com>
15008
15009         * decl2.c (lang_decode_option): New argc/argv interface.
15010         * cp-tree.h (lang_decode_option): New argc/argv interface.
15011         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
15012         specified for cpplib-enabled compilers.
15013         * lex.c (lang_init): Don't check_newline for cpplib.
15014         (init_parse): Don't initialize cpplib here.
15015
15016 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
15017
15018         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
15019         piece before checking DECL_MUTABLE_P.
15020
15021 1998-06-10  John Carr  <jfc@mit.edu>
15022
15023         * tree.c (debug_binfo): Make printf format match arguments.
15024
15025         * error.c (OB_PUTI): Make printf format match arguments.
15026
15027 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
15028
15029         * init.c (perform_member_init): Handle default-initialization.
15030
15031         * except.c (build_throw): Handle throwing NULL.
15032
15033         * typeck.c (build_x_function_call): Use resolve_offset_ref.
15034
15035         * search.c (compute_access): Only strip an anonymous union
15036         for a FIELD_DECL.
15037
15038         * call.c (add_builtin_candidates): Tweak.
15039
15040         * cvt.c (build_expr_type_conversion): Restore code for conversion
15041         from class types.
15042         * decl2.c (delete_sanity): Use it.  Clean up.
15043
15044         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
15045
15046 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
15047
15048         * typeck.c (c_expand_return): Don't warn about void expressions on
15049         return statements in functions returning void.
15050
15051 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
15052
15053         * pt.c (fn_type_unification): Revise documentation.  Tidy.
15054         (type_unification): Likewise.
15055
15056 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
15057
15058         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
15059         expand_end_catch.
15060         * parse.y (function_try_block): Rename expand_start_catch, and delete
15061         expand_end_catch.
15062         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
15063         expand_end_catch.
15064
15065 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
15066
15067         * search.c (lookup_member): New fn.
15068         * class.c (finish_struct_1): Use it.
15069         * decl.c (lookup_name_real): Use it.
15070
15071 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15072
15073         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
15074
15075         * cp-tree.h: Add prototype for `maybe_print_template_context' and
15076         `maybe_make_one_only'.
15077
15078         * decl.c (auto_function): Remove unused variable `decl'.
15079
15080         * decl2.c: Include dwarf2out.h and dwarfout.h.
15081
15082         * lex.c: Remove redundant declarations of `set_float_handler' and
15083         `asm_out_file'.
15084
15085 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
15086
15087         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
15088         time flag.  Call __cp_eh_info instead of __cp_exception_info.
15089         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
15090         (__cp_exception_info): Return offset into cp_eh_info structure to
15091         match what use to be the start of this structure.
15092         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
15093         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
15094         compile time flag.
15095         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
15096         __cp_eh_info instead of __cp_exception_info.
15097
15098 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
15099
15100         * decl.c (cp_finish_decl): Disable inlining of extern inlines
15101         with static variables.
15102
15103 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
15104
15105         * init.c (build_offset_ref): Correct previous change to use build,
15106         not build_min.
15107
15108 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
15109
15110         * class.c (instantiate_type): Handle pointer-to-members where the
15111         member is a template.
15112         * init.c (build_offset_ref): Likewise.
15113         * typeck.c (build_unary_op): Likewise.
15114
15115 1998-06-07  Richard Henderson  <rth@cygnus.com>
15116
15117         * lex.c (lang_init_options): New function.
15118         (lang_init): Remove flag_exceptions == 2 hack.
15119
15120 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
15121
15122         * search.c (envelope_add_decl): Tweak for implicit typename.
15123
15124         * call.c (joust): Also warn about confusing conversion op/constructor
15125         overload resolution.
15126
15127         * spew.c (yylex): Also return the TYPE_DECL if got_object.
15128         Don't clear got_object after '~'.
15129         * call.c (build_scoped_method_call): Tweak destructor handling.
15130         (build_method_call): Likewise.
15131         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
15132         TYPE_MAIN_VARIANT for destructors.
15133         * semantics.c (finish_object_call_expr): Complain about calling a
15134         TYPE_DECL.
15135
15136 1998-06-05  Per Bothner  <bothner@cygnus.com>
15137
15138         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
15139         Define - update needed by gcc.c change.
15140
15141 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
15142
15143         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
15144
15145 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
15146
15147         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
15148         * decl.c (lookup_name_real): Add namespaces_only parameter.
15149         If set, return only NAMESPACE_DECLs.
15150         (select_decl): Likewise.
15151         (identifier_type_value): Give additional parameter.
15152         (lookup_name_nonclass): Likewise.
15153         (lookup_name): Likewise.
15154         (find_binding): Skip namespace aliases.
15155         (binding_for_name): Likewise.
15156         (push_namespace): Check for namespace aliases.
15157         (lookup_name_namespace_only): New function.
15158         (begin_only_namespace_names, end_only_namespace_names): New functions.
15159         * decl2.c (set_decl_namespace): Skip namespace aliases.
15160         (do_using_directive): Likewise.
15161         (do_namespace_alias): Produce namespace aliases, fix alias
15162         redeclaration.
15163         * error.c (dump_decl): Support SCOPE_REF.
15164         * parse.y (extdef): Wrap lookup with namespace_only for namespace
15165         aliases and using declarations.
15166
15167 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
15168
15169         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
15170
15171         * error.c (dump_expr): Clean up NEW_EXPR case.
15172
15173 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
15174
15175         Suggested by Brendan Kehoe
15176         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
15177         treat it as using ::decl.
15178
15179         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
15180
15181         * tree.c (mapcar): Support NEW_EXPR.
15182
15183         * error.c (dump_expr): Support NEW_EXPR.
15184
15185 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
15186
15187         * method.c (make_thunk): Use overload machinery to make name.
15188         * search.c (covariant_return_p): New fn.
15189         (get_matching_virtual): Use it.
15190
15191         * init.c (build_new_1): Fix check for void.
15192
15193 1998-06-01  Per Bothner  <bothner@cygnus.com>
15194
15195         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
15196         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
15197         java_int_type_node, java_long_type_node, java_float_type_node,
15198         java_double_type_node, java_char_type_node, java_boolean_type_node):
15199         New "primitive" types, with predefined names __java_byte etc.
15200         (record_builtin_java_type):  New function.
15201         (init_decl_processing):  Make Java types with record_builtin_java_type.
15202         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
15203         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
15204         (grokfndecl):  Call check_java_method for Java classes.
15205         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
15206         (process_overload_item):  Match types against specific
15207         java_XX_type_node types, rather than using is_java_type.
15208         * class.c (finish_struct_1):  Don't add default copy constructor
15209         or operator= if TYPE_FOR_JAVA.
15210         (pop_lang_conext):  Restore strict_prototyp proper if Java.
15211         * decl2.c (acceptable_java_type, check_java_method):  New functions.
15212         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
15213         (tsubst):  Move common statement after if statement.
15214         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
15215
15216 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
15217
15218         * pt.c (for_each_template_parm): Use first_rtl_op.
15219
15220         * tree.c (build_cplus_array_type_1): Also check index_type for
15221         template parms.
15222
15223 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
15224
15225         * pt.c (tsubst): Always copy BINFO_BASETYPES.
15226
15227 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
15228
15229         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
15230         TYPE_SIZE_UNIT too.
15231
15232 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
15233
15234         * decl.c (grokdeclarator): Don't complain about in-class
15235         initialization of static consts if we don't really know the type
15236         of the variable.
15237
15238 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
15239
15240         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
15241         * method.c (build_destructor_name): New fn.
15242         * decl2.c (maybe_retrofit_in_chrg): Split out...
15243         (grokclassfn): From here.  Reorganize.
15244         * decl.c (grok_ctor_properties): Make sure ctors for types with
15245         vbases have the in_chrg parm.
15246         * pt.c (instantiate_class_template): Update
15247         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
15248         grok_*_properties.
15249         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
15250
15251 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
15252
15253         * pt.c (instantiate_decl): Make test for whether or not static
15254         variables should be instantiated early match its comment.
15255
15256 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
15257
15258         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
15259         a member.
15260         (start_function): Call check_default_args.
15261         * decl2.c (grokfield): Don't call check_default_args.
15262         (check_default_args): Use cp_error_at.
15263         * lex.c (do_pending_defargs): Call check_default_args.
15264
15265 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
15266
15267         * call.c (build_method_call): Make sure get_type_value returns
15268         something before we try to use its TYPE_MAIN_VARIANT.
15269         (build_scoped_method_call): Likewise.
15270
15271 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
15272
15273         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
15274         initialize an array.
15275
15276         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
15277         DECL_VIRTUAL_P.
15278
15279         * friend.c (do_friend): Clarify template warning.
15280
15281 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
15282
15283         * decl.c (shadow_label): Don't treat decls as identifiers.
15284         (maybe_push_to_top_level): Clear shadowed_labels.
15285
15286         * pt.c (instantiate_decl): Reset lineno and filename after calling
15287         regenerate_decl_from_template.
15288
15289         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
15290         error_mark_node.
15291
15292 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
15293
15294         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
15295
15296 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15297
15298         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
15299         (convert_nontype_argument): Handle cases when nontype template
15300         parameters become classes after substitution.
15301
15302 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
15303
15304         * friend.c (is_friend): Use comptypes, rather than == to compare
15305         types.  Modify for new representation of template friends.
15306         (make_friend_class): Likewise.
15307         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
15308         (instantiate_class_template): Deal with template friends.
15309
15310         * decl.c (store_parm_decls): Remove redundant call to
15311         expand_main_function.
15312
15313 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
15314
15315         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
15316         DECL_USE_TEMPLATE.
15317
15318 1998-05-26  Per Bothner  <bothner@cygnus.com>
15319
15320         * language_as_string:  Handle lang_java.
15321
15322 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
15323
15324         * decl.c (pushdecl): Don't copy the type_decl.
15325
15326 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15327
15328         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
15329         current_class_type.
15330         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
15331
15332         * parse.y (complex_direct_notype_declarator): Use $1 to access
15333         scope of notype_qualified_id.
15334
15335 1998-05-26  Dave Brolley  <brolley@cygnus.com>
15336
15337         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
15338         (init_parse): Initialize cpplib interface.
15339
15340         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
15341         empty continuation.
15342
15343 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
15344
15345         * decl.c (pushtag): Avoid crashing on erroneous input.
15346
15347 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15348
15349         * decl.c (push_namespace): Only produce one unique name for
15350         anonymous namespaces.
15351         (get_unique_name): Remove.
15352
15353 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
15354
15355         * call.c (tourney): Don't do any extra comparisons.
15356
15357         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
15358
15359         * cp-tree.h (processing_template_parmlist): Declare.
15360         * decl.c (pushtag): Don't call push_template_decl when we
15361         shouldn't.
15362         * pt.c (processing_template_parmlist): New variable.
15363         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
15364         (complete_template_args): Use it.
15365         (add_to_template_args): Likewise.
15366         (innermost_args): Likewise.
15367         (tsubst): Likewise.
15368         (begin_template_parm_list): Use processing_template_parmlist.
15369         (end_template_parm_list): Likewise.
15370
15371         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
15372         * decl.c (grokdeclarator): Use it.
15373         * decl2.c (grok_x_components): Likewise.
15374         * init.c (initializing_context): Likewise.
15375         * method.c (do_build_copy_constructor): Likewise.
15376         (do_build_assign_ref): Likewise.
15377         * search.c (compute_access): Likewise.
15378         * typeck.c (build_component_ref): Likewise.
15379
15380         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
15381         unnamed type a typedef name "for linkage purposes".
15382
15383         * pt.c (lookup_template_class): Don't look at
15384         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
15385
15386         * method.c (build_overload_int): Handle error cases gracefully.
15387
15388         * pt.c (instantiate_decl): Handle static member variables
15389         correctly.
15390
15391         * pt.c (tsubst): Use the tsubst'd type when producing new
15392         TEMPLATE_PARM_INDEX nodes.
15393
15394 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
15395
15396         * tree.c (cp_tree_equal): Handle pointers to member functions.
15397
15398         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
15399         sure the type of the REF_BIND is a reference type.
15400         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
15401         target_type for clarity.
15402
15403         * parse.y (xcond): Move call to condition_conversion ...
15404         * semantics.c (finish_for_cond): Here.
15405         * parse.c: Regenerated.
15406
15407 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
15408
15409         * decl.c (push_namespace): Namespaces have type void.
15410         * typeck2.c (incomplete_type_error): Complain about namespace
15411         used as expression.
15412         * typeck.c (decay_conversion): Likewise.
15413
15414 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
15415
15416         * error.c (dump_expr): Support namespaces.
15417
15418 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
15419
15420         * cp-tree.def: Add SRCLOC.
15421         * cp-tree.h: Add struct tree_srcloc and accessor macros.
15422         * tree.c (build_srcloc, build_srcloc_here): New fns.
15423         * pt.c (add_pending_template): Use build_srcloc_here.
15424         (push_tinst_level): Update last_template_error_tick before erroring.
15425         (instantiate_decl): Restore lineno and input_filename before
15426         calling add_pending_template.
15427         * decl2.c (finish_file): Set up lineno and input_filename for
15428         pending templates.
15429
15430 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
15431
15432         * decl.c (lang_print_error_function): New fn.
15433         (init_decl_processing): Set print_error_function to use it.
15434         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
15435
15436         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
15437         ICS_BAD_FLAG.
15438
15439         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
15440         copy-initialization.
15441
15442         * class.c (build_vtable_entry): Use int_fits_type_p.
15443         (build_vtable): Pass a signed offset to build_vtable_entry.
15444         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
15445         set_rtti_entry): Likewise.
15446
15447 1998-05-22  Per Bothner  <bothner@cygnus.com>
15448
15449         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
15450         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
15451
15452 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
15453
15454         * pt.c (print_template_context): Use fprintf instead of cp_error.
15455
15456         * pt.c (determine_specialization): Just return an error_mark_node.
15457         Also print the decl we want in error messages.  If we complain,
15458         return error_mark_node.
15459         (tsubst_friend_function): Set lineno and input_filename so
15460         error messages will be useful.
15461         (instantiate_template): Just return an error_mark_node.
15462         (check_explicit_specialization): Don't mess with a returned
15463         error_mark_node.
15464
15465         * pt.c (print_template_context): Add new argument.
15466         (maybe_print_template_context): New fn.
15467         (push_tinst_level): Increment tinst_level_tick.
15468         (pop_tinst_level): Likewise.
15469         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
15470         xrealloc instead of xmalloc.
15471
15472         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
15473
15474 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
15475
15476         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
15477         if the template we looked up is the same as the one we already
15478         have.
15479
15480 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
15481
15482         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
15483         (cpp_reader,parse_in): Add for cpplib.
15484         (check_newline): Call handle_sysv_pragma with new interface.
15485         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
15486
15487         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
15488         (sub_getch): Call GETC for cpplib.
15489
15490         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
15491         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
15492
15493         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
15494
15495 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
15496
15497         * decl2.c (maybe_make_one_only): New fn.
15498         (import_export_vtable): Use it.
15499         (import_export_decl): Likewise.
15500         * pt.c (mark_decl_instantiated): Likewise.
15501
15502 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
15503
15504         * decl2.c (find_representative_member): Rename to ...
15505         (build_anon_union_vars): New function.
15506         (finish_anon_union): Fix stupidity of previous change.
15507
15508 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
15509
15510         * decl.c (grokfndecl): Handle definition of specialization in
15511         friend declaration.
15512
15513         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
15514
15515 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
15516
15517         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
15518         to look for type declarations.
15519         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
15520         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
15521         (finish_member_class_template): Declare.
15522         * decl.c (pushtag): Put member class templates on the
15523         CLASSTYPE_TAGS list, just as for ordinary member classes.
15524         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
15525         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
15526         IDENTIFIER_NAMESPACE_VALUEs.
15527         * parse.y (component_decl): Move code to ...
15528         * semantics.c (finish_member_class_template): New function.
15529         Don't put member class templates on the list of components for a
15530         class.
15531         * parse.c: Regenerated.
15532         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
15533         In fact, don't use DECL_CONTEXT at all here.
15534
15535 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15536
15537         * decl.c (record_unknown_type): New function.
15538         (init_decl_processing): Call it for the unknown and global type
15539         nodes.
15540
15541 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
15542
15543         * decl2.c (find_representative_member): New function.
15544         (finish_anon_union): Use it.
15545
15546         * cp-tree.h (MAIN_NAME_P): New macro.
15547         (DECL_MAIN_P): Likwise.
15548         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
15549         (grokfndecl): Use the new macros.
15550         (grokdeclarator): Likewise.
15551         (start_function): Likewise.
15552         (store_parm_decls): Likewise.
15553         (finsh_function): Likewise.
15554         * friend.c (do_friend): Likewise.
15555         * typeck.c (build_function_call_real): Likewise.
15556         (build_unary_op): Likewise.
15557
15558 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
15559
15560         * decl2.c (start_objects, finish_objects, do_dtors,
15561         do_ctors): Split out from...
15562         (finish_file): ...here.
15563
15564 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
15565
15566         * tree.c (is_overloaded_fn): Don't abort on placeholders from
15567         push_class_decls.
15568
15569 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
15570
15571         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
15572
15573         * error.c (dump_expr): Handle an ARROW_EXPR.
15574
15575 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
15576
15577         * decl.c (saveable_obstack): Declare.
15578         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
15579         declare, if necessary.
15580
15581 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
15582
15583         * call.c (compare_qual): Remove.
15584         (is_subseq): Tweak.
15585         (is_properly_derived_from): New function.
15586         (maybe_handle_ref_bind): Likewise.
15587         (maybe_handle_implicit_object): Likewise.
15588         (compare_ics): Modify substantially to bring into conformance with
15589         the standard.
15590         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
15591         (comp_cv_qualification): Declare.
15592         (comp_cv_qual_signature): Likewise.
15593         * typeck.c (comp_cv_qualification): Likewise.
15594         (comp_cv_qual_signature): Likewise.
15595
15596 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15597
15598         * Makefile.in (parse.o): Depend on toplev.h.
15599
15600         * class.c (typecode_p): Remove prototype and definition.
15601
15602         * cp-tree.h (currently_open_class, is_empty_class, member_p):
15603         Add prototype.
15604
15605         * decl.c (push_overloaded_decl_top_level): Remove prototype and
15606         definition.
15607
15608         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
15609         in call to `cp_thing'.
15610         (cp_warning): Likewise for function pointer `warning'.
15611
15612         * except.c (do_function_call): Remove prototype and definition.
15613         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
15614
15615         * method.c (is_java_type): Add prototype and make it static.
15616
15617         * parse.y: Include toplev.h.
15618
15619         * pt.c (type_unification): Remove unused variable `arg'.
15620         (instantiate_decl): Likewise for `save_ti'.
15621
15622         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
15623
15624 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
15625
15626         * init.c (build_member_call): Handle template_ids.
15627         * parse.y (primary): Add global_scope template_id.
15628
15629 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
15630
15631         * decl2.c (get_sentry): Use end_temporary_allocation.
15632         Don't declare permanent_obstack.
15633
15634 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
15635
15636         * parse.y (.finish_new_placement): New non-terminal.
15637         (unary_expr, new_type_id): Use it.
15638         * parse.c: Regenerated.
15639
15640 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
15641
15642         * pt.c (redeclare_class_template): Say where the original definition
15643         of the template-parameter's default argument appeared.
15644
15645 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
15646
15647         * call.c (build_over_call): Tweak empty class handling.
15648
15649         * decl.c (make_typename_type): Use currently_open_class.
15650
15651         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
15652
15653 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
15654
15655         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
15656         for a type unless it is one.
15657
15658         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
15659
15660 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
15661
15662         * Makefile.in (program_transform_name, objdir): Define.
15663
15664         * Makefile.in (BISON): Use bison from the build tree if it exists.
15665         (FLEX): Likewise.
15666
15667 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
15668
15669         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
15670
15671         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
15672
15673 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
15674
15675         * call.c (build_scoped_method_call): Likewise.
15676
15677 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
15678
15679         * init.c (build_new_1): Call suspend_momentary around the creation
15680         of values that must be saved for exception handling.
15681         * parse.y (.build_new_placement): New non-terminal.
15682         (unary_expr, new_placement): Use it.
15683         * parse.c: Regenerated.
15684
15685 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
15686
15687         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
15688         old and new types.
15689
15690         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
15691         canonical type.
15692
15693         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
15694
15695 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
15696
15697         * decl.c (start_decl): Revert problem change.
15698
15699         * Makefile.in (CONFLICTS): Fix.
15700
15701 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15702
15703         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
15704
15705 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
15706
15707         * class.c (finish_struct_1): Use BINFO_SIZE.
15708
15709         * decl.c (start_decl): Use 'tem'.
15710
15711 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
15712
15713         * exception.cc: Include eh-common.h.
15714         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
15715         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
15716         (__cp_push_exception): Initialize eh_info struct as well.
15717         * except.c: Remove local structs and include eh-common.h.
15718         (init_exception_processing): Set language and version codes.
15719         (call_eh_info): Add presence of eh_info to runtime description of
15720         struct cp_eh_info.
15721         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
15722         * semantics.c (finish_try_block): Call start_catch_block() and
15723         end_catch_block().
15724         * parse.y (function_try_block): Call start_catch_block() and
15725         end_catch_block().
15726
15727 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
15728
15729         * typeck.c (original_type): New function.
15730         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
15731         to see if they're actually the same.
15732         * cp-tree.h (original_type): Declare.
15733
15734 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15735
15736         * Makefile.in (lex.o): Depend on output.h.
15737
15738         * call.c (add_function_candidate): Remove unused variable `cand'.
15739         (add_conv_candidate): Likewise.
15740         (build_builtin_candidate): Likewise.
15741
15742         * cp-tree.h: Add prototype for `types_overlap_p'.
15743
15744         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
15745
15746         * decl2.c (merge_functions): Remove unused variables `tmp' and
15747         `tempn'.
15748
15749         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
15750         (code_as_string): Likewise.
15751         (language_as_string): Likewise.
15752         (parm_as_string): Likewise.
15753         (op_as_string): Likewise.
15754         (assop_as_string): Likewise.
15755         (cv_as_string): Likewise.
15756
15757         * lex.c: Include output.h.
15758
15759         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
15760
15761         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
15762         ATTRIBUTE_UNUSED.
15763
15764         * tinfo.cc (__class_type_info::dcast): Change the type of variable
15765         `i' from int to size_t.
15766
15767         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
15768         ATTRIBUTE_UNUSED.
15769
15770 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
15771
15772         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
15773         DECL_NAMESPACE_SCOPE_P.
15774         (lang_decl_name): Likewise.
15775         * pt.c (tsubst_friend_function, tsubst): Likewise.
15776         * decl.c (pushdecl, redeclaration_error_message, start_decl,
15777         cp_finish_decl, start_function): Likewise.
15778         * class.c (finish_struct_1): Likewise.
15779         * call.c (build_over_call): Likewise.
15780         (compare_ics): Use DERIVED_FROM_P.
15781
15782 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
15783
15784         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
15785         * method.c (build_mangled_name): Use it.
15786         (build_decl_overload_real): Likewise.
15787
15788         * error.c (dump_simple_decl): New function, broken out from ...
15789         (dump_decl): Use it.
15790
15791 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
15792
15793         * ptree.c (lang_print_xnode): Add missing `break'.
15794
15795         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
15796
15797         * call.c (add_template_candidate): Adjust for changes to
15798         fn_type_unification.
15799         (add_template_candidate_real): Likewise.
15800         (add_template_conv_candidate): Likewise.
15801         (build_user_type_conversion_1): Likewise.
15802         (build_new_function_call): Likewise.
15803         (build_object_call): Likewise.
15804         (build_new_op): Likewise.
15805         (build_new_method_call): Likewise.
15806         * class.c (instantiate_type): Likewise.
15807         * cp-tree.h (unification_kind_t): New type.
15808         (fn_type_unification): Adjust prototype.
15809         (type_unificaiton): Likewise.
15810         * pt.c (UNIFY_ALLOW_NONE): New macro.
15811         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
15812         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
15813         (UNIFY_ALLOW_DERIVED): Likewise.
15814         (unify): Change prototype.
15815         (maybe_adjust_types_for_deduction): New function.
15816         (check_cv_quals_for_unify): Likewise.
15817         (determine_specialization): Adjust.
15818         (fn_type_unification): Likewise.
15819         (type_unification): Likewise.
15820         (type_unification_real): Likewise.  Use
15821         maybe_adjust_types_for_deduction.  Fix mishandling of
15822         back-unification of template functions passed as arguments.  Pass
15823         appropriate combination of UNIFY_ALLOW_* to unify.
15824         (unify): Remove unused NTPARMS parameter.  Use
15825         check_cv_quals_for_unify.  Remove bogus code that allowed
15826         too-generous unification in order to adhere more closely to standard.
15827         (get_bindings_real): Adjust.
15828         (get_class_bindings): Likewise.
15829
15830         * method.c (build_overload_identifier): Only use the innermost
15831         template arguments when mangling.
15832         * pt.c (tsubst_template_argument_vector): New function.
15833         (complete_template_args): Deal with the situation where the
15834         extra_args contain more than one level of arguments.
15835         (lookup_template_class): Deal with member template classes, which
15836         may have more than one level of arguments.
15837         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
15838         Improve handling of member template classes.  Use
15839         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
15840         tsubst_template_argument_vector where appropriate.
15841         (regenerate_decl_from_template): Break out from ...
15842         (instantiate_decl): Here.
15843
15844         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
15845         * parse.h: Regenerated.
15846         * parse.c: Really regenerated.
15847
15848         * cp-tree.h (finish_unary_op_expr): New function.
15849         (finish_id_expr): Likewise.
15850         (begin_new_placement): Likewise.
15851         (finish_new_placement): Likewise.
15852         (finish_declarator): Likewise.
15853         (finish_translation_unit): Likewise.
15854         (finish_parmlist): Likewise.
15855         (begin_class_definition): Likewise.
15856         (finish_class_definition): Likewise.
15857         (finish_default_args): Likewise.
15858         (finish_inline_definitions): Likewise.
15859         * parse.y (GCC_ASM_KEYWORD): Remove.
15860         (TYPENAME_ELLIPSIS): Likewise.
15861         * parse.c: Regenerated.
15862         Use new functions in semantics.c in the actions for many rules.
15863         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
15864         * hash.h: Regenerated.
15865         * semantics.c (finish_expr_stmt): Allow NULL expr.
15866         (finish_unary_op_expr): New function, containing
15867         code previously in parse.y.
15868         (finish_id_expr): Likewise.
15869         (begin_new_placement): Likewise.
15870         (finish_new_placement): Likewise.
15871         (finish_declarator): Likewise.
15872         (finish_translation_unit): Likewise.
15873         (finish_parmlist): Likewise.
15874         (begin_class_definition): Likewise.
15875         (finish_class_definition): Likewise.
15876         (finish_default_args): Likewise.
15877         (finish_inline_definitions): Likewise.
15878
15879 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
15880
15881         * typeck.c (build_c_cast): Don't decay arrays and functions to
15882         pointer type when converting to a class type.
15883
15884 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
15885
15886         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
15887         (DECL_CLASS_SCOPE_P): Likewise.
15888
15889 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
15890
15891         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
15892         * decl2.c (constructor_name_full): Likewise.
15893
15894 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
15895
15896         * tree.c (mapcar): Add OVERLOAD support.
15897
15898         * init.c (resolve_offset_ref): We must use basetype_path before we
15899         destroy it with a call to convert_pointer_to.
15900
15901 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
15902
15903         * class.c (currently_open_class): New fn.
15904         * decl.c (lookup_name_real): Use it.
15905         * search.c (lookup_field): Likewise.
15906
15907 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15908
15909         * cp-tree.def (OVERLOAD): New node.
15910         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
15911         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
15912         (NAMESPACE_BINDING): Remove.
15913         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
15914         namespace_binding.
15915         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
15916         Define.
15917         (tree_overload): New struct.
15918         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
15919         (REAL_IDENTIFIER_TYPE_VALUE): Define.
15920         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
15921         (lang_decl_flags): Remove in_namespace.
15922         (lang_decl): Remove chain.
15923         (DECL_CHAIN, DECL_NAMESPACE): Remove.
15924         (flag_honor_std): Declare extern.
15925         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
15926         namespace_binding, set_namespace_binding,
15927         lookup_function_nonclass, cat_namespace_levels,
15928         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
15929         scratch_ovl_cons, ovl_member, build_overload): Declare.
15930         (decl_list_length, get_namespace_id, current_namespace_id,
15931         overloaded_globals_p): Remove.
15932         (lookup_using_namespace, qualified_lookup_using_namespace): Change
15933         return type.
15934         (push_scratch_obstack): New macro.
15935         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
15936         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
15937         convs, fns.
15938         (build_new_function_call): Iterate using OVL_CHAIN.
15939         Print DECL_NAME in when reporting ambiguities.
15940         (build_object_call): Iterate using OVL_NEXT for fns, convs.
15941         (build_new_op): Call lookup_function_nonclass.
15942         Iterate using OVL_NEXT.
15943         (build_op_delete_call): Change detection of members.
15944         Do not wrap TREE_LIST around fields and single global functions.
15945         (build_over_call): Don't push a class level if the context is a
15946         namespace.
15947         (build_new_method_call): Iterate using OVL_NEXT.
15948         * class.c (add_method): Chain overloaded members using
15949         build_overload.  Remove copying of method.
15950         (grow_method): When iterating through the obstack, expect OVERLOAD
15951         nodes.  Chain overload members.
15952         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
15953         nodes in call to get_baselinks.
15954         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
15955         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
15956         fdecls that are OVERLOAD nodes.
15957         (validate_lhs): New function.
15958         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
15959         code.  Use DECL_NAME in error messages.  Split code between global
15960         and member function processing.
15961         * decl.c (global_type_node): New static variable.
15962         (in_std): New global.
15963         (struct binding_level): New field usings.
15964         (resume_binding_level): Assert that we are not in a class.
15965         (toplevel_bindings_p): Just check for namespace_p or
15966         pseudo_global.
15967         (resume_level): Remove.
15968         (find_binding): New function.
15969         (binding_for_name): Call it.
15970         (namespace_binding, set_namespace_binding): New functions.
15971         (push_namespace): Associate binding level with new namespace,
15972         resume_binding_level for existing namespace.  Remove old code.
15973         Fake std by counting.
15974         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
15975         (maybe_push_to_top_level): Save current namespace.
15976         (pop_from_top_level): Restore saved namespace.
15977         (pop_namespace): Call suspend_binding_level.  Remove old code.
15978         (cat_namespace_levels): New function.
15979         (set_identifier_type_value_with_scope): For namespace bindings,
15980         set BINDING_TYPE, and use global_type_node.
15981         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
15982         (identifier_type_value): New function.
15983         (pushtag): If no context, use current_namespace.
15984         (duplicate_decls): Don't process DECL_CHAIN.
15985         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
15986         already set.  Never reset it to NULL_TREE.  Lookup global variables
15987         in their namespace.  Push overloaded templates if they are on
15988         namespace level.
15989         (pushdecl_namespace_level): New function.
15990         (pushdecl_top_level): Implement using pushdecl_namespace_level.
15991         (pushdecl_using_decl): New function.
15992         (overloaded_globals_p): Remove.
15993         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
15994         them.  Use namespace_binding and set_namespace_value.
15995         (redeclaration_error_message): Complain if the declarations come
15996         from different namespaces.
15997         (lookup_tag): On namespace level, look in the BINDING_TYPE.
15998         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
15999         old code.
16000         (select_decl): New function.
16001         (lookup_name_real): Call it for qualified and unqualified lookup.
16002         Pass tree_bindings from the stack.
16003         If prefer_type is 1, also accept namespaces.
16004         (lookup_function_nonclass): New function.
16005         (init_decl_processing): Set the binding level of the global
16006         namespace to global_binding_level.
16007         Build a proper type list for __builtin_apply.
16008         Initialize std_node to "fake std" if flag_honor_std is set.
16009         Initialize global_type_node.
16010         Allocated bad_alloc in namespace std if flag_honor_std.
16011         (define_function): Set the DECL_CONTEXT to the current_namespace.
16012         (start_decl): A namespace is not considered as a context here.  If
16013         the DECL_CONTEXT is a namespace, push the decl.
16014         (cp_finish_decl): Check for namespaces used as initializers.
16015         (grokfndecl): Add namespace parameter.  Remove processing of
16016         DECL_CHAIN.
16017         (grokvardecl): Add namespace parameter.
16018         (grokdeclarator): Process SCOPEs that are namespaces.  For
16019         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
16020         (start_function): Check for contexts that are namespaces.
16021         Set context for declarations that have not been pushed.
16022         (store_parm_decls): Check for ::main only.
16023         (finish_function): Likewise.
16024         (start_method): Check for contexts that are namespaces.
16025         (start_method): Remove DECL_CHAIN processing.
16026         * decl2.c (flag_honor_std): Declare.
16027         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
16028         (decl_namespace_list): New static global.
16029         (grok_x_components): Ignore namespaces as type contexts.
16030         (check_classfn): Expect OVERLOAD nodes.
16031         (grokfield): Remove DECL_CHAIN processing.
16032         (finish_file): Call cat_namespace_levels.
16033         (merge_functions): New function.
16034         (ambiguous_decl): Rewrite.
16035         (lookup_using_namespace): Produce tree_bindings.
16036         (qualified_lookup_using_namespace): Likewise.
16037         (set_decl_namespace, decl_namespace, current_decl_namespace,
16038         push_decl_namespace, pop_decl_namespace): New functions.
16039         (arg_lookup): New struct.
16040         (add_function, arg_assoc_namespace, arg_assoc_class,
16041         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
16042         New functions.
16043         (get_namespace_id, current_namespace_id): Remove.
16044         (do_toplevel_using_decl): Rewrite.
16045         (do_class_using_decl): Complain about namespace qualifiers.
16046         (do_using_directive): Sorry if not on namespace level.  Complain
16047         about unknown namespaces.
16048         * error.c (dump_aggr_type): Check for namespace contexts.
16049         * except.c (init_exception_processing): Push terminate into std.
16050         * friend.c (is_friend): A namespace is not a context, here.
16051         * init.c (expand_member_init): Remove DECL_CHAIN processing.
16052         (build_offset_ref): Process OVERLOAD nodes.
16053         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
16054         * lex.c (identifier_type): Loop using OVL_CHAIN.
16055         (see_typename): Set looking_for_typename to 2.
16056         (real_yylex): Likewise.
16057         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
16058         (do_scoped_id): Expect OVERLOAD nodes.
16059         Change calling convention for qualified_lookup_using_namespace.
16060         (build_lang_decl): Don't set in_namespace anymore.
16061         * method.c (typevec_size): New global.
16062         (build_overload_nested_name): Return if global_namespace.
16063         Otherwise, always expect a declaration context.
16064         (build_qualified_name): Likewise.
16065         Make sure we don't write beyond typevec_size.
16066         (build_decl_overload_real): Likewise.
16067         Allocate one extra slot for the namespace.
16068         (hack_identifier): Mark code dead.
16069         Process OVERLOAD and NAMESPACE_DECL nodes.
16070         * parse.y (program): Pop namespaces until in global namespace.
16071         (extdef): In a using-declaration, don't discard the identifier if
16072         there is no declaration.
16073         (left_curly): Ignore type contexts which are namespaces.
16074         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
16075         used as scope.
16076         * pt.c (template_class_depth): Expect types to be namespaces.
16077         (determine_specialization): Simplify by expecting OVERLOAD nodes.
16078         (push_template_decl): Push into namespace level.
16079         Reset ctx if it is a namespace.
16080         Set DECL_CONTEXT to current_namespace if not set already.
16081         Ignore real contexts that are namespaces.
16082         (mangle_class_name_for_template): Skip global_namespace.
16083         Mangle other namespaces as declarations.
16084         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
16085         (lookup_template_class): Push into namespace of context.
16086         If the context is a namespace, set it to global_namespace.
16087         Use id_context for mangling.
16088         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
16089         (tsubst_friend_function): Ignore namespace contexts.
16090         Push into namespace level.
16091         (tsubst): Handle NAMESPACE_DECL nodes.
16092         Remove DECL_CHAIN processing.
16093         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
16094         * ptree.c (print_lang_identifier): Print bindings.
16095         (lang_print_xnode): Print OVERLOAD nodes.
16096         * rtti.c (init_rtti_processing): Push type_info into std.
16097         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
16098         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
16099         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
16100         lookup_fnfields_here): Likewise.
16101         Process all nodes, instead of going through TREE_CHAIN.
16102         * sig.c (build_signature_pointer_or_reference_type): Set context
16103         to global_namespace.
16104         (build_signature_table_constructor): Expect OVERLOAD nodes.
16105         * spew.c (yylex): Save old setting of looking_for_typename.
16106         * tree.c (decl_list_length): Remove.
16107         (binding_init): New function.
16108         (count_functions): Rewrite.
16109         (is_overloaded_fn): Expect OVERLOAD nodes.
16110         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
16111         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
16112         ovl_member): New functions.
16113         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
16114         (type_unknown_p): Likewise.
16115         (require_instantiated_type): Likewise.
16116         (build_component_ref): Declare code dead.
16117         (build_x_function_call): Create and expect OVERLOAD nodes.
16118         (build_function_call_real): Check for ::main only.
16119         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
16120         (convert_for_assignment): Check for TREE_LIST before accessing
16121         TREE_VALUE.
16122         * decl.c (duplicate_decls): Check for namespace bindings instead
16123         of global bindings.
16124         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
16125         lookup_name_current_level, start_decl, xref_tag,
16126         finish_enum): Likewise.
16127         * init.c (build_offset_ref): Likewise.
16128         * search.c (lookup_field): Likewise.
16129         (lookup_fnfields): Likewise.
16130         (dfs_debug_mark): Likewise.
16131         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
16132         (poplevel_class, pop_from_top_level): Likewise.
16133         * decl2.c (finish_method): Likewise.
16134         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
16135         * decl.c (record_builtin_type): Likewise.
16136         (init_decl_processing, grokfndecl): Likewise.
16137         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
16138         (make_lang_type): Likewise.
16139         * parse.y (make_thunk): Likewise.
16140         * pt.c (tsubst): Likewise.
16141         * tree.c (debug_binfo): Likewise.
16142         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
16143         tinfo2.cc, inc/new.h: Add std qualifications.
16144         * inc/new: Wrap with namespace std if __HONOR_STD.
16145         * inc/typeinfo: Likewise.
16146
16147 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
16148
16149         * call.c (build_user_type_conversion_1): Handle second_conv
16150         properly for templates.
16151
16152 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
16153
16154         * method.c (build_decl_overload_real): Set TREE_USED flag to
16155         zero for build_type_variants nodes as well.
16156
16157 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
16158
16159         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
16160
16161 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
16162
16163         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
16164         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
16165         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
16166         xref.o): Add toplev.h dependencies.
16167
16168 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
16169
16170         * errfn.c (cp_error, cp_warning): Remove declarations for
16171         error and warning respectively.
16172
16173 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16174
16175         * error.c: Convert to using ctype macros defined in system.h.
16176         * method.c: Likewise.
16177         * xref.c: Likewise.
16178         * lex.c: Likewise.  Also remove redundant system header stuff.
16179
16180 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
16181
16182         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
16183         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
16184         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
16185         xref.c: Add include of toplev.h.
16186
16187 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
16188
16189         * tree.c (perm_manip): Also regenerate the RTL of an extern.
16190         (copy_to_permanent): Use end_temporary_allocation.
16191
16192 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
16193
16194         * init.c (expand_vec_init): The initialization of each array
16195         element is a full-expression.
16196
16197 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
16198
16199         * method.c (build_mangled_name): Add a call to build_type_variant
16200         to get the right type.
16201
16202 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
16203
16204         * Makefile.in: Add .SUFFIXES.
16205
16206         * cp-tree.def: Remove NAMESPACE_DECL.
16207
16208 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
16209
16210         * call.c (build_over_call): Do evaluate arg even if it has empty
16211         class type.
16212         * decl.c (start_function): Don't push a member function.
16213
16214 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
16215
16216         * Makefile.in (g++FAQ.info): Put -o option before input file.
16217
16218 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
16219
16220         * gxxint.texi: Add info for squangling codes K and B.
16221
16222 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
16223
16224         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
16225         the expression in templates.
16226         (finish_stmt_expr): Likewise.
16227
16228 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
16229
16230         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
16231
16232 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
16233
16234         * decl.c (maybe_push_to_top_level): Always clear
16235         current_template_parms and processing_template_decl.
16236         (pushtag): Remove check of current_class_type and some comments,
16237         since maybe_push_to_top_level no longer creates confusion.
16238
16239 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
16240
16241         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
16242         (DECL_CLASS_TEMPLATE_P): Likewise.
16243         (DECL_PRIMARY_TEMPLATE): Likewise.
16244         (PRIMARY_TEMPLATE_P): Use it.
16245         (push_template_decl_real): New function.
16246         (redeclare_class_template): Take new template parameters as
16247         input.
16248         (is_specialization_of): New function.
16249         (comp_template_args): Declare.
16250         * decl.c (pushtag): Handle friend template classes.
16251         (xref_tag): Likewise.  Use new calling convention for
16252         redeclare_class_template.
16253         * decl2.c (grok_x_components): Handle friend templates.
16254         * friend.c (is_friend): Use is_specialization_of where
16255         appropriate.  Deal with friend class templates.
16256         (make_friend_class): Let a class template be friends with itself.
16257         * pt.c (comp_template_args): Remove declaration.
16258         (tsubst_friend_class): New function.
16259         (push_template_decl_real): New function.
16260         (push_template_decl): Use it.
16261         (redeclare_class_template): Adjust for new calling convention.
16262         (comp_template_args): Give it external linkage.
16263         (instantiate_class_type): Use tsubst_friend_class to deal
16264         with friend templates.
16265         * typeck.c (comptypes): Use comp_template_args, rather than
16266         expanding it inline.
16267         * parse.y (component_decl): Handle a nested template type
16268         like other component type declarations.
16269
16270         * pt.c (check_explicit_specialization): Handle overloaded
16271         constructors correctly.
16272
16273         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
16274         (lookup_template_class): Use it.
16275
16276 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
16277
16278         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
16279         * cp-tree.h: Add WRAPPER support.
16280         * call.c (add_candidate): Split out from add_*_candidate fns.
16281         (build_over_call): Take the candidate instead of function and args.
16282         Enforce access control here.  Emit overload warnings here.
16283         (add_warning): New fn.
16284         (joust): Add WARN parm.  If not set, call add_warning instead of
16285         printing a warning.  Re-enable some warnings.
16286         (tourney): Pass it.
16287         (convert_like): Adjust.
16288         (build_new_op): Adjust.
16289         (build_new_function_call): Adjust.
16290         (build_user_type_conversion_1): Adjust.
16291         (USER_CONV_FN): Adjust.
16292         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
16293         build_int_wrapper): New fns.
16294
16295 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
16296
16297         * pt.c (unify): Fix typo in previous change.
16298
16299 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
16300
16301         * error.c (dump_type_real): Declare canonical_name.
16302
16303         * typeck.c (comp_target_types): Fix PMFs.
16304
16305 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
16306
16307         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
16308         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
16309         TEMPLATE_DECL.
16310
16311         * pt.c (tsubst): Decrease the template-level of
16312         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
16313         TEMPLATE_PARM_INDEX.
16314         (template_decl_level): New function.
16315         (unify): Make sure to record unifications for template
16316         parameters, even when the parameters exactly match the arguments.
16317         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
16318         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
16319         aren't from the level we're currently working on.
16320
16321 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
16322
16323         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
16324
16325         * decl2.c (check_member_template): Set DECL_IGNORED for member
16326         class templates, too.
16327
16328         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
16329
16330 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16331
16332         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
16333
16334 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
16335
16336         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
16337         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
16338         (init_decl_processing): Handle TI types.
16339         * typeck.c (unsigned_type, signed_type): Handle TI types.
16340
16341 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
16342
16343         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
16344         New local added_libraries.  Increment count when add library to
16345         arglist.
16346
16347 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
16348
16349         * cp-tree.h (type_as_string_real): New function.
16350         * pt.c (mangle_class_name_for_template): Use it.
16351         * error.c (dump_aggr_type): Change prototype.
16352         (dump_type_prefix): Likewise.
16353         (dump_type_suffix): Likewise.
16354         (dump_type_real): Convert from dump_type.  If desired, the
16355         "canonica" name of a typedef, i.e., the name of the underlying
16356         type, can be printed.
16357         (dump_type): Call dump_type_real.
16358
16359 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
16360
16361         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
16362
16363         * typeck.c (comp_target_types): Tweak pedantic case.
16364         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
16365         Return -1 or 1 instead of 1 or 2.
16366         (compparms): Remove STRICT handling.
16367         (convert_for_assignment): Fix handling of pmfs.
16368
16369 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
16370
16371         * typeck.c (comp_target_types): Handle references like pointers.
16372         (comp_target_parms): Note that return code from comp_target_types
16373         can be negative to indicate failure.
16374
16375 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16376
16377         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
16378         which requires a working target compiler to build.
16379
16380 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
16381
16382         * tree.c (avoid_overlap): Add prototype.
16383
16384         * spew.c (num_tokens): Add prototype.
16385         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
16386
16387         * search.c (dfs_check_overlap): Add prototype.
16388         (dfs_no_overlap_yet): Likewise.
16389
16390         * pt.c (original_template): Add prototype.
16391         (inline_needs_template_parms): Likewise.
16392         (push_inline_template_parms_recursive): Likewise.
16393         (retrieve_specialization, register_specialization): Likewise.
16394         (print_candidates, reduce_template_parm_level): Likewise.
16395         (build_template_decl, mark_template_parm): Likewise.
16396         (tsubst_friend_function, get_bindings_real): Likewise.
16397
16398         * method.c (start_squangling): Add prototype.
16399         (end_squangling, check_ktype, issue_ktype): Likewise.
16400         (build_overloaded_scope_ref, check_btype): Likewise.
16401         (build_mangled_template_parm_index): Likewise.
16402
16403         * lex.c (init_cpp_parse): Add prototype.
16404         (handle_cp_pragma, handle_sysv_pragma): Likewise.
16405         (reduce_cmp, token_cmp): Likewise.
16406
16407         * except.c (call_eh_info): Add prototype.
16408         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
16409         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
16410
16411         * decl2.c (is_namespace_ancestor): Add prototype.
16412         (namespace_ancestor, add_using_namespace): Likewise.
16413         (ambiguous_decl): Likewise.
16414
16415         * decl.c (indent): Add prototype.
16416
16417         * call.c (add_template_candidate_real): Add prototype.
16418
16419 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
16420
16421         * decl2.c (build_expr_from_tree): Just return a PMF.
16422
16423 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
16424
16425         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
16426         when doing initializations.
16427
16428         * pt.c (unify): Use comptypes to compare type args.
16429
16430 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
16431
16432         * decl.c (duplicate_decls): Fix check for when it's safe to free
16433         the new decl.
16434
16435         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
16436         to type_as_string.
16437
16438 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
16439
16440         * pt.c (build_template_parm_index): Add prototype.
16441
16442         * search.c (my_tree_cons): Don't clear words outside the
16443         newly allocated node.
16444
16445 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
16446
16447         * lex.c (init_parse): Now returns char* containing the filename.
16448
16449 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
16450                           Jeff Law   <law@cygnus.com>
16451
16452         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
16453         than a pointer.
16454
16455 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16456
16457         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
16458
16459 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
16460
16461         * decl.c (duplicate_decls): Don't warn for redundant decls if
16462         friend: let add_friend take care of it.
16463
16464 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
16465
16466         * sig.c (build_signature_pointer_constructor): Don't set
16467         TREE_HAS_CONSTRUCTOR for a signature pointer.
16468         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
16469         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
16470         here, too.
16471         * typeck.c (build_unary_op): Only allow taking the address of a
16472         real constructor.
16473         * typeck2.c (digest_init): Simplify.
16474         (store_init_value): Don't pedwarn about using { } for pmfs.
16475
16476 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
16477
16478         * cp-tree.h (start_decl):  Update prototype.
16479         * decl.c (start_decl):  Like the C version, new parameters
16480         for the attributes.  Call cplus_decl_attributes here,
16481         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
16482         (grokdeclarator):  Pass NULL for new start_decl arguments.
16483         * pt.c (tsubst_expr):  Likewise.
16484         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
16485         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
16486         * lex.c (build_lang_decl): Add lang_name_java.
16487         * class.c (push_lang_context): Add lang_name_java.
16488         * method.c (build_mangled_name): Check for is_java_type.
16489
16490 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
16491
16492         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
16493         * call.c (build_scoped_method_call): Check for TREE_CODE for
16494         VOID_TYPE instead of type ==  void_type_node.
16495         (build_method_call): Likewise.
16496         * decl.c (lookup_name_real): Likewise.
16497         (grokdeclarator): Likewise.
16498         (start_decl): Likewise.
16499         (grokparms): Likewise.
16500         (start_function): Likewise.
16501         (finish_function): Likewise.
16502         (start_method): Likewise.
16503
16504 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
16505
16506         * lex.c (finput): New variable.
16507         (init_cpp_parse):  Renamed from init_parse.
16508         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
16509         (finish_parse): New function.
16510         * cp-tree.h (init_lex, init_parse): Remove declarations.
16511
16512 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
16513
16514         * call.c (build_call): Still evaluate the actual argument.
16515         * class.c (is_empty_class): Update for -fnew-abi.
16516
16517         * decl2.c: -fnew-abi implies -fsquangle.
16518
16519         * method.c (do_build_assign_ref): Don't do anything to copy
16520         an empty class.
16521         (do_build_copy_constructor): Likewise.
16522         * call.c (build_over_call): Likewise.
16523
16524 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
16525
16526         * tree.c (avoid_overlap): Return a value.
16527
16528 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
16529
16530         * method.c (check_btype): Add missing argument to xrealloc.
16531         (check_ktype): Likewise.
16532
16533 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
16534
16535         Implement empty base optimization.
16536         * class.c (finish_struct_1): Add vbase fields earlier.  Set
16537         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
16538         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
16539         (types_overlap_p): New fn.
16540         * tree.c (avoid_overlap): New fn.
16541         (build_base_fields): Use it to avoid overlapping empty bases.
16542         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
16543
16544         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
16545
16546         Re-implement allocation of base class subobjects.
16547         * tree.c (unshare_base_binfos): New fn.
16548         (layout_basetypes): Use it.  Now handles offsets of both virtual and
16549         non-virtual bases, after layout_type.
16550         (layout_vbasetypes): Remove.
16551         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
16552         (build_vbase_pointer_fields): Split out from old layout_basetypes.
16553         * class.c (finish_base_struct): Lose offset handling code.
16554         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
16555         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
16556         * cp-tree.h: Adjust.
16557
16558 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
16559
16560         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
16561         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
16562         * class.c (duplicate_tag_error): Likewise.
16563         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
16564         * tree.c (layout_vbasetypes): Update from layout_record, remove
16565         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
16566         (layout_basetypes): Likewise.
16567
16568 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
16569
16570         * class.c, Make sure system.h is included just after config.h.
16571         Delete lingering stdio and errno references too.
16572         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
16573
16574 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
16575
16576         * friend.c (is_friend): Fix access control for local classes.
16577
16578         * class.c (is_empty_class): New fn.
16579         * call.c (build_call): Don't pass empty class objects to a function.
16580
16581 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
16582
16583         * call.c (build_over_call): Do name resolution for default
16584         arguments of function templates in the scope of the templates.
16585
16586 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
16587
16588         * call.c: Include system.h.  Remove includes, declarations and
16589         defines provided by system.h.
16590         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
16591         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
16592         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
16593         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
16594         * typeck2.c, xref.c: Likewise.
16595         * Makefile.in: Dependencies updated as appropriate.
16596         * Make-lang.in: Likewise.
16597
16598 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
16599
16600         * pt.c (fn_type_unification): Allow incomplete unification without
16601         an immediate error message.
16602
16603 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
16604
16605         * tree.c (member_p): New fn.
16606         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
16607         initializing class members.
16608
16609         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
16610         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
16611
16612         * call.c (build_method_call): Handle non-scoped destructors, too.
16613         * pt.c (tsubst_copy): Likewise.
16614
16615         * pt.c (print_template_context): Split out...
16616         (push_tinst_level): ...from here.
16617
16618         * friend.c (is_friend): Don't pass a type to decl_function_context.
16619
16620         * typeck.c (convert_for_initialization): Always hand off
16621         conversions to class type.
16622
16623 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
16624
16625         * friend.c (is_friend): Local classes have the same access as the
16626         enclosing function.
16627
16628 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
16629
16630         * typeck.c (expand_target_expr): Delete dead function.
16631
16632         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
16633
16634         * repo.c (save_string): Delete dead function.
16635
16636         * method.c (thunk_printable_name): Delete dead function.
16637
16638         * lex.c (yynextch): Delete dead function.
16639
16640         * expr.c (tree_extract_aggr_init): #if 0 out.
16641
16642         * except.c (do_unwind): Delete dead function.
16643         (easy_expand_asm): Likewise.
16644
16645         * cvt.c (build_conversion_type_1): Delete dead function.
16646
16647         * cp-tree.h (push_expression_obstack): Declare.
16648
16649         * call.c (source_type): #if 0 out.
16650
16651         * class.c (alter_access): Remove unused label.  Add braces
16652         around empty else clause.
16653
16654         * lex.c (yyprint): Fix argument to printf.
16655
16656 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
16657
16658         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
16659
16660         * pt.c (instantiate_class_template): Make sure template
16661         arguments are permanent.
16662         * init.c (resolve_offset_ref): Don't go looking around in
16663         template types.
16664
16665         * semantics.c: Add routines to handle expressions, and some
16666         declaration processing.
16667         * parse.y: Use them.
16668         (current_class_depth): Move declaration to cp-tree.h.
16669         * parse.c: Regenerated.
16670         * cp-tree.h: Use them.
16671         (current_class_depth): Declare.
16672         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
16673
16674 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
16675
16676         * error.c (dump_decl): Be a bit more explicit with template
16677         type arguments, when verbose.
16678
16679 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
16680
16681         * inc/exception: Reorder closing braces.
16682
16683 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
16684
16685         * pt.c (redeclare_class_template): New function.
16686         * cp_tree.h (redeclare_class_template): Declare it.
16687         * decl.c (xref_tag): Use it.
16688
16689 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
16690
16691         * call.c (build_over_call): Check IS_AGGR_TYPE, not
16692         TYPE_LANG_SPECIFIC.
16693         * typeck.c (convert_arguments): Likewise.
16694
16695         * decl.c (grokdeclarator): Remove const and volatile from type after
16696         setting constp and volatilep.
16697
16698         * class.c (finish_struct_1): Don't warn about bool bitfield larger
16699         than one bit.
16700
16701 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
16702
16703         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
16704
16705 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
16706
16707         * call.c (build_object_call): Complain about ambiguous operator(),
16708         rather that crashing.
16709         (build_new_op): Likewise.
16710         (build_op_delete_call): Likewise.
16711
16712 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
16713
16714         * cvt.c (perform_qualification_conversions): Use comp_target_types
16715         instead of comp_ptr_ttypes.
16716
16717 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
16718
16719         * cp-tree.h (enforce_access): Declare.
16720         * call.c (enforce_access): Make it extern, not static.
16721         * class.c (alter_access): Use enforce_access; modify code for ISO
16722         compliance, rather than ARM rules.
16723
16724 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16725
16726         * cp-tree.h: Fix typo.
16727
16728 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
16729
16730         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
16731         if (aggregate_value_p (type)).
16732
16733         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
16734
16735 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
16736
16737         * tree.c (mapcar): When dealing with a DECL, use it's constant
16738         value, if any.
16739         * pt.c (lookup_template_class): Don't mangle the names of template
16740         classes whose arguments are unknown.
16741
16742         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
16743
16744 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
16745
16746         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
16747
16748 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
16749
16750         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
16751         boolean_type_node to 1.
16752
16753 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
16754
16755         * error.c (dump_expr): Remove unused variable `l'.
16756
16757         * pt.c (for_each_template_parm): New function, created by
16758         converting uses_template_parms.
16759         (tree_fn_t): New typedef.
16760         (uses_template_parms): Use it.
16761         (mark_template_parm): New function.
16762         (push_template_decl): Check that the argument list of a partial
16763         specialization uses all the template parameters.
16764
16765         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
16766         with it; we might want it for debugging.
16767         * cp-tree.h (type_unification): Change interface.
16768         * class.c (finish_struct_1): Skip nested template types, just like
16769         ordinary nested types.
16770         (instantiate_type): Use new interface to type_unification.
16771         * lex.c (init_lex): Add __sz as opname for sizeof.
16772         * method.c (build_overload_scope_ref): New function.
16773         (build_overload_int): Handle complex expressions.  Set
16774         numeric_output_need_bar if necessary.
16775         (build_overload_value): Handle non-PARM_DECL nodes; this
16776         routine is now used by build_overload_int.  Remove some
16777         assignments to numeric_output_need_bar.  Use
16778         build_overload_scope_ref.
16779         (build_qualified_name): Note that some template mangled names end
16780         with digits, and set numeric_output_need_bar appropriately.  Use
16781         build_underscore_int.
16782         * pt.c (unify): Change interface.
16783         (type_unification_real): Likewise.
16784         (determine_specialization): Use new interfaces.
16785         (tsubst): Deal gracefully with situations in which the argument
16786         vector is not fully filled.
16787         (fn_type_unification): Use new interfaces.
16788         (type_unification): Likewise.  Remove NOP_EXPR hack.
16789         (type_unification_real): Likewise.
16790         (unify): Likewise.  Deal with unification of complex expressions.
16791
16792 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
16793
16794         * pt.c (complete_template_args): Initialize skip properly.
16795
16796         * decl.c (make_typename_type): Revert.
16797         (make_implicit_typename): Remove.
16798         (lookup_name_real): Don't call it.  Call lookup_field if we see a
16799         TYPE_DECL from a template base.
16800         * search.c (lookup_field): Do implicit typename stuff.
16801
16802 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
16803                           Geoff Noer    <noer@cygnus.com>
16804
16805         * Makefile.in: Various fixes for building cygwin32 native toolchains.
16806         * Make-lang.in: Likewise.
16807
16808 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16809
16810         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
16811
16812 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
16813
16814         * decl.c (make_implicit_typename): Rewrite removed code.
16815         (make_typename_type): Call it if the type we look up comes from
16816         a base that uses template parms.
16817
16818         * pt.c (complete_template_args): Rewrite.
16819         (tsubst, FUNCTION_DECL): Use it.
16820
16821 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
16822
16823         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
16824         c_expand_asm_operands () if output_operands, input_operands or
16825         clobbers is not NULL_TREE.
16826
16827 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16828
16829         * pt.c (complete_template_args): New function.
16830         (get_bindings): Deal with specializations of function templates
16831         with return type containing parameters from outer class
16832         templates.
16833         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
16834         substitute arguments and compose a new type.
16835
16836 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
16837
16838         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
16839         FUNCTION_DECLs.
16840
16841 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
16842
16843         * decl.c (make_implicit_typename): Lose useless code.
16844
16845         * call.c (standard_conversion): Handle A* -> const A* properly.
16846
16847         * pt.c (get_bindings_real): Rename from get_bindings.  Add
16848         check_rettype parm.
16849         (get_bindings): Pass 1.
16850         (get_bindings_overload): Pass 0.
16851
16852 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
16853
16854         * pt.c (check_explicit_specialization): When reverting a static
16855         member function, also remove the `this' parameter from
16856         last_function_parms.
16857
16858 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
16859
16860         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
16861         a function context.
16862
16863         * decl.c (store_bindings): Use free_binding_vecs.
16864         (pop_from_top_level): Likewise.
16865
16866 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
16867
16868         * decl.c (make_implicit_typename): Only change the type of a
16869         TYPENAME_TYPE.
16870
16871 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
16872
16873         * semantics.c: New file, containing routines to perform the
16874         semantic phase of parsing.
16875         * parse.y: Use it.
16876         * pt.c (tsubst_expr): Likewise.
16877         * cp-tree.h: Declare the various functions in semantics.c.
16878         Provide macros to access _STMT tree nodes.
16879         * cp-tree.def: Add ASM_STMT tree node.
16880         * Makefile.in, Make-lang.in: Add dependencies on and for
16881         semantics.c.
16882
16883 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
16884
16885         * pt.c (push_template_decl): Only check primary templates.
16886
16887         * pt.c (check_explicit_specialization): Complain about default args
16888         in explicit specialization.
16889
16890         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
16891         constructor_declarator.
16892
16893 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
16894
16895         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
16896         has no overloaded operator ->.
16897
16898         * call.c (build_field_call): Don't crash when presented with a
16899         field that is actually a nested type.
16900
16901         * decl.c (pushtag): Deal with friend class injection in local
16902         classes.
16903
16904         * call.c (build_object_call): Don't crash if OBJ is a
16905         pointer-to-member-function.
16906
16907 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
16908
16909         * pt.c (push_template_decl): Complain about template with C linkage,
16910         anonymous template class.
16911
16912 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
16913
16914         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
16915         * search.c: Likewise.
16916
16917         * lex.c (do_pending_defargs): Only call
16918         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
16919
16920         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
16921
16922 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
16923
16924         * parse.y: Deal with CONSTRUCTORS in new_initializers.
16925
16926 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
16927
16928         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
16929         closely mimics the behavior in parse.y.
16930         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
16931         into a compound statement.
16932
16933 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
16934
16935         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
16936         * pt.c (inline_needs_template_parms): New fn.
16937         (original_template): New fn.
16938         (push_inline_template_parms_recursive): New fn.
16939         (maybe_begin_member_template_processing): Use them.
16940         (maybe_end_member_template_processing): Likewise.
16941         (is_member_or_friend_template): Rename to is_member_template.
16942         Member functions of local classes are never member templates.
16943
16944 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16945
16946         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
16947         added in the class scope to catch redefinition error.
16948
16949         * pt.c (reduce_template_parm_level): Also copy
16950         the DECL_TEMPLATE_PARMS field.
16951
16952 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
16953
16954         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
16955         reduced-level template type parameter.
16956
16957 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16958
16959         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
16960         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
16961         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
16962         * decl.c (duplicate_decls): Propagate it.
16963         * typeck2.c (abstract_virtuals_error): Use two loops to emit
16964         abstract virtual functions and virtual functions which need a
16965         final overrider separately.
16966
16967 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16968
16969         * lang-specs.h: Properly put brackets around array elements in
16970         initializer.
16971
16972         * typeck.c (build_binary_op_nodefault): Correctly place parens around
16973         && and || in expression.
16974
16975 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16976
16977         * call.c (default_parm_conversions): Remove prototype definition.
16978         (build_method_call): Remove unused variable result.
16979
16980         * cvt.c (ocp_convert): Remove unused variable conversion.
16981
16982         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
16983
16984         * except.c (do_unwind): #if 0 definition of unused variables fcall
16985         and next_pc.
16986
16987         * expr.c (extract_scalar_init): #if 0 prototype and function
16988         definition.
16989
16990         * init.c (expand_aggr_init_1): Remove unused variable init_type.
16991         (build_new_1): Remove unused variable t.
16992
16993         * pt.c (instantiate_class_template): Remove unused variable newtag;
16994         cast called function return value to void.
16995         (do_decl_instantiation): Remove unused variables name and fn.
16996
16997         * tree.c (get_type_decl): Add default return to shut up compiler from
16998         complaining control reaches end of non-void function.
16999
17000         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
17001
17002 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
17003
17004         * call.c (default_parm_conversions): Remove prototype definition.
17005         (build_method_call): Remove unused variable result.
17006         (build_over_call): Add default case in enumeration switch.
17007
17008 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
17009
17010         * decl2.c (lang_decode_option): Change j's type to size_t.
17011
17012         * tree.c (layout_vbasetypes): record_align and desired_align are of
17013         type unsigned int; const_size and nonvirtual_const_size likewise.
17014
17015 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
17016
17017         * parse.y (new_initializer): Make sure all initializers are
17018         lists.
17019
17020 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
17021
17022         * decl2.c (import_export_decl): Mark tinfo functions for
17023         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
17024
17025 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
17026
17027         * method.c: Fix typo.
17028
17029 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17030
17031         * method.c: Include "system.h" to get stdlib.h, stdio.h,
17032         ctype.h, string.h, etc.
17033         (issue_nrepeats): Add default case in enumeration switch.
17034         (check_btype): Likewise.
17035         (process_overload_item): Likewise.
17036
17037         * Makefile.in (method.o): Depend on system.h.
17038
17039 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17040
17041         * lex.c (do_scoped_id): Fix parenthesizing.
17042
17043 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
17044
17045         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
17046         FLAG_RTTI is unset, initialize type info machinery and continue
17047         with FLAG_RTTI enabled.
17048         (get_typeid): Likewise.
17049
17050 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
17051
17052         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
17053         from B.
17054
17055 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
17056
17057         * pt.c (finish_member_template_decl): Deal more gracefully with
17058         invalid declarations.
17059
17060 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
17061
17062         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
17063         cp-tree.h: Clean up more old overloading code, old RTTI code, and
17064         some formatting quirks.
17065
17066         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
17067         method.c, pt.c, ptree.c, typeck.c: Remove support for
17068         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
17069         * class.h: Remove.
17070         * Makefile.in: Adjust.
17071
17072         * pt.c (unify): Don't allow reduced cv-quals when strict.
17073
17074         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
17075         *type_unification* and unify.
17076
17077 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
17078
17079         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
17080         (nested_name_specifier): And add it before this use.
17081         (typename_sub0): And this use.  Also add use without the keyword.
17082         (typename_sub1): Likewise.
17083         * pt.c (instantiate_class_template): Don't actually instantiate
17084         anything if our type uses template parms.
17085
17086 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
17087
17088         * decl.c (start_function): Don't call temporary_allocation for a
17089         nested function.
17090
17091 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
17092
17093         * pt.c (instantiate_class_template): Don't mess with friends if
17094         our type uses template parms.
17095
17096 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
17097
17098         * parse.y (nested_name_specifier): Use explicit_template_type.
17099         (typename_sub): Allow a template_type, an explicit_template_type,
17100         or an implicit template type at the end.
17101         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
17102         * decl.c (make_typename_type): Handle template-id where the name
17103         is a TEMPLATE_DECL.
17104         * call.c (build_scoped_method_call): Handle member template
17105         destructor call.
17106         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
17107         destructor is represented by the type.
17108
17109         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
17110         * parse.y (nested_name_specifier): Add 'template' case.
17111         (explicit_template_type): New rule.
17112         (typename_sub): Use it.
17113         * decl.c (make_typename_type): Handle getting a template-id for NAME.
17114         * pt.c (tsubst): Likewise.
17115
17116 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
17117
17118         * pt.c (add_to_template_args): Fix thinko.
17119         (instantiate_class_template): Call it later.
17120
17121         * pt.c (get_class_bindings): Add outer_args parm.
17122         (most_specialized_class): Likewise.
17123         (instantiate_class_template): Pass it.
17124         (more_specialized_class): Likewise.
17125         (lookup_template_class): Get context from template if none
17126         was specified.
17127         (finish_member_template_decl): Don't do anything with a
17128         partial specialization.
17129         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
17130         AGGREGATE_TYPE_P.
17131         * class.c (finish_struct): Member class templates have already been
17132         checked for name clashes.
17133         * decl.c (pushdecl_with_scope): Handle pushing at class level.
17134
17135 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
17136
17137         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
17138         (tsubst, *_PARM): Support multiple levels of template classes.
17139         (instantiate_class_template): Look up the pattern from the
17140         original template.
17141         (lookup_template_class): Handle getting a template for d1.
17142         (push_template_decl): Correct setting of 'primary'.
17143         (reduce_template_parm_level): Add 'levels' parm.
17144         (finish_member_template_decl): Support member class templates.
17145         (template_class_depth): Handle multiple levels.
17146         * parse.y (component_decl_1, fn.def2): Remove member template case.
17147         (component_decl): Add member template cases.
17148         * decl2.c (check_member_template): We now handle member template
17149         classes.
17150         * decl.c (pushtag): Handle member templates.
17151         * method.c (do_inline_function_hair): Don't touch
17152         IDENTIFIER_GLOBAL_VALUE.
17153         * init.c (build_offset_ref): If name isn't an identifier, just
17154         return it.
17155         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
17156
17157         * typeck.c (get_delta_difference): Do adjust for conversions to
17158         and from virtual base.
17159
17160 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
17161
17162         * typeck.c (get_delta_difference): Give hard error for conversion
17163         from virtual base.
17164
17165         * cp-tree.h: Tweak formatting.
17166
17167 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
17168
17169         * decl.c (push_namespace): Handle redeclaration error.
17170
17171         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
17172         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
17173         (NAMESPACE_BINDING): New macro.
17174         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
17175         * *.c: Use them.
17176
17177         * pt.c (push_template_decl): Use innermost_args.
17178
17179         * decl.c (get_unique_name): Tweak from earlier in the name.
17180
17181 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
17182
17183         * cp-tree.def: Add CPLUS_BINDING node.
17184         * cp-tree.h (tree_binding): New struct.
17185         (BINDING_SCOPE, BINDING_VALUE): New macros.
17186         (current_namespace, global_namespace): Declare extern.
17187         (struct lang_decl_flags): New field in_namespace.
17188         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
17189         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
17190         (TREE_INDIRECT_USING): New macro.
17191         * decl2.c (current_namespace, global_namespace): Declare.  The
17192         value is a NAMESPACE_DECL now, not a TREE_LIST.
17193         (is_namespace_ancestor, namespace_ancestor): New static functions.
17194         (add_using_namespace, ambiguous_decl): Likewise.
17195         (lookup_using_namespace): New support function for lookup_name.
17196         (qualified_lookup_using_namespace): New support function for
17197         do_scoped_id and lookup_namespace_name.
17198         (get_namespace_id): Mark as obsolete.
17199         (current_namespace_id): Likewise.
17200         (do_namespace_alias): Implement.
17201         (do_using_directive): Implement as call to add_using_namespace.
17202         * decl.c (binding_for_name): New function.
17203         (push_namespace, pop_namespace): Implement.
17204         (push_decl): Don't install a FUNCTION_DECL in the global branch.
17205         (lookup_namespace_name): Implement using qualified lookup.
17206         (lookup_name_real): For global scoping, lookup in
17207         global_namespace.  For namespace scoping, lookup in given
17208         namespace.  For unscoped lookup, iterate over namespace,
17209         considering using directives.
17210         (init_decl_processing): Initialize global_namespace.
17211         (grokvardecl): Build assembler name as static name for globals.
17212         (grokdeclarator): Remove old namespace mangling.
17213         (xref_tag): When installing a global binding for the
17214         tag, make sure we have an identifier.
17215         * method.c (build_overload_nested_name): Mangle namespaces.
17216         (build_qualified_name): Likewise.
17217         (build_decl_overload_real): Likewise.
17218         * lex.c (build_lang_decl): Set namespace for new declaration to
17219         current_namespace.
17220         (do_scoped_id): Find global names in global or current
17221         namespace, or using qualified namespace lookup, depending on
17222         context.
17223         * init.c (build_member_call): When scope is namespace, use
17224         build_x_function_call instead.
17225         (build_offset_ref): When scope is namespace, collapse processing
17226         to lookup_namespace_name instead.
17227         * error.c (dump_decl): Support NAMESPACE_DECL.
17228         * decl.c (pushdecl): Bind globals to current namespace.
17229         (push_overloaded_decl): Likewise.
17230         (lookup_tag): Likewise.
17231         (lookup_name_current_level): Likewise.
17232         (xref_tag): Likewise.
17233         (start_function): Likewise.
17234         * lex.c (do_identifier): Likewise.
17235         (identifier_typedecl_value): Likewise.
17236         (real_yylex): Likewise.
17237         * method.c (do_inline_function_hair): Likewise.
17238         * parse.y (unscoped): Likewise.
17239         * pt.c (check_explicit_specialization): Likewise.
17240         (lookup_template_class): Likewise.
17241         * rtti.c (call_void_fn): Likewise.
17242         * sig.c (build_sigtable): Likewise.
17243         * ptree.c (lang_print_xnode): New function.
17244
17245 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
17246
17247         * pt.c (instantiate_class_template): Don't instantiate if pedantic
17248         and the args use template parms.
17249
17250         * pt.c (push_tinst_level): If the instantiation uses template parms,
17251         fail silently.
17252         * decl.c (xref_basetypes): Do call complete_type for basetypes
17253         that involve template parameters.
17254
17255 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
17256
17257         * typeck2.c (process_init_constructor): Fix labeled init check.
17258
17259 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
17260
17261         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
17262         argument to tsubst and friends.
17263
17264         * pt.c (tsubst, FUNCTION_DECL): Tidy.
17265
17266         * typeck.c (build_x_function_call): Handle static member function
17267         templates like non-templates.  Handle friend templates like normal
17268         function templates.
17269         * pt.c (tsubst, *_PARM): Don't use orig_level.
17270         (get_bindings): Don't call add_to_template_args.
17271         (instantiate_template): Likewise.
17272         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
17273         * ptree.c (print_lang_type): Print index/level for template parms.
17274
17275 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
17276
17277         * Make-lang.in (cc1plus): Note that cc1plus depends on
17278         cp/cp-tree.h and cp/cp-tree.def.
17279
17280         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
17281         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
17282         position in a template parameter list.
17283         * cp-tree.h (template_parm_index): New structure, used as the tree
17284         structure for a TEMPLATE_PARM_INDEX.
17285         (TEMPLATE_PARM_IDX): New macro.
17286         (TEMPLATE_PARM_LEVEL): Likewise.
17287         (TEMPLATE_PARM_DESCENDANTS): Likewise.
17288         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
17289         (TEMPLATE_PARM_DECL): Likewise.
17290         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
17291         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
17292         (TEMPLATE_TYPE_DECL): Likewise.
17293         (TEMPLATE_CONST_IDX): Remove.
17294         (TEMPLATE_CONST_LEVEL): Likewise.
17295         (TEMPLATE_CONST_SET_INFO): Likewise.
17296         (TEMPLATE_TYPE_SET_INFO): Likewise.
17297         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
17298         node.
17299         (TEMPLATE_TYPE_LEVEL): Likewise.
17300         * decl.c (decls_match): Call comp_template_parms, rather than
17301         expanding it inline.
17302         (duplicate_decls): If two template declarations are being merged,
17303         then their TEMPLATE_INFOs should be merged as well.
17304         (grokfndecl): Save template-id information when declaring a friend
17305         with explicit template arguments.  Pass arguments to
17306         check_explicit_specialization via correct convention; at some
17307         point check_explicit_specialization changed, but these call-sites
17308         did not.
17309         (grokdeclarator): Tidy up slightly.
17310         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
17311         two template functions with the same DECL_ASSEMBLER_NAME the same,
17312         since the names are not yet mangled.
17313         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
17314         TEMPLATE_CONST_PARM.
17315         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
17316         decl for a non-type parameter, rather than printing `<tparm ...>'.
17317         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
17318         (do_friend): Deal with template friends.
17319         * lex.c (do_pending_inlines): Call
17320         maybe_begin_member_template_processing, rather than
17321         conditionally calling begin_member_template_processing.
17322         (process_next_inline): Likewise.  Call
17323         maybe_end_member_template_processing, rather than
17324         conditionally calling end_member_template_processing.
17325         (do_pending_defargs): Likewise.
17326         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
17327         TEMPLATE_CONST_PARM.
17328         * method.c (build_mangled_template_parm_index): New function.
17329         (build_overload_value): Use it.
17330         (build_overload_name): Likewise.
17331         * pt.c (finish_member_template_decl): Allow friend declarations.
17332         (template_class_depth): New function.
17333         (is_member_template): Rename, and modify, to become...
17334         (is_member_or_friend_template): New function.
17335         (end_member_template_processing): Rename, and modify, to become...
17336         (maybe_end_member_template_processing).
17337         (build_template_parm_index): New function.
17338         (reduce_template_parm_level): New function.
17339         (process_template_parm): Modify to use build_template_parm_index.
17340         (push_template_decl): Deal with friend templates.
17341         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
17342         TEMPLATE_CONST_PARM.
17343         (tsubst_friend_function): New function.
17344         (instantiate_class_template): Generate the DECL_FRIENDLIST
17345         for a new instantiation by using tsubst_friend_function rather
17346         than just tsubst.
17347         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
17348         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
17349         appropriate new macros.  Use reduce_template_parm_level to
17350         generate lower-level template parameters.  Handle tsubst'ing into
17351         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
17352         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
17353         templates.  Similarly for the template parameters for a new
17354         template.
17355         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
17356         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
17357         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
17358         (get_bindings): Call add_to_template_args if necessary.
17359         (instantiate_decl): Handle instantiations of friend templates.
17360         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
17361         TEMPLATE_TYPE_PARM as a list of fields; it's not!
17362         * spew.c (yylex): Do a little manual constant propagation to
17363         clarify the code.
17364
17365 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
17366
17367         * error.c: Include sys/types.h.
17368
17369 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
17370
17371         * method.c (build_mangled_name): Start CPP directives in column zero.
17372
17373 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
17374
17375         * typeck2.c (process_init_constructor): Sorry about non-trivial
17376         labeled initializers.
17377         * parse.y (initlist): Re-enable labeled initializers.
17378
17379 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17380
17381         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
17382         all callers changed.  Rely on the new parameter instead of arg
17383         being a TREE_LIST when determine whether we are working inside
17384         template template parameter.  Clean up is_type test.
17385
17386 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
17387
17388         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
17389         * typeck2.c (initializer_constant_valid_p): Allow conversions
17390         between pointers and references.
17391
17392 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
17393
17394         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
17395         if pedantic || warn_pointer_arith.
17396
17397 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17398
17399         * pt.c (unify): Handle TEMPLATE_DECL.
17400
17401 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
17402
17403         * cp-tree.h (strip_attrs): Remove decl.
17404
17405 1998-02-18  Doug Evans  <devans@cygnus.com>
17406
17407         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
17408         Update olddecl's attributes too.
17409         (strip_attrs): Remove function.
17410         * typeck.c (common_type): Call merge_machine_type_attributes.
17411
17412 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
17413
17414         * parse.y (initdcl0_innards): New grammar symbol.
17415         (nomods_initdecls, nomods_initdcl0): Change type from itype to
17416         none, since the resulting value is never used.
17417         (parse_decl): New function.
17418         (datadef): Remove redundant actions.
17419         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
17420         * parse.c: Regenerated.
17421
17422 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
17423
17424         * parse.y (simple_stmt): Use getdecls() to check for decl.
17425
17426 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
17427
17428         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
17429         macros.
17430         (c++.install-common): Install c++filt properly as native or as cross
17431         variant.
17432         (c++.uninstall): Add c++filt.
17433
17434 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
17435
17436         * call.c (standard_conversion): Fix multi-level ptr conversions.
17437
17438 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
17439
17440         * init.c (build_new): Propagate error_mark_node up.
17441
17442 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
17443
17444         * parse.y (simple_stmt): If the condition isn't a declaration,
17445         start the controlled block after the test.
17446
17447 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17448
17449         * call.c (build_over_call): Convert builtin abs, labs and fabs to
17450         tree-codes.
17451         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
17452         builtins.
17453
17454 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
17455
17456         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
17457
17458 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
17459
17460         * cp-tree.h: Add access_protected_virtual_node.
17461         * class.c (init_class_processing): Initialize it.
17462         * decl.c (xref_basetypes): Use it.
17463         * parse.y (base_class_access_list): Likewise.
17464
17465         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
17466         (c++.install-common): Install c++filt.
17467
17468 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17469
17470         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
17471
17472 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
17473
17474         * call.c (reference_binding): Use comptypes when comparing
17475         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
17476
17477 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
17478
17479         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
17480         (really_overloaded_fn): Move check here from is_overloaded_fn.
17481         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
17482
17483 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
17484
17485         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
17486         conversions.
17487
17488 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
17489
17490         * cp-tree.h (push_template_decl): Return the decl passed in, or an
17491         equivalent duplicate.
17492         * decl.c (pushtag): Use the return value from push_template_decl.
17493         (duplicate_decls): When duplicating a template declaration, merge
17494         the DECL_TEMPLATE_RESULTs as well.
17495         (make_implicit_typename): Don't try to dive into typename types to
17496         find a context for making a new implicit typename.
17497         (start_decl): Use the return value from push_template_decl.
17498         (grokdeclarator): Complain about declarations list `const operator
17499         int'.  Since we don't correctly handle in-class initializations of
17500         non-static data members, complain about this (now illegal)
17501         practice.  Issue an error for initializations of non-const statics
17502         since that is illegal as well, and since we don't handle that case
17503         correctly either.
17504         (start_function): Use the return value from push_template_decl.
17505         (start_method): Likewise.
17506         * decl2.c (grokfield): Likewise.  Since the change to
17507         grokdeclarator ensures that all initialized fields are in fact
17508         static, remove a redundant test for TREE_PUBLIC.
17509         * parse.y (initlist): Disable labeled initializers since they do
17510         not work as per the documentation, and since they do not use the
17511         same syntax as the C front end.
17512         * pt.c (push_template_decl): Return the decl passed in, or an
17513         equivalent duplicate.
17514         (lookup_template_class): When searching in a nested context,
17515         use the right arguments.
17516         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
17517         * typeck.c (build_component_ref): Assign the correct type to the
17518         result of build_vfn_ref.
17519
17520 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
17521
17522         * pt.c (convert_nontype_argument): Fix typo.
17523         (check_explicit_specialization): Allow old-style specialization
17524         of class template members.
17525
17526 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
17527                           Manfred Hollstein  <manfred@s-direktnet.de>
17528
17529         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
17530         when deciding to override DECL_ASSEMBLER_NAME.
17531
17532 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
17533
17534         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
17535         * cp-tree.h (flag_do_squangling): Add declaration.
17536         * lang-options.h: Add -fsquangle and -fno-squangle.
17537         * method.c: Add macros and static variables for squangling.
17538         (build_overload_name): Rename to build_mangled_name, add logic for B
17539         compression, and split into process_modifiers and
17540         process_overload_item.
17541         (process_modifiers): New function, to handle constant, reference,
17542         and pointer types.
17543         (process_overload_item): New function, handles issue of type codes.
17544         (build_overload_name): New function, start squangling and call
17545         build_mangled_name.
17546         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
17547         (start_squangling): New function to initialize squangling structs.
17548         (end_squangling): New function to destroy squangling structs.
17549         (nrepeats): Rename variable to Nrepeats.
17550         (issue_nrepeats): New function for issuing 'n' type repeats.
17551         (check_ktype): New function to check for type K name compression.
17552         (build_overload_nested_name): Add a check for K name compression.
17553         (build_qualified_name): Add a check for K name compression and don't
17554         use DECL_ASSEMBLER_NAME when squangling is on.
17555         (check_btype): New function, checks for B type compression.
17556         (build_static_name, build_decl_overload_real): Initiate squangling.
17557         (build_typename_overload, build_overload_with_type): Initiate
17558         squangling
17559
17560 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
17561
17562         * method.c (make_thunk): Avoid name buffer overflow.
17563
17564 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
17565
17566         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
17567         don't define them yet.
17568
17569         * parse.y (nomods_initdcl0): Add constructor_declarator case.
17570
17571 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17572
17573         * config-lang.in (diff_excludes): Use basename only.
17574
17575 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
17576
17577         * tinfo2.cc: Add tinfo for signed char.
17578
17579 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
17580
17581         * search.c (compute_access): Handle protected constructors in derived
17582         classes as accessible.
17583
17584 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
17585
17586         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
17587         Call convert_from_reference sooner.
17588
17589 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
17590
17591         * cvt.c (ocp_convert): Obtain the constant values from constant
17592         decls even if the destination type is the same as the type of the
17593         decl.
17594
17595         * decl2.c (finish_file): Make sure that static inlines with
17596         definitions are not marked DECL_EXTERNAL before returning.
17597
17598 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
17599
17600         * decl.c: Lose arg_looking_for_template.
17601         (lookup_name_real): Likewise.
17602         * parse.y: Lose processing_template_arg, template_arg1.
17603         (primary): Likewise.
17604         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
17605
17606 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17607
17608         * error.c (dump_decl): Fix type of default arguments for template
17609         template parameters and nontype template parameters.
17610         * parse.y (template_parm): Handle invalid default template
17611         template arguments here.
17612
17613         * parse.y (template_parm): Use template_arg instead of PTYPENAME
17614         for default template template argument.
17615         * pt.c (coerce_template_parms): Merge default template argument
17616         codes.  Can treat RECORD_TYPE as template name if it is implicitly
17617         created.  Fix argument index in error message.
17618         * typeck.c (comptypes): Merge template argument comparison codes in
17619         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
17620
17621 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
17622
17623         * lex.c (file_name_nondirectory): Also check for '/'.
17624
17625 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
17626
17627         * parse.y (primary): Deal with statement-expressions in
17628         templates.
17629         * pt.c (tsubst_copy): Handle BIND_EXPR.
17630         * tree.c (mapcar): Likewise.
17631
17632         * call.c (add_template_candidate_real): Pass extra parameter to
17633         fn_type_unification.
17634         * cp-tree.h (fn_type_unification): Add parameter.
17635         * pt.c (fn_type_unification): Add additional parameter to deal with
17636         static member functions.
17637         (get_bindings): Deal with static member functions.
17638
17639         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
17640         (revert_static_member_fn): Declare.
17641         * decl.c (revert_static_member_fn): Remove declaration.  Change
17642         linkage from internal to external.
17643         (cp_finish_decl): Deal with virtual functions in classes local to
17644         template functions.
17645         * decl2.c (finish_file): Don't forget to emit increment/decrement
17646         expressions in initializers for file-scope variables.
17647         * parse.y (typename_sub2): If the typename doesn't names a
17648         template, rather than a type, issue an error message.
17649         * pt.c (check_explicit_specialization): Handle specializations of
17650         static member functions.
17651         (coerce_template_parms): Handle offset references to lists of
17652         member functions.
17653         * search.c (note_debug_info_needed): Don't crash when handed a
17654         type which is being defined.
17655         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
17656         that can happen with some illegal code.
17657
17658 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17659
17660         * call.c (user_harshness): Initialize `code' to 0.
17661         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
17662         (null_ptr_cst_p): Add parentheses around && within ||.
17663         (standard_conversion): Likewise.
17664         (z_candidate): Likewise.
17665         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
17666         (build_object_call): Likewise for `mem_args'.
17667         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
17668         default case in enumeration switch.
17669
17670         * class.c (build_vtable_entry): Add explicit braces to avoid
17671         ambiguous `else'.
17672         (build_class_init_list): Likewise.
17673         (finish_struct_1): Initialize `width' to 0.
17674         (instantiate_type): Initialize `name' to NULL_TREE.  Add
17675         explicit braces to avoid ambiguous `else'.
17676
17677         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
17678         `else'.
17679
17680         * decl.c (grok_reference_init): Eliminate unused parameter, all
17681         callers changed.
17682         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
17683         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
17684         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
17685         (grokdeclarator): Add parentheses around && within ||.  Add
17686         explicit braces to avoid ambiguous `else'.
17687         (grokparms): Initialize `type' to NULL_TREE.
17688         (xref_tag): Remove unused label `just_return'.
17689         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
17690         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
17691         (hack_incomplete_structures): Add parentheses around assignment
17692         used as truth value.
17693
17694         * decl2.c (coerce_delete_type): Hide definition of `e3'.
17695
17696         * error.c: Include <stdlib.h>.
17697         (dump_expr): Change the type of `i' to size_t.  Remove unused
17698         label `error'.
17699
17700         * except.c (init_exception_processing): Remove unused variable `d'.
17701         (expand_throw): Likewise for `label'.
17702
17703         * friend.c (add_friends): Add explicit braces to avoid ambiguous
17704         `else'.
17705
17706         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
17707         (sort_base_init): Likewise for `binfo'.
17708         (expand_member_init): Likewise for `rval'.
17709         (build_member_call): Add parentheses around assignment used as
17710         truth value.
17711         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
17712         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
17713         `old_immediate_size_expand' to 0.
17714         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
17715         (build_vec_delete_1): Remove unused variable `block'.
17716         (expand_vec_init): Initialize `itype' to NULL_TREE.
17717
17718         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
17719         declaration of `index' and `rindex' with autoconf macros.
17720         (reinit_parse_for_expr): Remove unused variables
17721         `look_for_semicolon' and `look_for_lbrac'.
17722         (cons_up_default_function): Initialize `args' to NULL_TREE.
17723         (readescape): Initialize `firstdig' to 0.
17724         (real_yylex): Add parentheses around assignment used as truth value.
17725
17726         * method.c: Include <strings.h> if we don't have <string.h>.
17727         Protect declaration of `index' with autoconf macro.
17728
17729         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
17730         Initialize `type' to NULL_TREE.
17731         (structsp): Remove unused variable `id'.
17732
17733         * pt.c (coerce_template_parms): Add explicit braces to avoid
17734         ambiguous `else'.
17735         (lookup_template_class): Initialize `template' to NULL_TREE.
17736         (instantiate_class_template): Remove unused variable `name' and `e'.
17737         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
17738         (do_poplevel): Initialize `saved_warn_unused' to 0.
17739         (type_unification): Remove unused varable `parm'.
17740         (unify): Likewise for `j'.
17741
17742         * repo.c (init_repo): Add parentheses around assignment used as
17743         truth value.
17744         (finish_repo): Remove unused varable `p'.
17745
17746         * search.c (get_binfo): Initialize `type' to NULL_TREE.
17747         (get_base_distance): Likewise.
17748         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
17749         and `new_v' to NULL_TREE.
17750         (lookup_fnfields): Likewise for `rval_binfo_h'.
17751         (breadth_first_search): Add parentheses around assignment used as
17752         truth value.
17753         (get_template_base): Initialize `type' to NULL_TREE.
17754
17755         * sig.c (append_signature_fields): Initialize `last_mfptr' to
17756         NULL_TREE.
17757         (build_signature_table_constructor): Likewise for
17758         `last_rhs_field', `pfn' and `vt_off'.
17759         (build_sigtable): Likewise for `init'.
17760
17761         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
17762         (propagate_binfo_offsets): Likewise for `delta'.
17763         (hash_tree_cons): Initialize hashcode to 0.
17764         (can_free): Likewise for `size'.
17765         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
17766
17767         * typeck.c (convert_sequence): Hide prototype.
17768         (common_type): Add explicit braces to avoid ambiguous `else'.
17769         (comp_target_types): Likewise.
17770         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
17771         (build_function_call_real): Add explicit braces to avoid ambiguous
17772         `else'.
17773         (convert_arguments): Initialize `called_thing' to 0.
17774         (convert_for_initialization): Initialize `savew' and `savee' to 0.
17775
17776         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
17777         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
17778         (build_x_arrow): Likewise for `last_rval'.
17779
17780         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
17781
17782 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
17783
17784         * decl.c (init_decl_processing): Use set_sizetype.
17785         * decl2.c (sizetype): Don't declare.
17786         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
17787         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
17788         (build_component_addr, unary_complex_lvalue): Likewise.
17789         * rtti.c (expand_class_desc): Likewise.
17790         * class.c (get_vfield_offset): Likewise.
17791
17792 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
17793
17794         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
17795         early to avoid bogus error.  Handle overloaded function
17796         names provided as template arguments correctly.
17797         (coerce_template_parms): Don't mishandle overloaded functions when
17798         dealing with template template parameters.
17799         (lookup_template_class): Issue an error message, rather than
17800         crashing, when the TYPE_DECL provided is not a template type.
17801
17802 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
17803
17804         * class.c (instantiate_type): Don't just return a known type if
17805         it's wrong.
17806
17807 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
17808
17809         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
17810         since that code could never be reached.
17811
17812         * error.c (dump_decl): Avoid aborting in the midst of printing an
17813         error message about an illegal template declaration.
17814
17815         * parse.y (structsp): Print an error message, rather than crashing,
17816         when a class-head does not name a class.
17817
17818         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
17819         template arguments as a g++ extension.
17820
17821         * cp-tree.def (ALIGNOF_EXPR): New tree code.
17822         * decl2.c (grok_alignof): If processing_template_decl, just store
17823         the expression.
17824         * typeck.c (c_alignof): Likewise.
17825         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
17826         * error.c (dump_expr): Likewise.
17827         * pt.c (tsubst_copy): Likewise.
17828         * tree.c (cp_tree_equal): Likewise.
17829         * pt.c (uses_template_parms): Correctly determine whether or not a
17830         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
17831         folding can be done.
17832
17833         * cp-tree.h (grok_enum_decls): Remove type parameter.
17834         * decl.c (grok_enum_decls): Likewise.
17835         * decl2.c (grok_x_components): Call grok_enum_decls
17836         unconditionally, since it will do nothing if there is no
17837         current_local_enum.  Use the new calling sequence.
17838         * pt.c (tsubst_enum): Use the new calling sequence for
17839         grok_enum_decls.
17840
17841         * decl.c (start_function): Make member functions of local classes
17842         in extern inline functions have comdat linkage here...
17843         (grokdeclarator): Rather than here.
17844
17845 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
17846
17847         * pt.c (convert_nontype_argument): Use decl_constant_value.
17848
17849 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
17850
17851         * call.c (add_template_candidate_real): New function.
17852         (add_template_candidate): Use it.
17853         (add_template_conv_candidate): Likewise.
17854         (joust): Pass extra argument to more_specialized.
17855         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
17856         (is_local_class): Remove.
17857         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
17858         * cp-tree.h (is_local_class): Remove.
17859         (perform_array_to_pointer_conversion): Likewise.
17860         (finish_member_template_decl): Add.
17861         (check_explicit_specialization): Return a tree, not an int.
17862         (more_specialized): Take additional argument.
17863         (get_bindings): Likewise.
17864         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
17865         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
17866         (perform_array_to_pointer_conversion): Remove.
17867         * decl.c (saved_scope): Add processing_specialization,
17868         processing_explicit_instantiation fields.
17869         (maybe_push_to_top_level): Save them.
17870         (pop_from_top_level): Restore them.
17871         (grokfndecl): Use new return value from
17872         check_explicit_specialization.
17873         (start_decl): Don't check flag_guiding_decls before pushing
17874         decls.
17875         (cp_finish_decl): Remove previous (bogus) change.
17876         (grok_declarator): Use decl_function_context rather than
17877         is_local_class.
17878         * decl2.c (finish_file): Pass extra argument to get_bindings.
17879         (build_expr_from_tree): Let build_x_component_ref check
17880         validity of arguments rather than doing it here.
17881         * lex.c (cons_up_default_function): Remove code fooling with
17882         processing_specialization, processing_explicit_instantiation
17883         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
17884         * method.c (build_overload_identifier): Mangle local classes in
17885         template functions correctly.
17886         * parse.y (finish_member_template_decl): Move to pt.c.
17887         * pt.c (finish_member_template_decl): Moved here from parse.y.
17888         (print_candidates): New function.
17889         (determine_specialization): Change interface.  Properly look for
17890         most specialized versions of template candidates.
17891         (check_explicit_specialization): Fully process explicit
17892         instantiations.
17893         (push_template_decl): Avoid looking at CLASSTYPE fields in
17894         FUNCTION_DECLS.
17895         (determine_overloaded_function): Remove.
17896         (convert_nontype_argument): Change name from
17897         convert_nontype_parameter.  Use determine_overloaded_function
17898         instead of instantiate_type.
17899         (mangle_class_name_for_template): Handle type contexts as well as
17900         function contexts.
17901         (classtype_mangled_name): Likewise.
17902         (lookup_template_class): Likewise.
17903         (tsubst): Likewise.
17904         (more_specialized): Take explict template arguments as a
17905         parameter.
17906         (most_specialized): Likewise.
17907         (get_bindings): Likewise.  Check that return types match before
17908         proclaiming a function a match.
17909         (do_decl_instantiation): Remove code searching for function to
17910         instantiate; that is now done in check_explicit_specialization.
17911         (add_maybe_template): Pass extra argument to get_bindings.
17912         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
17913         implementation.
17914         * typeck.c (build_component_ref): Check for invalid arguments.
17915
17916 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
17917
17918         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
17919         return_target and call_target are equivalent.
17920
17921         * pt.c (type_unification_real): Just accept function parms that
17922         don't use any template parms.
17923
17924 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
17925
17926         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
17927         unset DECL_NOT_REALLY_EXTERN.
17928
17929         * parse.y (typename_sub*): Fix std::.
17930
17931 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
17932
17933         * error.c (dump_decl): Fix type default template args.
17934         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
17935
17936 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
17937
17938         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
17939         (file_name_nondirectory): Use.
17940
17941 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17942
17943         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
17944         that are not really present.  Substitute default arguments in
17945         template template arguments.  Correctly convert TEMPLATE_DECL to
17946         TEMPLATE_TEMPLATE_PARM.
17947         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
17948         are no longer treated specially here.
17949         * parse.y (template_template_parm): Fix copy error.
17950         * decl.c (grokdeclarator): Warn about missing `typename' for nested
17951         type created from template template parameters.
17952         * parse.y (bad_parm): Likewise
17953
17954         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
17955         (push_nested_class): Likewise.
17956         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
17957         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
17958         (copy_template_template_parm): Declare.
17959         * decl.c (arg_looking_for_template): New variable.
17960         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
17961         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
17962         node if arg_looking_for_template is nonzero.
17963         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
17964         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
17965         (grokdeclarator): Handle TEMPLATE_DECL.
17966         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
17967         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
17968         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
17969         (dump_decl): Handle unnamed template type parameters.
17970         Handle template template parameters.
17971         (dump_function_name): Handle template template parameters.
17972         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
17973         Handle TEMPLATE_TEMPLATE_PARM.
17974         * method.c (build_template_template_parm_names): New function.
17975         (build_template_parm_names): Handle TEMPLATE_DECL.
17976         (build_overload_nested_name, build_overload_name):
17977         Handle TEMPLATE_TEMPLATE_PARM.
17978         * parse.y (maybe_identifier): New nonterminal.
17979         (template_type_parm): Use it.
17980         (template_template_parm, template_arg1): New nonterminal.
17981         (template_parm): Add template_template_parm rules.
17982         (template_arg): Set processing_template_arg.
17983         (template_arg1): Rules moved from template_arg.
17984         (primary, nonnested_type): Set arg_looking_for_template if we are
17985         processing template arguments.
17986         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
17987         (process_template_parm): Handle template template parameters.
17988         (coerce_template_parms, comp_template_args): Likewise.
17989         (mangle_class_name_for_template, lookup_template_class): Likewise.
17990         (uses_template_parms): Handle TEMPLATE_DECL and
17991         TEMPLATE_TEMPLATE_PARM.
17992         (current_template_args): Handle TEMPLATE_DECL.
17993         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
17994         * search.c (dfs_walk, dfs_record_inheritance):
17995         Handle TEMPLATE_TEMPLATE_PARM.
17996         * tree.c (copy_template_template_parm): New function.
17997         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
17998         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
17999
18000 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
18001
18002         * decl.c (start_decl): Don't allow duplicate definitions of static
18003         data members.
18004
18005         * call.c (build_user_type_conversion_1): Handle user-defined
18006         template conversion operators correctly.
18007
18008         * decl2.c (build_expr_from_tree): Issue an error message if the
18009         object in a COMPONENT_REF is a TEMPLATE_DECL.
18010
18011         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
18012
18013         * class.c (is_local_class): New function.
18014         * cp-tree.h (is_local_class): Declare it.
18015         (last_tree): Likewise.
18016         (begin_tree): Likewise.
18017         (end_tree): Likewise.
18018         (lookup_template_class): Change prototype.
18019         * decl.c (cp_finish_decl): Check for NULL where necessary.
18020         Consider FUNCTION_DECLS to declare objects with top-level binding,
18021         when calling make_decl_rtl.
18022         (grokdeclarator): Give members of local classes internal linkage.
18023         (start_function): Remove declaration of last_tree.
18024         (finish_function): Set flag_keep_inline_functions around call to
18025         rest_of_compilation if we are processing a member function in a
18026         local class.
18027         (start_method): Call push_template_decl for member functions of
18028         local classes in template functions.
18029         * decl2.c (import_export_decl): Don't give external linkage to
18030         instantiations of templates with internal linkage.
18031         * parse.y (last_tree): Remove declaration.
18032         (template_type): Pass extra parameter to lookup_template_class.
18033         (self_template_type): Likewise.
18034         (structsp): Move call to reset_specialization into left_curly.
18035         (left_curly): Call reset_specialization, and begin_tree.
18036         * pt.c (saved_trees): New variable.
18037         (mangle_class_name_for_template): Change prototype.  Use
18038         additional function context to name local classes in templates
18039         correctly.
18040         (classtype_mangled_name): Pass the context.
18041         (push_template_decl): Handle local classes and templates, and
18042         member functions for such classes.
18043         (convert_nontype_parameter): Fix handling of pointer-to-member
18044         constants.
18045         (lookup_template_class): Handle local classes in templates.
18046         (tsubst): Likewise.  Don't assume that template instantiations
18047         have external linkage; pay attention to the template declaration.
18048         (mark_decl_instantiated): Likewise.
18049         (begin_tree): New function.
18050         (end_tree): Likewise.
18051
18052         * decl.c (xref_basetypes): Don't call complete_type for basetypes
18053         that involve template parameters; that can lead to infinite
18054         recursion unnecessarily.
18055
18056         * pt.c (register_specialization): Do not register specializations
18057         that aren't ready to be registered yet.
18058         (check_explicit_specialization): Handle explicit specialization of
18059         constructors and destructors.
18060         (build_template_decl): New function.
18061         (push_template_delc): Handle out-of-class specializations of
18062         member templates.
18063
18064         * pt.c (check_explicit_specialization): Set up the template
18065         information before registering the specialization.
18066         (coerce_template_parms): Fix thinko.
18067         (tsubst): Handle specializations of member templates correctly.
18068
18069         * class.c (finish_struct_methods): Remove calls to
18070         check_explicit_specialization from here.
18071         (finish_struct): And insert them here.
18072         * cp-tree.h (perform_qualification_conversions): New function.
18073         (perform_array_to_pointer_conversion): Likewise.
18074         (begin_explicit_instantiation): Likewise.
18075         (end_explicit_instantiation): Likewise.
18076         (determine_specialization): Renamed from
18077         determine_explicit_specialization.
18078         (comp_template_parms): New function.
18079         (processing_explicit_instantiation): New variable.
18080         * cvt.c (perform_qualification_conversions): New function.
18081         (perform_array_to_pointer_conversion): Likewise.
18082         * decl.c (duplicate_decls): Don't consider template functions
18083         alike unless they have the same parameters.  Refine handling of
18084         instantiation/specialization mismatches.
18085         (start_decl): Don't call pushdecl for template specializations,
18086         since they don't affect overloading.
18087         (start_function): Likewise.
18088         (grokfndecl): Call check_explicit_specialization a little later.
18089         Don't call duplicate_decls for memberm template specializations.
18090         (grokdeclarator): Don't update template_count for classes that are
18091         themselves specializations.  Remove use of `2' as parameter to
18092         grokfndecl since that value isn't used.
18093         * lex.c (cons_up_default_function): Save and restore
18094         processing_explicit_instantiation around calls to grokfield.
18095         * parse.y (finish_member_template_decl): New function.
18096         (component_decl_1): Use it.
18097         (fn.def2): Likewise.
18098         (template_arg_list_opt): New nonterminal.
18099         (template_type): Use it.
18100         (self_template_type): Likewise.
18101         (template_id): Likewise.
18102         (object_template_id): Likewise.
18103         (notype_template_declarator): Likwise.
18104         (begin_explicit_instantiation): Likewise.
18105         (end_explicit_instantiation): Likewise.
18106         (explicit_instantiation): Use them.
18107         * pt.c (coerce_template_parms): Add parameters.
18108         (processing_explicit_instantiation): New variable.
18109         (convert_nontype_parameter): New function.
18110         (determine_overloaded_function): Likewise.
18111         (begin_explicit_instantiation): Likewise.
18112         (end_explicit_instantiation): Likewise.
18113         (retrieve_specialization): Likewise.
18114         (register_specialization): Likewise.
18115         (processing_explicit_specialization): Removed.
18116         (determine_specialization): Handle specializations of member
18117         functions of template class instantiations.
18118         (check_explicit_specialization): Refine to conform to standard.
18119         (comp_template_parms): New function.
18120         (coerce_template_parms): Call convert_nontype_parameter.
18121         (tsubst): Refine handling of member templates.  Use
18122         register_specialization.
18123         (instantiate_template): Use retrieve_specialization.
18124         (do_decl_instantiation): Likewise.
18125         (instantiate_decl): Likewise.
18126         (type_unification): Improve handling of explict template
18127         arguments.
18128         * tree.c (mapcar): Return error_mark_node, rather than aborting,
18129         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
18130         * typeck.c (build_unary_op): Call determine_specialization, rather
18131         than determine_explicit_specialization.
18132
18133 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
18134
18135         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
18136
18137 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18138
18139         * error.c (dump_decl): For enum tags, output the tag, not its value.
18140
18141 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
18142
18143         * decl.c (init_decl_processing): Only call init_rtti_processing
18144         FLAG_RTTI is set.
18145
18146 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
18147
18148         * init.c (build_new_1): Split out from build_new.
18149         (build_new): Just return a NEW_EXPR.
18150         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
18151
18152         * decl2.c (get_temp_regvar): Tweak.
18153
18154         * cp-tree.h (TREE_CALLS_NEW): Comment out.
18155         * class.c (resolves_to_fixed_type_p): Remove use.
18156         * method.c (build_opfncall): Likewise.
18157         * call.c (build_new_op): Likewise.
18158
18159 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
18160
18161         * exception.cc (__eh_alloc, __eh_free): New fns.
18162         (__cp_push_exception, __cp_pop_exception): Use them.
18163         (__uncatch_exception): Call terminate here if no exception.
18164         * except.c (build_terminate_handler): New fn.
18165         (expand_start_catch_block): Use it.
18166         (expand_exception_blocks): Likewise.
18167         (alloc_eh_object): New fn.
18168         (expand_throw): Use it.  Protect exception init with terminate.
18169         * typeck.c (build_modify_expr): Remove code that ignores trivial
18170         methods.
18171
18172 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18173
18174         * call.c (add_builtin_candidate): Add default case in enumeration
18175         switch.
18176         (build_new_op): Likewise.
18177         (convert_like): Likewise.
18178         * cvt.c (build_expr_type_conversion): Likewise.
18179         * tree.c (real_lvalue_p): Likewise.
18180         (lvalue_p): Likewise.
18181         (cp_tree_equal): Likewise.
18182         * typeck.c (comptypes): Likewise.
18183         (build_component_ref): Likewise.
18184         (build_function_call_real): Likewise.
18185         (build_binary_op_nodefault): Likewise.
18186         (build_unary_op): Likewise.
18187         (build_modify_expr): Likewise.
18188         * typeck2.c (initializer_constant_valid_p): Likewise.
18189
18190 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
18191
18192         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
18193
18194 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
18195
18196         * pt.c (coerce_template_parms): Make sure to digest_init if
18197         possible.
18198
18199         * decl.c (duplicate_decls): Make the newdecl virtual if the
18200         olddecl was, just as is done with other attributes of olddecl.
18201
18202 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
18203
18204         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
18205         address of an OFFSET_REF.
18206
18207         * cp-tree.def: Add AGGR_INIT_EXPR.
18208         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
18209         AGGR_INIT_EXPR where appropriate.
18210         * expr.c (cplus_expand_expr): Likewise.  Simplify.
18211
18212         * decl2.c (finish_file): Remove call to register_exception_table.
18213
18214 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18215
18216         * pt.c (instantiate_class_template): Don't do injection when
18217         processing_template_decl is true, as pollutes current_binding_level
18218         for base classes.
18219
18220 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
18221
18222         * pt.c (maybe_fold_nontype_arg): Add prototype.
18223
18224 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18225
18226         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
18227         * error.c (dump_expr): Likewise.
18228
18229 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
18230
18231         * typeck.c (build_function_call_real): Remove "inline called before
18232         definition" pedwarn.
18233
18234         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
18235
18236 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18237
18238         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
18239
18240         * pt.c (type_unification_real): Change __null to type void* with
18241         a warning.
18242
18243 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
18244
18245         * call.c (implicit_conversion): Don't call
18246         build_user_type_conversion_1 with a NULL expr, since it will
18247         crash.
18248
18249         * pt.c (unify): Don't try to unify array bounds if either array is
18250         unbounded.
18251
18252 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18253
18254         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
18255         Replace extern decls with casts.
18256
18257         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
18258         Update last_parm_cleanup_insn.
18259         (store_after_parms): Remove.
18260         * cp-tree.h: Adjust.
18261
18262 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
18263
18264         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
18265         (finish_file): Check DECL_COMDAT instead of weak|one_only.
18266         (import_export_vtable): Use make_decl_one_only instead of
18267         comdat_linkage for win32 tweak.
18268         (import_export_decl): Likewise.
18269         * pt.c (mark_decl_instantiated): Likewise.
18270
18271         * decl2.c (finish_file): Lose handling of templates in pending_statics.
18272
18273 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
18274
18275         * decl2.c (finish_file): Lose call to expand_builtin_throw.
18276         * except.c (expand_builtin_throw): Remove.
18277         * cp-tree.h: Remove ptr_ptr_type_node.
18278         * decl.c: Likewise.
18279
18280 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
18281
18282         * decl.c (ptr_ptr_type_node): Define.
18283         (init_decl_processing): Initialize it.
18284         * cp-tree.h: Declare it.
18285         * exception.cc (__cp_exception_info): Use __get_eh_info.
18286         (__cp_push_exception): Likewise.
18287         (__cp_pop_exception): Likewise.
18288
18289         From Scott Snyder <snyder@d0sgif.fnal.gov>:
18290         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
18291         saved_pc.
18292         (init_exception_processing): Removed saved_pc initialization.
18293
18294 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
18295
18296         * pt.c (instantiate_decl): Defer all templates but inline functions.
18297
18298 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
18299
18300         * init.c (expand_vec_init): Don't fold a list of parameters.
18301
18302         * decl.c (copy_args_p): Handle copy elision for types with virtual
18303         bases.
18304         * call.c (build_over_call): Likewise.
18305
18306 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
18307
18308         * pt.c (lookup_template_function): Copy the template arguments,
18309         not just the list containing them, to the permanent obstack.
18310
18311 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18312
18313         * except.c (expand_start_catch_block): suspend_momentary for the
18314         terminate handler.
18315
18316         * error.c (dump_decl): Handle LOOKUP_EXPR.
18317
18318 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
18319
18320         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
18321         permanent obstack if we are processing a template decl.
18322         * typeck.c (build_static_cast): Likewise.
18323         (build_const_cast): Likewise.
18324         (build_reinterpret_cast): Likewise.
18325
18326         * pt.c (coerce_template_parms): Coerce some expressions, even
18327         when processing_template_decl.
18328
18329 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18330
18331         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
18332         handling of pointer difference expressions.
18333
18334         * typeck.c (comp_target_types): Comparison of function/method types
18335         is independent of nptrs.
18336
18337 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
18338
18339         * pt.c (tsubst): Avoid creating pointer to reference and
18340         reference to reference types.
18341
18342 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
18343
18344         * parse.y (do_id): New nonterminal.
18345         (template_id): Use it.
18346
18347 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
18348
18349         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
18350         * spew.c (yylex): Don't do_identifier here.
18351         * decl2.c (build_expr_from_tree): Revert last change.
18352
18353         * decl2.c (build_expr_from_tree): Expand the name for a method call.
18354         * parse.y (object_template_id): Don't try to take the DECL_NAME.
18355
18356 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
18357
18358         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
18359         alloc_expr.
18360         * call.c (build_op_delete_call): Adjust.
18361
18362         * except.c (expand_end_catch_block): Lose rethrow region.
18363         (expand_start_catch_block): Likewise.
18364         (expand_end_catch_block): Don't expand_leftover_cleanups.
18365
18366 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18367
18368         * pt.c (tsubst): Remove tree_cons call (places redundant info into
18369         DECL_TEMPLATE_INSTANTIATION).
18370
18371 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
18372
18373         * tree.c (is_overloaded_fn): Handle getting a fn template.
18374         (really_overloaded_fn): Likewise.
18375         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
18376         * pt.c (check_explicit_specialization): Tweak.
18377         (determine_explicit_specialization): Tweak.
18378
18379         * tree.c, cp-tree.h (get_target_expr): New fn.
18380
18381 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
18382
18383         * pt.c (check_explicit_specialization): Fix misspelling in
18384         diagnostic: `preceeded'.
18385         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
18386         `conversiona'.
18387
18388 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
18389
18390         * pt.c (determine_explicit_specialization): Avoid an internal
18391         error for bad specializations.
18392
18393         * method.c (build_overload_value): Handle SCOPE_REF.
18394
18395 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
18396
18397         * class.c (prepare_fresh_vtable): Enable even more complex MI
18398         vtable names.
18399
18400 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
18401
18402         * exception.cc (__check_eh_spec): Optimize a bit.
18403
18404         * exception.cc (__cp_pop_exception): Lose handler arg.
18405         * except.c (do_pop_exception): Likewise.
18406         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
18407         (expand_end_catch_block): Likewise.
18408
18409 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18410
18411         * pt.c (check_explicit_specialization): Complain about using a
18412         template-id for a non-specialization.
18413
18414 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
18415
18416         * repo.c: Prototype rindex only if needed.
18417         * xref.c: Likewise.
18418
18419 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18420
18421         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
18422
18423 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
18424
18425         * typeck.c (build_const_cast): Handle references here instead of
18426         handing off to convert_to_reference.
18427
18428         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
18429         TerminateFunctionCall.
18430         (init_exception_processing): Likewise.  Terminate et al are now
18431         the fns, not ADDR_EXPRs.
18432         (various): Lose redundant assemble_external calls.
18433         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
18434
18435         * cp-tree.h (struct lang_decl_flags): Add comdat.
18436         (DECL_COMDAT): New macro.
18437         * decl.c (duplicate_decls): Propagate it.
18438         (cp_finish_decl): Handle it.
18439         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
18440
18441         * class.c: Remove static pending_hard_virtuals.
18442         (add_virtual_function): Take pointers to pending_virtuals
18443         and pending_hard_virtuals.
18444         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
18445
18446 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
18447
18448         * decl2.c (import_export_vtable): If we support one_only but not
18449         weak symbols, mark instantiated template vtables one_only.
18450         (import_export_decl): Likewise for tinfo functions.
18451         (finish_vtable_vardecl): Also write out vtables from explicitly
18452         instantiated template classes.
18453         * pt.c (mark_class_instantiated): Revert last change.
18454
18455         * except.c (expand_throw): Call mark_used on the destructor.
18456
18457 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
18458
18459         * lex.c (lang_init): Enable flag_exceptions by default if no
18460         command line switch was specified.
18461
18462 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
18463
18464         * pt.c (unify): Handle `void' template parameters in
18465         specializations.
18466
18467 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
18468
18469         * rtti.c (build_dynamic_cast): Handle template case here.
18470         (build_dynamic_cast_1): Not here.
18471
18472         * typeck2.c (digest_init): Make copies where appropriate.
18473
18474         * decl2.c (delete_sanity): resolve_offset_ref.
18475
18476         * except.c: Call terminate without caching so many bits.
18477
18478         * except.c (expand_start_catch_block): Fix catching a reference
18479         to pointer.
18480
18481 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
18482
18483         * init.c (build_new): Copy size to the saveable obstack.
18484
18485         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
18486         TRY_CATCH_EXPR for now.
18487
18488 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
18489
18490         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
18491         has DECL_LANG_SPECIFIC.
18492
18493         * exception.cc (struct cp_eh_info): Add handlers field.
18494         (__cp_push_exception): Initialize it.
18495         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
18496         (__throw_bad_exception): Remove.
18497         * except.c (call_eh_info): Add handlers field.
18498         (get_eh_handlers): New fn.
18499         (push_eh_cleanup): Increment handlers.
18500
18501 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
18502
18503         * except.c (expand_start_eh_spec): Use the try/catch code.
18504         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
18505         doing everything inline.
18506         (init_exception_processing): throw_type_match now takes
18507         const void pointers.
18508         * exception.cc (__check_eh_spec): New fn.
18509         * inc/exception: Neither terminate nor unexpected return.
18510         * decl.c: Make const_ptr_type_node public.
18511         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
18512
18513         * except.c (expand_start_catch_block): We only need the rethrow
18514         region for non-sjlj exceptions.
18515         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
18516
18517 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
18518
18519         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
18520         (various.o): Likewise.
18521         * inc/new: Add placement deletes.  Add throw specs for default new.
18522         * new.cc (set_new_handler): Move here from libgcc2.
18523         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
18524         (new): Move from libgcc2.  Throw bad_alloc.
18525         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
18526         * decl.c (init_decl_processing): Update exception specs on new and
18527         delete.
18528
18529         * method.c (build_decl_overload_real): Don't mess with global
18530         placement delete.
18531
18532         * init.c (build_new): Check for null throw spec, not nothrow_t.
18533
18534         * decl.c (duplicate_decls): Don't complain about different exceptions
18535         from an internal declaration.
18536
18537         * call.c (build_op_delete_call): Fix check for member fns again.
18538
18539         * decl2.c (import_export_decl): Interface hackery affects
18540         virtual synthesized methods.
18541
18542 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18543
18544         * decl.c (start_decl): Don't just complain about a mismatched
18545         scope, fix it.
18546
18547         * decl.c (make_implicit_typename): Handle case where t is not
18548         actually from context.
18549         * tree.c (get_type_decl): Lose identifier case.
18550         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
18551         * parse.y (nonnested_type): Just use lookup_name.
18552         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
18553
18554 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
18555
18556         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
18557         T was built in C language context (for example, by
18558         output_func_start_profiler).
18559
18560 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
18561
18562         * decl.c (make_implicit_typename): New fn.
18563         (lookup_name_real): Use it.  Use current_class_type as the context.
18564
18565 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
18566
18567         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
18568
18569 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18570
18571         * friend.c (do_friend): Warn about non-template friends in templates.
18572
18573         * call.c (build_op_delete_call): Fix handling of inherited delete.
18574
18575         * search.c (dfs_record_inheritance): Ignore template type parms.
18576
18577 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
18578
18579         * call.c (build_new_op): Fix copy error.
18580         (build_op_new_call): New fn.
18581         (build_op_delete_call): New fn.
18582         * cp-tree.h: Declare them.
18583         * init.c (build_new): Use them.  Support placement delete.
18584         (build_x_delete): Use build_op_delete_call.
18585         (build_delete): Likewise.
18586         * decl2.c (delete_sanity): Likewise.
18587         (coerce_delete_type): Don't complain about placement delete.
18588
18589 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18590
18591         * call.c (build_new_function_call): Remove unused 'obj' parm.
18592         * cp-tree.h, typeck.c: Adjust.
18593
18594         * init.c (build_new): Make the cleanup last longer.
18595         (expand_vec_init): Call do_pending_stack_adjust.
18596
18597 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
18598
18599         * pt.c (do_type_instantiation): Fix typo.
18600         (mark_class_instantiated): If we support one_only but not weak
18601         symbols, don't mark this as known.
18602
18603         * init.c (build_new): Handle vec delete in EH cleanup.
18604
18605 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18606
18607         * call.c (build_method_call): Call complete_type before checking
18608         for destructor.
18609
18610 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
18611
18612         * decl.c (add_block_current_level): Delete.
18613         * init.c (build_vec_delete_1): Delete build_block and
18614         add_block_current_level calls.
18615
18616 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
18617
18618         * init.c (build_new): Handle freeing allocated memory when the
18619         constructor throws.
18620
18621         * call.c (build_new_method_call): Fix flags arg.
18622
18623         * pt.c (do_type_instantiation): Don't try to instantiate
18624         member templates.
18625         (mark_decl_instantiated): If we support one_only but not
18626         weak symbols, mark this one_only.
18627         * decl2.c (import_export_vtable): Don't defer handling of vtables
18628         if MULTIPLE_SYMBOL_SPACES.
18629
18630 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18631
18632         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
18633
18634 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
18635
18636         * except.c (do_pop_exception): Return a value.
18637
18638 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
18639
18640         * call.c (build_new_method_call): Handle getting a
18641         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
18642         if we got template parms.
18643         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
18644         not just the args.
18645         * decl2.c (build_expr_from_tree): Tweak last change.
18646         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
18647         (maybe_fold_nontype_arg): Split out from tsubst_copy.
18648         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
18649
18650 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
18651
18652         * pt.c (tsubst_copy): Handle explicit template arguments in
18653         function calls.
18654         * typeck.c (build_x_function_call): Likewise.
18655         * decl2.c (build_expr_from_tree): Lookup function name if it
18656         hasn't been done.
18657
18658         * pt.c (tsubst): Instantiate template functions properly when
18659         template parameter does not appear in function arguments and return
18660         type.
18661         (comp_template_args): Handle member templates required by tsubst.
18662
18663 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
18664
18665         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
18666         previous change.
18667
18668 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18669
18670         * pt.c (coerce_template_parms): Tweak error message.
18671
18672         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
18673         return type defaults to `int', even if there are storage-class
18674         specifiers.
18675
18676 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18677
18678         Complete nested exception support.
18679         * except.c (do_pop_exception): Split out...
18680         (push_eh_cleanup): From here.  Handle the EH region by hand.
18681         (expand_start_catch_block): Add a new level for the catch parm.
18682         Move the rethrow region outside the two cleanup regions.
18683         Protect the initializer for the catch parm with terminate.
18684         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
18685         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
18686         popping off the middle of the stack.
18687         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
18688         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
18689         (build_cplus_new): Only wrap CALL_EXPRs.
18690         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
18691         the constructor call.
18692
18693 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18694
18695         * Make-lang.in (c++.distdir): Make inc subdirectory.
18696
18697 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18698
18699         * decl2.c (finish_file): Put back some code.
18700
18701 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18702
18703         * decl2.c (finish_file): Remove redundant code.
18704         * method.c (emit_thunk): Don't let the backend defer generic thunks.
18705
18706 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
18707
18708         * except.c (call_eh_info): Split out...
18709         (push_eh_info): From here.
18710         (expand_builtin_throw): Use it.
18711         (expand_start_catch_block): Move region start back.
18712
18713 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
18714
18715         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
18716         (real_yylex): Record wide strings using target endianness, not host.
18717
18718 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
18719
18720         * repo.c (rindex): Add decl unconditionally.
18721         (get_base_filename, open_repo_file): Don't cast rindex.
18722         * xref.c (rindex): Add decl unconditionally.
18723         (index): Remove unused decl.
18724         (open_xref_file): Don't cast rindex.
18725
18726 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18727
18728         * class.c (build_vbase_path): Propagate the result type properly.
18729
18730 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
18731
18732         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
18733         remaining use of saved_throw_type with a call to get_eh_type.
18734
18735 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
18736
18737         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
18738         (file_name_nondirectory): New function, doing the same as the macro.
18739         (set_typedecl_interface_info): Use it instead of the macro.
18740         (check_newline): Likewise.
18741         (handle_cp_pragma): Likewise.
18742
18743         * repo.c (get_base_filename): Cast result of rindex to char*.
18744         (open_repo_file): Likewise.
18745         * xref.c (open_xref_file): Likewise.
18746         * error.c (dump_char): Make its arg int, not char.
18747
18748         * except.c (push_eh_info): Pass the number of fields - 1 down, not
18749         the exact number of fields.
18750
18751 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
18752
18753         Support for nested exceptions.
18754         * tinfo2.cc (__is_pointer): New fn.
18755         * exception.cc (struct cp_eh_info): Define.
18756         (__cp_exception_info, __uncatch_exception): New fns.
18757         (__cp_push_exception, __cp_pop_exception): New fns.
18758         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
18759         Lose empty_fndecl.
18760         (init_exception_processing): Likewise.  __eh_pc is now external.
18761         (push_eh_info): New fn.
18762         (get_eh_{info,value,type,caught}): New fns.
18763         (push_eh_cleanup): Just call __cp_pop_exception.
18764         (expand_start_catch_block): Use push_eh_info.  Start the eh region
18765         sooner.
18766         (expand_end_eh_spec): Use push_eh_info.
18767         (expand_throw): Call __cp_push_exception to set up the exception info.
18768         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
18769         when we rethrow.
18770         (expand_builtin_throw): Don't refer to empty_fndecl.
18771
18772 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
18773
18774         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
18775
18776 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
18777
18778         * method.c (build_template_parm_names, build_decl_overload_real):
18779         Add static to definitions.
18780         * pt.c (add_to_template_args, note_template_header,
18781         processing_explicit_specialization, type_unification_real): Likewise.
18782         ({determine,check}_explicit_specialization): Use a single string for
18783         error messages.
18784
18785 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
18786
18787         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
18788         (expand_end_catch_block): Likewise.
18789         (expand_end_eh_spec): Likewise.
18790
18791 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
18792
18793         * decl.c (duplicate_decls): Handle template specializations
18794         correctly.
18795         * error.c (dump_function_name): Fix printing of specializations of
18796         member functions that are not member templates.
18797         * cp-tree.h (processing_specialization): Make global.
18798         * pt.c (processing_specialization): Likewise.
18799         * lex.c (cons_up_default_function): Save and restore
18800         processing_specialization to avoid confusion.
18801
18802 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18803
18804         * decl.c (init_decl_processing): Give null_node unknown* type.
18805         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
18806         (common_type): Likewise.
18807         * error.c (args_as_string): Recognize null_node.
18808
18809 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18810
18811         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
18812         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
18813
18814         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
18815
18816         * Make-lang.in (g++): Include prefix.o.
18817
18818 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
18819
18820         * pt.c (determine_explicit_specialization): Initialize "dummy"
18821         to keep Purify quiet.
18822
18823 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
18824
18825         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
18826         (build_overload_int): Not here.
18827
18828 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
18829
18830         * class.c (build_type_pathname): Remove.
18831         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
18832
18833 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
18834
18835         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
18836         &&label GNU extension.
18837
18838 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
18839
18840         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
18841         so as to avoid incorrect manglings.
18842         * method.c (build_decl_overload_real): Don't mangle return types
18843         for constructors.
18844
18845 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18846
18847         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
18848         scratch_tree_cons): Define as macros for now.
18849         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
18850         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
18851         typeck2.c: Use them and the expression_obstack variants.
18852
18853 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18854
18855         * decl.c (store_return_init): Allow classes with explicit ctors to
18856         be used with the named return values extension.
18857
18858 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
18859
18860         * pt.c (instantiate_decl): Fix previous change.
18861
18862 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
18863
18864         * pt.c (tsubst): Fix thinko.
18865         (instantiate_decl): Really use the original template.
18866
18867         * call.c (build_new_method_call): Use simple constructor_name for
18868         error messages.
18869
18870 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
18871
18872         * method.c (build_underscore_int): Don't use ANSI specific
18873         features.
18874
18875 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18876
18877         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
18878         for our key method; it might have been inlined by -O3.
18879
18880 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
18881
18882         * decl.c (make_typename_type): Do not try to call lookup_field for
18883         non-aggregate types.
18884
18885 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
18886
18887         * typeck.c (build_reinterpret_cast): Tweak.
18888
18889 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
18890
18891         * typeck.c (build_reinterpret_cast): Converting a void pointer
18892         to function pointer with a reinterpret_cast produces a warning
18893         if -pedantic is issued.
18894
18895 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18896
18897         * typeck.c (c_expand_return): Don't warn about returning a
18898         reference-type variable as a reference.
18899
18900 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18901
18902         * method.c (build_static_name): Fix typo.
18903
18904 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
18905
18906         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
18907         OLDDECL before we try to do DECL_USE_TEMPLATE.
18908
18909 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18910
18911         * decl.c (duplicate_decls): Don't warn about template instances.
18912
18913         * typeck.c (mark_addressable): Lose ancient code that unsets
18914         DECL_EXTERNAL.
18915
18916         * pt.c (do_decl_instantiation): Lose support for instantiating
18917         non-templates.
18918
18919         * call.c (build_new_function_call): Fix handling of null explicit
18920         template args.
18921         (build_new_method_call): Likewise.
18922
18923 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
18924
18925         * method.c (build_underscore_int): Fix typo.
18926
18927 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
18928
18929         * tree.c (print_lang_statistics): #if 0 call to
18930         print_inline_obstack_statistics until its definition is checked in.
18931
18932 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
18933
18934         * decl2.c (finish_file): Move dump_tree_statistics to end.
18935
18936         * pt.c (instantiate_decl): Look for the original template.
18937         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
18938         of member templates.
18939
18940 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
18941
18942         * Makefile.in (g++FAQ.*): New rules.
18943         (CONFLICTS): Update.
18944         * g++FAQ.texi: Moved from libg++.
18945
18946         * parse.y (PFUNCNAME): Only specify the type once.
18947
18948 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
18949
18950         * lex.c (real_yylex): Clean up the code to fully behave the way
18951         the c-lex.c parser does for complex and real numbers.
18952
18953 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18954
18955         * method.c (build_decl_overload_real): Reformat.
18956
18957 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
18958
18959         * method.c (synthesize_method): If at_eof, determine our linkage.
18960
18961 1997-09-29  Paul Eggert  <eggert@twinsun.com>
18962
18963         * lex.c (real_yylex): Treat `$' just like `_', except issue a
18964         diagnostic if !dollars_in_ident or if pedantic.
18965
18966         * lang-specs.h (@c++): -ansi no longer implies -$.
18967
18968         * decl2.c (lang_decode_option):
18969         -traditional and -ansi now do not mess with
18970         dollars_in_ident.
18971
18972 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
18973
18974         * Makefile.in (parse.o, decl.o): Also depend on
18975         $(srcdir)/../except.h $(srcdir)/../output.h.
18976         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
18977         $(srcdir)/../except.h $(srcdir)/../output.h.
18978         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
18979         ../insn-codes.h.
18980
18981         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
18982
18983         * expr.c (cplus_expand_expr): Make it static.
18984
18985         * decl2.c, init.c, typeck.c: Include "expr.h".
18986         (expand_expr): Use proper values when calling the function.
18987
18988 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
18989
18990         * lang-options.h: New -Wold-style-cast flag.
18991         * cp-tree.h (warn_old_style_cast): New variable.
18992         * decl2.c (warn_old_style_cast): Likewise.
18993         (lang_decode_option): Support -Wold-style-cast.
18994         (reparse_absdcl_as_casts): Produce old-style-cast warning.
18995
18996 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18997
18998         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
18999         TREE_USED, reset value based on already_used.
19000
19001         * init.c (expand_member_init): Revert change.
19002
19003 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
19004
19005         * cp-tree.h, decl.c, decl2.c, pt.c:
19006         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
19007
19008         * decl2.c (lang_decode_option): Add missing ;.
19009
19010 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
19011
19012         * friend.c (do_friend): Disable injection for all template-derived
19013         decls.
19014         * decl2.c (lang_decode_option): Handle -fguiding-decls.
19015         * parse.y (notype_template_declarator): New nonterminal.
19016         (direct_notype_declarator): Use it.
19017         (complex_direct_notype_declarator): Likewise.
19018         (object_template_id): Accept any kind of identifier after TEMPLATE.
19019         (notype_qualified_id): Don't add template declarators here.
19020
19021 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
19022
19023         * call.c (add_template_candidate): Add explicit_targs parameter.
19024         (build_scoped_method_call): Use it.
19025         (build_overload_call_real): Likewise.
19026         (build_user_type_conversion_1): Likewise.
19027         (build_new_function_call): Likewise.
19028         (build_object_call): Likewise.
19029         (build_new_op): Likewise.
19030         (build_new_method_call): Likewise.
19031         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
19032         (build_new_method_call): Likewise.
19033
19034         * class.c (finish_struct_methods): Add specialization pass to
19035         determine which methods were specializing which other methods.
19036         (instantiate_type): Handle TEMPLATE_ID_EXPR.
19037
19038         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
19039
19040         * cp-tree.h (name_mangling_version): New variable.
19041         (flag_guiding_decls): Likewise.
19042         (build_template_decl_overload): New function.
19043         (begin_specialization): Likewise.
19044         (reset_specialization): Likewise.
19045         (end_specialization): Likewise.
19046         (determine_explicit_specialization): Likewise.
19047         (check_explicit_specialization): Likewise.
19048         (lookup_template_function): Likewise.
19049         (fn_type_unification): Add explicit_targs parameter.
19050         (type_unification): Likewise.
19051
19052         * decl.c (duplicate_decls): Add smarts for explicit
19053         specializations.
19054         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
19055         specializations.
19056         (grokfndecl): Call check_explicit_specialization.
19057
19058         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
19059         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
19060         (check_classfn): Handle specializations.
19061
19062         * error.c (dump_function_name): Print specialization arguments.
19063
19064         * friend.c (do_friend): Don't call pushdecl for template
19065         instantiations.
19066
19067         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
19068
19069         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
19070         and -fno-guiding-decls.
19071
19072         * lex.c (identifier_type): Return PFUNCNAME for template function
19073         names.
19074
19075         * method.c (build_decl_overload_real): New function.
19076         (build_template_parm_names): New function.
19077         (build_overload_identifier): Use it.
19078         (build_underscore_int): New function.
19079         (build_overload_int): Use it.  Add levels for template
19080         parameters.
19081         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
19082         (build_overload_nested_names): Handle template type parameters.
19083         (build_template_decl_overload): New function.
19084
19085         * parse.y (YYSTYPE): New ntype member.
19086         (nested_name_specifier): Use it.
19087         (nested_name_specifier_1): Likewise.
19088         (PFUNCNAME): New token.
19089         (template_id, object_template_id): New non-terminals.
19090         (template_parm_list): Note specializations.
19091         (template_def): Likewise.
19092         (structsp): Likewise.
19093         (fn.def2): Handle member template specializations.
19094         (component_decl_1): Likewise.
19095         (direct_notype_declarator): Handle template-ids.
19096         (component_decl_1): Likewise.
19097         (direct_notype_declarator): Handle template-ids.
19098         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
19099
19100         * pt.c (processing_specializations): New variable.
19101         (template_header_count): Likewise.
19102         (type_unification_real): New function.
19103         (processing_explicit_specialization): Likewise.
19104         (note_template_header): Likewise.
19105         (is_member_template): Handle specializations.
19106         (end_template_decl): Call reset_specialization.
19107         (push_template_decl): Handle member template specializations.
19108         (tsubst): Likewise.
19109         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
19110         (instantiate_template): Handle specializations.
19111         (instantiate_decl): Likewise.
19112         (fn_type_unification): Handle explicit_targs.
19113         (type_unification): Likewise.  Allow incomplete unification
19114         without an error message, if allow_incomplete.
19115         (get_bindings): Use new calling sequence for fn_type_unification.
19116
19117         * spew.c (yylex): Handle PFUNCNAME.
19118
19119         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
19120         (really_overloaded_fn): Likewise.
19121         (get_first_fn): Handle function templates.
19122
19123         * typeck.c (build_x_function_call): Use really_overloaded_fn.
19124         Handle TEMPLATE_ID_EXPR.
19125         (build_x_unary_op): Likewise.
19126         (build_unary_op): Likewise.
19127         (mark_addressable): Templates whose address is taken are marked
19128         as used.
19129
19130 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
19131
19132         * decl.c (init_decl_processing): Declare __builtin_constant_p as
19133         accepting any kind of type, not only int.
19134
19135 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
19136
19137         * search.c (get_matching_virtual): Notice virtual bases when sorrying
19138         about covariant returns.
19139
19140         * parse.y (member_init): Also imply typename here.  Remove ancient
19141         extension for initializing base members.
19142
19143 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
19144
19145         Handle multi-level typenames and implicit typename in base list.
19146         * parse.y (typename_sub{,[0-2]}): New rules.
19147         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
19148         (nonnested_type): New rule.
19149         (complete_type_name): Use it.
19150         (base_class.1): Use typename_sub and nonnested_type.
19151         (nested_name_specifier): Don't elide std:: here.
19152         * decl.c (make_typename_type): Handle getting a type for NAME.
19153         (lookup_name_real): Turn std:: into :: here.
19154
19155         Rvalue conversions were removed in London.
19156         * call.c (is_subseq): Don't consider lvalue transformations.
19157         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
19158         (joust): Re-enable ?: kludge.
19159
19160 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
19161
19162         * decl.c (start_function): Up warning of no return type to be a
19163         pedwarn.
19164
19165 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
19166
19167         * init.c (expand_member_init): Don't set TREE_USED.
19168         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
19169         set,don't clear TREE_USED wholesale.
19170
19171 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
19172
19173         * call.c (build_over_call): Do require_complete_type before
19174         build_cplus_new.
19175
19176 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
19177
19178         * search.c (lookup_field): Call complete_type in all cases.
19179
19180         * decl.c (finish_function): Just warn about flowing off the end.
19181
19182 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19183
19184         * decl.c (grokparms): Don't bash a permanent list node if we're
19185         in a function.
19186
19187 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
19188
19189         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
19190
19191 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
19192
19193         * call.c (build_new_op): Give better error for syntactically
19194         correct, but semantically invalid, use of undeclared template.
19195
19196         * call.c (compare_qual): Handle pmfs.
19197
19198         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
19199         after the exception spec.
19200
19201 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
19202
19203         * call.c (null_ptr_cst_p): Integer type, not integral type.
19204
19205         * call.c (joust): Disable warnings until they can be moved to the
19206         right place.
19207
19208 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
19209
19210         * Makefile.in, config-lang.in:  Convert to autoconf.
19211
19212 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
19213
19214         * decl.c (lookup_name_real): Add implicit 'typename' to types from
19215         base classes.
19216
19217         * pt.c (most_specialized_class): Fix typo.
19218         (tsubst): Move constant folding to TREE_VEC case.
19219
19220 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
19221
19222         * pt.c (do_poplevel): Don't warn about unused local variables
19223         while processing_template_decl since we don't always know whether
19224         or not they will need constructing/destructing.
19225
19226         * pt.c (uses_template_parms): Check the values of an enumeration
19227         type to make sure they don't depend on template parms.
19228
19229         * decl.c (make_typename_type): Don't lookup the field if the
19230         context uses template parms, even if we're not
19231         processing_template_decl at the moment.
19232
19233         * pt.c (coerce_template_parms): Avoid looking at the
19234         TYPE_LANG_DECL portion of a typename type, since there won't be
19235         one.
19236         (tsubst): Do constant folding as necessary to make sure that
19237         arguments passed to lookup_template_class really are constants.
19238
19239 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
19240
19241         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
19242         * decl2.c (finish_file): Only register exception tables if we
19243         need to.
19244
19245         * decl.c (init_decl_processing): Add __builtin_[fs]p.
19246
19247 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
19248
19249         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
19250
19251 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
19252
19253         * error.c (dump_decl): Avoid crashing when presented with a
19254         uninitialized constant, as can occur with a template parameter.
19255         (dump_expr): Make sure that there are enough levels of
19256         current_template_parms before we start diving through them.
19257
19258 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
19259
19260         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
19261         c-typeck.c.
19262
19263 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
19264
19265         * except.c (expand_throw): Call build_delete for all
19266         exception types, not just objects with destructors.
19267
19268 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
19269
19270         * decl.c (current_local_enum): Remove static.
19271         * pt.c (tsubst_enum): Save and restore value of current_local_enum
19272         in case template is expanded in enum decl.
19273         (instantiate_class_template): Use new tsubst_enum signature.
19274         (tsubst_expr): Likewise.
19275
19276 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
19277
19278         * pt.c (begin_member_template_processing): Take a function as
19279         argument, not a set of template arguments.  Use the template
19280         parameters, rather than the arguments.  Handle non-type parameters
19281         correctly.  Push a binding level for the parameters so that multiple
19282         member templates using the same parameter names can be declared.
19283         (end_member_template_processing): Pop the binding level.
19284         (push_template_decl): Mark member templates as static when
19285         appropriate.
19286
19287         * lex.c (do_pending_inlines): Pass the function, not its template
19288         arguments, to begin_member_template_processing.
19289         (process_next_inline): Likewise.
19290         (do_pending_defargs): Likewise.
19291
19292         * error.c (dump_expr): Obtain the correct declaration for a
19293         TEMPLATE_CONST_PARM.
19294
19295         * call.c (add_template_conv_candidate): New function.
19296         (build_object_call): Handle member templates, as done in the other
19297         build_ functions.
19298
19299 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
19300
19301         * decl.c (replace_defag): Undo previous change.
19302         * lex.c (do_pending_defargs): Deal with member templates.
19303
19304         * pt.c (is_member_template): Avoid crashing when passed a
19305         non-function argument.
19306
19307 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
19308
19309         * class.c (grow_method): Remove check for redeclaration.
19310
19311 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
19312
19313         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
19314         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
19315         (PRIMARY_TEMPLATE_P): Use it.
19316         * call.c (build_overload_call_real): Use it.
19317         * class.c (instantiate_type): Likewise.
19318         * decl.c (decls_match): Likewise.
19319         * method.c (build_overload_identifier): Likewise.
19320         * pt.c (push_template_decl): Likewise.
19321         (classtype_mangled_name): Likewise.
19322         (lookup_template_class): Likewise.
19323
19324         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
19325         DECL_NTPARMS to conform to usage elsewhere.
19326         * call.c (add_template_candidate): Likewise.
19327         * class.c (instantiate_type): Likewise.
19328         * pt.c (instantiate_template): Likewise.
19329         (get_bindings): Likewise.
19330
19331         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
19332         is_member_template.
19333
19334         * pt.c (unify): Undo changes to allow multiple levels of template
19335         parameters.
19336         (type_unification): Likewise.
19337         (fn_type_unification): Likewise.
19338         (get_class_bindings): Likewise.
19339         * cp-tree.h (Likewise).
19340
19341         * decl.c (replace_defarg): Check that the type of the default
19342         parameter does not invlove a template type before complaining
19343         about the initialization.
19344
19345         * error.c (dump_expr): Deal with template constant parameters in
19346         member templates correctly.
19347
19348         * pt.c (is_member_template): Deal with class specializations
19349         correctly.
19350         (tsubst): Handle "partial instantiation" of member templates
19351         correctly.
19352
19353 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
19354
19355         * pt.c (type_unification): Change calling sequence to allow for
19356         multiple levels of template parameters.
19357         (tsubst_expr): Likewise.
19358         (tsubst): Likewise.
19359         (tsubst_copy): Likewise.
19360         (instantiate_template): Likewise.
19361         (unify): Likewise.
19362         * call.c (build_overload_call_real): Use it.
19363         (add_builtin_candidate): Use it.
19364         (build_new_method_call): Use it.
19365         * class.c (instantiate_type): Use it.
19366         * decl.c (grokdeclarator): Use it.
19367         * decl2.c (finish_file): Use it.
19368         * method.c (build_overload_identifier): Use it.
19369
19370         * call.c (add_template_candidate):  Add additional parameter for
19371         the function return type.  Call fn_type_unification istead of
19372         type_unification.
19373         (build_user_type_conversion_1): Handle member templates.
19374         (build_new_function_call): Likewise.
19375         (build_new_op): Likewise.
19376         (build_new_method_call): Likewise.
19377
19378         * class.c (grow_method): Don't give an error message indicating
19379         that two member templates with the same name are ambiguous.
19380         (finish_struct): Treat member template functions just like member
19381         functions.
19382
19383         * cp-tree.h (check_member_template): Add declaration.
19384         (begin_member_template_processing): Likewise.
19385         (end_member_template_processing): Likewise.
19386         (fn_type_unification): Likewise.
19387         (is_member_template): Likewise.
19388         (tsubst): Change prototype.
19389         (tsubst_expr): Likewise.
19390         (tsubst_copy): Likewise.
19391         (instantiate_template): Likewise.
19392         (get_bindings): Likewise.
19393
19394         * decl.c (decls_match): Handle multiple levels of template
19395         parameters.
19396         (pushdecl): Handle template type params just like other type
19397         declarations.
19398         (push_class_level_binding): Return immediately if the
19399         class_binding_level is NULL.
19400         (grokfndecl): If check_classfn() returns a member_template, use
19401         the result of the template, not the template itself.
19402
19403         * decl2.c (check_member_template): New function.  Check to see
19404         that the entity declared to be a member template can be one.
19405         (check_classfn): Allow redeclaration of member template functions
19406         with different types; the new functions can be specializations or
19407         explicit instantiations.
19408
19409         * error.c (dump_decl): Handle multiple levels of template
19410         parameters.
19411         (dump_function_decl): Update to handle function templates.
19412
19413         * lex.c (do_pending_inlines): Set up template parameter context
19414         for member templates.
19415         (process_next_inline): Likewise.
19416
19417         * method.c (build_overload_identifier): Adjust for multiple levels
19418         of template parameters.
19419
19420         * parse.y (fn.def2): Add member templates.
19421         (component_decl_1): Likewise.
19422
19423         * pt.c (begin_member_template_processing): New function.
19424         (end_member_template_processing): Likewise.
19425         (is_member_template): Likewise.
19426         (fn_type_unification): Likewise.
19427         (current_template_parms): Return a vector of all the template
19428         parms, not just the innermost level of parms.
19429         (push_template_decl): Deal with the possibility of member
19430         templates.
19431         (lookup_template_class): Likewise.
19432         (uses_template_parms): Likewise.
19433         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
19434         TEMPLATE_CONST_PARM to deal with multiple levels of template
19435         arguments.   Add processing of TEMPLATE_DECL to produce new
19436         TEMPLATE_DECLs from old ones.
19437         (do_decl_instantiation): Handle member templates.
19438
19439         * search.c (lookup_fnfields_1): Handle member template conversion
19440         operators.
19441
19442         * tree.c (cp_tree_equal): Check the levels, as well as the
19443         indices, of TEMPLATE_CONST_PARMs.
19444
19445         * typeck.c (comptypes): Check the levels, as well as the indices,
19446         fo TEMPLATE_TYPE_PARMs.
19447         (build_x_function_call): Treat member templates like member
19448         functions.
19449
19450 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19451
19452         * typeck.c (c_expand_return): Always convert_for_initialization
19453         before checking for returning a pointer to local.
19454
19455         * pt.c (type_unification): If strict and the function parm doesn't
19456         use template parms, just compare types.
19457
19458 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
19459
19460         * method.c (build_overloaded_value): Replace direct call
19461         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
19462
19463 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
19464
19465         * typeck.c (convert_arguments): Don't arbitrarily choose the first
19466         of a set of overloaded functions.
19467
19468 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
19469
19470         * lex.c (real_yylex): Don't elide __FUNCTION__.
19471
19472         * method.c (build_overload_value): Add in_template parm.
19473         (build_overload_int): Likewise.
19474         (build_overload_identifier): Pass it.
19475
19476         * decl.c (duplicate_decls): Don't bash a previous template
19477         definition with a redeclaration.
19478
19479         * pt.c (unify): float doesn't match double.
19480
19481         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
19482         TYPE_DECL.  Handle getting non-template types.
19483         * parse.y (explicit_instantiation): Use typespec instead of
19484         aggr template_type.
19485
19486 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
19487
19488         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
19489
19490 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
19491
19492         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
19493         (compare_ics): Likewise.
19494
19495 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
19496
19497         * call.c (joust): Warn about choosing one conversion op over
19498         another because of 'this' argument when the other return type is
19499         better.
19500         (source_type): New fn.
19501
19502         * call.c (build_new_op): Strip leading REF_BIND from first operand
19503         to builtin operator.
19504
19505         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
19506         use its RTL.
19507
19508 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
19509
19510         * call.c (null_ptr_cst_p): Remove support for (void*)0.
19511
19512 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
19513
19514         * typeck.c (expand_target_expr): Make definition match declaration.
19515
19516         * class.c (get_basefndecls): Make definition match declaration.
19517
19518 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
19519
19520         * input.c (sub_getch): Eventually give up and release the input file.
19521
19522         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
19523         right place.
19524
19525         * call.c (joust): Tweak message.
19526
19527 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
19528
19529         * error.c (type_as_string): Put const/volatile on template type
19530         parameters where appropriate.
19531
19532 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
19533
19534         * call.c (strictly_better): Make arguments unsigned ints.
19535
19536 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
19537
19538         * lex.c (real_yylex): Refer to __complex instead of complex.
19539
19540 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
19541
19542         * lex.c (real_yylex): Don't use getc directly.
19543
19544 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
19545
19546         * call.c (is_subseq): Don't try to be clever.
19547
19548 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
19549
19550         * parse.y, pt.c: Include "except.h".
19551         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
19552         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
19553         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
19554         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
19555         prototyping.
19556
19557 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
19558
19559         * decl2.c (mark_vtable_entries): Instead of replacing pure
19560         virtuals with a reference to __pure_virtual, copy the decl and
19561         change the RTL.
19562
19563 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
19564
19565         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
19566
19567         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
19568
19569         * pt.c (instantiate_class_template): Call repo_template_used
19570         before finish_prevtable_vardecl.
19571
19572         * call.c (is_subseq): New fn.
19573         (compare_ics): Use it.
19574
19575         * repo.c (finish_repo): Don't crash on no args.
19576
19577         * parse.y (named_complex_class_head_sans_basetype): Handle
19578         explicit global scope.
19579         * decl2.c (handle_class_head): New fn.
19580
19581         * pt.c (unify): Add CONST_DECL case.
19582
19583 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19584
19585         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
19586
19587         * cp-tree.h (report_type_mismatch): Add prototype.
19588         * call.c (build_overload_call_real): Remove erroneous fourth
19589         argument to report_type_mismatch.
19590         (build_user_type_conversion_1): Remove erroneous second arg to
19591         tourney.
19592         (build_new_function_call): Likewise.
19593         (build_object_call): Likewise.
19594         (build_new_op): Likewise.
19595         (build_new_method_call): Likewise.
19596
19597 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19598
19599         * error.c (dump_decl): Don't bother processing a function with no
19600         DECL_LANG_SPECIFIC.
19601
19602         * method.c (emit_thunk): Call init_function_start in the macro case.
19603
19604 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
19605
19606         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
19607         defined and used to set flag_vtable_thunks.
19608
19609 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
19610
19611         * parse.y: Don't clear the inlines from their obstack until they've
19612         all been processed.
19613
19614         * decl.c (duplicate_decls): Don't complain about exception
19615         specification mismatch if flag_exceptions is off.
19616
19617 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
19618
19619         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
19620
19621 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
19622
19623         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
19624         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
19625         Include <stdio.h> before include files that formerly used STDIO_PROTO.
19626
19627         * decl.c, g++spec.c, lex.c, method.c, repo.c:
19628         Include "config.h" first, as per autoconf manual.
19629
19630 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
19631
19632         * decl.c (duplicate_decls): Tweak wording.
19633         * lex.c (do_pending_defargs): Don't die if we see a default arg
19634         that isn't a DEFAULT_ARG.
19635         * error.c (dump_expr): Handle DEFAULT_ARG.
19636
19637         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
19638         * lang-options.h: Add -fhandle-exceptions.
19639
19640         * class.c (build_vtable): Vtables are artificial.
19641         (prepare_fresh_vtable): Likewise.
19642
19643 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
19644
19645         * cvt.c (ocp_convert): After converting to the target type, set
19646         LOOKUP_NO_CONVERSION.
19647
19648         * call.c (joust): Warn about potentially confusing promotion rules
19649         with -Wsign-promo.
19650         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
19651
19652 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
19653
19654         * exception.cc: Declare __terminate_func with noreturn attribute.
19655
19656 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
19657
19658         * parse.y: Break out eat_saved_input, handle errors.
19659         (function_try_block): Use compstmt instead of compstmt_or_error.
19660
19661 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
19662
19663         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
19664
19665 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
19666
19667         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
19668         existence of cc1plus check whether $(LANGUAGES) contains C++.
19669
19670 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
19671
19672         * method.c (do_build_copy_constructor): When copying an anonymous
19673         union member loop around to handle nested anonymous unions.  Use
19674         the offset of the member relative to the outer structure, not the
19675         union.
19676
19677 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
19678
19679         * call.c (resolve_args): New fn.
19680         (build_new_function_call): Use it.
19681         (build_object_call): Likewise.
19682         (build_new_method_call): Likewise.
19683
19684 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
19685
19686         * call.c (build_over_call): tsubst all default parms from templates.
19687
19688 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19689
19690         * decl.c (struct cp_function): Add static_labelno.
19691         (push_cp_function_context): Save it.
19692         (pop_cp_function_context): Restore it.
19693
19694 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
19695
19696         * typeck.c (build_component_ref_1): Convert from reference.
19697
19698 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19699
19700         * parse.y (current_declspecs, prefix_attributes): Initialize to
19701         NULL_TREE.
19702
19703         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
19704         before we try to force it to be a TREE_LIST.
19705         (decl): Make sure $1.t is non-nil.
19706
19707 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
19708
19709         * pt.c (uses_template_parms): Handle template first-parse codes.
19710
19711         * decl.c (cp_finish_decl): Only warn about user-defined statics.
19712
19713 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
19714
19715         * pt.c (unify): Handle BOOLEAN_TYPE.
19716
19717         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
19718         * pt.c (tsubst): Don't set it.
19719         * call.c (build_over_call): Use uses_template_parms.
19720
19721 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
19722
19723         * method.c (build_overload_nested_name): Use static_labelno
19724         instead of var_labelno.
19725         (build_qualified_name): New fn.
19726         (build_overload_name): Split out from here.
19727         (build_static_name): Use build_qualified_name.
19728         * decl.c (cp_finish_decl): Statics in extern inline functions
19729         have comdat linkage.
19730         (start_function): Initialize static_labelno.
19731
19732 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
19733
19734         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
19735         before "all member functions in class [] are private".
19736
19737 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
19738
19739         * lex.c (do_scoped_id): convert_from_reference.
19740         * init.c (build_offset_ref): Likewise.
19741
19742 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
19743
19744         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
19745
19746 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
19747
19748         * typeck.c (get_member_function_from_ptrfunc): Promote index
19749         before saving it.
19750
19751 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
19752
19753         * tree.c (layout_basetypes): Move non-virtual destructor warning.
19754         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
19755
19756 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
19757
19758         * decl.c (grokdeclarator): Call add_defarg_fn for the function
19759         type, too.
19760         * lex.c (add_defarg_fn): Adjust.
19761         (do_pending_defargs): Adjust.  Don't skip the first parm.
19762
19763 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
19764
19765         * decl.c (build_enumerator): Global enumerators are also readonly.
19766
19767         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
19768         (build_dynamic_cast): Call it and convert_from_reference.
19769
19770         * lex.c (add_defarg_fn): New fn.
19771         (snarf_defarg): Don't add to defarg_types.
19772         (do_pending_defargs): Lose defarg_types.  All fns we process now
19773         have defargs.
19774         * decl.c (grokfndecl): Call add_defarg_fn.
19775
19776         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
19777         * cp-tree.def: Add DEFAULT_ARG.
19778         * spew.c (yylex): Call snarf_defarg as appropriate.
19779         * parse.y: New tokens DEFARG and DEFARG_MARKER.
19780         (defarg_again, pending_defargs, defarg, defarg1): New rules.
19781         (structsp): Use pending_defargs.
19782         (parms, full_parm): Use defarg.
19783         * lex.c (init_lex): Initialize inline_text_firstobj.
19784         (do_pending_inlines): Never pass the obstack to feed_input.
19785         (process_next_inline): Call end_input instead of restore_pending_input.
19786         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
19787         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
19788         * input.c (end_input): New fn.
19789         (sub_getch): At the end of some fed input, just keep returning EOF
19790         until someone calls end_input.
19791         Remove 'obstack' field from struct input_source.
19792         * decl.c (grokparms): Handle DEFAULT_ARG.
19793         (replace_defarg): New fn.
19794         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
19795
19796 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
19797
19798         * call.c (implicit_conversion): If nothing else works, try binding
19799         an rvalue to a reference.
19800
19801 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
19802
19803         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
19804         ifndef for Cygwin32 to include SIGSEGV.
19805
19806 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19807
19808         * class.c (finish_struct_1): Only complain about pointers without
19809         copy stuff if there are any constructors.
19810
19811         * rtti.c (build_dynamic_cast): Call complete_type on the types.
19812
19813         * decl.c (grokfndecl): If the function we chose doesn't actually
19814         match, die.
19815
19816         * decl2.c (grokclassfn): Don't specify 'const int' for the
19817         artificial destructor parm.
19818
19819         * pt.c (type_unification): If we are called recursively, nothing
19820         decays.
19821
19822 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
19823
19824         * decl.c (init_decl_processing): Stop trying to catch signals
19825         other than SIGABRT since the Cygwin32 library doesn't support
19826         them correctly yet.  This fixes a situation in which g++ causes
19827         a hang on SIGSEGVs and other such signals in our Win32-hosted
19828         tools.
19829
19830 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
19831
19832         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
19833
19834 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
19835
19836         * typeck2.c (store_init_value): Always return the value if our
19837         type needs constructing.
19838
19839         * method.c (hack_identifier): Convert class statics from
19840         reference, too.
19841
19842 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
19843
19844         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
19845
19846 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
19847
19848         * typeck.c (c_expand_return): Make sure we clean up temporaries at
19849         the end of return x;
19850
19851 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19852
19853         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
19854
19855 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
19856
19857         * except.c (expand_builtin_throw): Add support
19858         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
19859
19860 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
19861
19862         * repo.c (extract_string): Null-terminate.
19863
19864         * cp-tree.h (TI_SPEC_INFO): New macro.
19865         (CLASSTYPE_TI_SPEC_INFO): New macro.
19866         * pt.c (push_template_decl): Correctly determine # of template parms
19867         for partial specs.
19868
19869         * call.c (compare_ics): Really fix 'this' conversions.
19870
19871         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
19872         non-template fn.
19873
19874         * pt.c (push_template_decl): Complain about mismatch in # of
19875         template parms between a class template and a member template.
19876
19877 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
19878
19879         * method.c (synthesize_method): You can't call
19880         function_cannot_inline_p after finish_function.
19881         * decl.c (finish_function): Turn on flag_inline_functions and turn
19882         off DECL_INLINE before handing a synthesized method to the
19883         backend.
19884
19885 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
19886
19887         * method.c (synthesize_method): Remove July 30 change to never set
19888         DECL_INLINE if at_eof.
19889
19890 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
19891
19892         * xref.c (GNU_xref_member): Ensure that the node has a
19893         decl_lang_specific part before checking DECL_FRIEND_P.
19894
19895 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19896
19897         * pt.c (instantiate_class_template): Diagnose non-class types used
19898         as bases.
19899
19900 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
19901
19902         * typeck.c (build_conditional_expr): Use convert_for_initialization
19903         instead of convert_and_check.
19904
19905 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19906
19907         * parse.y (typespec): Don't pedwarn for typeof.
19908
19909 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
19910
19911         * repo.c (finish_repo): Only check changes if we would write a
19912         repo file.
19913
19914         * call.c (compare_ics): Fix handling of 'this' conversions.
19915
19916         * pt.c (do_decl_instantiation): Support static data too.  Rename
19917         from do_function_instantiation.
19918         * cp-tree.h: Adjust.
19919         * parse.y: Adjust.
19920
19921         * repo.c (extract_string): New fn.
19922         (get_base_filename): Use it.
19923         (init_repo): Compare old args with current args.
19924
19925 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
19926
19927         * Makefile.in, Make-lang.in: Protect C-ls with a comment
19928         character, idea from Paul Eggert <eggert@twinsun.com>.
19929
19930 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
19931
19932         * typeck.c (c_expand_return): Be more persistent in looking for
19933         returned temps.
19934
19935         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
19936         pointer to reference.
19937
19938         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
19939
19940 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19941
19942         * init.c (build_member_call, build_offset_ref):
19943         Use do_scoped_id instead of do_identifier.
19944
19945         * cvt.c (convert): Remove bogosity.
19946
19947 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19948
19949         * cvt.c (build_up_reference): Do checks of ARGTYPE and
19950         TARGET_TYPE before trying to use get_binfo.
19951
19952 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
19953
19954         * cvt.c (build_up_reference): Call get_binfo to get access control.
19955
19956         * decl2.c (import_export_decl): If we don't support weaks, leave
19957         statics undefined.
19958
19959 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
19960
19961         * except.c (expand_builtin_throw): Add support for machines that
19962         cannot access globals after throw's epilogue when
19963         -fno-sjlj-exceptions is used.
19964
19965 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
19966
19967         * parse.y: 'std::' becomes '::'.
19968         * lex.c (real_yylex): Remove 'namespace' warning.
19969         * init.c (build_member_call): Ignore 'std::'.
19970         (build_offset_ref): Likewise.
19971         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
19972         (do_toplevel_using_decl): Ignore 'using std::whatever'.
19973         * decl.c (push_namespace): Just sorry.
19974         (pop_namespace): Nop.
19975         (init_decl_processing): Declare std namespace.
19976
19977 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
19978
19979         * search.c (push_class_decls): A name which ambiguously refers to
19980         several instantiations of the same template just refers to the
19981         template.
19982
19983 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
19984
19985         * decl.c (build_enumerator): Fix problem with unsigned long
19986         enumerated values being smashed to ints, causing overflow
19987         when computing next enumerated value (for enum values around
19988         MAX_VAL).
19989
19990 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
19991
19992         * typeck.c (build_component_ref): Only call mark_used on a decl.
19993
19994 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19995
19996         * typeck.c (build_c_cast): Make the check for a ptr to function
19997         more specific before possible default_conversion call.
19998
19999 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
20000
20001         * except.c (expand_exception_blocks): Simplify and fix and make
20002         sure we don't end a region in a sequence, as expand_end_bindings
20003         doesn't like it.
20004
20005 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
20006
20007         * except.c (init_exception_processing): Mark terminate as not
20008         returning so that the optimizer can optimize better.
20009
20010 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
20011
20012         * cvt.c (convert): Don't do any extra work, if we can avoid it
20013         easily.
20014
20015 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
20016
20017         * *.[chy]: Change cp_convert to ocp_convert, change convert to
20018         cp_convert.  convert is now reserved for the backend, and doesn't
20019         have the semantics a frontend person should ever want.
20020
20021 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
20022
20023         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
20024         Lose -traditional support.
20025
20026 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
20027
20028         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
20029
20030         * parse.y (self_reference): Do it for templates, too.
20031         * class.c (pushclass): Don't overload_template_name; the alias
20032         generated by build_self_reference serves the same purpose.
20033
20034         * tree.c (list_hash): Make static, take more args.
20035         (list_hash_lookup): Likewise.
20036         (list_hash_add): Make static.
20037         (list_hash_canon): Lose.
20038         (hash_tree_cons): Only build a new node if one isn't already in the
20039         hashtable.
20040         (hash_tree_chain): Use hash_tree_cons.
20041         * cp-tree.h: Adjust.
20042         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
20043         of calling lookup_name.
20044
20045 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
20046
20047         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
20048         doesn't refer to the CONST_DECLs.
20049
20050 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
20051
20052         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
20053         is bigger.
20054         (expand_class_desc): Convert the last argument to a sizetype.
20055
20056 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20057
20058         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
20059         __real__): Add reswords.
20060         * hash.h: Regenerate.
20061         * lex.h (rid): Add RID_COMPLEX.
20062         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
20063         * lex.c (init_lex): Add building of RID_COMPLEX.
20064         (real_yylex): General cleanup in line with what c-lex.c also has,
20065         sans the cruft for traditional; add handling of SPEC_IMAG, complex
20066         types, and imaginary numeric constants.
20067         * parse.y (REALPART, IMAGPART): Add tokens.
20068         (unary_expr): Add REALPART and IMAGPART rules.
20069         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
20070         * decl.c (complex_{integer,float,double,long}_type_node): Define
20071         types.
20072         (init_decl_processing): Set up the types.
20073         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
20074         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
20075         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
20076         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
20077         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
20078         COMPLEX_TYPE case.
20079         * method.c (build_overload_name): Add handling of the different
20080         COMPLEX_TYPEs, prefixing them with `J'.
20081         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
20082         as a template parm.
20083         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
20084         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
20085         (mapcar): Handle COMPLEX_CST.
20086         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
20087         (common_type): Add code for complex types.
20088         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
20089         (convert_for_assignment): Likewise.
20090         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
20091
20092 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
20093
20094         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
20095         tsubst_expr, as it might try to do overload resolution.
20096
20097 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
20098
20099         * pt.c (instantiate_class_template): Oops.
20100
20101 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
20102
20103         * cp-tree.def: Add TAG_DEFN.
20104         * pt.c (tsubst_enum): New fn.
20105         (instantiate_class_template): Use it.
20106         (tsubst_expr): Support TAG_DEFN.
20107         (tsubst): Support local enums.
20108         (tsubst_copy): Likewise.
20109         * decl.c (finish_enum): Likewise.
20110         (start_enum): If this is a local enum, switch to permanent_obstack.
20111
20112 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
20113
20114         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
20115         (finish_function): Put the base init code for constructors just
20116         after the parm cleanup insns.
20117         (struct cp_function): Add last_parm_cleanup_insn.
20118         (push_cp_function_context): Likewise.
20119         (pop_cp_function_context): Likewise.
20120
20121 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
20122
20123         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
20124
20125 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20126
20127         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
20128         for THUNK_FNDECL before we switch to temporary allocation.
20129
20130 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
20131
20132         * call.c (build_new_op): Handle null arg2 for ?:.
20133
20134 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
20135
20136         * except.c (expand_exception_blocks): Ensure that we flow through
20137         the end of the exception region for the exception specification.
20138         Move exception region for the exception specification in, so that
20139         it doesn't protect the parm cleanup.  Remove some obsolete code.
20140         * decl.c (store_parm_decls): Likewise.
20141         (finish_function): Likewise.
20142
20143 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
20144
20145         * init.c (build_new): Fix nothrow handling.
20146
20147 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20148
20149         * init.c (emit_base_init): Don't warn about the initialization
20150         list for an artificial member.
20151
20152 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20153
20154         * expr.c (do_case): Handle !START case for the error msg.
20155
20156 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
20157
20158         * decl2.c, lang-options.h: New option -Weffc++.
20159         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
20160         to -Weffc++.
20161
20162         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
20163         to MULTIPLE_SYMBOL_SPACES.
20164
20165 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
20166
20167         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
20168
20169         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
20170
20171         * typeck.c (c_expand_return): Don't complain about returning void
20172         to void in an artificial function.
20173         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
20174         don't set DECL_RESULT, set DECL_ARTIFICIAL.
20175         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
20176
20177 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
20178
20179         * init.c (init_decl_processing): Add support for setjmp/longjmp based
20180         exception handling.
20181         * except.c (init_exception_processing): Likewise.
20182         (expand_end_catch_block): Likewise.
20183         (expand_exception_blocks): Likewise.
20184         (expand_throw): Likewise.
20185         * exception.cc (__default_terminate): Likewise.
20186
20187         * init.c (perform_member_init): Use new method of expr level
20188         cleanups, instead of cleanups_this_call and friends.
20189         (emit_base_init): Likewise.
20190         (expand_aggr_vbase_init_1): Likewise.
20191         (expand_vec_init): Likewise.
20192         * decl.c (cp_finish_decl): Likewise.
20193         (expand_static_init): Likewise.
20194         (store_parm_decls): Likewise.
20195         (cplus_expand_expr_stmt): Likewise.
20196         * decl2.c (finish_file): Likewise.
20197
20198         * Make-lang.in (exception.o): Ok to compile with -O now.
20199
20200         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
20201         we know it will be done later by the backend.
20202
20203         * decl2.c (lang_f_options): Remove support for short temps.
20204         * lang-options.h: Likewise.
20205
20206 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
20207
20208         * tree.c (varargs_function_p): New fn.
20209         * method.c (emit_thunk): Replace broken generic code with code to
20210         generate a heavyweight thunk function.
20211
20212 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
20213
20214         * pt.c (process_template_parm): pedwarn about floating-point parms.
20215
20216         * decl.c (grokdeclarator): inline no longer implies static.
20217
20218         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
20219
20220 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
20221
20222         * class.c (check_for_override): The signature of an overriding
20223         function is not changed.
20224
20225         * call.c (build_over_call): Move setting of conv into the loop.
20226         Note: this change, along with the related changes of the 18th thru
20227         the 20th of April, fix an infinite loop problem in conversions.
20228
20229 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
20230
20231         * call.c (build_user_type_conversion_1): Really ignore rvalue
20232         conversions when looking for a REFERENCE_TYPE.
20233
20234         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
20235         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
20236         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
20237         (build_unary_op): Likewise.
20238         * call.c (build_over_call): See through a CONVERT_EXPR around the
20239         ADDR_EXPR for on a temporary.
20240         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
20241         the ADDR_EXPR for a local variable.
20242
20243 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
20244
20245         * call.c (build_user_type_conversion_1): If we're trying to
20246         convert to a REFERENCE_TYPE, only consider lvalue conversions.
20247         (build_new_function_call): Print candidates.
20248         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
20249         (reference_binding): Binding a temporary of a reference-related type
20250         is BAD.
20251
20252 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20253
20254         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
20255         * tinfo2.cc (type_info::before): Likewise.
20256
20257 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
20258
20259         * call.c (implicit_conversion): Oops.
20260
20261 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
20262
20263         * call.c (implicit_conversion): Try to find a reference conversion
20264         before binding a const reference to a temporary.
20265
20266 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
20267
20268         * exception.cc (__default_unexpected): Call terminate by default,
20269         so that if the user overrides terminate, the correct function will
20270         be called.
20271
20272 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
20273
20274         * parse.y (left_curly): Avoid trying to use any fields of
20275         error_mark_node, as there aren't any.
20276
20277 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
20278
20279         * lex.c (do_identifier): Avoid breaking on overloaded methods
20280         as default arguments.
20281
20282 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
20283
20284         * call.c (add_template_candidate): Initialize the variable "dummy".
20285
20286 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
20287
20288         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
20289         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
20290
20291 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20292
20293         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
20294         (debug_binfo): Delete decl, not needed.
20295
20296         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
20297         promotes_to_aggr_type): Delete fns.
20298         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
20299         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
20300         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
20301
20302         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
20303
20304         * friend.c (is_friend_type): Delete fn.
20305         * cp-tree.h (is_friend_type): Delete decl.
20306
20307         * decl.c (original_result_rtx, double_ftype_double,
20308         double_ftype_double_double, int_ftype_int, long_ftype_long,
20309         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
20310         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
20311
20312         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
20313         fwd decls.
20314         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
20315
20316         * decl.c (pushdecl_nonclass_level): #if 0, unused.
20317         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
20318
20319         * lex.c (reinit_lang_specific): #if 0, unused.
20320         * cp-tree.h (reinit_lang_specific): #if 0 decl.
20321
20322         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
20323         * cp-tree.h (revert_static_member_fn): Delete decl.
20324
20325         * class.c (root_lang_context_p): Delete fn.
20326         * cp-tree.h (root_lang_context_p): Delete decl.
20327
20328         * decl.c (set_current_level_tags_transparency): #if 0, unused.
20329         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
20330
20331         * lex.c (set_vardecl_interface_info): Make static.
20332         * cp-tree.h (set_vardecl_interface_info): Delete decl.
20333
20334         * call.c (find_scoped_type): Make static.
20335         * cp-tree.h (find_scoped_type): Delete decl.
20336
20337         * search.c (convert_pointer_to_vbase): Make static.
20338         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
20339
20340         * decl.c (const_ptr_type_node): Likewise.
20341         * cp-tree.h (const_ptr_type_node): Delete decl.
20342
20343         * typeck.c (common_base_type): Make static.
20344         * cp-tree.h (common_base_types): Delete erroneous decl.
20345
20346         * pt.c (classtype_mangled_name): Make static.
20347         * cp-tree.h (classtype_mangled_name): Delete decl.
20348
20349         * lex.c (check_newline): Make static.
20350         * cp-tree.h (check_newline): Delete decl.
20351
20352         * typeck.c (build_x_array_ref): Delete fn, same idea as
20353         grok_array_decl.
20354         * cp-tree.h (build_x_array_ref): Delete decl.
20355
20356         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
20357         copy_lang_decl.
20358         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
20359
20360         * class.c (build_vtable_entry): Make static.
20361         * cp-tree.h (build_vtable_entry): Delete decl.
20362
20363         * class.c (build_vbase_pointer): Make static.
20364         * cp-tree.h (build_vbase_pointer): Delete decl.
20365
20366         * sig.c (build_sptr_ref): Add forward decl and make static.
20367         * cp-tree.h (build_sptr_ref): Delete decl.
20368
20369         * call.c (build_new_method_call): Add forward decl and make static.
20370         * cp-tree.h (build_new_method_call): Delete decl.
20371
20372         * call.c (build_object_call): Make static.
20373         * class.c (check_for_override, complete_type_p, mark_overriders):
20374         Likewise.
20375         * decl.c (cp_function_chain): Likewise.
20376         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
20377         Likewise.
20378         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
20379         Likewise.
20380         * tree.c (build_cplus_array_type_1): Likewise.
20381         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
20382         (comp_target_parms): Likewise.
20383
20384         * init.c (build_builtin_call): Make static.
20385         * cp-tree.h (build_builtin_call): Delete decl.
20386
20387         * typeck.c (binary_op_error): Delete decl.
20388         * cp-tree.h (binary_op_error): Likewise.
20389
20390 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20391
20392         * call.c (build_method_call): Compare against error_mark_node
20393         directly, rather than the ERROR_MARK tree code.
20394         * cvt.c (cp_convert): Likewise.
20395         * decl.c (print_binding_level): Likewise.
20396         (duplicate_decls): Likewise.
20397         (grokdeclarator): Likewise.
20398         (grokdeclarator): Likewise.
20399         * init.c (expand_aggr_init_1): Likewise.
20400         (decl_constant_value): Likewise.
20401         * method.c (build_opfncall): Likewise.
20402         (hack_identifier): Likewise.
20403         * typeck.c (build_modify_expr): Likewise.
20404
20405         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
20406
20407 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
20408
20409         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
20410
20411         * pt.c (coerce_template_parms): Add new error message.
20412
20413         * method.c (build_overload_value): Implement name mangling for
20414         floating-point template arguments.
20415
20416         * method.c (build_overload_int, icat, dicat): Fix mangling of template
20417         arguments whose absolute value doesn't fit in a signed word.
20418
20419 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20420
20421         * friend.c: New file; put all of the friend stuff in here.
20422         * init.c: Instead of here.
20423         * Makefile.in (CXX_OBJS): Add friend.o.
20424         (friend.o): Add dependencies.
20425         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
20426
20427 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
20428
20429         * call.c (build_scoped_method_call): Complain if the scope isn't a
20430         base.
20431
20432 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
20433
20434         * parse.y (left_curly): Don't crash on erroneous type.
20435
20436         * init.c (build_delete): Fix type of ref.
20437
20438 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
20439
20440         * search.c (get_vbase_1): Renamed from get_vbase.
20441         (get_vbase): Wrapper, now non-static.
20442         (convert_pointer_to_vbase): Now static.
20443
20444         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
20445         * init.c (build_delete): Pass one.
20446         (build_partial_cleanup_for): Use build_scoped_method_call.
20447         * decl.c (finish_function): Pass a binfo.
20448
20449 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
20450
20451         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
20452
20453         * typeck.c (build_c_cast): Lose other reference to flag.
20454
20455         * call.c (build_field_call): Don't look for [cd]tor_identifier.
20456         * decl2.c (delete_sanity): Remove meaningless use of
20457         LOOKUP_HAS_IN_CHARGE.
20458         * decl.c (finish_function): Use build_scoped_method_call instead
20459         of build_delete for running vbase dtors.
20460         * init.c (build_delete): Call overload resolution code instead of
20461         duplicating it badly.
20462
20463 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
20464
20465         * call.c (build_over_call): Call mark_used before trying to elide
20466         the call.
20467
20468         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
20469
20470 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20471
20472         * typeck.c (build_modify_expr): Always pedwarn for a cast to
20473         non-reference used as an lvalue.
20474
20475 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
20476
20477         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
20478
20479 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
20480
20481         * parse.y (handler): Fix template typo.
20482
20483 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
20484
20485         * error.c (lang_decl_name): New fn.
20486         * tree.c (lang_printable_name): Use it.
20487
20488 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
20489
20490         * g++spec.c: Include config.h so that we can catch bzero #defines
20491         from the config file.
20492
20493 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
20494
20495         * new1.cc: Include a declaration for malloc, to avoid warning, and
20496         avoid lossing on systems that require one (ones that define malloc
20497         in xm.h).
20498
20499 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
20500
20501         * decl2.c (max_tinst_depth): New variable.
20502         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
20503         option.
20504         * pt.c (max_tinst_depth): Variable moved.
20505         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
20506         as legal.
20507
20508 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
20509
20510         * decl.c (xref_basetypes): Allow a base class that depends on
20511         template parms to be incomplete.
20512
20513         * decl2.c (build_expr_from_tree): Support typeid(type).
20514         * rtti.c (get_typeid): Support templates.
20515         (expand_si_desc, expand_class_desc): Fix string length.
20516         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
20517
20518 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
20519
20520         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
20521
20522         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
20523
20524 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
20525
20526         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
20527         smashes together template and non-template decls of the same
20528         signature.
20529
20530 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
20531
20532         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
20533
20534 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20535
20536         * decl.c (duplicate_decls): Next route, pedwarn about different
20537         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
20538
20539 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20540
20541         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
20542         (struct lang_type): Delete has_default_implementation member.
20543         Increase dummy to 21.
20544         * decl.c (start_method): Delete usage.
20545
20546         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
20547         store_after_parms, start_decl_1, auto_function): Add decls.
20548         (get_arglist_len_in_bytes, declare_implicit_exception,
20549         have_exceptions_p, make_type_decl, typedecl_for_tag,
20550         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
20551         build_component_type_expr, cplus_exception_name,
20552         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
20553         * call.c (build_this): Make static.
20554         (is_complete): Likewise.
20555         (implicit_conversion): Likewise.
20556         (reference_binding): Likewise.
20557         (standard_conversion): Likewise.
20558         (strip_top_quals): Likewise.
20559         (non_reference): Likewise.
20560         (build_conv): Likewise.
20561         (user_harshness): Likewise.
20562         (rank_for_ideal): Likewise.
20563         * decl.c (start_decl_1): Delete forward decl.
20564         (push_decl_level): Make static.
20565         (resume_binding_level): Make static.
20566         (namespace_bindings_p): Make static.
20567         (declare_namespace_level): Make static.
20568         (lookup_name_real): Make static.
20569         (duplicate_decls): Make static.  Take register off NEWDECL and
20570         OLDDECL parm decls.
20571         * decl2.c (get_sentry): Make static.
20572         (temp_name_p): Delete fn.
20573         * except.c (auto_function): Delete decl.
20574         * lex.c (handle_{cp,sysv}_pragma): Make static.
20575         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
20576         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
20577         * pt.c (tsubst_expr_values): Make static.
20578         * rtti.c (combine_strings): Delete decl.
20579
20580 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
20581
20582         * pt.c (push_template_decl): Handle getting a typedef.
20583
20584         * call.c (build_new_function_call): Complain about void arg.
20585
20586 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20587
20588         * decl.c (duplicate_decls): Give pedwarn of different exceptions
20589         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
20590
20591 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
20592
20593         * except.c (expand_throw): Don't expand the cleanup tree here,
20594         since we are not going to write the rtl out.  Fixes problem with
20595         -g -O on SPARC.
20596
20597 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
20598
20599         * Make-lang.in: Add $(exeext) as necessary.
20600
20601 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
20602
20603         * parse.y (handler_seq): Must have at least one catch clause.
20604
20605 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
20606
20607         * call.c (add_builtin_candidate): Restore ?: hack.
20608
20609         * decl.c (grok_op_properties): More warnings.
20610
20611 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20612
20613         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
20614         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
20615
20616         * decl.c (duplicate_decls): Scale back to a warning, and only do
20617         'em if -pedantic.
20618
20619 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
20620
20621         * decl.c (duplicate_decls): pedwarn mismatched exception
20622         specifications.
20623
20624 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
20625
20626         * call.c (build_new_method_call): Don't display the invisible
20627         argument for controlling virtual bases.
20628
20629 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
20630
20631         * new: Add nothrow new and delete, bad_alloc and throw specifications
20632         for delete.
20633         * decl.c (init_decl_processing): Add throw specification for delete.
20634         * new.cc (nothrow): Define.
20635         * lex.c (real_yylex): Removing warning that throw and friends are
20636         keywords.
20637         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
20638         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
20639         * Make-lang.in: Add new{1,2}.{cc,o}.
20640
20641 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
20642
20643         * lex.c (cons_up_default_function): Fix return type of synth op=.
20644
20645         * init.c (emit_base_init): Add warnings for uninitialized members
20646         and bases.
20647
20648         * decl.c (xref_basetypes): Add warning for non-polymorphic type
20649         with destructor used as base type.
20650
20651         * decl.c (grok_op_properties): Add warning for op= returning void.
20652         * typeck.c (c_expand_return): Add warning for op= returning anything
20653         other than *this.
20654
20655         * class.c (finish_struct_1): Add warning for class with pointers
20656         but not copy ctor or copy op=.
20657
20658         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
20659         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
20660         (instantiate_template): If -fexternal-templates, add this
20661         instantiation to pending_templates.
20662
20663         * decl2.c (copy_assignment_arg_p): Disable old hack to support
20664         Booch components.
20665
20666 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
20667
20668         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
20669
20670 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
20671
20672         * call.c (standard_conversion): Handle getting references.  Tack
20673         on RVALUE_CONV here.  Do it for non-class types, too.
20674         (reference_binding): Pass references to standard_conversion.
20675         (implicit_conversion): Likewise.
20676         (add_builtin_candidate): Disable one ?: kludge.
20677         (convert_like): Handle RVALUE_CONVs for non-class types.
20678         (joust): Disable the other ?: kludge.
20679
20680 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20681
20682         * decl.c (init_decl_processing): Add code to build up common
20683         function types beforehand, to avoid creation then removal of
20684         things already in the hash table.
20685
20686 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
20687
20688         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
20689         the arguments.
20690
20691         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
20692         current_template_parms.
20693
20694 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
20695
20696         * search.c (lookup_field): Don't return a function, check want_type.
20697
20698 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20699
20700         * init.c (build_new): Make sure PLACEMENT has a type.
20701
20702 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
20703
20704         * init.c (build_new): Support new (nothrow).
20705
20706 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
20707
20708         * pt.c (instantiate_decl): Also do push_to_top_level before setting
20709         up DECL_INITIAL.
20710
20711         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
20712         * pt.c (tsubst): Defer instantiation of default args.
20713         * call.c (build_over_call): Until here.
20714
20715 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20716
20717         * search.c (lookup_field): Make sure we have an
20718         IDENTIFIER_CLASS_VALUE before we try to return it.
20719
20720 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20721
20722         * call.c (build_method_call): Delete unused var PARM.
20723         (build_overload_call_real): Likewise.
20724         (build_object_call): Delete unused var P.
20725         (build_new_op): Likewise.
20726         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
20727         var definitions, which are never used.
20728         (shadow_tag): Delete unused var FN.
20729         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
20730         * init.c (build_new): Delete unused var ALLOC_TEMP.
20731         * method.c (hack_identifier): Delete unused var CONTEXT.
20732         (do_build_copy_constructor): Delete unused var NAME.
20733         (synthesize_method): Delete unused var BASE.
20734         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
20735         * rtti.c (build_headof): Delete unused var VPTR.
20736         (get_typeid): Delete unused var T.
20737         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
20738         and ORIG_OP2.
20739         (build_ptrmemfunc): Delete unused vars U and NINDEX.
20740         * typeck2.c (build_functional_cast): Delete unused var BINFO.
20741
20742 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
20743
20744         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
20745         things in a type being defined.
20746         * decl.c (finish_enum): Reverse the values so that they are in
20747         the correct order.
20748
20749         * pt.c (instantiate_class_template): Don't initialize
20750         BINFO_BASETYPES until the vector is filled out.
20751         (unify): Don't abort on conflicting bindings, just fail.
20752         (instantiate_decl): Do push_tinst_level before any tsubsting.
20753
20754         * method.c (build_overload_value): Handle getting a
20755         TEMPLATE_CONST_PARM for a pointer.
20756
20757 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
20758
20759         * init.c (expand_member_init): Don't give 'not a base' error for
20760         templates.
20761
20762         * pt.c (instantiate_decl): Call import_export_decl later.
20763
20764         * pt.c (instantiate_class_template): Return a value.
20765
20766         * parse.y (extension): New rule for __extension__.
20767         (extdef, unary_expr, decl, component_decl): Use it.
20768
20769 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
20770
20771         * class.c (base_binfo): Remove unused base_has_virtual member.
20772         (finish_base_struct): Likewise.
20773         (finish_struct_1): Likewise.
20774
20775 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
20776
20777         * search.c (expand_upcast_fixups): Fix bogus code generation
20778         problem where the generated code uses the wrong index into the
20779         runtime built vtable on the stack.  Old code could clobber random
20780         stack values.
20781
20782 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
20783
20784         * init.c (perform_member_init): Make sure the partial EH cleanups
20785         live on the function_obstack.
20786
20787 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
20788
20789         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
20790         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
20791
20792 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
20793
20794         * decl.c (grokvardecl): Avoid ANSI style initialization.
20795
20796 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
20797
20798         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
20799
20800 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
20801
20802         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
20803
20804 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20805
20806         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
20807         arguments we compare against.  Start the count of I at 1, not 0,
20808         since argv[0] is still the command.
20809
20810 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
20811
20812         * lang-specs.h: Accept .cp as an C++ extension.
20813
20814 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20815
20816         * cp-tree.h (ptr_reasonably_similar): Add decl.
20817
20818 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20819
20820         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
20821         pointer.  New local SPECBITS with the parm's value.
20822         (grokdeclarator): Pass &specbits down.
20823
20824         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
20825         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
20826
20827         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
20828         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
20829
20830         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
20831         not an error_mark_node.
20832
20833 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20834
20835         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
20836         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
20837
20838 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20839
20840         * decl.c (grokdeclarator): When giving an anonymous struct a name,
20841         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
20842         not affected).
20843
20844         * typeck2.c (build_m_component_ref): If component is a pointer
20845         to data member, resolve the OFFSET_REF now.
20846
20847         * call.c (convert_like): Don't go into infinite recursion.
20848
20849         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
20850
20851         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
20852         * tree.c (layout_basetypes): And on the vbase ptr.
20853
20854 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
20855
20856         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
20857         CHAR_TYPE_SIZE so bool is always the same size as another type.
20858
20859         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
20860
20861 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
20862
20863         * decl2.c (grok_x_components): Remove synthesized methods from
20864         TYPE_METHODS of an anonymous union, complain about member
20865         functions.
20866         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
20867         anonymous unions.
20868         (finish_function): Just clear the DECL_RTL of our arguments.
20869
20870 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20871
20872         * decl2.c (finish_file): Emit DWARF debugging info for static data
20873         members.
20874
20875         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
20876
20877 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
20878
20879         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
20880         IDENTIFIER_NODE.
20881
20882 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
20883
20884         * Make-lang.in (g++-cross$(exeext)): Fix typo.
20885
20886 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20887
20888         Make the g++ driver now be a standalone program, rather than one
20889         that tries to run the gcc driver after munging up the options.
20890         * Make-lang.in (g++.c, g++spec.o): New rules.
20891         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
20892         added.
20893         (g++$(exeext)): New rule, based on xgcc rule.
20894         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
20895         * g++spec.c: New file.
20896         * g++.c: Removed file.
20897
20898 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
20899
20900         * cvt.c (build_up_reference): Arrange for any temporary values
20901         that have been keep in registers until now to be put into memory.
20902
20903 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20904
20905         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
20906         that make -j3 bootstrap works better.
20907
20908 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20909
20910         * decl.c (pushtag): Do pushdecl for anon tags.
20911
20912 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
20913
20914         * typeck.c (c_expand_return): Fix logic.
20915         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
20916
20917 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
20918
20919         * g++.c (main): Make sure arglist has a final NULL entry.  Add
20920         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
20921         stdin/stdout of the invoked program are redirected to
20922         nowheresville.
20923
20924 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20925
20926         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
20927
20928 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
20929
20930         * init.c (resolve_offset_ref): Handle obj.vfn better.
20931         * typeck.c (build_component_ref): Set TREE_TYPE on result from
20932         build_vfn_ref.
20933
20934 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
20935
20936         * typeck.c (convert_for_assignment): Also handle anachronistic
20937         implicit conversions from (::*)() to cv void*.
20938         * cvt.c (cp_convert_to_pointer): Likewise.
20939
20940 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20941
20942         * lex.c (handle_cp_pragma): Fix bogus warning.
20943
20944 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
20945
20946         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
20947         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
20948
20949 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20950
20951         * class.c (finish_struct_1): Support DWARF2_DEBUG.
20952         * search.c (dfs_debug_mark): Likewise.
20953         * decl2.c (finish_vtable_vardecl): Likewise.
20954         * decl.c (pushtag, finish_enum): Likewise.
20955         * lex.c (check_newline): Use debug_* instead of calling *out
20956         functions directly.
20957
20958 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20959
20960         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
20961         on some picky hosts.
20962
20963 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
20964
20965         * class.c (finish_struct_1): A class has a non-trivial copy
20966         constructor if it has virtual functions.
20967
20968         * cvt.c (cp_convert): Always call a constructor.
20969
20970         * call.c (reference_binding): Still tack on a REF_BIND
20971         for bad conversions.
20972         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
20973
20974         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
20975         (c_expand_return): Likewise.
20976         * typeck2.c (digest_init): Likewise for { }.
20977         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
20978         * cvt.c (cp_convert): Handle failure better.
20979
20980 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20981
20982         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
20983         of GCC be path-relative.
20984
20985 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
20986
20987         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
20988         it does need choose-temp.o and pexecute.o.
20989
20990 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20991
20992         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
20993         that we still use it.
20994         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
20995
20996 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20997
20998         * init.c (expand_default_init): Avoid calling constructors to
20999         initialize reference temps.
21000
21001         * cvt.c (convert_to_reference): Fix.
21002
21003 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
21004
21005         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
21006         (convert_to_reference): Likewise.
21007         * typeck.c (convert_for_initialization): Likewise.
21008         * init.c (expand_default_init): Likewise.
21009         (expand_aggr_init_1): Likewise.
21010         * cp-tree.h (CONV_NONCONVERTING): Lose.
21011         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
21012         * *.c: Adjust.
21013         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
21014
21015 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
21016
21017         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
21018
21019 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21020
21021         * init.c (expand_aggr_init_1): Don't crash on non-constructor
21022         TARGET_EXPR.
21023
21024 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21025
21026         * g++.c: Include gansidecl.h.
21027         (VPROTO, PVPROTO, VA_START): Delete.
21028         (choose_temp_base_try, choose_temp_base, perror_exec,
21029         run_dos) [__MSDOS__]: Delete fns.
21030         (pfatal_with_name): Delete fn.
21031         (temp_filename): Declare like in gcc.c.
21032         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
21033         (error_count, signal_count): Define.
21034         (error): Delete both definitions.
21035         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
21036         (pfatal_pexecute): Add fn from gcc.c.
21037         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
21038         code to use the pexecute stuff also used by gcc.c.
21039         (MIN_FATAL_STATUS): Define.
21040         * Make-lang.in (g++): Add dependency on and linking with
21041         choose-temp.o and pexecute.o.
21042
21043         * cp-tree.h: Include gansidecl.h.
21044         (STDIO_PROTO): Delete #undef/#define.
21045         * cvt.c (NULL): Delete #undef/#define.
21046         * expr.c (NULL): Likewise.
21047         * init.c (NULL): Likewise.
21048         * rtti.c (NULL): Likewise.
21049         * xref.c (NULL): Likewise.
21050
21051         * cp-tree.h (build_user_type_conversion): Add prototype.
21052         * call.c (build_user_type_conversion): Delete prototype.  Correct
21053         decl of FLAGS arg to be an int.
21054         * cvt.c (build_user_type_conversion): Likewise.
21055
21056 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
21057
21058         * cp-tree.def: Add TRY_BLOCK and HANDLER.
21059         * except.c (expand_start_catch_block): Support templates.
21060         * parse.y (try_block, handler_seq): Likewise.
21061         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
21062
21063 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
21064
21065         * pt.c (current_template_args): New fn.
21066         (push_template_decl): Use it.
21067         * decl.c (grokdeclarator): Use it.
21068
21069         * decl2.c (build_expr_from_tree): Dereference ref vars.
21070
21071         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
21072         the decl-specifier-seq.
21073
21074         * decl.c (grok_op_properties): Don't force the type of a conversion
21075         op to be complete.  Don't warn about converting to the same type
21076         for template instantiations.
21077
21078         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
21079         methods.
21080
21081 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
21082
21083         * typeck.c (get_delta_difference): Remove previous bogusness.
21084         Don't give errors if force is set.
21085
21086 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21087
21088         * decl2.c (finish_file): Don't emit debug info.
21089         * decl.c (pushdecl): Lose obsolete code.
21090         (grokdeclarator): Still do the long long thing after complaining.
21091         * search.c (note_debug_info_needed): Don't do anything if we're in a
21092         template.
21093         * method.c (synthesize_method): For non-local classes,
21094         push_to_top_level first.
21095
21096 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
21097
21098         * typeck.c (get_delta_difference): Add no_error parameter.
21099         (build_ptrmemfunc): Call get_delta_difference with no_error set;
21100         we don't want error messages when converting unrelated
21101         pointer-to-member functions.
21102
21103 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
21104
21105         * error.c (dump_expr): Improve the wording on error messages that
21106         involve pointer to member functions.
21107
21108 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
21109
21110         * cvt.c (cp_convert_to_pointer): Move code for conversions from
21111         (::*)() to void* or (*)() up a bit, so that we can convert from
21112         METHOD_TYPEs as well.
21113
21114 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21115
21116         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
21117         There are no 'member' types.
21118         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
21119         (build_x_typeid): Handle errors.
21120
21121 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
21122
21123         * typeck.c (convert_for_assignment): Handle anachronistic implicit
21124         conversions from (::*)() to void* or (*)().
21125         * cvt.c (cp_convert_to_pointer): Likewise.
21126         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
21127         conversions from here.
21128         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
21129         * lang-options.h: Likewise.
21130         * decl2.c (warn_pmf2ptr): Define.
21131         * cp-tree.h: Declare it.
21132         * typeck2.c (digest_init): Allow pmfs down into
21133         convert_for_initialization.
21134
21135 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
21136
21137         * typeck.c (c_expand_return): Fix for returning overloaded fn.
21138
21139 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21140
21141         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
21142         * decl.c (grok_reference_init): Pass DIRECT_BIND.
21143         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
21144         DIRECT_BIND.
21145         * call.c (convert_like): Don't pass INDIRECT_BIND.
21146         * typeck.c (convert_arguments): Likewise.
21147         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
21148
21149 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
21150
21151         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
21152         similar code in build_up_ref.
21153         * cvt.c (build_up_reference): Drastically simplify.
21154
21155 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
21156
21157         * typeck.c (signed_or_unsigned_type): If the given type already
21158         as the correct signedness, then just return it.
21159
21160         * typeck.c ({un,}signed_type): If can't do anything, call
21161         signed_or_unsigned_type.
21162
21163 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
21164
21165         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
21166         current_class_type is NULL.
21167
21168 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
21169
21170         * class.c (finish_struct_1): Avoid empty structs by adding a field
21171         so layout_type gets the mode right.
21172
21173         * typeck.c (c_expand_return): Drastically simplify.
21174
21175 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
21176
21177         * typeck.c (decay_conversion): Handle overloaded methods.
21178
21179 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
21180
21181         * call.c (build_over_call): A TARGET_EXPR has side-effects.
21182
21183 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
21184
21185         * cvt.c (convert_to_pointer_force): Add code to support pointer to
21186         member function to pointer to function conversions.
21187         * init.c (resolve_offset_ref): Add code to allow faked up objects,
21188         ignoring them if they are not used, and giving an error, if they
21189         are needed.
21190         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
21191         code, and so that we can give an error, if we needed an object,
21192         and one was not provided.
21193         (build_c_cast): Don't call default_conversion when we want to
21194         convert to pointer to function from a METHOD_TYPE.
21195
21196 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
21197
21198         * Make-lang.in (cplib2.ready): Fix logic.
21199
21200         * decl.c (shadow_tag): Only complain about non-artificial function
21201         members.
21202
21203         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
21204
21205 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
21206
21207         * expr.c (cplus_expand_expr): Pre-tweak call_target like
21208         expand_inline_function would.
21209
21210         * pt.c (mark_decl_instantiated): If extern_p, call
21211         mark_inline_for_output.
21212
21213 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
21214
21215         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
21216         pmd conversions.
21217
21218         * typeck.c (get_delta_difference): Fix wording, as we can be used
21219         for pointer to data members.
21220
21221 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
21222
21223         * pt.c (tsubst): If the function decl isn't a member of this
21224         template, return a copy of the decl (including copying the
21225         lang-specific part) so we don't hose ourselves later.
21226
21227 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
21228
21229         * class.c (finish_struct): Remove DWARF-specific tag handling.
21230         * decl.c (pushtag): Likewise.
21231         (finish_function): Always clear DECL_ARGUMENTS on function decls with
21232         no saved RTX.
21233         * decl2.c (finish_file): Emit DWARF debugging info for static data
21234         members.
21235
21236 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
21237
21238         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
21239         isn't the same as the new one before we whack it.
21240
21241 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
21242
21243         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
21244         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
21245         warn_traditional and warn_strict_prototypes; remove ancient
21246         'overload' code; remove references to flag_traditional.
21247
21248 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
21249
21250         * input.c (sub_getch): Handle 8-bit characters in string literals.
21251
21252 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
21253
21254         * tree.c (mapcar): Handle CONSTRUCTORs.
21255         (copy_to_permanent): Handle expression_obstack properly.
21256
21257         * Make-lang.in (cplib2.txt): Also depend on the headers.
21258
21259         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
21260         INT_TYPE_SIZE.
21261         (expand_class_desc): Use USItype for offset field.
21262         * tinfo.h (struct __class_type_info): Likewise.
21263
21264         * method.c (build_overload_int): TYPE_PRECISION should be applied
21265         to types.
21266
21267 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
21268
21269         * call.c (build_new_op): A COND_EXPR involving void must be a
21270         builtin.
21271
21272 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21273
21274         * typeck.c (build_x_component_ref): New fn.
21275         (build_object_ref): Use it.
21276         * parse.y (primary): Use it.
21277         * decl2.c (build_expr_from_tree): Use it.
21278         * cp-tree.h: Declare it.
21279
21280         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
21281         * error.c (dump_type_suffix): Handle variable arrays.
21282
21283 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21284
21285         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
21286
21287 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21288
21289         * decl.c (lookup_name_real): Don't try to look up anything in a
21290         TYPENAME_TYPE.
21291
21292         * tinfo2.cc (__throw_type_match_rtti): Oops.
21293
21294 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21295
21296         * Make-lang.in (exception.o): Use -fno-PIC for now.
21297
21298 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
21299
21300         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
21301         calling them.
21302         (get_tinfo_fn_dynamic): Extracted from build_typeid.
21303         * tinfo2.cc (__dynamic_cast): Adjust.
21304
21305         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
21306         (build_x_typeid): Likewise.
21307
21308         * parse.y: Call build_x_typeid instead of build_typeid.
21309         * cp-tree.def: Add TYPEID_EXPR.
21310         * pt.c (tsubst_copy): Handle typeid.
21311         * decl2.c (build_expr_from_tree): Likewise.
21312         * rtti.c (build_x_typeid): Throw bad_typeid from here.
21313         (build_typeid): Not here.
21314         * cp-tree.h: Declare build_x_typeid.
21315
21316 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
21317
21318         * call.c (convert_like): Pull out constant values.
21319
21320         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
21321
21322 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
21323
21324         * decl.c (init_decl_processing): Create short int types before
21325         creating size_t in case a machine description needs to use
21326         unsigned short for size_t.
21327
21328 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21329
21330         * Make-lang.in (exception.o): Turn off pic.
21331
21332         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
21333         type, multi-level ptr conversions.
21334
21335         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
21336         (throw_bad_cast): Use it.
21337         (throw_bad_typeid): New fn.
21338         (build_typeid): Throw bad_typeid as needed.
21339         Use build_call.
21340         (synthesize_tinfo_fn): Handle functions and arrays before checking
21341         for cv-quals.
21342
21343         * Remove .h from standard C++ headers, add new.h, move into inc
21344         subdirectory.
21345
21346         * exception*: Remove pointer from object, constructors.  Add
21347         default exception::what that uses type_info::name.  Add
21348         __throw_bad_typeid.
21349
21350         * init.c (build_new): Don't add a cookie to new (void *) T[2].
21351
21352 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
21353
21354         * Make-lang.in: Building C++ code depends on cc1plus.
21355
21356 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21357
21358         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
21359         a HOST_WIDE_INT, not a tree.
21360
21361 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
21362
21363         * exception.cc: Don't include <stdlib.h>.
21364
21365         * Make-lang.in (c++.clean): Remove cplib2.*.
21366
21367 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
21368
21369         * parse.y (component_decl_1, component_costructor_declarator case):
21370         Pass attributes/prefix_attributes in tree list.
21371
21372 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
21373
21374         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
21375
21376 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21377
21378         * lex.c (do_identifier): Don't do deferred lookup in a template
21379         header.
21380
21381         * typeck2.c (store_init_value): Oops.
21382
21383         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
21384         New files for C++ lang-support library.
21385         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
21386         (CXX_LIB2FUNCS): Define.
21387         And rules for building the C++ lang-support code.
21388         * config-lang.in (headers): Define.
21389         (lib2funcs): Define.
21390
21391 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
21392
21393         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
21394         digest_init.
21395         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
21396         * typeck2.c (store_init_value): Check for initializing pmf with { }
21397         here.
21398         (process_init_constructor): Not here.
21399
21400 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
21401
21402         * pt.c (begin_template_parm_list): Increment
21403         processing_template_decl here.
21404         (end_template_parm_list): Not here.
21405         (process_template_parm): No need to add 1 to it now.
21406         * *.c: Use processing_template_decl instead of current_template_parms
21407         to check for being in a template.
21408
21409         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
21410         (tsubst_copy): Handle CONSTRUCTOR.
21411         (instantiate_decl): Set up context properly for variables.
21412         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
21413         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
21414
21415 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21416
21417         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
21418
21419 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
21420
21421         * method.c (make_thunk): Call comdat_linkage before setting the
21422         TREE_CODE.
21423
21424         * decl2.c (comdat_linkage): Use make_decl_one_only.
21425         (import_export_decl): Likewise.
21426         * decl.c (init_decl_processing): Check supports_one_only instead of
21427         SUPPORTS_WEAK.
21428
21429 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
21430
21431         * decl2.c (grokfield): Tighten checking for access decls.
21432
21433         * decl.c (make_typename_type): Resolve references to
21434         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
21435         (lookup_name_real): Types that depend on a template parameter get
21436         an implicit 'typename' unless they're in the current scope.
21437         (start_decl_1): We don't care about incomplete types that depend
21438         on a template parm.
21439         (grokdeclarator): Resolve 'typename's in the type specifier that
21440         refer to members of the current scope.
21441
21442         * call.c (build_over_call): Remove 'inline called before
21443         definition' diagnostic.
21444         (build_method_call): Likewise.
21445         * decl.c (duplicate_decls): Downgrade 'used before declared
21446         inline' to a warning, only with -Winline.
21447
21448 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
21449
21450         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
21451
21452 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
21453
21454         * call.c (build_method_call): When calling a signature
21455         default implementation, as in other cases, let instance_ptr simply
21456         be instance.
21457
21458 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
21459
21460         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
21461
21462 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
21463
21464         * except.c (expand_start_catch_block): Add a pushlevel so that -g
21465         works on hppa and SPARC.
21466
21467 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21468
21469         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
21470
21471 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
21472
21473         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
21474         before testing whether it's a signature.
21475
21476 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
21477
21478         * call.c (build_new_method_call): Don't complain about signature
21479         pointers and references not being an aggr type.
21480         (build_this): If a signature pointer or reference was passed in,
21481         just return it.
21482         (build_new_method_call): If instance is a signature pointer, set
21483         basetype to the signature type of instance.
21484         * sig.c (build_signature_method_call): Deleted basetype and
21485         instance parameters, they can be found as the DECL_CONTEXT of
21486         function and as the first argument passed in.
21487         * cp-tree.h: Changed declaration of build_signature_method_call.
21488         * call.c (build_method_call): Deleted first two arguments in call
21489         of build_signature_method_call.
21490         (build_over_call): Added call to build_signature_method_call.
21491
21492 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
21493
21494         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
21495         target_expr.
21496
21497 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21498
21499         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
21500
21501 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
21502
21503         * except.c (expand_start_try_stmts): Move to except.c in the backend.
21504         (expand_end_try_stmts): Remove.
21505
21506         * init.c (perform_member_init): Use add_partial_entry () instead
21507         of directly manipulating lists.
21508         (emit_base_init): Likewise.
21509
21510 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
21511
21512         * except.c (expand_exception_blocks): Always make sure USE and
21513         CLOBBER insns that came at the end still do, the backend relies
21514         upon this.
21515
21516 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
21517
21518         * call.c (build_over_call): We can only use a TARGET_EXPR of the
21519         right type.
21520
21521 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
21522
21523         * cvt.c (convert_to_reference): Revert last change, don't complain
21524         about temp without target decl.
21525
21526 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
21527
21528         * decl.c (grokdeclarator): Don't core dump when void() is given.
21529
21530 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
21531
21532         * decl.c (copy_args_p): Don't crash.
21533
21534 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
21535
21536         * pt.c (tsubst): And support template args inside the exception
21537         specification.
21538
21539         * pt.c (tsubst): Add support for exception specifications in
21540         template functions.
21541
21542 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
21543
21544         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
21545         fields now.
21546         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
21547         (start_function): Likewise.
21548         (start_method): Likewise.
21549         (grokfield): Likewise.
21550         (make_call_declarator): Add throw spec parameter.
21551         (set_quals_and_spec): Add routine.
21552         * lex.c (set_quals_and_spec): Likewise.
21553         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
21554         * decl.c (shadow_tag): Eliminate the throw spec parameter to
21555         grokdeclarator.
21556         (groktypename): Likewise.
21557         (start_decl): Eliminate the throw spec parameter.  Eliminate the
21558         throw spec parameter to grokdeclarator.  Eliminate the throw spec
21559         field in DECL_STMT.
21560         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
21561         (grokfndecl): Remove useless set of raises.
21562         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
21563         the throw spec parameter to start_decl.  Pull the throw spec out
21564         of the call declarator.
21565         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
21566         (start_function): Eliminate the throw spec parameter.  Eliminate
21567         the throw spec parameter to grokdeclarator.
21568         (start_method): Likewise.
21569         * decl2.c (grokfield): Likewise.
21570         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
21571         (grokoptypename): Likewise.
21572         (finish_file): Eliminate the throw spec parameter to
21573         start_function.  Add throw spec to make_call_declarator.
21574         * except.c (init_exception_processing): Add throw spec to
21575         make_call_declarator.  Eliminate the throw spec parameter to
21576         start_decl.
21577         (expand_start_catch_block): Eliminate the throw spec parameter to
21578         grokdeclarator.
21579         (expand_builtin_throw): Add throw spec to make_call_declarator.
21580         Eliminate the throw spec parameter to start_function.
21581         (start_anon_func): Likewise.
21582         * lex.c (make_call_declarator): Add throw spec parameter.
21583         (set_quals_and_spec): New routine.
21584         (cons_up_default_function): Add throw spec to make_call_declarator.
21585         Eliminate the throw spec parameter to grokfield.
21586         * method.c (synthesize_method): Eliminate the throw spec parameter
21587         to start_function.
21588         * pt.c (process_template_parm): Eliminate the throw spec parameter
21589         to grokdeclarator.
21590         (tsubst): Add throw spec to make_call_declarator.
21591         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
21592         (do_function_instantiation): Eliminate the throw spec parameter to
21593         grokdeclarator.  Eliminate the throw spec parameter to
21594         start_function.
21595         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
21596         to start_function.
21597         * parse.y (datadef): Remove non-winning optimization.
21598         (decl): Likewise.
21599         (fndef): Remove ambiguous error productions uncovered by grammar
21600         fixing.
21601         (constructor_declarator): Add exception_specification_opt here.
21602         (component_constructor_declarator): Likewise.
21603         (direct_after_type_declarator): Likewise.
21604         (complex_direct_notype_declarator): Likewise.
21605         (direct_abstract_declarator): Likewise.
21606         (fn.def1): Remove exception_specification_opt.
21607         (fn.def2): Likewise.
21608         (condition): Likewise.
21609         (initdcl0): Likewise.
21610         (initdcl): Likewise.
21611         (notype_initdcl0): Likewise.
21612         (nomods_initdcl0): Likewise.
21613         (component_decl_1): Likewise.
21614         (component_declarator): Likewise.
21615         (after_type_component_declarator0): Likewise.
21616         (after_type_component_declarator): Likewise.
21617         (notype_component_declarator): Likewise.
21618
21619 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21620
21621         * call.c (build_over_call): Also use an INIT_EXPR when
21622         initializing anything from an rvalue.
21623
21624         * call.c (build_over_call): Call stabilize_reference when building
21625         an INIT_EXPR instead of calling the copy ctor.
21626
21627         * call.c (joust): Extend the previous change to all comparisons.
21628
21629         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
21630         NO_LINKAGE_HEURISTICS.
21631
21632         * decl2.c (finish_file): Emit any statics that weren't already.
21633
21634         * typeck.c (build_static_cast): Implement.
21635         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
21636         * decl.c (grokparms): Use can_convert_arg instead of
21637         implicit_conversion directly.
21638         (copy_args_p): New fn.
21639         * cvt.c (convert_to_reference): Don't complain about temp with
21640         static_cast.
21641         (build_up_reference): Handle TARGET_EXPRs.
21642         * call.c (build_over_call): Elide unnecessary temps.
21643         (can_convert*): Use new overloading code.
21644
21645 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
21646
21647         * call.c: Move TYPE_PTR*_MACROS ...
21648         * cp-tree.h: To here.
21649         * typeck.c (build_reinterpret_cast): Implement.
21650
21651         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
21652         ptr_complete_ob.
21653         (joust): If we're comparing a function to a builtin and the worst
21654         conversion for the builtin is worse than the worst conversion for the
21655         function, take the function.
21656
21657         * typeck.c (build_const_cast): Implement.
21658         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
21659         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
21660
21661 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
21662
21663         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
21664         too early.  Make sure we explode if exprtype turns out to be a
21665         NULL_TREE when it shouldn't be.
21666
21667 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
21668
21669         * cp-tree.h: New routine make_call_declarator.
21670         * lex.c (make_call_declarator): Define it.
21671         * except.c (init_exception_processing): Use it.
21672         (expand_builtin_throw): Likewise.
21673         (start_anon_func): Likewise.
21674         * decl2.c (finish_file): Likewise.
21675         * lex.c (cons_up_default_function): Likewise.
21676         * parse.y: Likewise.
21677         * pt.c (tsubst): Likewise.
21678
21679 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
21680
21681         * decl2.c (groktypefield): Remove unused code.
21682
21683 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
21684
21685         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
21686         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
21687         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
21688         nonempty_cv_qualifiers.
21689         * hash.h: Rebuild.
21690
21691         * lex.c (make_pointer_declarator): Change type_quals into
21692         cv_qualifiers.
21693         (make_reference_declarator): Likewise.
21694
21695 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21696
21697         * decl.c (start_function): Only check interface_* for templates
21698         with flag_alt_external_templates.
21699
21700         * call.c (build_new_op): Check for comparison of different enum types.
21701         (build_over_call): Fix arg # output.
21702
21703         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
21704
21705 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21706
21707         * call.c (build_new_op): Check for erroneous args.
21708
21709         * call.c (build_new_method_call): Add missing args to cp_error.
21710
21711         * tree.c (error_type): Don't print reference-to-array.
21712
21713         * typeck.c (convert_for_assignment): Don't say contravariance for
21714         removing const.
21715
21716 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
21717
21718         * call.c (build_over_call): Diagnose bad convs for `this'.
21719
21720         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
21721         on _ctor_arg.
21722
21723         * call.c (convert_like): Handle bad convs.
21724         (build_over_call): Handle bad convs better.
21725
21726         * decl2.c: -fansi-overloading is now the default.
21727
21728         * call.c (build_new_method_call): Check for erroneous args.
21729
21730         * pt.c (instantiate_class_template): Propagate
21731         TYPE_USES_MULTIPLE_INHERITANCE.
21732
21733 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
21734
21735         * call.c (enforce_access): Add static to routine.
21736
21737 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
21738
21739         * call.c (build_user_type_conversion_1): Fix bad handling.
21740         (compare_ics): Likewise.
21741
21742 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21743
21744         * call.c (standard_conversion): Oops.
21745
21746 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
21747
21748         * g++.c: Update test for win32 (&& ! cygwin32).
21749
21750 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
21751
21752         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
21753         (ptr_reasonably_similar): New fn.
21754         * call.c (BAD_RANK): New rank.
21755         (ICS_BAD_FLAG): New macro.
21756         (standard_conversion): Handle almost-right pointer conversions.
21757         (reference_binding): Handle bad rvalue bindings.
21758         (add_*_candidate): Stuff.
21759         (build_over_call): Pass bad conversions to convert_for_initialization.
21760         (compare_ics): Handle bad convs.
21761         (joust): Likewise.
21762
21763 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
21764
21765         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
21766         integer_type_node when computing pointer offsets.
21767
21768 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
21769
21770         * tree.c (lvalue_type): New fn.
21771         (error_type): New fn.
21772         * call.c (op_error): Use error_type.
21773         (add_conv_candidate): Use lvalue_type.
21774         (add_builtin_candidates): Likewise.
21775         * error.c (args_as_string): Use error_type.
21776
21777 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
21778
21779         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
21780         (tsubst): Not here.
21781
21782         * decl.c (init_decl_processing): With -ansi, __null's type is the
21783         signed integral type with the same number of bits as a pointer.
21784         Introduce a new variable null_node for it.
21785         * cp-tree.h: Adjust.
21786         * call.c (null_ptr_cst_p): Adjust.
21787
21788 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
21789
21790         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
21791         optimize.
21792
21793 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
21794
21795         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
21796         fns of classes without virtual functions.
21797
21798         * call.c (add_function_candidate): Handle `this' specially.
21799         (compare_ics): Likewise.
21800
21801 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
21802
21803         * typeck.c (build_conditional_expr): Fix handling of __null.
21804
21805         * decl2.c (comdat_linkage): New fn.
21806         (import_export_vtable): Use it.
21807         (import_export_decl): Use it.
21808         * method.c (make_thunk): Use it.
21809
21810 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21811
21812         * pt.c (end_template_decl): If we don't actually have parms, return.
21813         * parse.y (template_header): Accept 'template <>'.
21814
21815         * errfn.c: Allow 5 args.
21816
21817 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
21818
21819         * tree.c (make_temp_vec): New fn.
21820         * pt.c (push_template_decl): Handle partial specs.
21821         (instantiate_class_template): Likewise.
21822         (more_specialized): Use get_bindings.
21823         (more_specialized_class): New fn.
21824         (get_class_bindings): New fn.
21825         (most_specialized_class): New fn.
21826         (do_function_instantiation): List candidates for ambiguous case.
21827         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
21828         (shadow_tag): Call push_template_decl for partial specializations.
21829         * parse.y: Likewise.
21830         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
21831         DECL_TEMPLATE_MEMBERS.
21832         * call.c (print_z_candidates): Reduce duplication.
21833
21834 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21835
21836         * decl2.c (lang_decode_option): Allow -fansi-overloading.
21837
21838 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21839
21840         * pt.c (get_bindings): New fn.
21841         (most_specialized): Likewise.
21842         (do_function_instantiation): Use them.
21843         (add_maybe_template): New fn.
21844         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
21845         * call.c (build_new_op): Handle guiding decls.
21846         (build_new_function_call): Likewise.
21847         * decl2.c (finish_file): Likewise.
21848
21849         * decl2.c (mark_used): Do synthesis here.
21850         * call.c (build_method_call): Not here.
21851         (build_over_call): Or here.
21852         * typeck.c (build_function_call_real): Or here.
21853         * tree.c (bot_manip): Call mark_used on functions used in default
21854         args.
21855
21856 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
21857
21858         * decl2.c (import_export_vtable): Delete code that disabled vtable
21859         heuristic on systems with ASM_OUTPUT_EXTERNAL.
21860
21861 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21862
21863         * typeck.c (build_x_function_call): Handle static call context
21864         better.
21865
21866         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
21867         the function, not its outer block.
21868
21869         * call.c (build_field_call): Pass fields on to build_opfncall
21870         regardless of TYPE_OVERLOADS_CALL_EXPR.
21871         (build_method_call): Pass on to build_new_method_call sooner.
21872
21873         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
21874         gives us.
21875         * class.c (instantiate_type): Don't put a POINTER_TYPE to
21876         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
21877         modifying it.
21878
21879 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
21880
21881         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
21882         (add_builtin_candidate): Don't take enums for ++.
21883         (build_new_method_call): Handle non-aggregates and field calls.
21884         Move new overloading code from...
21885         * cvt.c: Here.
21886
21887         * decl.c (grokparms): Don't check default args in templates.
21888
21889 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
21890
21891         * cvt.c (build_new_op): Fix args to build_unary_op.
21892         (add_builtin_candidates): Don't call type_promotes_to on float.
21893
21894         * decl.c (grokparms): Check the type of the default arg.
21895
21896         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
21897         returning NULL_TREE.
21898
21899         * typeck.c (build_x_binary_op): Avoid doing extra work.
21900         (build_x_unary_op): Likewise.
21901         (build_x_conditional_expr): Likewise.
21902         * cvt.c (build_over_call): Return.
21903         (add_builtin_candidate): Fix MEMBER_REF.
21904         (build_new_op): Likewise.
21905
21906 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
21907
21908         * method.c (build_overload_name): Put bug fix into code but leave
21909         disabled for now so we can be bug compatible with older releases
21910         that do repeats incorrectly.  In the future, we can enable it.
21911
21912 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
21913
21914         * cvt.c (convert_like): Don't call build_cplus_new twice.
21915
21916         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
21917         Control new overloading code with -fansi-overloading.
21918
21919 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21920
21921         * cvt.c (build_over_call): Call build_cplus_new.
21922         * call.c (build_method_call): Likewise.
21923         * typeck.c (build_function_call_real): Likewise.
21924         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
21925         the COND_EXPR in a TARGET_EXPR so they use the same slot.
21926
21927         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
21928         recursive calls.
21929         * typeck.c (complete_type): Propagate
21930         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
21931
21932 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
21933
21934         * cvt.c (joust): More ?: kludging.  Sigh.
21935         (build_over_call): Don't try to synthesize global fns.
21936
21937         * search.c (lookup_conversions): Use binfo marking.
21938
21939 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
21940
21941         * search.c (build_mi_matrix): Use the correct value of cid
21942         when determining the new mi_size.
21943
21944 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
21945
21946         * cvt.c (add_builtin_candidates): Do consider type conversion ops
21947         for the first parms of += et al.
21948         (strip_top_quals): New fn.
21949         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
21950         (implicit_conversion): Likewise.
21951         (add_builtin_candidates): Be careful about arrays.
21952         (build_new_method_call): Handle vtable optimization.
21953
21954 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
21955
21956         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
21957         * cvt.c (reference_binding): Use it.
21958         (implicit_conversion): Use it.
21959         (add_builtin_candidate, COND_EXPR): Use it.
21960
21961         * cvt.c (build_new_function_call): Check for error args.
21962
21963         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
21964
21965         * gxx.gperf: Add __null.
21966         * hash.h: Regenerate.
21967         * lex.h: Add RID_NULL.
21968         * lex.c (init_lex): Create null_pointer_node here, stick it in
21969         RID_NULL.
21970         * decl.c (init_decl_processing): Still set its type here.
21971         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
21972         (convert_to_pointer_force): Likewise.
21973         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
21974         if (! pedantic).
21975         * call.c (convert_harshness): Use null_ptr_cst_p.
21976         * typeck.c (convert_for_assignment): Likewise.  Don't produce
21977         null_pointer_node.
21978
21979         * error.c (args_as_string): Handle lists of actual args, too.
21980         * cvt.c (null_ptr_cst): Support (void*)0 for now.
21981         (build_user_type_conversion_1): Improve diagnostics.
21982         (build_new_function_call): Likewise.
21983         (build_object_call): Likewise.
21984         (build_new_method_call): Likewise.  Move call before def diagnostic...
21985         (build_over_call): Here.
21986
21987         * cvt.c (build_new_method_call): Don't complain about no match if
21988         LOOKUP_SPECULATIVELY.
21989         (build_over_call): Fix 'this' for virtual fn.
21990         (build_new_method_call): Add diagnostic.
21991
21992 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21993
21994         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
21995         constructors to be passed in.
21996         (build_over_call): Likewise.
21997         (build_user_type_conversion_1): Pass them in.
21998         (convert_like): Likewise.
21999         (build_object_call): Handle overloaded conversions.
22000         (build_over_call): Pass the right args to build_vfn_ref.
22001         (standard_conversion): Fix pmf convs.
22002         (joust): Handle comparing statics and non-statics.
22003         (build_new_method_call): New fn.
22004         * call.c (build_method_call): Call it if NEW_OVER.
22005
22006 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
22007
22008         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
22009         %D instead.
22010
22011 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
22012
22013         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
22014         instead of just maybe_build_cleanup so that we deallocate the
22015         thrown object.
22016
22017 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22018
22019         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
22020         * cp-tree.h (finish_prevtable_vardecl): Add decl.
22021
22022 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
22023
22024         * pt.c (instantiate_class_template): Call complete_type.  Also, if
22025         we're at the end of the file and we just instantiated a template
22026         class with a vtable, call finish_prevtable_vardecl.
22027
22028         * error.c (dump_decl): Don't explode (or explode more gracefully
22029         as appropriate) if the object being dumped has a null type.
22030         (dump_expr): Likewise.
22031
22032         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
22033         by counting the number of nodes that we'll need before allocating
22034         the array.
22035         (lookup_fnfields): Fix comment.
22036         (breadth_first_search): Fix comment.
22037
22038 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
22039
22040         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
22041         TYPE_ALIGN.
22042         * class.c (finish_struct): Call cplus_decl_attributes here.
22043         (finish_struct_1): Not here.
22044         * cp-tree.h: Adjust.
22045
22046         * pt.c (type_unification): New parameter STRICT.
22047         (unify): If STRICT, don't allow cv addition or base deduction.
22048         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
22049
22050 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
22051
22052         * search.c (get_template_base{_recursive}): New fns.
22053         * pt.c (more_specialized): New fn.
22054         (do_function_instantiation): Use it.
22055         (unify): Handle base deduction.
22056         * cvt.c (joust): Use more_specialized.
22057         Don't arbitrarily choose between non-builtin candidates.
22058         (build_over_call): Call require_complete_type.
22059
22060         * decl.c (start_function): Statics are static even in a #pragma
22061         interface file.
22062
22063         * decl2.c (import_export_vtable): Disable vtable heuristic on
22064         systems with ASM_OUTPUT_EXTERNAL.
22065
22066         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
22067         (standard_conversion): No std conv to enum type.
22068
22069         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
22070         for ptm's.
22071
22072         * cvt.c (reference_binding): Bind directly to a base subobject of
22073         a class rvalue.
22074
22075         * cvt.c (build_new_op): Enforce access control.
22076
22077 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
22078
22079         * typeck2.c (process_init_constructor): When scanning the
22080         union for a named field, skip things that aren't FIELD_DECLs.
22081
22082         * method.c (synthesize_method): Don't scan fndecl's rtl if
22083         we're at the end of the file; just assume the function can't
22084         be inlined.
22085
22086 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22087
22088         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
22089         it failed.
22090
22091         * cvt.c (build_user_type_conversion_1): Handle overloaded
22092         conversion ops.
22093
22094         * cvt.c (add_builtin_candidates): Don't consider type conversion
22095         operators for the first parameter of operator=.
22096
22097 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
22098
22099         * typeck.c (complete_type): Only call layout_type if we're not
22100         expanding a template.
22101
22102 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22103
22104         * cvt.c (compare_ics): Oops.
22105
22106         * cvt.c (op_error): Oops.
22107
22108         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
22109         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
22110         (build_conv): Use them.
22111         (implicit_conversion): Use them.
22112         (convert_like): Handle them.
22113         (build_new_op): Handle builtin COND_EXPR again.
22114         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
22115         in lists of types for COND_EXPR.
22116         (add_builtin_candidate): Add enum candidates for COND_EXPR.
22117
22118 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
22119
22120         * typeck.c (build_modify_expr): Always attempt to build a call to
22121         the assignment operator, even if we're using a default one.
22122         (convert_for_initialization): Call complete_type.
22123
22124 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22125
22126         * cvt.c (reference_binding): A REF_BIND gets the reference type.
22127         (implicit_conversion): Likewise.
22128         (convert_like): Likewise.
22129         (compare_ics): Likewise.
22130         (compare_qual): Likewise.
22131         (print_z_candidates): Handle no candidates.
22132         (build_new_op): Don't handle builtin COND_EXPR for now.
22133
22134 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
22135
22136         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
22137
22138 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
22139
22140         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
22141
22142         * cvt.c (build_builtin_candidate): Oops.
22143         (build_new_op): Oops.
22144
22145         * method.c (build_opfncall): Pass COND_EXPR on.
22146         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
22147         (add_builtin_candidate{,s}): Likewise.
22148         (add_builtin_candidates): Likewise.
22149         (print_z_candidates, op_error, build_new_op): Likewise.
22150         (type_decays_to): New fn.
22151         * lex.c (init_lex): Just say ?: for COND_EXPR.
22152
22153 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22154
22155         * typeck.c (complete_type): Call layout_type rather than building
22156         a new array type.
22157
22158         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
22159         only use ptrdiff_t.
22160
22161 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22162
22163         * cvt.c: Always compile the new overloading code (but don't use it).
22164         (implicit_conversion): Add a BASE_CONV when converting to
22165         the same class type.
22166         (convert_like): Handle BASE_CONV.
22167
22168 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22169
22170         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
22171         (add_builtin_candidate): Likewise.
22172
22173         NEW_OVER changes:
22174         * typeck.c (build_x_function_call): Try an operator function
22175         whenever we call an object of class type.
22176         * method.c (build_opfncall): Pass CALL_EXPRs through.
22177         * cvt.c (implicit_conversion): Do const-ref case first.
22178         (add_conv_candidate, build_object_call, op_error): New fns.
22179         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
22180         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
22181         builtin candidates.
22182         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
22183         Fall back on preincrement handling.  Use op_error.
22184         Handle warn_synth.
22185         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
22186         an error_mark_node.
22187         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
22188         properly.
22189
22190 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
22191
22192         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
22193
22194 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
22195
22196         * typeck.c (build_component_ref_1): Use build_component_ref
22197         instead of open coding it here.
22198
22199 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
22200
22201         * g++.c (main): Don't link with -lg++.
22202
22203         NEW_OVER changes:
22204         * cvt.c (convert_to_reference): Don't use convert_from_reference on
22205         result of build_type_conversion.
22206         (cp_convert): Only call build_method_call for ctors if
22207         build_type_conversion failed.
22208         (ptr_complete_ob): New function.
22209         (TYPE_PTR{,OB,MEM}_P): New macros.
22210         ({add,build}_builtin_candidate{,s}): New functions.
22211         (print_z_candidates): Handle builtins.
22212         (build_user_type_conversion_1): Don't use conversion fns for
22213         converting to a base type.
22214         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
22215         (build_user_type_conversion): Use convert_from_reference.
22216         (build_new_op): New function.
22217         (build_over_call): Fix handling of methods.
22218         (compare_ics): Handle AMBIG_CONV properly.
22219         * typeck2.c: Increment abort count.
22220         * method.c (build_opfncall): Forward most requests to build_new_op.
22221         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
22222
22223 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22224
22225         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
22226         invalid second argument to dump_expr_list.
22227
22228 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
22229
22230         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
22231
22232 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
22233
22234         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
22235         ASSEMBLE_EXTERNAL.
22236
22237 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
22238
22239         * typeck2.c (process_init_constructor): New pedwarn for using { }
22240         to initialize a pointer to member function.
22241         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
22242         we can avoid the new error.
22243
22244 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
22245
22246         * typeck.c (build_ptrmemfunc1): New function to hide details of
22247         pointer to member functions better.
22248
22249 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
22250
22251         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
22252         methods into the actual method, as we know the implied object is
22253         not used.
22254
22255 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22256
22257         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
22258         inside a system header.
22259
22260 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
22261
22262         * call.c (build_method_call): Call complete_type on the
22263         instance type.
22264
22265 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
22266
22267         * typeck.c (build_component_ref): Always build up an OFFSET_REF
22268         for obj_ptr->func so that we can know which object to use in a
22269         method call.
22270
22271 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
22272
22273         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
22274         around things.  Also improve maintainability.
22275
22276 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
22277
22278         * decl.c (grokdeclarator): Check for overflow when evaluating an
22279         array dimension.
22280
22281 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
22282
22283         * cvt.c (cp_convert): Don't check for ambiguity with constructor
22284         if NEW_OVER.
22285
22286         * typeck.c (build_x_function_call): Pass function overload
22287         questions to new overloading code if NEW_OVER.
22288         * init.c (expand_aggr_init_1): Only check for type conversion ops
22289         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
22290         Don't check for ambiguity with constructor if NEW_OVER.
22291         * cvt.c (convert_to_reference): Dereference the result of a type
22292         conversion operator.
22293         (build_conv): Propagate ICS_USER_FLAG.
22294         (implicit_conversion): Call instantiate_type.
22295         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
22296         (add_function_candidate): Fix cv-quals on argtype.
22297         (print_z_candidates): New function.
22298         (build_new_function_call): Call it.
22299         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
22300         consider non-converting constructors.
22301         Call print_z_candidates.
22302         Return an AMBIG_CONV for an ambiguous conversion.
22303         (build_user_type_conversion): Handle AMBIG_CONV.
22304         (convert_like): Fix test for building TARGET_EXPR.
22305         Call instantiate_type.
22306         Handle AMBIG_CONV and LVALUE_CONV.
22307         (build_over_call): Handle 0 args and ellipsis.
22308         * cp-tree.def: Add AMBIG_CONV.
22309
22310 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
22311
22312         * decl.c (lookup_name_real): If we find mem in obj when parsing
22313         `obj->mem', make sure we return the right value.
22314
22315 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
22316
22317         * search.c (get_base_distance): Call complete_type.
22318
22319 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
22320
22321         * decl.c (store_bindings): Make static.
22322
22323 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
22324
22325         * init.c (expand_aggr_init_1): Don't check type conversions if
22326         NEW_OVER.
22327
22328         * cvt.c (z_candidate): Put back template field.
22329         (add_function_candidate): Set it.
22330         (add_template_candidate): Likewise.
22331         (joust): Use it.
22332         (compare_qual): Handle references and pointers to members.
22333         (compare_ics): Handle reference bindings.
22334
22335         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
22336
22337 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
22338
22339         * call.c (compute_conversion_costs): Call complete_type.
22340
22341         * tree.c (vec_binfo_member): Use comptypes instead of comparing
22342         pointers, so we can handle template parameters.
22343
22344 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
22345
22346         * cvt.c (cp_convert_to_pointer): We have to call complete_type
22347         here; let's make it explicit instead of a side effect of an
22348         error check.
22349
22350 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
22351
22352         * cvt.c (z_candidate): Remove template field.
22353         (reference_binding): Handle binding to temporary.
22354         (implicit_conversion): Likewise.
22355         (add_function_candidate): Handle artificial constructor parms.
22356         Handle functions with too few parms.
22357         (add_template_candidate): New function.
22358         (build_user_type_conversion_1): Handle constructors.
22359         (convert_like): Likewise.
22360         (build_over_call): Likewise.
22361         (build_new_function_call): Support templates.
22362         (compare_ics): Fix reference, inheritance handling.
22363
22364 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
22365
22366         * decl.c: Add signed_size_zero_node.
22367         (init_decl_processing): Build it.
22368         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
22369         when we're trying to make a negative delta.
22370
22371 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22372
22373         Stop doing this damn index==strchr variable name confusion.
22374         * class.c (add_virtual_function): Change local var INDEX to be
22375         named IDX.
22376         (add_method): Likewise.
22377         * lex.c (print_parse_statistics): Likewise.
22378         * search.c (make_memoized_table_entry): Likewise.
22379         (lookup_fnfields_here): Likewise.
22380         (lookup_field): Likewise.
22381         (lookup_fnfields): Likewise.
22382         (get_baselinks): Likewise.
22383         * sig.c (build_signature_table_constructor): Likewise.
22384         (build_signature_method_call): Likewise.
22385         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
22386         (get_member_function_from_ptrfunc): Likewise.
22387         (build_ptrmemfunc): Change local var INDEX to be IDX.
22388         (c_expand_start_case): Likewise.
22389
22390 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
22391
22392         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
22393         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
22394         (convert_to_reference): Use build_type_conversion to convert to
22395         the reference type directly.
22396         (standard_conversion): Fix void* case, non-conversions.
22397         (reference_binding): Fix expr == 0 case, non-conversions.
22398         (convert_like): Support REF_BIND.
22399         (compare_qual): Split out from compare_ics.
22400         (compare_ics): Use it, handle icses with only a qual_conv.
22401
22402         * init.c (expand_vec_init): Don't crash if decl is NULL.
22403
22404 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
22405
22406         * mpw-config.in: New file, configury for Mac MPW.
22407         * mpw-make.sed: New file, makefile editing for MPW.
22408
22409 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22410
22411         * pt.c (instantiate_class_template): Call repo_template_used.
22412
22413         * search.c (lookup_conversions): Only lookup conversions in
22414         complete types.
22415
22416 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22417
22418         * cp-tree.def: Renamed from tree.def, to avoid confusion with
22419         gcc's tree.def.
22420         * cp-tree.h, lex.c: Include cp-tree.def.
22421         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
22422
22423 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
22424
22425         * init.c (build_vec_delete_1): Call complete_type.
22426
22427 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
22428
22429         * except.c (start_anon_func): Make sure anonymous functions are
22430         never external.
22431
22432 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
22433
22434         * decl.c (finish_function): If function_depth > 1, set nested.
22435
22436         * decl2.c (grokbitfield): Revert Bob's change.
22437         * class.c (finish_struct_1): Fix handling of named bitfield widths.
22438
22439 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22440
22441         * pt.c (add_pending_template): Handle types.
22442         (lookup_template_class): With -fexternal-templates, just add the class
22443         to pending_templates instead of instantiating it now.
22444         * decl2.c (finish_file): Handle types in pending_templates.
22445
22446 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
22447
22448         * decl2.c (grokbitfield): Handle constant decls appropriately.
22449         Give an appropriate error message now instead of spewing core
22450         later.
22451
22452 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
22453
22454         * decl2.c: Don't turn on thunks by default for now.
22455
22456 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
22457
22458         * typeck.c (complete_type): Handle error_mark_node.
22459         (common_type, OFFSET_TYPE): Handle template_type_parms.
22460
22461 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
22462
22463         * pt.c (instantiate_decl): If at_eof, call import_export_decl
22464         regardless of DECL_INLINE.
22465
22466         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
22467
22468         * class.c (finish_struct_bits): Copy TYPE_SIZE.
22469
22470         * rtti.c (build_dynamic_cast): Support templates.
22471         * tree.def: Support DYNAMIC_CAST_EXPR.
22472         * pt.c (tsubst_copy): Likewise.
22473         * decl2.c (build_expr_from_tree): Likewise.
22474
22475 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
22476
22477         * typeck.c (build_static_cast): Support templates.
22478         (build_const_cast): Likewise.
22479         * tree.def: Support CONST/STATIC_CAST_EXPR.
22480         * pt.c (tsubst_copy): Likewise.
22481         * decl2.c (build_expr_from_tree): Likewise.
22482
22483 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
22484
22485         * decl2.c (finish_vtable_vardecl): Don't trust
22486         TREE_SYMBOL_REFERENCED for vtables of local classes.
22487
22488 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
22489
22490         * pt.c (tsubst_copy): Handle operator T.
22491
22492 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22493
22494         * init.c (build_delete): Move creation of PARMS inside test of
22495         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
22496
22497 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
22498
22499         * typeck.c (build_conditional_expr): Don't assume that
22500         the arguments to ?: are always pointers or records.
22501
22502 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22503
22504         * decl2.c (import_export_decl): Still emit static/weak/comdat
22505         copies of inline template functions with -fno-implicit-templates.
22506
22507 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
22508
22509         * init.c (build_delete): Determine the complete basetype
22510         path to the destructor we're calling.
22511
22512 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
22513
22514         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
22515         initialize the enum, because we really and truly don't know where
22516         it came from.
22517         (start_enum): Don't copy integer_zero_node because
22518         build_enumerator will do it.
22519
22520 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
22521
22522         * decl.c (finish_function): Do access control on base destructors.
22523
22524         * pt.c (tsubst, case FUNCTION_DECL): Set up
22525         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
22526         hose us.
22527
22528 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
22529
22530         * cvt.c (build_up_reference): If we have already extended the
22531         lifetime of the temporary, don't try it again.
22532         * typeck.c (c_expand_return): Don't try and convert the return
22533         value twice when we want a reference, once is enough.
22534
22535 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
22536
22537         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
22538         LOOKUP_ONLYCONVERTING at all for now.
22539
22540         * search.c (add_conversions): Put the conversion function in
22541         TREE_VALUE, the basetype in TREE_PURPOSE.
22542         * cvt.c (build_type_conversion): Adjust.
22543         * cvt.c (build_expr_type_conversion): Adjust.
22544         * call.c (user_harshness): Adjust.
22545
22546 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
22547
22548         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
22549         backend's benefit.
22550
22551 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
22552
22553         * except.c (expand_start_catch_block): Add a dummy region, if we
22554         get an error, so that we can avoid core dumping later.
22555
22556 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
22557
22558         * cp-tree.h (OFFSET_REF): Remove.
22559         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
22560         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
22561         * init.c (expand_aggr_init_1): Likewise.
22562         (build_new): Likewise.
22563         * typeck.c (expand_target_expr): Likewise.
22564
22565 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22566
22567         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
22568         TARGET_EXPR.
22569
22570 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
22571
22572         * cvt.c (build_up_reference): Redo how and when temporaries are
22573         created.
22574         * decl.c (grok_reference_init): Don't try and be smart about
22575         running cleanups.
22576
22577 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
22578
22579         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
22580         (TARGET_EXPR...), now that it has 4 arguments.
22581         * tree.c (build_cplus_new): Likewise.
22582
22583 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22584
22585         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
22586
22587         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
22588         * decl.c (struct saved_scope): Remove named_labels,
22589         {base,member}_init_list.
22590         (maybe_push_to_top_level): Don't set them.  Call
22591         push_cp_function_context if appropriate.
22592         (pop_from_top_level): Likewise.
22593
22594         * method.c (do_build_assign_ref): Remove obsolete check of
22595         TYPE_HAS_ASSIGN_REF (basetype).
22596
22597         * decl.c (grokfndecl): Diagnose user definition of
22598         implicitly-declared methods.
22599
22600 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
22601
22602         * method.c (do_build_copy_constructor): Add code to give
22603         meaningful error messages instead of crashing.
22604         (do_build_assign_ref): Don't synthesize assignment operators for
22605         classes containing reference or const members.
22606
22607         * class.c (struct base_info): Remove cant_synth_copy_ctor
22608         and cant_synth_asn_ref.
22609         (finish_base_struct): Remove the code that tries to conditionalize
22610         synthesis of copy constructors & assignment operators based on
22611         access permissions.  Instead, let it fail when it tries to
22612         synthesize the copy constructor.  This will give meaningful error
22613         messages instead of silently generating code to perform a bitcopy.
22614
22615 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
22616
22617         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
22618         determining types for constant values.
22619
22620         * decl.c (struct named_label_list): Use instead of stuffing
22621         random items into a TREE_LIST node.
22622         (named_label_uses): Use the new struct.
22623         (poplevel): Likewise.
22624         (lookup_label): Likewise.
22625         (define_label): Add an error message to tell the user the line
22626         where the goto is located in addition to the destination of the
22627         goto.
22628         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
22629         named_label_uses.
22630         (finish_function): Likewise.
22631
22632         (start_decl): Complain about defining a static data member
22633         in a different type from which it was declared.
22634
22635 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22636
22637         * cvt.c (build_expr_type_conversion): Adjust.
22638
22639 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
22640
22641         * call.c (build_method_call): Always convert 'this' to the
22642         appropriate type.
22643
22644         * search.c (add_conversions): Put the conversion function in
22645         TREE_VALUE, the type in TREE_PURPOSE.
22646         * cvt.c (build_type_conversion): Adjust.
22647         * call.c (user_harshness): Adjust.
22648
22649         * method.c (emit_thunk): Call temporary_allocation and
22650         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
22651
22652         * tree.c (build_cplus_array_type): Handle tweaking of
22653         TYPE_MAIN_VARIANT here.
22654         * typeck.c (common_type): Not here.
22655
22656         * typeck.c (complete_type): Only try to complete an array type if
22657         it has a domain.
22658
22659 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
22660
22661         * decl.c (grokvardecl): Call complete_type.
22662         (grokdeclarator): Call complete_type for PARM_DECLs.
22663
22664 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
22665
22666         * pt.c (instantiate_class_template): Re-set
22667         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
22668
22669 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
22670
22671         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
22672         smart enough to do it right.
22673         * tree.c (cp_expand_decl_cleanup): Likewise.
22674         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
22675         cp_expand_decl_cleanup.
22676         (store_parm_decls): Likewise.
22677         (hack_incomplete_structures): Likewise.
22678         * except.c (push_eh_cleanup): Likewise.
22679
22680 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
22681
22682         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
22683         frontend to the backend where it belongs.
22684         * tree.c (unsave_expr): Likewise.
22685         (unsave_expr_now): Likewise.
22686         * tree.def (UNSAVE_EXPR): Likewise.
22687         * cp-tree.h (unsave_expr): Likewise.
22688         (unsave_expr_now): Likewise.
22689
22690 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
22691
22692         * init.c (emit_base_init): Make sure the partial EH cleanups live
22693         on the function_obstack.
22694
22695 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
22696
22697         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
22698         when checking for pointer types.
22699
22700 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
22701
22702         * pt.c (instantiate_class_template): Remove obsolete check for
22703         access declarations.
22704
22705 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
22706
22707         * call.c (build_overload_call): Simplify calls to
22708         build_overload_call by removing last parameter.
22709         (build_method_call): Likewise.
22710         * cp-tree.h: Likewise.
22711         * method.c (build_opfncall): Likewise.
22712         * typeck.c (build_x_function_call): Likewise.
22713
22714 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
22715
22716         * call.c (default_parm_conversions): Factor out common code.
22717         (build_method_call): Use it.
22718         (build_overload_call_real): Use it.
22719
22720 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
22721
22722         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
22723         but pedwarn as the code is bogus.
22724         * typeck.c (decay_conversion): Likewise.
22725         (build_function_call_real): Use build_addr_func instead of
22726         default_conversion.  Don't allow pointer-to-method functions down
22727         here.
22728         (build_unary_op): Use real pointer-to-member functions instead of
22729         fake ones.
22730         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
22731         (convert_for_assignment): Removed some obsolete code.
22732         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
22733         build_x_function_call instead of current_class_ptr.  Only call
22734         digest_init once on an initializer, we do this just checking
22735         TREE_TYPE.
22736         (build_expr_from_tree): Pass current_class_ref to
22737         build_x_function_call instead of current_class_ptr.
22738         * init.c (build_member_call): Likewise.
22739         * pase.y: Likewise.
22740         * error.c (dump_expr): Handle OFFSET_REFs better.
22741         * pt.c (unify): Handle pointer-to-member functions better.
22742         * decl.c (finish_function): Clear out current_class_ref just like
22743         we do for current_class_ptr.
22744
22745         * typeck.c (get_delta_difference): Handle virtual bases better.
22746
22747 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
22748
22749         * sig.c (build_signature_table_constructor): Use the delta for
22750         the original basetype for this virtual function with thunks.
22751         (build_signature_method_call): We still need to adjust 'this'
22752         with thunks.
22753
22754 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
22755
22756         * call.c (build_addr_func): New routine.  Used to get the `real'
22757         address of a function or a method.  Needed to avoid getting a
22758         pointer-to-member function.
22759         (build_call): New routine to build CALL_EXPRs.
22760         (build_method_call): Use it.
22761         * cvt.c (convert_to_aggr): Likewise.
22762         * typeck.c (build_function_call_real): Likewise.
22763         * sig.c (build_signature_table_constructor): Use build_addr_func.
22764         * cp-tree.h (build_call, build_addr_func): Declare them.
22765
22766 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
22767
22768         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
22769         * parse.y: Remove uses of LOOKUP_AGGR.
22770
22771 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
22772
22773         * *.[chy]: Rename current_class_decl to current_class_ptr, and
22774         C_C_D to current_class_ref.
22775
22776 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22777
22778         * call.c (convert_harshness): Tighten up pointer conversions.
22779
22780 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
22781
22782         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
22783         (finish_file): Likewise.
22784
22785 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
22786
22787         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
22788
22789         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
22790         code.
22791
22792 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22793
22794         * decl2.c: Turn on thunks by default where supported.
22795
22796 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
22797
22798         * cp-tree.h (build_overload_call_maybe): Removed.
22799         * call.c (build_overload_call_real): Invert meaning of last arg to
22800         be require_complete.
22801         (build_overload_call): Likewise.
22802         * typeck.c (build_x_function_call): Use build_overload_call_real
22803         instead of build_overload_call_maybe.
22804
22805 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
22806
22807         * decl2.c (finish_file): Don't try to emit functions that haven't
22808         been compiled.
22809
22810 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
22811
22812         * decl2.c (finish_vtable_vardecl): Oops.
22813
22814         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
22815         Also store the bindings from previous_class_values.
22816         (pop_from_top_level): Restore them.
22817
22818 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
22819
22820         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
22821         symbol has been referenced.
22822         (finish_file): Re-join synthesis/vtable loop with inline emission
22823         loop, disable inlining when an inline is output.
22824
22825 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
22826
22827         * except.c (init_exception_processing): Setup saved_in_catch.
22828         (push_eh_cleanup): Reset __eh_in_catch.
22829         (expand_start_catch_block): Set __eh_in_catch.
22830
22831 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
22832
22833         * except.c (push_eh_cleanup): Add tracking for whether or not we
22834         have an active exception object.
22835         (expand_builtin_throw): Use it to make sure a rethrow without an
22836         exception object is caught.
22837
22838 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
22839
22840         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
22841         cache.
22842
22843 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
22844
22845         * decl2.c (finish_file): Also use sentries for vars with
22846         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
22847         created).
22848
22849         * lex.c (handle_cp_pragma): Disable #pragma
22850         interface/implementation if SUPPORTS_ONE_ONLY > 1.
22851
22852 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
22853
22854         * method.c (emit_thunk): Wrap default case in
22855         temporary/permanent_allocation.
22856
22857         * method.c (make_thunk): Use DECL_ONE_ONLY.
22858         (emit_thunk): Call assemble_end_function.
22859
22860 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
22861
22862         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
22863         (import_export_decl): Likewise.
22864         (finish_prevtable_vardecl): Disable vtable hack if
22865         SUPPORTS_ONE_ONLY > 1.
22866
22867 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
22868
22869         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
22870         PREDECREMENT_EXPRs take two arguments, not one.
22871
22872 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
22873
22874         * class.c (build_vtable_entry): Don't build thunks for abstract
22875         virtuals.
22876
22877         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
22878         frontend.
22879
22880 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
22881
22882         * class.c (set_rtti_entry): Use size_zero_node.
22883         (build_vtable): Likewise.
22884
22885 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
22886
22887         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
22888         (prepare_fresh_vtable): Likewise.
22889
22890 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
22891
22892         * method.c (emit_thunk): Call mark_used on the target function.
22893
22894         * call.c (build_method_call): Don't warn about pending templates.
22895
22896 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
22897
22898         * decl2.c (finish_file): Fix list walking logic.
22899
22900         * typeck2.c (check_for_new_type): Only warn if -pedantic.
22901
22902 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
22903
22904         * class.c (finish_struct_1): Remove old code for
22905         dont_allow_type_definitions.
22906         * cp-tree.h: Likewise.
22907         * spew.c: Make sure cp-tree.h is included before parse.h, so the
22908         definition of flagged_type_tree is found before it is used.
22909         * lex.c: Likewise.
22910         * parse.y: Added the ftype member to the type union, and changed a
22911         number of rules to use it instead of ttype.  Added calls to
22912         check_for_new_type() as appropriate.
22913         * typeck2.c (check_for_new_type): New function for checking
22914         if a newly defined type appears in the specified tree.
22915         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
22916         for check_for_new_type().
22917
22918 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
22919
22920         * decl2.c (finish_file): Only use a sentry if the decl is public.
22921
22922         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
22923         don't pass LOOKUP_ONLYCONVERTING.
22924
22925 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
22926
22927         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
22928         properly keeps track of const and volatile type modifiers.
22929
22930 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
22931
22932         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
22933         * pt.c (comp_template_args): Use it.
22934
22935         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
22936         assemble_external for artificial function decls.
22937
22938         * decl.c (cp_finish_decl): Oops.
22939
22940 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
22941
22942         * decl2.c (import_export_decl): Put static data member templates
22943         into common storage, or make them weak, depending on whether they
22944         are dynamically or statically initialized.
22945         (get_sentry): New function.
22946         (finish_file): Do import_export_decl for static data members before
22947         building the init/fini functions.  Don't init/fini a variable that's
22948         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
22949         push/pop_temp_slots.
22950         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
22951         expand_static_init thang.
22952         * method.c (get_id_2): New function.
22953
22954 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
22955
22956         * parse.y (empty_parms): Make sure we use C++-style prototypes
22957         when we're declaring member functions.
22958
22959 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
22960
22961         * Makefile.in (CONFLICTS): 16 s/r conflicts.
22962         * parse.y (self_template_type): New nonterminal.
22963
22964 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
22965
22966         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
22967         name.
22968         * parse.y (base_class.1): Allow 'typename foo::bar'.
22969
22970         * lex.c (check_newline): Remove #pragma code that plays with the
22971         input stream, since we now deal with tokens.  Clear nextchar when
22972         we're done.
22973         (handle_cp_pragma): Use real_yylex.
22974         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
22975         in one place.
22976
22977         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
22978
22979         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
22980
22981 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22982
22983         * parse.y: New token SELFNAME for potential constructor.
22984         * spew.c (yylex): Handle it.
22985         * lex.c (identifier_type): Produce it.
22986
22987         * parse.y (complete_type_name): In :: case, don't push class binding.
22988         (complex_type_name): Likewise.
22989
22990 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
22991
22992         * typeck.c (build_reinterpret_cast): Handle pointer to member
22993         functions.
22994
22995 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22996
22997         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
22998         pragmas.
22999         (check_newline): Put the vtable/unit/implementation/interface pragma
23000         code into handle_cp_pragma, replacing it with a call.
23001         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
23002         args.  Get the next token after handling the pragma token.
23003
23004 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
23005
23006         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
23007         (convert_to_pointer_force): Likewise.
23008
23009         * init.c (build_new): Fix array new without -fcheck-new.
23010
23011 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
23012
23013         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
23014         tree.c: Lose TYPE_NESTED_NAME.
23015
23016         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
23017         as identifiers.
23018
23019         * tree.def: Add VEC_INIT_EXPR.
23020         * expr.c (cplus_expand_expr): Handle it.
23021         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
23022         the extra file-scope symbol nastiness.
23023
23024 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
23025
23026         * method.c (make_thunk): Thunks are static.
23027         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
23028
23029         * decl2.c (mark_vtable_entries): Emit thunks as needed.
23030         (finish_file): Don't emit them here.
23031
23032 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
23033
23034         * rtti.c (build_dynamic_cast): Handle null pointers.
23035         (ifnonnull): New function.
23036
23037 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
23038
23039         * call.c (build_method_call): Remember the original basetype we
23040         were called with.  Give an error message instead of trying
23041         (incorrectly) to call a non-static member function through a
23042         non-inherited class.
23043
23044         * search.c (expand_upcast_fixups): Mark the new fixup as
23045         DECL_ARTIFICIAL.
23046
23047 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
23048
23049         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
23050
23051         * class.c (set_rtti_entry): Fix for thunks.
23052
23053         * decl2.c (import_export_decl): Still emit typeinfo fns for
23054         cv-variants of builtin types.
23055
23056         * rtti.c (expand_class_desc): Set up base_info_type_node here.
23057         (init_rtti_processing): Instead of here.
23058
23059 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
23060
23061         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
23062         (build_typeid): Only complain about taking dynamic typeid without
23063         -frtti.
23064
23065         * decl2.c: flag_rtti defaults to 1.
23066
23067         * rtti.c (get_tinfo_var): The general class case is now smaller.
23068         (init_rtti_processing): Pack the latter three fields of base_info
23069         into 32 bits.
23070
23071 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
23072
23073         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
23074
23075 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
23076
23077         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
23078         (push_memoized_context): Split out code to undefer pop_type_level to
23079         (clear_memoized_cache): here.
23080         (pop_memoized_context): We can only handle one layer of deferral of
23081         pop_type_level so clear the cache, if there was a previous level.
23082
23083 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
23084
23085         * rtti.c (init_rtti_processing): Build up base_info_type_node.
23086         (expand_class_desc): Use one pointer to an array of base_info
23087         structs, passed using a CONSTRUCTOR.
23088
23089 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
23090
23091         * class.c (build_vbase_path): Remove block extern for
23092         flag_assume_nonnull_objects here.
23093         (build_vfn_ref): Split out functionality into build_vtbl_ref.
23094         (build_vtbl_ref): New routine.
23095         (build_vtable): Set up rtti info here.
23096         (add_virtual_function): Note in CLASSTYPE_RTTI the best
23097         place where we can get the rtti pointers from to avoid having to
23098         search around for a place.
23099         (finish_base_struct): Likewise.
23100         (finish_struct_1): Likewise.  Never create totally new vtables
23101         with totally new vtable pointers for rtti.  Disable code to layout
23102         vtable pointers better until we want to break binary
23103         compatibility.
23104         * rtti.c (build_headof_sub): New routine to convert down to a
23105         sub-object that has an rtti pointer in the vtable.
23106         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
23107         maintainable.
23108         (build_dynamic_cast): Make sure we have saved it, if we need to.
23109         * search.c (dfs_init_vbase_pointers): Disable code that deals with
23110         a more efficient vtable layout, enable later.
23111         * call.c (flag_assume_nonnull_objects): Moved declaration to
23112         * cp-tree.h: here.  Declare build_vtbl_ref.
23113         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
23114         function calls that want a tree.
23115
23116 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
23117
23118         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
23119         other X subobjects in the most derived type.  Ack.
23120
23121         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
23122         get_typeid will do it for us.
23123         (get_typeid_1): Break out call-building for expand_*_desc to use.
23124         (get_typeid): Call it.
23125         (expand_*_desc): Likewise.
23126         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
23127         and void *.
23128         (init_decl_processing): Lose builtin_type_tdescs lossage.
23129         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
23130
23131 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
23132
23133         * pt.c (tsubst): When calling set_nested_typename, use
23134         TYPE_NESTED_NAME (current_class_type) instead of
23135         current_class_name.
23136
23137         * decl.c (pushdecl): Likewise.
23138         (pushdecl_class_level): Likewise.
23139         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
23140         set_nested_typename.
23141
23142 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
23143
23144         * rtti.c (synthesize_tinfo_fn): Handle arrays.
23145
23146         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
23147
23148 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
23149
23150         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
23151         (init_rtti_processing): Lose bad_cast_type.
23152         (build_dynamic_cast): Use throw_bad_cast.
23153
23154         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
23155
23156         * decl2.c (finish_file): Don't synthesize artificial functions
23157         that are external and not inline.
23158
23159         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
23160
23161         * decl2.c (finish_file): Handle having new inlines added to
23162         saved_inlines by synthesis.
23163
23164         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
23165
23166 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
23167
23168         RTTI rewrite to initialize nodes as needed, not require that
23169         users #include <typeinfo>, complete functionality and reduce wasted
23170         space.
23171         * rtti.c (init_rtti_processing): New fn.
23172         (build_typeid): The vtable entry is now a function.
23173         (get_tinfo_var): New fn.
23174         (get_tinfo_fn): Likewise.
23175         (get_typeid): Use it.
23176         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
23177         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
23178         points __rtti_*.
23179         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
23180         (synthesize_tinfo_fn): New fn.
23181         * method.c (build_t_desc_overload): Lose.
23182         (build_overload_with_type): More generic.
23183         * decl.c (init_decl_processing): Call init_rtti_processing.
23184         * class.c (set_rtti_entry): Use get_tinfo_fn.
23185         * decl2.c (mark_vtable_entries): Mark the rtti function.
23186         (finish_prevtable_vardecl): Don't build_t_desc.
23187         (import_export_decl): Handle tinfo functions.
23188         (finish_file): Likewise.
23189         * typeck.c (inline_conversion): New fn.
23190         (build_function_call_real): Use it.
23191         * cp-tree.h: Add decls.
23192
23193         * method.c (hack_identifier): Also convert component_refs from
23194         references.
23195
23196         * lex.c (cons_up_default_function): Use the type, not the name, in
23197         declspecs.
23198
23199         * decl2.c (import_export_vtable): Fix weak vtables.
23200
23201 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
23202
23203         * search.c (get_base_distance_recursive): Fix access checks for
23204         protected bases.
23205
23206 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23207
23208         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
23209         cp-tree.h.
23210         (convert_harshness): Add prototypes wrapped by PROTO.
23211         * decl2.c (grok_function_init): Likewise.
23212         (do_toplevel_using_decl): Change to void return type.
23213         * class.c (build_vtable_entry): Remove decl of make_thunk.
23214         (merge_overrides): Fix order of arg definitions.
23215         (finish_vtbls): Likewise.
23216         (fixup_vtable_deltas): Likewise.
23217         (modify_all_direct_vtables): Likewise.
23218         (modify_all_indirect_vtables): Likewise.
23219         * search.c (get_base_distance_recursive): Likewise.
23220         (get_abstract_virtuals_1): Likewise.
23221         (fixup_virtual_upcast_offsets): Likewise.
23222         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
23223         * init.c (perform_member_init): Fix order of arg definitions.
23224         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
23225         * cp-tree.h (make_thunk): Add decl.
23226         (overload_template_name, push_template_decl): Add decls.
23227         (do_toplevel_using_decl): Change to void return type.
23228         (vec_binfo_member): Add decl.
23229
23230 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23231
23232         * typeck.c (mark_addressable, convert_for_assignment,
23233         convert_for_initialization, pointer_int_sum, pointer_diff,
23234         unary_complex_lvalue): Add prototypes wrapped by PROTO.
23235         (convert_sequence): #if 0 fn decl, since definition also is.
23236
23237 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
23238
23239         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
23240         cast to pointer types for type searching.
23241
23242 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23243
23244         * typeck.c (get_delta_difference): Use cp_error, not error, in the
23245         case where BINFO == 0.
23246
23247 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
23248
23249         * call.c (build_method_call): Fix wording of error messages so
23250         constructors come out right.
23251
23252 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
23253
23254         * decl.c (push_overloaded_decl): Don't warn about hidden
23255         constructors when both the type and the function are declared
23256         in a system header file.
23257
23258 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
23259
23260         * class.c (finish_struct_1): Propagate the TYPE_PACKED
23261         flag for the type to the type's fields.
23262
23263 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23264
23265         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
23266
23267 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
23268
23269         * class.c (base_info, finish_base_struct): Replace
23270         needs_virtual_dtor with base_has_virtual.
23271
23272         (finish_struct_1): Remove the old code that tried to make default
23273         destructors virtual.  Use base_has_virtual when checking if we need
23274         to add a vtable entry for the rtti code.
23275
23276 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
23277
23278         * pt.c (push_template_decl): Complain about template decl with
23279         inappropriate declaration.
23280
23281 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
23282
23283         * typeck.c (build_x_unary_op): Remove bogus check for taking
23284         the address of a member function.
23285
23286 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
23287
23288         * parse.y (constructor_declarator): Only push the class if
23289         we are not already in the class.
23290
23291 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
23292
23293         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
23294         Add additional argument to INIT_CUMULATIVE_ARGS.
23295
23296 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
23297
23298         * decl.c (shadow_tag): Fix error about anon union with methods.
23299
23300         * parse.y (self_reference): Only generate a self-reference if this
23301         is a non-template class.
23302         (opt.component_decl_list): Only use it if it was generated.
23303
23304         * parse.y (component_decl_1): Use constructor_declarator.
23305         (fn.def2): Likewise.
23306         (notype_component_declarator0): Likewise.
23307
23308 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
23309
23310         * typeck.c (build_x_unary_op): Add checks for taking the address
23311         of a TARGET_EXPR or of a member function, and give appropriate
23312         warnings.
23313
23314 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
23315
23316         * pt.c (process_template_parm): Allow template type parms to be
23317         used as types for template const parms.
23318
23319 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
23320
23321         * init.c (expand_vec_init): Ensure the eh cleanups are on the
23322         function_obstack.
23323
23324 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
23325
23326         * decl.c (lookup_name_real): Be even more picky about the
23327         ambiguous lookup warning.
23328         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
23329         * parse.y (constructor_declarator): Rather than here.
23330
23331         * parse.y (constructor_declarator): New nonterminal.
23332         (fn.def1): Use it.
23333         (explicit_instantiation): Likewise.
23334
23335 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23336
23337         Add implicit declaration of class name at class scope.
23338         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
23339         * parse.y (self_reference): New nonterminal.
23340         (opt.component_decl_list): Use it.
23341         (fn.def1): Add nested_name_specifier type_name cases.
23342         * class.c (build_self_reference): New function.
23343         (finish_struct): Handle access_default later, move self-reference
23344         decl to the end.
23345         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
23346         * cp-tree.h: Adjust.
23347
23348         * pt.c (do_function_instantiation): Separate handling of member
23349         functions and non-member functions properly.
23350
23351 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
23352
23353         * pt.c (process_template_parm): Improve error for 'volatile class K'.
23354
23355         * class.c (finish_struct_1): Check the right slot for destructors.
23356
23357         * decl.c (start_enum): Complain about enum templates.
23358
23359 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
23360
23361         * init.c (resolve_offset_ref): Offset pointers to member data by one.
23362         * typeck.c (unary_complex_lvalue): Likewise.
23363
23364 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
23365
23366         * typeck.c (c_expand_return): Check for a returned local
23367         array name, similar to the check for an ADDR_EXPR.
23368
23369 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
23370
23371         * decl.c (cp_finish_decl): Don't build cleanups for static
23372         variables here.
23373
23374 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
23375
23376         * typeck.c (build_modify_expr): Fix error messages to be more
23377         accurate.
23378         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
23379         assignment operators.
23380         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
23381         assignment operators.
23382
23383 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
23384
23385         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
23386         give an error if initialized.  pedwarn about nested type with the
23387         same name as its enclosing class.
23388
23389         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
23390
23391         * typeck.c (require_complete_type): Be sure to instantiate the
23392         MAIN_VARIANT of the type.
23393
23394         * decl2.c (finish_file): Instantiate pending templates before
23395         processing static constructors and destructors.
23396
23397         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
23398         unless at_eof.
23399
23400 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
23401
23402         * decl2.c (delete_sanity): If error_mark_node is passed
23403         in as an expression, quit while we're ahead.
23404
23405         * decl.c (grokdeclarator): Give an error message if `friend'
23406         is combined with any storage class specifiers.
23407
23408 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
23409
23410         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
23411         definition of nonexistent nested type.
23412
23413         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
23414         not to say 'typedef'.
23415
23416 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23417
23418         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
23419         * search.c (dfs_walk, dfs_init_vbase_pointers,
23420         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
23421         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
23422
23423 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
23424
23425         * except.c (build_throw): Support minimal parse.
23426         * pt.c (tsubst_copy): Support THROW_EXPR.
23427         * decl2.c (build_expr_from_tree): Likewise.
23428
23429         * pt.c (mangle_class_name_for_template): Always allocate
23430         scratch_firstobj.
23431
23432 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
23433
23434         * cvt.c (cp_convert_to_pointer): Give an appropriate error
23435         when trying to cast from an incomplete type.
23436
23437 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23438
23439         * pt.c (instantiate_class_template): Don't bother setting up
23440         CLASSTYPE_TAGS explicitly, as the nested types will add
23441         themselves.
23442
23443 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
23444
23445         * decl.c (shadow_tag): Remove old error check for usage of
23446         an enum without a previous declaration.
23447         (xref_tag): Add error message about usage of enums without a
23448         previous declaration.
23449
23450 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
23451
23452         * lex.c (do_identifier): Only do name consistency check if we're
23453         parsing.
23454
23455         * pt.c (push_template_decl): Don't crash if we get a member defn
23456         that doesn't match.
23457
23458         * decl.c (xref_tag_from_type): New function to do an xref without
23459         always having to figure out code_type_node.
23460         * cp-tree.h: Declare it.
23461         * pt.c (instantiate_class_template): Use it for friend classes.
23462         (lookup_template_class): Use it.
23463
23464         * typeck2.c (build_functional_cast): Pull out a single parm before
23465         passing it to build_c_cast.
23466
23467 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
23468
23469         * expr.c (do_case): Give an error message if a pointer is
23470         given as a case value.
23471
23472 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
23473
23474         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
23475         an overload list.
23476
23477         * lex.c (cons_up_default_function): Really, now, interface hackery
23478         does not apply to synthesized methods.
23479
23480 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
23481
23482         * call.c (build_method_call): Ctors and dtors now have special names
23483         with respect to lookups.
23484         * class.c (add_method): Likewise.
23485         (grow_method): Likewise.
23486         (finish_struct_methods): Likewise.
23487         (warn_hidden): Likewise.
23488         (finish_struct_1): Likewise.
23489         * cvt.c (convert_to_reference): Likewise.
23490         (convert_to_aggr): Likewise.
23491         (cp_convert): Likewise.
23492         * decl2.c (check_classfn): Likewise.
23493         * init.c (expand_member_init): Likewise.
23494         (expand_default_init): Likewise.
23495         (expand_aggr_init_1): Likewise.
23496         (build_offset_ref): Likewise.
23497         (build_new): Likewise.
23498         (build_delete): Likewise.
23499         * lex.c (do_inline_function_hair): Likewise.
23500         * search.c (lookup_field_1): Likewise.
23501         (lookup_fnfields_here): Likewise.
23502         (lookup_field): Likewise.
23503         (lookup_fnfields): Likewise.
23504         (get_virtual_destructor): Likewise.
23505         (dfs_debug_mark): Likewise.
23506         (dfs_pushdecls): Likewise.
23507         (dfs_compress_decls): Likewise.
23508         * tree.c (layout_basetypes): Likewise.
23509         * typeck.c (build_component_ref): Likewise.
23510         (build_x_function_call): Likewise.
23511         (build_modify_expr): Likewise.
23512         (convert_for_initialization): Likewise.
23513         (build_functional_cast): Likewise.
23514         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
23515         (CTOR_NAME): New.
23516         (DTOR_NAME): New.
23517         * decl.c (ctor_identifier): New.
23518         (dtor_identifier): New.
23519         (init_decl_processing): Set them.
23520
23521 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
23522
23523         * typeck.c (build_component_ref): Don't get confused by fields whose
23524         context has no type name, like pointer to member functions.
23525
23526 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
23527
23528         * decl.c (grokdeclarator): Handle typedef without declarator.
23529
23530         * pt.c (tsubst): Handle SCOPE_REF in declarator.
23531
23532         * parse.y (bad_parm): Catch another case of missing `typename'.
23533
23534         * lex.c (yyprint): Handle TYPE_DECLs.
23535
23536         * decl.c (start_function): Don't try to be clever.
23537
23538         * lex.c: Lose compiler_error_with_decl.
23539         * typeck2.c: Lose error_with_aggr_type.
23540         (incomplete_type_error): Use cp_* instead of old functions.
23541         (readonly_error): Likewise.
23542         * typeck.c (convert_arguments): Likewise.
23543         * search.c (lookup_nested_field): Likewise.
23544         * method.c (make_thunk): Likewise.
23545         * decl.c (grokparms): Likewise.
23546         * cp-tree.h: Update.
23547
23548         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
23549         and value.
23550
23551 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
23552
23553         * method.c (build_opfncall): When deleting a pointer to an
23554         array, build a new pointer to the tree past any ARRAY_TYPE
23555         nodes.
23556
23557 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23558
23559         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
23560
23561 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
23562
23563         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
23564         and ! DECL_INLINE.
23565
23566         * decl.c (finish_function): Don't set nested based on
23567         hack_decl_function_context.
23568         * parse.y (function_try_block): Check for nested function.
23569         (pending_inlines): Likewise.
23570
23571         * decl2.c (build_expr_from_tree): If a unary op already has a
23572         type, just return it.
23573
23574         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
23575
23576         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
23577         (finish_file): Check the return value of walk_vtables.
23578         (finish_prevtable_vardecl): Return int.
23579         (finish_vtable_vardecl): Likewise.
23580         (prune_vtable_vardecl): Likewise.
23581         * lex.c (set_vardecl_interface_info): Likewise.
23582         * cp-tree.h: Adjust return types.
23583
23584         * class.c (delete_duplicate_fields_1): Don't complain about
23585         duplicate nested types if they're the same type.
23586         (finish_struct): Remove check for duplicate.
23587         * decl2.c (grokfield): Don't check for typedef of anonymous type.
23588
23589 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
23590
23591         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
23592
23593         * decl.c (grokdeclarator): Lose special handling of class-level
23594         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
23595         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
23596
23597         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
23598
23599         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
23600
23601         * search.c (compute_access): Fix handling of anonymous union
23602         members.
23603         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
23604         from anonymous unions to their members.
23605
23606         * typeck.c (build_x_function_call): For static member functions,
23607         hand off to build_member_call.
23608
23609 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
23610
23611         * typeck.c (build_component_ref): Handle OFFSET_REFs.
23612
23613         * init.c (expand_vec_init): Fix init == 0 case.
23614
23615 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
23616
23617         * init.c (build_new): pedwarn about init and array new.
23618         (expand_vec_init): Handle lists, use convert_for_initialization.
23619
23620         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
23621         when converting to an aggregate type.
23622         * cvt.c (cp_convert): Pass it through.
23623
23624         * typeck.c (build_conditional_expr): Handle user-defined
23625         conversions to slightly different types.
23626
23627         * decl.c (grokdeclarator): Force an array type in a parm to be
23628         permanent.
23629
23630         * decl2.c (do_using_directive): Sorry.
23631         (do_namespace_alias): Likewise.
23632         * lex.c (real_yylex): Warn about using the `namespace' keyword.
23633
23634 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
23635
23636         * parse.y (datadef): Move call to note_list_got_semicolon up.
23637
23638 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
23639
23640         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
23641
23642 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
23643
23644         * decl.c (cp_finish_decl): The exception regions have to be
23645         nested, not overlapping.  We start the exception region for a
23646         decl, after it has been fully built, and all temporaries for it
23647         have been cleaned up.
23648
23649 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
23650
23651         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
23652
23653 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
23654
23655         * tree.def: Add RETURN_INIT.
23656         * pt.c (instantiate_decl): Handle RETURN_INIT.
23657         * decl.c (store_return_init): Handle minimal_parse_mode.
23658
23659         * tree.c (cp_build_type_variant): Just return an error_mark_node.
23660         * decl.c (make_typename_type): Don't try to get the file and line
23661         of an identifier.
23662         * typeck.c (comptypes): Handle TYPENAME_TYPE.
23663
23664 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
23665
23666         * decl.c (poplevel): Make sure we clear out and restore old local
23667         non-VAR_DECL values by default when they go out of scope.
23668
23669 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
23670
23671         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
23672         referring to addresses of variables and functions.
23673
23674         * error.c (dump_expr): Support SIZEOF_EXPR.
23675
23676         * init.c (do_friend): Use the return value of check_classfn.
23677
23678         * typeck.c (convert_arguments): Call complete_type.
23679
23680         * method.c (hack_identifier): After giving an error, set value to
23681         error_mark_node.
23682
23683 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
23684
23685         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
23686         lossage for local classes.
23687         * cp-tree.h: Declare it.
23688         * decl.c (lookup_name_real): Evil, painful hack for local classes.
23689         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
23690         Use hack_decl_function_context.
23691         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
23692         (start_function): Use hack_decl_function_context.
23693         (finish_function): Likewise.
23694         * method.c (synthesize_method): Likewise.
23695         * lex.c (process_next_inline): Likewise.
23696         (do_pending_inlines): Likewise.
23697         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
23698         done with it.
23699
23700 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
23701
23702         * sig.c (build_signature_pointer_or_reference_type): Align
23703         signature pointers/references on 8-byte boundaries so they can be
23704         grabbed 2 words at a time on a Sparc.
23705
23706 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
23707
23708         * method.c (hack_identifier): Requiring a static chain is now a
23709         hard error.
23710         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
23711         functions.
23712
23713 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23714
23715         * init.c (build_offset_ref): Call complete_type.
23716
23717         * decl.c (pop_from_top_level): Always pop previous_class_type.
23718
23719         * parse.y: Handle multiple decls in a for-init-statement.
23720         * pt.c (tsubst_expr): Likewise.
23721
23722         * pt.c (tsubst): Use tsubst_expr for the second operand of an
23723         ARRAY_REF.
23724
23725         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
23726         (poplevel_class): Set it here.
23727         (pop_from_top_level): Pop it here if we're returning to class scope.
23728         * class.c (pushclass): Don't set it here.
23729
23730         * decl.c (maybe_push_to_top_level): Save current_template_parms,
23731         and clear it if !pseudo.
23732         (pop_from_top_level): Restore it.
23733
23734         * decl2.c (finish_file): Push the dummy each time we walk the list
23735         of vtables.
23736
23737         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
23738         something for CAST_EXPR.
23739
23740 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
23741
23742         * cvt.c (cp_convert): Warn about implicit conversion of the
23743         address of a function to bool, as it is always true.
23744
23745 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
23746
23747         * typeck.c (c_expand_return): Fix warning for local externs returned.
23748
23749 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
23750
23751         * tree.c (mapcar): Propagate const and volatile properly.
23752
23753         * typeck.c (complete_type): Be sure to instantiate the
23754         MAIN_VARIANT of the type.
23755
23756         * method.c (synthesize_method): Class interface hackery does not
23757         apply to synthesized methods.
23758
23759 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
23760
23761         * pt.c (comp_template_args): Use comptypes rather than just
23762         checking for TEMPLATE_TYPE_PARM equivalence.
23763
23764         * typeck.c (build_x_function_call): Call complete_type before
23765         checking TYPE_OVERLOADS_CALL_EXPR.
23766
23767 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
23768
23769         * g++.c (main): Check also for new define ALT_LIBM.
23770
23771 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23772
23773         * pt.c (instantiate_class_template): If we don't have a pattern
23774         yet, that's OK.
23775         (coerce_template_parms): If we see a local class, bail.
23776
23777         * decl.c (grok_reference_init): Make sure there's a type before
23778         checking its code.
23779
23780         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
23781         (push_template_decl): Likewise.
23782
23783         * parse.y (named_class_head): Set
23784         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
23785
23786         * decl.c (xref_tag): Diagnose redeclaration of template
23787         type-parameter name.
23788
23789         * error.c (dump_type): Handle anonymous template type parms.
23790
23791         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
23792         TYPE_STUB_DECL.
23793         (coerce_template_parms): Likewise.
23794
23795 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
23796
23797         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
23798         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
23799
23800 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
23801
23802         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
23803         before trying to get its STUB_DECL.
23804         (coerce_template_parms): Likewise.
23805
23806         * parse.y (template_type_parm): If they didn't use 'class',
23807         pretend they did after giving an error.
23808
23809         * pt.c (coerce_template_parms): Diagnose use of local class.
23810
23811         * decl.c (grok_reference_init): Use instantiate_type.
23812
23813         * error.c (dump_expr): Handle TEMPLATE_DECLs.
23814
23815         * parse.y (named_class_head): Diagnose mismatching types and tags.
23816
23817         * decl.c (pushdecl): Type decls and class templates clash with
23818         artificial type decls, not hide them.
23819
23820         * decl.c (redeclaration_error_message): Diagnose redefinition of
23821         templates properly.
23822         (duplicate_decls): Diagnose disallowed overloads for template
23823         functions, too.
23824
23825         * decl.c (start_decl): Call complete_type before checking for a
23826         destructor.
23827
23828         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
23829
23830         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
23831
23832 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
23833
23834         * decl.c (grok_op_properties): Don't check for operator++(int) in
23835         a template.
23836
23837         * tree.c (perm_manip): Return a copy of variable and function
23838         decls with external linkage.
23839
23840         * tree.def: Change some of the min tree codes to type "1".
23841         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
23842         * method.c (build_overload_int): Emit something arbitrary for
23843         anything but an INTEGER_CST if we're in a template.
23844
23845         * decl.c (cp_finish_decl): Call complete_type before deciding
23846         whether or not to lay out the decl.
23847
23848         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
23849
23850 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
23851
23852         * typeck2.c (build_x_arrow): Call complete_type.
23853
23854         * pt.c (add_pending_template): Broken out.
23855         (lookup_template_class): If -fexternal-templates, call it for all
23856         the methods of implemented types.
23857         (instantiate_class_template): Instead of instantiating them here.
23858         (instantiate_decl): Handle -fexternal-templates earlier.
23859
23860 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23861
23862         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
23863         memoized lookup stuff inside GATHER_STATISTICS.
23864
23865 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
23866
23867         * decl.c (start_decl): Complain about array of incomplete type
23868         here.
23869         (grokdeclarator): Not here.
23870
23871         * parse.y (template_parm): Expand full_parm inline so we can set
23872         the rule's precedence.
23873
23874         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
23875         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
23876         * decl2.c (grokbitfield): Don't check for integer constant here.
23877         * class.c (finish_struct_1): Check here.
23878
23879         * decl.c (define_label): Make the min decl go on permanent_obstack.
23880
23881         * pt.c (unify): Don't handle CONST_DECLs.
23882         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
23883         (tsubst_copy): Likewise.
23884
23885         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
23886         CONST_DECL for a template parm.
23887
23888 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
23889
23890         * decl.c (grokdeclarator): Complain about array of incomplete type
23891         here.
23892         (start_decl_1): Not here.
23893
23894         * pt.c (tsubst): Handle pointer-to-function declarators.
23895
23896         * method.c (hack_identifier): If pedantic, diagnose local class
23897         methods that require a static chain.
23898
23899         * decl.c (grok_op_properties): No longer static.
23900         * cp-tree.h: Declare it.
23901         * pt.c (tsubst): Call it for operators.
23902         Use tsubst_copy for TREE_VECs.
23903
23904         * parse.y (template_arg): The expr has precedence like '>'.
23905
23906 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
23907
23908         * pt.c (coerce_template_parms): Don't coerce an expression using
23909         template parms.
23910         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
23911         (tsubst): Don't use build_index_2_type if the max_value uses template
23912         parms.
23913         * method.c (build_overload_int): Emit something arbitrary for an
23914         expression using template parms.
23915
23916         * parse.y (template_close_bracket): New non-terminal to catch use
23917         of '>>' instead of '> >' in template class names.
23918         (template_type): Use it.
23919         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
23920
23921         * tree.def: Add CAST_EXPR.
23922         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
23923         CONVERT_EXPR for minimal_parse_mode.
23924         * typeck.c (build_c_cast): Likewise.
23925         * pt.c (tsubst_copy): Likewise.
23926         * decl2.c (build_expr_from_tree): Likewise.
23927         * error.c (dump_expr): Likewise.
23928
23929 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23930
23931         * except.c (SetTerminate, SetUnexpected): Put back global vars.
23932         (init_exception_processing): Put back decl/init of
23933         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
23934         fns from libstdc++.
23935
23936         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
23937         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
23938         Delete unused fns.
23939         * cp-tree.h (declare_uninstantiated_type_level,
23940         uninstantiated_type_level_p): Delete prototypes.
23941
23942 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
23943
23944         * pt.c (tsubst_expr): Add default return.
23945
23946 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23947
23948         * error.c (fndecl_as_string): Delete unused arg CNAME.
23949         * sig.c (build_signature_table_constructor,
23950         build_signature_method_call): Fix calls.
23951
23952         * class.c (the_null_vtable_entry): Delete var definition.
23953         (init_class_processing): Delete tree the_null_vtable_entry init.
23954         * decl.c (no_print_{functions, builtins}): Declare as static.
23955         (__tp_desc_type_node): #if 0 var definition.
23956         (init_type_desc): #if 0 init of __tp_desc_type_node.
23957         (vb_off_identifier): Move var decl into init_decl_processing.
23958         (current_function_assigns_this): Declare as static.
23959         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
23960         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
23961         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
23962         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
23963         * init.c (BI_header_type, BI_header_size): Declare as static.
23964         * pt.c (template_classes): Delete unused var.
23965         (add_pending_template): Delete decl for non-existent fn.
23966         (lookup_template_class): Delete vars CODE and TAG_CODE.
23967         (instantiate_template): Delete unused var TARGS.
23968         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
23969         Delete decls.
23970         (__tp_desc_type_node): #if 0 var decl.
23971         (fndecl_as_string): Fix prototype.
23972
23973 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
23974
23975         * tree.def: Add GOTO_STMT.
23976         * pt.c (tsubst_expr): Support goto and labels.
23977         * decl.c (define_label): Support minimal parsing.
23978         * parse.y (simple_stmt): Likewise.
23979
23980 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23981
23982         * xref.c (GNU_xref_member): Only define/set var I if
23983         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
23984         used.
23985         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
23986         (GNU_xref_end): Fix call.
23987         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
23988         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
23989
23990         * tree.c (build_exception_variant): Delete unused vars I, A, T,
23991         T2, and CNAME.
23992         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
23993         (mapcar): Delete unused var CODE.
23994         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
23995         (break_out_cleanups): Fix call.
23996         (bot_manip): Likewise.
23997         * call.c (build_method_call): Likewise.
23998         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
23999         Likewise.
24000         * typeck.c (unary_complex_lvalue, build_modify_expr,
24001         convert_for_initialization): Likewise.
24002         * typeck2.c (build_functional_cast): Likewise.
24003         * cp-tree.h (build_cplus_new): Fix prototype.
24004
24005         * repo.c (open_repo_file): Delete unused var Q.
24006         (repo_compile_flags, repo_template_declared,
24007         repo_template_defined, repo_class_defined, repo_inline_used,
24008         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
24009         (repo_get_id, repo_vtable_used): Declare as static.
24010         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
24011         prototypes.
24012
24013 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
24014
24015         * parse.y (pending_inlines): Add function_try_block case.
24016
24017         * pt.c (unify): Fix for template const parms.
24018
24019 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24020
24021         * lex.c (extract_interface_info): Delete forward decl.
24022         (default_copy_constructor_body, default_assign_ref_body): Delete
24023         decls for non-existent functions.
24024         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
24025         (init_lex): Delete setting them.
24026         (cons_up_default_function): Delete unused vars FUNC_BUF,
24027         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
24028         #if 0'd synth code.
24029         (toplevel, expression_obstack): Delete unused extern decls.
24030         (tree_node_kind): Delete unused enum.
24031         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
24032         GATHER_STATISTICS.
24033         (tree_node_kind_names): Delete unused extern decl.
24034         (synth_obstack): Delete unused var.
24035         (init_lex): Don't set it.
24036         (init_parse): Add decl before use.
24037         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
24038         (current_unit_{name, language}): Delete unused vars.
24039         (check_newline): Don't bother setting them, just accept the #pragma.
24040         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
24041         (current_unit_{name, language}): Delete decls.
24042
24043         * search.c: Wrap all of the memoized functions, macros, and
24044         variables inside #ifdef GATHER_STATISTICS.
24045         (lookup_field, lookup_fnfields): Likewise.
24046         (init_search_processing): Likewise.
24047         (reinit_search_statistics): Wrap whole function.
24048         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
24049
24050         * decl.c (finish_function): Only call pop_memoized_context if
24051         GATHER_STATISTICS is defined.
24052         (start_function): Likewise for push_memoized_context.
24053         * class.c (pushclass, popclass): Likewise.
24054
24055         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
24056         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
24057
24058         * cvt.c (cp_convert): Delete unused local var FORM.
24059         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
24060         prototypes.
24061
24062 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
24063
24064         * pt.c (do_poplevel): Oops; really return what we get from
24065         poplevel this time.
24066
24067 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24068
24069         * cp-tree.h (is_aggr_type): Add prototype.
24070
24071         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
24072         * method.c ({push,pop}_cp_function_context): Delete decls.
24073         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
24074         (SetUnexpected, SetTerminate): Delete unused vars.
24075         (init_exception_processing): Don't set SetUnexpected or
24076         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
24077         (output_exception_table_entry): Delete unused array LABEL.
24078         (expand_internal_throw): Delete unused var PARAMS.
24079         (expand_start_catch_block): Delete unused var CLEANUP.
24080         (emit_exception_table): Delete unused var EH_NODE_DECL.
24081         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
24082         GOTO_UNWIND_AND_THROW.  Don't set them.
24083         (end_eh_unwinder): Add top decl.
24084         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
24085         (exception_section, push_rtl_perm, do_function_call,
24086         lang_interim_eh, push_eh_cleanup, eh_outer_context,
24087         expand_end_eh_spec, end_eh_unwinder): Declare as static.
24088         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
24089         throw_used): Likewise.
24090         * cp-tree.h (expand_end_eh_spec): Delete prototype.
24091
24092         * search.c (dfs_mark, dfs_mark_vtable_path,
24093         dfs_unmark_vtable_path, dfs_mark_new_vtable,
24094         dfs_unmark_new_vtable, dfs_clear_search_slot,
24095         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
24096         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
24097         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
24098         functions.
24099         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
24100         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
24101         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
24102         Only define #ifdef GATHER_STATISTICS.
24103         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
24104         is defined.
24105         (vbase_decl): Delete var definition.
24106         (init_search): Delete old decl.
24107         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
24108         never actually used.
24109         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
24110         (get_base_distance_recursive): Delete unused fourth arg
24111         BASETYPE_PATH.  Fix call .
24112         (get_base_distance): Fix call.
24113         (push_class_decls): Delete unused var ID.
24114         (make_memoized_table_entry): Declare as static.
24115         (breadth_first_search): Declare as static.
24116         (tree_has_any_destructor_p): Declare as static.
24117         (pop_class_decls): Delete unused arg pop_class_decls.
24118         * class.c (popclass): Fix call to pop_class_decls.
24119         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
24120         tree_has_any_destructor_p): Delete prototypes.
24121
24122         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
24123         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
24124         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
24125         (build_user_desc): Delete unused var T.
24126         (build_class_desc): Delete unused vars T and OFF.
24127         (build_t_desc): Delete unused var NAME_STRING.
24128         (build_headof): Make static.
24129         (get_bad_cast_node): Likewise.
24130         (get_def_to_follow): Likewise.
24131         * cp-tree.h (init_type_desc): Add prototype.
24132         (build_headof): Remove prototype.
24133
24134 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
24135
24136         * pt.c (tsubst): Only look for matching decls at file scope for
24137         non-member functions.
24138
24139         * call.c (build_scoped_method_call): Handle scoped destructor
24140         calls in templates.
24141
24142         * decl.c (*_top_level): Also save previous_class_values.
24143
24144         * pt.c (tsubst_expr): Support do {} while loops.
24145         * parse.y (simple_stmt): Likewise.
24146         * tree.def: Likewise.
24147
24148         * method.c (build_overload_identifier): For a class nested in a
24149         template class, don't mangle in the template parms from our
24150         context.
24151
24152         * lex.c, cp-tree.h: Remove support for template instantiations in
24153         the pending_inlines code.
24154         * pt.c: Remove dead functions and unused arguments.
24155         (uses_template_parms): TYPENAME_TYPEs always use template parms.
24156         * parse.y: Stop passing anything to end_template_decl.
24157         * tree.c (print_lang_statistics): Only print tinst info #ifdef
24158         GATHER_STATISTICS.
24159
24160 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24161
24162         * init.c (expand_recursive_init{,_1}): Delete decls.
24163         (sort_member_init): Delete unused var INIT.
24164         (emit_base_init): Delete unused var X.
24165         (build_offset_ref): Delete unused var CNAME.
24166         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
24167         (emit_base_init): Delete unused local var BASE.  Delete extern
24168         decl of IN_CHARGE_IDENTIFIER.
24169         (build_delete): Delete unused local var VIRTUAL_SIZE.
24170
24171         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
24172         (build_delete): Fix call.
24173         * decl2.c (delete_sanity): Likewise.
24174         * cp-tree.h (build_vec_delete): Update prototype.
24175
24176         * typeck.c (common_base_type): Delete unused var TMP.
24177         (build_binary_op): Delete local var ARGS_SAVE.
24178         (build_array_ref): Delete unused var ITYPE.
24179         (c_expand_return): Delete unused var USE_TEMP.
24180
24181         * typeck.c (compexcepttypes): Delete unused arg STRICT.
24182         (comptypes): Fix calls.
24183         * decl.c (duplicate_decls): Likewise.
24184         * cp-tree.h (compexcepttypes): Delete extra arg.
24185
24186         * decl2.c (check_classfn): Delete unused second arg CNAME.
24187         * decl.c (start_decl, grokfndecl): Fix calls.
24188         * init.c (do_friend): Likewise.
24189         * cp-tree.h (check_classfn): Update prototype.
24190
24191         * cp-tree.h (signature_error, import_export_vtable,
24192         append_signature_fields, id_in_current_class, mark_used,
24193         copy_assignment_arg_p): Add decls.
24194         * decl2.c (mark_used): Delete decl.
24195
24196         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
24197
24198         * class.c (get_vtable_entry): Disable unused function.
24199         (doing_hard_virtuals): Delete unused static global var.
24200         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
24201         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
24202         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
24203         (modify_one_vtable): Delete unused var OLD_RTTI.
24204         (finish_struct_anon): Delete unused vars OFFSET and X.
24205         (finish_struct_bits): Delete unused var METHOD_VEC.
24206         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
24207         for-scope local variable METHODS.
24208
24209         * call.c (user_harshness): Delete unused/unneeded arg PARM.
24210         (ideal_candidate): Delete unused args BASETYPE and PARMS.
24211         (build_method_call): Delete unused args passed into ideal_candidate.
24212         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
24213         * cp-tree.h (synthesize_method): Add decl.
24214
24215         * decl.c (note_level_for_for): Give void return type.
24216         (pushdecl_nonclass_level): Likewise.
24217         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
24218         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
24219         (suspend_binding_level): Delete unused var LEVEL.
24220         (duplicate_decls): Delete unused var CTYPE.
24221         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
24222         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
24223         PTR_ENDLINK.
24224         (grokdeclarator): Delete unused var C.
24225         (grokdeclarator): Delete unused var SIZE_VARIES.
24226         (grokparms): Delete unused var SAW_VOID.
24227         (start_function): Delete unused var OLDDECL.
24228         (cplus_expand_expr_stmt): Delete unused var
24229         REMOVE_IMPLICIT_IMMEDIATELY.
24230
24231         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
24232
24233         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
24234
24235 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
24236
24237         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
24238         (build_min_nt): Likewise.
24239         * pt.c (do_pushlevel): Emit line note.
24240         (do_poplevel): Return what we get from poplevel.
24241         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
24242         * parse.y: Use do_pushlevel and do_poplevel.
24243         * cp-tree.h: Declare do_poplevel.
24244
24245         * cp-tree.h: Declare at_eof.
24246         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
24247         * decl2.c (import_export_decl): Renamed from import_export_inline.
24248         (finish_file): Call it to do interface handling for statics.
24249         * pt.c (tsubst_copy): Call mark_used on variables and functions
24250         used here.
24251
24252         * decl2.c (finish_file): Don't emit statics we can't generate.
24253         * pt.c (instantiate_decl): Don't set interface on instantiations
24254         we can't generate.
24255
24256         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
24257         * tree.c (print_lang_statistics): Print max template depth.
24258         * pt.c (push_tinst_level): Dump entire instantiation context.
24259         (instantiate_class_template): Use it and pop_tinst_level.
24260         (instantiate_decl): Likewise.
24261
24262         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
24263         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
24264
24265 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
24266
24267         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
24268         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
24269         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
24270         the new template implementation.
24271
24272 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24273
24274         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
24275
24276 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
24277
24278         * decl.c (cp_finish_decl): Delay emitting the debug information for
24279         a typedef that has been installed as the canonical typedef, if the
24280         type has not yet been defined.
24281
24282 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
24283
24284         * decl2.c (grokfield): Still call pop_nested_class for access decls.
24285
24286 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24287
24288         * decl.c (lookup_label): Call label_rtx.
24289
24290         * decl.c (make_binding_level): New function.
24291         (pushlevel, pushlevel_class): Call it instead of explicit
24292         duplicate calls to xmalloc.
24293
24294         * decl.c (init_decl_processing): Delete useless build_pointer_type
24295         call.
24296
24297         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
24298         (sizet_ftype_string): Delete variable.
24299         (init_decl_processing): Add built-in functions fabsf, fabsl,
24300         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
24301         variable strlen_ftype, used for strlen.
24302
24303 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
24304
24305         * decl.c (push_to_top_level): Start from current_binding_level
24306         again for now; the stl hacks depend on g++ being broken in this
24307         way, and it'll be fixed in the template rewrite.
24308
24309         * tree.def: Add USING_DECL.
24310         * decl2.c (do_class_using_decl): Implement.
24311         (grokfield): Pass access decls off to do_class_using_decl instead of
24312         grokdeclarator.
24313         * error.c (dump_decl): Handle USING_DECLs.
24314         * decl.c (grokdeclarator): Remove code for handling access decls.
24315         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
24316         as access decls for now.
24317         (finish_struct): Don't check USING_DECLs for other uses of the name.
24318
24319         * search.c (get_matching_virtual): Use cp_error_at.
24320
24321 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24322
24323         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
24324         match c-typeck.c.
24325         (self_promoting_args_p): Move the check that TYPE is non-nil
24326         before trying to look at its main variant.
24327         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
24328
24329         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
24330         Delete macros.
24331         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
24332         (do_friend): Delete call to xref_friend.
24333         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
24334
24335         * typeck.c (convert_sequence): #if 0 unused function.
24336
24337         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
24338         be in decl_in_memory_p.
24339         (decl_in_memory_p): Delete decl.
24340         * expr.c (decl_in_memory_p): Delete fn.
24341         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
24342
24343         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
24344
24345 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
24346
24347         * class.c (finish_struct_1): Check for a pure-specifier on a
24348         non-virtual function here.
24349
24350         * decl2.c (grok_function_init): Don't check whether the function
24351         is virtual here.
24352         (grokfield): Don't call check_for_override here.
24353
24354         * decl.c (push_to_top_level): Start from inner_binding_level,
24355         check class_shadowed in class levels.
24356
24357 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
24358
24359         * decl.c (resume_level): Ignore things that don't have names, instead
24360         of core dumping.
24361
24362 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24363
24364         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
24365
24366 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
24367
24368         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
24369         synthesized dtor.
24370
24371         * parse.y (complete_type_name): Bind global_scope earlier.
24372         (complex_type_name): Likewise.
24373         (qualified_type_name): Remove.
24374
24375 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
24376
24377         * decl.c (grokfndecl): Move code that looks for virtuals in base
24378         classes...
24379         * class.c (check_for_override): ... to a new function.
24380         (finish_struct_1): Call it.
24381
24382         * cp-tree.h: Declare warn_sign_compare.
24383
24384         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
24385         rather than extra_warnings to decide whether to warn about
24386         comparison of signed and unsigned.
24387
24388         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
24389         implies -Wsign-compare.  -Wall doesn't imply -W.
24390
24391 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
24392
24393         * typeck.c (build_component_ref): Fix to handle anon unions in base
24394         classes as well.
24395
24396 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24397
24398         * class.c (resolves_to_fixed_type_p): Delete code dealing with
24399         a WITH_CLEANUP_EXPR, since we don't generate them any more.
24400         * cvt.c (build_up_reference): Likewise.
24401         * decl.c (grok_reference_init): Likewise.
24402         (cp_finish_decl): Likewise.
24403         * error.c (dump_expr): Likewise.
24404         * tree.c (real_lvalue_p): Likewise.
24405         (lvalue_p): Likewise.
24406         (build_cplus_new): Likewise.
24407         (unsave_expr_now): Likewise.
24408         * typeck.c (unary_complex_lvalue, build_modify_expr,
24409         c_expand_return): Likewise.
24410
24411 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24412
24413         Make the C++ front-end pay attention to attributes for structures.
24414         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
24415         finish_struct_1.
24416         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
24417         Take out old round_up_size use and setting the DECL_ALIGN possibly
24418         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
24419         can override what the attribute set.
24420         * cp-tree.h (finish_struct): Update prototype.
24421         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
24422         attributes to finish_struct.
24423         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
24424         value down into finish_struct.
24425         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
24426
24427 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
24428
24429         * decl.c (poplevel):  Re-word dead for local handling.
24430         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
24431         (cp_finish_decl):  If is_for_scope, check for duplicates so
24432         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
24433
24434         * lex.c (do_identifier):  Use global binding in preference of
24435         dead for local variable.
24436
24437 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
24438
24439         * init.c (initializing_context): Handle anon union changes, the
24440         context where fields of anon unions can be initialized now has to be
24441         found by walking up the TYPE_CONTEXT chain.
24442
24443 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
24444
24445         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
24446         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
24447         (obscure_complex_init): If bss is supported, always set
24448         DECL_INITIAL to error_mark_node.
24449
24450 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24451
24452         * init.c (is_friend): Make sure there's a context before we see if
24453         it's an aggr type.
24454
24455 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
24456
24457         * init.c (is_friend): Classes are not friendly with nested classes.
24458
24459 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
24460
24461         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
24462         and record its result.
24463
24464 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
24465
24466         * class.c (finish_struct_anon): Switch around code to not move anon
24467         union elements around, nor mess up their contexts, nor offsets,
24468         instead we now build up the right number of COMPONENT_REFs for all
24469         the anon unions that may be present at build_component_ref time.
24470         * typeck.c (lookup_anon_field): New routine to handle field lookup
24471         on fields without names.  We find them, based upon their unique type
24472         instead.
24473         * typeck.c (build_component_ref): Allow FIELD_DECL components.
24474         Handle finding components in anonymous unions, and ensure that a
24475         COMPONENT_REF is built for each level as necessary.
24476
24477 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
24478
24479         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
24480         code that ensures that copy ctors are used if appropriate.
24481
24482 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24483
24484         * init.c (build_vec_delete): Only give an error if base isn't an
24485         error_mark_node.
24486
24487 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
24488
24489         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
24490         (yylex): If we see `new', keep slurping.
24491
24492 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
24493
24494         * class.c (finish_struct_1): Move code for handling anon unions...
24495         (finish_struct_anon): to here.  Fixup so that we do the offset
24496         calculations right, and so that the fields are physically moved to
24497         the containers's chain.
24498
24499 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24500
24501         * decl.c (grokdeclarator): Avoid trying to get an operand off an
24502         identifier node.
24503
24504 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
24505
24506         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
24507         POINTER_SIZE to agree with expr.c.
24508
24509 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
24510
24511         * search.c (lookup_field): Don't report ambiguities if protect is 0,
24512         instead return NULL_TREE.
24513
24514 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
24515
24516         * class.c (finish_struct_1): Call warn_hidden if we want warnings
24517         about overloaded virtual functions.
24518         (warn_hidden): New routine to warn of virtual functions that are
24519         hidden by other virtual functions, that are not overridden.
24520         (get_basefndecls): New routine, used by warn_hidden.
24521         (mark_overriders): New routine, used by warn_hidden.
24522         * search.c (get_matching_virtual): Remove old warning that just
24523         isn't very useful.
24524
24525 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24526
24527         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
24528
24529         * typeck.c (null_ptr_cst_p): Delete unused fn.
24530         (build_function_call_maybe): Delete unused fn.
24531
24532         * expr.c (extract_init): #if 0 the code after unconditional return 0
24533         for now.
24534
24535         Delete old cadillac code.
24536         * edsel.c: Remove file.
24537         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
24538         * Makefile.in (CXX_OBJS): Delete edsel.o.
24539         (edsel.o): Delete rule.
24540         * cp-tree.h (flag_cadillac): Delete var decl.
24541         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
24542         * decl2.c (flag_cadillac): Delete var definition.
24543         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
24544         (grokfield): Delete code depending on flag_cadillac.
24545         (finish_anon_union): Likewise.
24546         * class.c (finish_struct_1): Likewise.
24547         (pushclass): Likewise.
24548         (popclass): Likewise.
24549         (push_lang_context): Likewise.
24550         (pop_lang_context): Likewise.
24551         * decl.c (init_decl_processing): Likewise.
24552         (start_decl): Likewise.
24553         (cp_finish_decl): Likewise.
24554         (xref_tag): Likewise.
24555         (finish_enum): Likewise.
24556         (start_function): Likewise.
24557         (finish_function): Likewise.
24558         (finish_stmt): Likewise.
24559         * lex.c (lang_init): Likewise.
24560         (check_newline): Likewise.
24561
24562         * lex.c (do_pending_inlines): Delete synthesized method kludge.
24563
24564         Delete defunct, ancient garbage collection implementation.
24565         * rtti.c: New file with the RTTI stuff from gc.c.
24566         * gc.c: Removed file (moved the remaining stuff into rtti.c).
24567         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
24568         (rtti.o): New rule, replacing gc.o.
24569         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
24570         * cp-tree.h: Delete gc-related fn decls.
24571         (DECL_GC_OFFSET): Delete macro.
24572         (flag_gc): Delete extern decl.
24573         * decl.c (current_function_obstack_index): Delete var decl.
24574         (current_function_obstack_usage): Delete var decl.
24575         (start_function): Delete clearing of current_function_obstack_index
24576         and current_function_obstack_usage.
24577         (init_decl_processing): Delete code relying on -fgc.
24578         Delete call to init_gc_processing.
24579         (cp_finish_decl): Delete calls to build_static_gc_entry and
24580         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
24581         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
24582         and to expand_expr of a __gc_main call.
24583         (maybe_gc_cleanup): Delete var decl.
24584         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
24585         * decl2.c (flag_gc): Delete var decl.
24586         (lang_f_options): Delete offering of -fgc.
24587         (lang_decode_option): Delete -fgc and -fno-gc handling.
24588         (get_temp_regvar): Delete gc code.
24589         * init.c (build_new): Delete gc code.
24590         * lex.c (init_lex): Delete checking of flag_gc.
24591
24592         * typeck.c (convert_arguments): Delete gc code.
24593         (build_component_addr): Delete -fgc warning.
24594         (build_modify_expr): Delete gc code.
24595
24596         * decl2.c (build_push_scope): Delete fn.
24597         * cp-tree.h (build_push_scope): Delete decl.
24598
24599         * search.c (clear_search_slots): Delete fn.
24600         * cp-tree.h (clear_search_slots): Delete decl.
24601
24602         * search.c (tree_needs_constructor_p): Delete fn.
24603         * cp-tree.h (tree_needs_constructor_p): Delete decl.
24604
24605         * tree.c (id_cmp): Delete fn.
24606
24607         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
24608         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
24609
24610         * tree.c (decl_value_member): Delete fn.
24611         * cp-tree.h (decl_value_member): Delete decl.
24612
24613         * tree.c (list_hash_lookup_or_cons): Delete fn.
24614         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
24615
24616         * method.c (cplus_exception_name): Delete fn.
24617         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
24618
24619         * spew.c (shift_tokens): Delete fn.
24620
24621 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
24622
24623         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
24624         to cp_finish_decl.
24625         * parse.y: Likewise.
24626
24627 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24628
24629         * tree.c (build_cplus_staticfn_type): Delete function definition;
24630         never used.
24631         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
24632
24633         * tree.c (virtual_member): Delete function definition; never used.
24634         * cp-tree.h (virtual_member): Delete decl.
24635
24636 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
24637
24638         * typeck.c (build_component_ref): Handle getting vbase pointers
24639         out of complex multiple inheritance better.
24640
24641 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
24642
24643         * typeck.c (build_object_ref): Make sure we use the real type, not
24644         any reference type.
24645
24646 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
24647
24648         * tree.c (build_exception_variant): Don't create new types if we
24649         don't have to, also build new types on the right obstack.
24650
24651 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
24652
24653         * decl.c (store_bindings): Split out from push_to_top_level.
24654         (push_to_top_level): Call it for b->type_shadowed on class binding
24655         levels.
24656
24657 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
24658
24659         * search.c (expand_upcast_fixups): Fix so that offsets stored in
24660         vbase_offsets are always right.  Fixes a problem where virtual base
24661         upcasting and downcasting could be wrong during conversions on this
24662         during virtual function dispatch at ctor/dtor time when dynamic
24663         vtable fixups for deltas are needed.  This only sounds easier than
24664         it is.  :-)
24665         (fixup_virtual_upcast_offsets): Change to reflect new calling
24666         convention for expand_upcast_fixups.
24667
24668 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24669
24670         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
24671         check that it's usable as the bitfield width.
24672
24673 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24674
24675         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
24676         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
24677         only ever used for functions in it.
24678
24679 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
24680
24681         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
24682         (nested_type): Likewise.
24683         (nested_name_specifier): Use lastiddecl.
24684
24685         * decl.c (grokdeclarator): Adjust accordingly.
24686         * init.c (expand_member_init): Likewise.
24687         * parse.y (base_class): Likewise.
24688         * typeck2.c (build_functional_cast): Likewise.
24689
24690         * typeck2.c (build_functional_cast): Fill in name after we've
24691         checked for non-aggr type.
24692
24693 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
24694
24695         * decl2.c (warn_pointer_arith): Default to on.
24696
24697 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
24698
24699         * lex.c (is_rid): New function.
24700         * decl.c (grokdeclarator): Diagnose reserved words used as
24701         declarator-ids.
24702
24703 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
24704
24705         * tree.c (get_decl_list): Don't lose cv-quals.
24706
24707         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
24708         typespecs used as declarator-ids.
24709
24710 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
24711
24712         * decl.c (poplevel): When poping a level, don't give a warning for
24713         any subblocks that already exist.
24714
24715 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
24716
24717         * typeck.c (build_object_ref): Finish what I started.
24718
24719         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
24720
24721         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
24722
24723         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
24724         scope.
24725
24726 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
24727
24728         * decl.c (xref_tag): Handle passing a type in directly.
24729
24730         * parse.y (qualified_type_name): Pull out the type.
24731         (nested_type): Likewise.
24732         Take types directly instead of as identifiers.
24733         * call.c (build_scoped_method_call): Take types directly instead of
24734         as identifiers.
24735         * decl.c (xref_basetypes): Likewise.
24736         * init.c (expand_member_init): Likewise.
24737         (build_member_call): Likewise.
24738         (build_offset_ref): Likewise.
24739         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
24740         * method.c (do_build_assign_ref): Likewise.
24741         * decl.c (grokdeclarator): Handle a type appearing as the
24742         declarator-id for constructors.
24743         * method.c (do_build_copy_constructor): current_base_init_list now
24744         uses the types directly, not their names.
24745         * init.c (sort_base_init): Likewise.
24746         (expand_member_init): Likewise.
24747         * init.c (is_aggr_type): New function, like is_aggr_typedef.
24748
24749 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
24750
24751         * tree.c (layout_basetypes): Call build_lang_field_decl instead
24752         of build_lang_decl if first arg is a FIELD_DECL.
24753
24754 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24755
24756         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
24757         non-empty.
24758         * except.c (expand_start_catch_block): Set TREE_USED to avoid
24759         warnings about the catch handler.
24760
24761 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
24762
24763         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
24764         expand_target_expr.
24765
24766 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24767
24768         Fix access control to use trees rather than integers.
24769         * class.c (access_{default, public, protected, private,
24770         default_virtual, public_virtual, private_virtual}_node): Add
24771         definitions.
24772         (init_class_processing): Do creation of those nodes.
24773         * cp-tree.h (access_type): Delete enum decl.
24774         (access_{default, public, protected, private, default_virtual,
24775         public_virtual, private_virtual}_node): Add decls.
24776         (compute_access): Change return type.
24777         * search.c (compute_access): Have tree return type, instead of enum.
24778         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
24779         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
24780         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
24781         * parse.y (VISSPEC): Make ttype rather than itype.
24782         (base_class_access_list): Likewise.
24783         * *.[cy]: Change all refs of `access_public' to `access_public_node',
24784         etc.
24785         * call.c (build_method_call): Make ACCESS be a tree.
24786         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
24787         * cvt.c (convert_to_aggr): Likewise.
24788         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
24789         Likewise.
24790         * method.c (hack_identifier): Likewise.
24791         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
24792
24793 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
24794
24795         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
24796         frontend, and make it more consistent with respect to
24797         warn_pointer_arith.
24798
24799 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
24800
24801         * decl.c (pushdecl): Check for duplicate parameter names.
24802
24803 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
24804
24805         * decl.c (expand_static_init): Call assemble_external for atexit.
24806
24807 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
24808
24809         * except.c (do_unwind): Remove some generated dead code.
24810         (eh_outer_context): New routine, factor out some common code from
24811         expand_builtin_throw and end_eh_unwinder.  Add code to do return
24812         address masking for the PA.
24813         (expand_builtin_throw): Use eh_outer_context instead of open coding
24814         it here.
24815         (end_eh_unwinder): Likewise.
24816
24817 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
24818
24819         * except.c (expand_throw): Call assemble_external for __empty, if we
24820         use it.
24821
24822 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
24823
24824         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
24825         NORMAL_RETURN_ADDR_OFFSET.
24826         (end_eh_unwinder): Likewise.
24827
24828 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
24829
24830         * gc.c (build_dynamic_cast): Make sure we don't cast away const
24831         when dealing with references, and make sure we handle dynamic
24832         casting to a cv qualified reference.
24833
24834 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
24835
24836         * except.c (struct eh_context): New structure top hold eh context
24837         information.
24838         (push_eh_context): New routine.
24839         (pop_eh_context): Likewise.
24840         * decl.c (push_cp_function_context): Use them.
24841         (pop_cp_function_context): Likewise.
24842
24843 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
24844
24845         * decl2.c (finish_file): Also prune uninteresting functions in the
24846         inline emission loop.
24847
24848 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
24849
24850         * sig.c (build_signature_table_constructor): Mark functions
24851         in the signature as referenced.
24852
24853 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
24854
24855         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
24856         the inline emission stuff.
24857
24858 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
24859
24860         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
24861         weak symbols.
24862         * lang-options.h: Add -f{no-,}weak.
24863         * decl.c (init_decl_processing): If the target does not support weak
24864         symbols, don't use them.
24865         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
24866
24867 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
24868
24869         * init.c (expand_member_init): warning for base init after members.
24870
24871 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
24872
24873         * cvt.c (build_expr_type_conversion): Don't convert to a reference
24874         type.
24875
24876 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
24877
24878         * method.c (report_type_mismatch): Improve wording for volatile
24879         mismatches.
24880
24881 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
24882
24883         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
24884         expand_assignment, as the later doesn't handle things that have
24885         copy constructors well.  The compiler would do bitwise copying,
24886         instead of ctor calling in some cases.
24887
24888 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
24889
24890         * g++.c (my_strerror): Return "cannot access" if errno is 0.
24891         (pfatal_with_name, perror_exec): Don't assume that
24892         the returned value from my_strerror contains no '%'s.
24893         (concat): Remove.
24894         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
24895
24896 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
24897
24898         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
24899         TYPE_METHODS/TREE_CHAIN mean what they used to.
24900         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
24901         instead of TYPE_METHODS.
24902         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
24903         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
24904         * cp-tree.h (CLASSTYPE_METHODS): Lose.
24905         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
24906         TYPE_METHODS.
24907         (struct lang_decl): Lose next_method field.
24908         (DECL_NEXT_METHOD): Lose.
24909         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
24910         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
24911         anymore.
24912         (finish_struct_methods): Don't mess with the TREE_CHAINs in
24913         fn_fields.
24914
24915         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
24916         vector.
24917
24918         * call.c (build_method_call): Synthesize here even when not inlining.
24919         * typeck.c (build_function_call_real): Likewise.
24920
24921 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
24922
24923         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
24924         == DBX_DEBUG, call dbxout_start_new_source_file and
24925         dbxout_resume_previous_source_file when appropriate.
24926
24927 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
24928
24929         * except.c (start_anon_func): Push to the top level.
24930         (end_anon_func): Pop from the top level.
24931
24932 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
24933
24934         * cp-tree.h (build_cleanup): New routine to build cleanups.
24935         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
24936         call at ctor time and use atexit to run it later.
24937         * decl2.c (build_cleanup): New routine, taken from finish_file.
24938         (finish_file): Use build_cleanup instead, and don't put function
24939         local statics in global dtor list.
24940
24941 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
24942
24943         * except.c (expand_throw): Ensure that we have cleanups, if we try
24944         and expand cleanups.
24945
24946 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
24947
24948         * except.c (expand_throw): Add logic to manage dynamic cleanups for
24949         the EH object.
24950         (expand_end_catch_block): Use the magic of expand_goto, instead of
24951         emit_jump so that we get the cleanup for any catch clause parameter
24952         and the cleanup for the exception object.  Update to reflect label
24953         changes.
24954         (push_eh_cleanup): New routine to register a cleanup for an
24955         exception object.
24956         (empty_fndecl): Used to default cleanup actions to
24957         nothing.
24958         (init_exception_processing): Setup empty_fndecl.  Setup
24959         saved_cleanup.
24960         (expand_start_catch_block): Update to reflect label changes.  Call
24961         push_eh_object to register the cleanup for the EH object.
24962         (start_anon_func): New routine to start building lambda expressions
24963         from trees.
24964         (end_anon_func): New routine to end them.
24965         (struct labelNode): Change so that we can use tree labels, or rtx
24966         labels.
24967         (saved_cleanup): Object to check for dynamic cleanups for the
24968         exception handling object.
24969         (push_label_entry): Change so that we can use tree labels, or rtx
24970         labels.
24971         (pop_label_entry): Likewise.
24972         (top_label_entry): Likewise.
24973         (expand_start_all_catch): Use tree label instead of rtx label, so
24974         that we can get the magic of expand_goto.
24975         (expand_end_all_catch): Update to reflect label changes.
24976
24977         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
24978         use UNSAVE_EXPRs.
24979         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
24980         building_cleanup logic, as we now use UNSAVE_EXPRs.
24981         * cp-tree.h (unsave_expr): Declare it.
24982         * decl.c (building_cleanup): Remove.
24983         (maybe_build_cleanup): Remove building_cleanup logic, and use
24984         UNSAVE_EXPR instead.
24985
24986 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
24987
24988         * gc.c (build_t_desc): Update error message to say <typeinfo>.
24989
24990 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24991
24992         * decl.c (pushdecl): Only warn about shadowing a local variable if
24993         warn_shadow is true.
24994
24995 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
24996
24997         * typeck.c (build_binary_op_nodefault): Added warning about
24998         comparisons between different enum types with -Wall, unless
24999         -fenum-int-equiv set.
25000
25001 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
25002
25003         * class.c (finish_struct_1): Skip down to the inner type in
25004         multidimensional arrays.  Ensures ctors will be made for types that
25005         need constructing.
25006
25007 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
25008
25009         * decl.c (last_dtor_insn): New to track the last compiler generated
25010         insn in a dtor.
25011         (store_parm_decls): Set it.
25012         (finish_function): Use it to see if the dtor is empty.  Avoid doing
25013         vtable setup all the time, if we can.
25014         (struct cp_function): Add last_dtor_insn.
25015         (push_cp_function_context): Save it.
25016         (pop_cp_function_context): Restore it.
25017
25018 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
25019
25020         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
25021         warnings.
25022
25023 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
25024
25025         * typeck.c (expand_target_expr): Make sure targets get put into the
25026         current temp_slot_level, so that the free_temp_slots call will reuse
25027         them.
25028
25029 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
25030
25031         * class.c (finish_struct_1): Delay delta fixups for virtual bases
25032         until after we have done the hard virtuals, to avoid a bogus `every
25033         virtual function must have a unique final overrider' for virtual
25034         functions that are only overridden by hard virtuals.
25035
25036 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
25037
25038         * pt.c (do_function_instantiation): Don't try to find a file-scope
25039         template for a member function.
25040
25041 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
25042
25043         * g++.c (main): Add handling of -nodefaultlibs.
25044
25045 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
25046
25047         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
25048         distinguish between direct bindings of reference variables, and
25049         indirect bindings of reference variables.
25050         * cvt.c (build_up_reference): Use it.
25051         * typeck.c (convert_arguments): Use it to indicate this is an
25052         indirect binding.
25053         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
25054         as they are unused.
25055         (expand_static_init): Likewise.
25056         (cplus_expand_expr_stmt): Likewise.
25057         * decl2.c (finish_file): Likewise.
25058         * init.c (perform_member_init): Likewise.
25059         (emit_base_init): Likewise.
25060         (expand_aggr_vbase_init_1): Likewise.
25061
25062 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25063
25064         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
25065         get a DECL_LANG_SPECIFIC node.
25066         * cp-tree.h (lang_decl_flags): Add new member `level'.
25067         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
25068         decl_flags level member.
25069
25070 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25071
25072         * call.c (build_method_call): Make sure instance has a
25073         TYPE_LANG_SPECIFIC node before we dive into it.
25074
25075 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
25076
25077         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
25078
25079 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
25080
25081         * decl.c (duplicate_decls): When smashing decls, smash staticness in
25082         the usual way.
25083
25084 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
25085
25086         * decl.c (poplevel): Handle the merging of subblocks of cleanups
25087         when finishing blocks that have already been created (usually due to
25088         the fixup goto code).  Fixes bad debugging information.
25089
25090 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
25091
25092         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
25093         that's not a list of overloaded functions.
25094
25095 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25096
25097         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
25098         before trying to use DECL_ABSTRACT_VIRTUAL_P.
25099
25100 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
25101
25102         * decl2.c (mark_used): New function for hooking into setting of
25103         TREE_USED on decls.
25104         * call.c (build_method_call): Use it.
25105         * class.c (instantiate_type): Likewise.
25106         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
25107         for all like-named functions.
25108         * method.c (hack_identifier): Likewise.
25109         (emit_thunk): Don't call assemble_external.
25110         (make_thunk): Create thunk as a FUNCTION_DECL so that it
25111         gets the right mode and ENCODE_SECTION_INFO works.
25112
25113         * parse.y: Use mark_used.  Pass operator names to do_identifier.
25114         * lex.c (do_identifier): Handle operator names.
25115
25116         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
25117
25118 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25119
25120         * errfn.c: Include stdio.h.
25121         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
25122
25123 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
25124
25125         * typeck2.c (digest_init): Always convert initializers to the
25126         right type.
25127
25128 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
25129
25130         * init.c (member_init_ok_or_else): Don't allow member initializers
25131         for indirect members, as it is invalid.
25132
25133 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25134
25135         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
25136
25137 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
25138
25139         * parse.y (for.init.statement): Catch compound statements inside for
25140         initializations, if we're being pedantic.
25141
25142 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
25143
25144         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
25145         looking for.
25146
25147 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
25148
25149         * error.c (dump_expr): Don't core dump when a boolean expression is
25150         used as a default argument.
25151
25152 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
25153
25154         * class.c (finish_struct_bits): Check aggregate_value_p instead of
25155         RETURN_IN_MEMORY.
25156
25157 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
25158
25159         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
25160         BLKmode type that would otherwise be returned in registers.
25161
25162 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25163
25164         * g++.c (WITHLIBC): New macro.
25165         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
25166         saw_libc and pass it at the end if it was set.
25167
25168 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
25169
25170         * parse.y (fn.def1): Call split_specs_attrs in
25171         declmods notype_declarator case.