OSDN Git Service

00a915a5e875c56e33246080e404999910253e4a
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2
3         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4         Remove hacks for stuff which now comes from libiberty.
5
6 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
7
8         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
9
10 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
11
12         * cp-tree.h (begin_init_stmts): Declare.
13         (finish_init_stmts): Likewise.
14         * cvt.c (build_up_reference): Wrap the declaration of a temporary
15         in a statement-expression so that we will see it when expanding
16         tree structure later.
17         * init.c (begin_init_stmts): Don't make it static.
18         (finish_init_stmts): Likewise.
19
20         * cp-tree.h (start_handler_parms): New function.
21         (expand_start_catch_block): Take only one parameter.
22         (start_handler_parms): New function.
23         * decl.c (start_handler_parms): Define it.
24         * except.c (process_start_catch_block): Take only one parameter.
25         Don't call grokdeclarator here.
26         (expand_start_catch_block): Don't call grokdeclarator here,
27         either.
28         * parse.y (handler_args): Adjust call to
29         expand_start_catch_block.  Use start_handler_parms.
30         * pt.c (push_template_decl_real): Make permanent lists have
31         permanent elements.
32         (tsubst_expr): Adjust calls to expand_start_catch_block
33         appropriately.
34         * semantics.c (expand_stmt): Likewise.
35         
36 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
37
38         * pt.c (push_template_decl_real): Use template declaration from
39         class type if it exists.
40
41 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
42
43         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
44         (maybe_inject_for_scope_var): Declare it.
45         (initialize_local_var): Likewise.
46         * decl.c (maybe_inject_for_scope_var): Make it global.
47         (initialize_local_var): Likewise.  Move cleanup handling here,
48         from cp_finish_decl.
49         (make_rtl_for_nonlocal_decl): Use
50         push_obstacks_nochange/pop_obstacks, rather than
51         end_temporary_allocation/resume_temporary_allocation.
52         (cp_finish_decl): Try to complete the type of a variable when it
53         is declared.  Move cleanup-handling to initialize_local_var.
54         (expand_static_init): Use tree-building code, rather than
55         RTL-building code.
56         * decl2.c (get_temp_name): Assert non-initializedness of
57         temporaries.
58         * init.c (create_temporary_var): Move RTL-assigning code to ...
59         (get_temp_regvar): Here.
60         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
61         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
62         call initialize_local_var to generate initialization code.
63         
64 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
65
66         * cp-tree.h (fndecl_as_string, type_as_string,
67         type_as_string_real, args_as_string, decl_as_string,
68         expr_as_string, code_as_string, language_as_string,
69         parm_as_string, op_as_string, assop_as_string, cv_as_string,
70         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
71
72         * errfn.c (cp_printer): Likewise.
73
74         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
75         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
76         cp_file_of, code_as_string, language_as_string, parm_as_string,
77         op_as_string, assop_as_string, args_as_string, cv_as_string):
78         Likewise.
79
80         * tree.c (lang_printable_name): Likewise.
81
82 1999-08-28  Richard Henderson  <rth@cygnus.com>
83
84         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
85
86 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
87
88         * cp-tree.h (strip_array_types): New function.
89         * decl.c (maybe_deduce_size_from_array_init): New function, split
90         out from cp_finish_decl.
91         (layout_var_decl): Likewise.
92         (maybe_commonize_var): Likewise.
93         (maybe_inject_for_scope_var): Likewise.
94         (initialize_local_var): Likewise.
95         (build_cleanup_on_safe_obstack): Likewise.
96         (check_initializer): Likewise.
97         (make_rtl_for_nonlocal_decl): Likewise.
98         (cp_finish_decl): Use them.
99         * typeck.c (strip_array_types): New function.
100         
101         * cp-tree.def (LABEL_STMT): New tree node.
102         * cp-tree.h (LABEL_STMT_LABEL): New macro.
103         (shadow_label): Remove.
104         (declare_local_label): New function.
105         (finish_label_decl): Likewise.
106         * decl.c (make_label_decl): New function, split out from
107         lookup_label.
108         (shadowed_labels): Remove.
109         (binding_level): Add shadowed_labels.
110         (clear_binding_level): Remove.
111         (push_binding_level): Just bzero the new binding level.
112         (pushlevel): Fix indentation.
113         (pop_label): New function.
114         (pop_labels): Likewise, split out from poplevel.
115         (poplevel): Pop local labels.  Use pop_labels.
116         (maybe_push_to_top_level): Don't clear shadowed_labels.
117         (lookup_label): Use make_label_decl.
118         (shadow_label): Remove.
119         (declare_local_label): New function.
120         (define_label): Simplify.
121         (start_function): Don't clear shadowed_labels.
122         (cp_function): Remove shadowed_labels.
123         (push_cp_function_context): Don't save shadowed_labels.
124         (pop_cp_function_context): Don't restore it.
125         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
126         * parse.y (label_decl): Use finish_label_decl.
127         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
128         declarations.
129         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
130         building_stmt_tree.
131         (finish_label_decl): New function.
132         (expand_stmt): Handle LABEL_STMTs and local label declarations.
133         
134 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
135
136         * decl.c (lookup_label): Build labels on the permanent obstack
137         when building statement trees.  Don't build RTL for labels when
138         building statement trees.
139         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
140         building statement trees.
141         (finish_label_stmt): Likewise.
142         (expand_stmt): Adjust accordingly.
143         * pt.c (tsubst_expr); Likewise.
144         (do_decl_instantiation): Robustify.
145         
146         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
147         * tree.c (build_cplus_new): Set it.
148         * expr.c (cplus_expand_expr): Use it.
149         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
150         
151         * decl.c (store_parm_decls): Reset immediate_size_expand.
152         (finish_function): Likewise.
153         
154         * tree.c (cplus_unsave_expr_now): Don't return a value.
155
156         * semantics.c (do_poplevel): Always initialize the return value.
157
158 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
159
160         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
161         * tree.h (cplus_unsave_expr_now) : Same.
162
163 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
164
165         * decl.c (grokdeclarator): Amend comment.
166         * except.c (expand_start_catch_block): Call push_template_decl for
167         catch-block parameters.
168         * method.c (synthesize_method): Build an empty compound statement
169         for the body of a constructor.
170
171 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
172
173         * tree.c (cp_build_qualified_type_real): If we're asking for the
174         same quals we already have, just return.
175
176 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
177
178         * cp-tree.def (SUBOBJECT): New tree node.
179         * cp-tree.h (CLEANUP_P): New macro.
180         (SUBOBJECT_CLEANUP): Likewise.
181         (keep_next_level): Add parameter.
182         (get_temp_regvar): Don't declare.
183         (emit_base_init): Remove parameter.
184         (expand_aggr_init): Rename to build_aggr_init.
185         (expand_vec_init): Rename to build_vec_init.
186         (do_pushlevel): Remove.
187         (do_poplevel): Likewise.
188         (finish_cleanup): New function.
189         (finish_subobject): Likewise.
190         (stmts_are_full_exprs_p): New variable.
191         * decl.c (keep_next_level): Add parameter.
192         (cp_finish_decl): Use build_aggr_init, not
193         expand_aggr_init.  Use finish_expr_stmt to expand the code.
194         (expand_static_init): Use tree-generating, not RTL-generating,
195         functions to handle the initialization.
196         (start_function): Remove dead code.  Always have a momentary
197         obstack inside the function, even before hitting the first curly
198         brace.
199         (cplus_expand_expr_stmt): Move calls to
200         expand_{start,end}_target_temps into semantics.c.
201         (cp_function): Add stmts_are_full_exprs_p.
202         (push_cp_function_context): Save it.
203         (pop_cp_function_context): Restore it.
204         * decl2.c (get_temp_regvar): Move to init.c.
205         (do_static_initialization): Use build_{aggr,vec}_init.
206         (do_static_destruction): Fix typo in comment.
207         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
208         * except.c (expand_throw): Use create_temporary_var.
209         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
210         * init.c (expand_vec_init_try_block): Remove.
211         (expand_vec_init_catch_clause): Likewise.
212         (get_temp_regvar): New function.
213         (begin_init_stmts): Likewise.
214         (finish_init_stmts): Likewise.
215         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
216         structure here.
217         (emit_base_init): Likewise.  Remove unused parameter.
218         (expand_virtual_init): Likewise.
219         (expand_cleanup_for_base): Use finish_subobject.
220         (expand_aggr_vbase_init_1): Simplify.
221         (construct_virtual_bases): Use tree-generating functions to build
222         up initialization.
223         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
224         (expand_default_init): Likewise.
225         (expand_aggr_init_1): Likewise.
226         (expand_vec_init): Rename to build_vec_init.
227         * method.c (do_build_copy_constructor): Use tree-generating
228         functions.  Don't call clear_last_expr.
229         (do_build_assign_ref): Likewise.
230         (synthesize_method): Call clear_last_expr here.
231         * parse.y (base_init): Don't call clear_last_expr here.
232         (nodecls): Likewise.
233         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
234         * semantics.c (do_pushlevel): Move to here.
235         (do_poplevel): Likewise.
236         (stmts_are_full_exprs_p): New variable.
237         (finish_expr_stmt): Handle logic for temoprary cleanup here.
238         (finish_for_stmt): Use finish_expr_stmt.
239         (finish_cleanup): New function.
240         (finish_function_try_block): Fix indentation.
241         (finish_subobject): New function.
242         (setup_vtbl_ptr): Call keep_next_level here.
243         (finish_stmt_expr): Handle a block with no scope inside the
244         statement-expression.
245         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
246         SUBOBJECT.
247         * tree.c (search_tree): Handle INIT_EXPR.
248         (mapcar): Likewise.
249         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
250         * typeck2.c (store_init_value): Change expand_aggr_init to
251         build_aggr_init in comment.
252         
253 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
254
255         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
256
257 1999-08-25  Nathan Sidwell  <nathan@acm.org>
258
259         * decl2.c (handle_class_head): Be graceful about additional
260         scope qualifiers. Adjust comments to reflect reality.
261
262 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
263
264         * call.c (build_conditional_expr): Fix typo.
265         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
266         lvalue before trying to mess with the sides.
267
268         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
269
270 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
271
272         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
273
274 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
275
276         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
277         Return arbitrary pointer or NULL.
278         (check_eh_spec): Call __throw_type_match_rtti_2.
279         * tinfo.h (*::dcast): Return int.  Add valp parm.
280         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
281         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
282         (__throw_type_match_rtti): Now just a wrapper.
283
284         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
285         (init_exception_processing): Don't initialize them.
286
287 1999-08-23  Paul Burchard <burchard@pobox.com>
288
289         * decl.c (check_default_argument): Fix typo.
290
291 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
292
293         * cp-tree.def (STMT_EXPR): Fix typo in node name.
294
295         * dump.c (dump_next_stmt): New function.
296         (dequeue_and_dump): Use it.
297         
298         * pt.c (tsubst_copy): Make sure to initialize return value for a
299         STMT_EXPR, even when processing_template_decl.
300         * semantics.c (finish_stmt_expr): A statement-expression whose
301         last statement is not an expression-statement has type `void'.  
302         
303 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
304
305         * semantics.c (finish_stmt_expr): Fix typo in comment.
306         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
307         (mapcar): Likewise.
308         * init.c (build_vec_delete_1): Make the children of a permanent
309         BIND_EXPR permanent.
310         * pt.c (register_specialization): Don't register a specialization
311         more than once.
312         
313 1999-08-18  Andrew Haley  <aph@cygnus.com>
314
315         * method.c (process_overload_item): Call build_mangled_C9x_name ()
316         for all integer parameter types larger than long long.
317
318 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
319
320         * pt.c (redeclare_class_template): Merge default template
321         arguments in both directions.
322
323         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
324         compiler_error message.
325
326 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
327
328         * cp-tree.h: Declare flag_use_repository.
329         * pt.c (do_decl_instantiation): Don't complain about duplicate
330         instantiation with -frepo.
331         (do_type_instantiation): Likewise.
332
333         * pt.c (push_template_decl_real): Complain about everything
334         that isn't a valid template.
335
336         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
337         affect inlines.
338
339 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
340
341         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
342         * decl2.c (build_expr_from_tree): Handle it.
343         * error.c (dump_expr): Likewise.
344         * pt.c (for_each_template_parm): Likewise.
345         (tsubst_copy): Likewise.
346         * tree.c (search_tree): Likewise.
347         * semantics.c (finish_pseudo_destructor_call): Create it.
348         
349 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
350
351         * search.c (setup_class_bindings): Robustify.
352         * typeck.c (common_type): Use same_type_p, not pointer equality,
353         to compare types.
354
355         * cp-tree.h (build_lang_field_decl): Remove.
356         * class.c (build_vtable): Replace calls to build_lang_field_decl
357         with build_lang_decl.
358         (prepare_fresh_vtable): Likewise.
359         (finish_struct_1): Likewise.
360         (init_class_processing): Likewise.
361         * decl.c (push_using_decl): Likewise.
362         (init_decl_processsing): Likewise.
363         (grokvardecl): Likewise.
364         (build_ptrmemfunc_type): Likewise.
365         (grokdeclarator): Likewise.
366         (build_enumerator): Likewise.
367         * decl2.c (grok_x_components): Likewise.
368         (do_class_using_decl): Likewise.
369         * except.c (call_eh_info): Likewise.
370         * init.c (init_init_processing): Likewise.
371         * rtti.c (expand_class_decl): Likewise.
372         * tree.c (build_base_fields): Likewise.
373         (build_vbase_pointer_fields): Likewise.
374         * lex.c (build_lang_decl): Build declarations on the permanent
375         obstack if we're building statmeent trees.
376         (retrofit_lang_decl): Handle both the full lang_decl and also the
377         smaller lang_decl_flags here.
378         (build_lang_field_decl): Remove.
379         * pt.c (push_template_decl_real): Issue errors for variable
380         declarations that are not static members.
381
382 1999-08-18  Richard Henderson  <rth@cygnus.com>
383
384         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
385         (mapcar): Likewise.
386
387 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
388
389         * cp-tree.h (back_end_hook): New variable.
390         * decl2.c (back_end_hook): Define it.
391         (finish_file): If it's non-NULL, call it.
392
393         * decl.c (add_decl_to_level): New function.
394         (push_local_binding): Use it.
395         (find_binding): Fix typo in comment.
396         (pushdecl): Use add_decl_to_level.  Put templates on the
397         corresponding namespace-scope binding levels.
398         * dump.c (dequeue_and_dump): Print the specializations of a
399         template.
400         * pt.c (push_template_decl_real): Don't push a template multiple
401         times.
402
403 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
404
405         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
406         (CALL_DECLARATOR_QUALS): Likewise.
407         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
408         * decl.c (grokdeclarator): Adjust to use them.
409         * decl2.c (grokfield): Likewise.
410         (reparse_absdcl_as_casts): Likewise.
411         * lex.c (make_call_declarator): Likewise.
412         (set_quals_and_spec): Likewise.
413         * pt.c (tsubst): Likewise.
414         * tree.c (mapcar): Remove special hack to handle third operand of
415         a CALL_EXPR.
416
417 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
418
419         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
420         * class.c (build_vtable): Use build_lang_field_decl to build the
421         VAR_DECLs for vtables.
422         (prepare_fresh_vtable): Likewise.
423         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
424         CAN_HAVE_FULL_LANG_DECL_P.
425         (push_using_decl): Use build_lang_decl to build USING_DECLs.
426         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
427         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
428         (build_lang_field_decl): Likewise.
429         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
430         to copy.
431         
432         * cp-tree.def (STMT_EXPR): New tree node.
433         * cp-tree.h (STMT_EXPR_STMT): New macro.
434         (store_return_init): Change prototype.
435         (finish_named_return_value): New function.
436         (expand_stmt): Likewise.
437         (expand_body): Likewise.
438         (begin_stmt_tree): Likewise.
439         (finish_stmt_tree): Likewise.
440         (expanding_p): New variable.
441         (last_expr_type): Likewise.
442         (building_stmt_tree): New macro.
443         * decl.c (start_function): Use building_stmt_tree, not
444         processing_template_decl, where appropriate.
445         (store_parm_decls): Likewise.
446         (store_return_init): Move most of the body to semantics.c.
447         (finish_function): Use building_stmt_tree.
448         (finish_stmt): Clear last_expr_type here.
449         (cp_function): Add expanding_p, last_tree, last_expr_type.
450         (push_cp_function_context): Save them.
451         (pop_cp_function_context): Restore them.
452         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
453         * error.c (dump_expr): Handle STMT_EXPR.
454         * except.c (expand_start_catch_block): Use building_stmt_tree.
455         Use add_decl_stmt.
456         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
457         (do_case): Move add_tree call to semantics.c.
458         * parse.y (return_init): Use finish_named_return_value.
459         (for.init.statement): Use finish_expr_stmt.
460         * parse.c: Regenerated.
461         * pt.c (do_pushlevel): Move to semantics.c.
462         (do_poplevel): Likewise.
463         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
464         (tsubst_expr): Don't expand all the way to RTL here.  Handle
465         RETURN_INIT and CTOR_INITIALIZER.
466         (instantiate_decl): Call expand_body after tsubst'ing into
467         DECL_SAVED_TREE.
468         * semantics.c (expand_stmts): New function.
469         (expanding_p): New variable.
470         (last_expr_type): Likewise.
471         (finish_expr_stmt): Use building_stmt_tree.
472         (begin_if_stmt): Likewise.
473         (finish_if_stmt_cond): Likewise.
474         (finish_then_clause): Likewise.
475         (begin_else_clause): Likewise.
476         (finish_else_clause): Likewise.
477         (begin_while_stmt): Likewise.
478         (finish_while_stmt_cond): Likewise.
479         (finish_while_stmt): Likewise.
480         (finish_do_body): Likewise.
481         (finish_do_stmt): Likewise.
482         (finish_return_stmt): Likewise.
483         (begin_for_stmt): Likewise.
484         (fnish_for_init_stmt): Likewise.
485         (finish_for_cond): Likewise.
486         (finish_for_expr): Likewise.
487         (finish_for_stmt): Likewise.
488         (finish_break_stmt): Likewise.
489         (finish_continue_stmt): Likewise.
490         (finish_switch_cond): Likewise.
491         (finish_switch_stmt): Likewise.
492         (finish_case_label): Call add_tree here if necessary.
493         (finish_goto_statement): Use building_stmt_tree.
494         (begin_try_block): Likewise.
495         (begin_function_try_block): Likewise.
496         (finish_try_block): Likewise.
497         (finish_function_try_block): Likewise.
498         (finish_handler_sequence): Likewise.
499         (finish_function_handler_sequence): Likewise.
500         (begin_handler): Likewise.
501         (finish_handler_parms): Likewise.
502         (finish_handler): Likewise.
503         (begin_compound_stmt): Likewise.
504         (finish_compound_stmt): Likewise.
505         (finish_asm_stmt): Likewise.
506         (finish_label_stmt): Likewise.
507         (finish_named_return_value): New function.
508         (setup_vtbl_ptr): Moved here from decl2.c.
509         (do_pushlevel): Moved here from pt.c.
510         (do_poplevel): Likewise.
511         (begin_stmt_expr): Use building_stmt_tree.
512         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
513         when building_stmt_tree.
514         (begin_stmt_tree): New function.
515         (finish_stmt_tree): Likewise.
516         (expand_stmt): Likewise.
517         (expand_body): Likewise.
518         * tree.c (build_cplus_method_type): Make sure the argument types
519         end up on the same obstack as the METHOD_TYPE.
520         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
521         THROW_EXPR, STMT_EXPR.
522         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
523         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
524         sorry, if an unsupported node is encountered.
525         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
526         (c_expand_return): Don't call add_tree here.
527         
528 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
529
530         * pt.c (check_default_tmpl_args): Don't check in local scopes.
531         (tsubst_decl): Make sure the declaration is on a saveable
532         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
533         variable.
534         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
535         
536 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
537
538         Speed up Koenig lookup.
539         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
540         to return namespaces we've looked at.
541         * decl2.c (lookup_using_namespace): Likewise.
542         (add_function): Don't call ovl_member.
543         (lookup_arg_dependent): Initialize k.namespaces to the list of 
544         namespaces seen in unqualified lookup.
545         * call.c (equal_functions): Move here from tree.c.
546         (joust): Use it to handle duplicate candidates.
547         * tree.c (ovl_member): Use ==.
548
549 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
550
551         * cp-tree.def (DECL_STMT): Make it smaller.
552         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
553         (lang_decl): ... here.  Add next.
554         (DECL_SAVED_TREE): Adjust accordingly.
555         (DECL_IMPLICIT_TYPEDEF_P): New macro.
556         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
557         (DECL_STMT_DECL): Likewise.
558         (create_implicit_typedef): New function.
559         (maybe_push_decl): Likewise.
560         (tsubst_default_argument): New function.
561         (at_function_scope_p): Likewise.
562         (add_decl_stmt): Likewise.
563         (push_permanent_obstack): Likewise.
564         * call.c (convert_default_arg): Use tsubst_default_argument.
565         * class.c (add_method): Use push_permanent_obstack.
566         (build_self_reference): Create a TEMPLATE_DECL for the
567         self-reference, if necessary.
568         * decl.c (pseudo_global_level_p): Only look at the current binding
569         level.
570         (push_binding): Use push_permanent_obstack.
571         (create_implicit_typedef): New function.
572         (pushtag): Use it.
573         (duplicate_decls): Use push_permanent_obstack.
574         (maybe_push_decl): New function.
575         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
576         (start_decl_1): Remove dead code.
577         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
578         pseudo_global_level_p.
579         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
580         template.
581         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
582         pseudo_global_level_p.
583         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
584         a template.
585         (get_sentry): Use push_permanent_obstack.
586         * dump.c (dequeue_and_dump): Enable DECL_STMT.
587         * except.c (call_eh_info): Use push_permanent_obstack.
588         (build_eh_type_ref): Likewise.
589         (do_pop_exception): Likewise.
590         (expand_eh_spec): Likewise.
591         (alloc_eh_object): Likewise.
592         (expand_throw): Likewise.
593         * init.c (build_java_class_ref): Likewise.
594         * lex.c (get_time_identifier): Likewise.
595         (free_lang_decl_chain): Correct type.
596         (retrofit_lang_decl): Adjust accordingly.
597         (build_lang_field_decl): Likewise.
598         * lex.h (free_lang_decl_chain): Likewise.
599         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
600         * parse.c: Regenerated.
601         * pt.c (tsubst_default_arguments): New function.
602         (retrieve_local_specialization): Likewise.
603         (register_local_specialization): Likewise.
604         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
605         pseudo_global_level_p to determine whether or not a template is
606         primary.
607         (lookup_template_class): Likewise.  Use create_implicit_typedef.
608         (instantiate_class_template): Call tsubst_default_arguments for
609         member functions, if appropriate.
610         (tsubst_default_argument): New function.
611         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
612         * search.c (at_function_scope_p): New function.
613         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
614         (finish_label_stmt): Likewise.
615         (add_decl_stmt): New function.
616         (begin_class_definition): Likewise.
617         (finish_typeof): Likewise.
618         * tree.c (copy_template_template_parm): Likewise.
619         (copy_to_permanent): Likewise.
620         (push_permanent_obstack): Define.
621         (mark_addressable): Use it.
622         * typeck.c (mark_addressable): Likewise.
623         
624 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
625
626         cp-tree.h (init_cplus_unsave): New.
627         (cplus_unsave_expr_now): New.
628         lex.c (init_parse): Call init_cplus_unsave.
629         tree.c (init_cplus_unsave): New.
630         (cplus_unsave_expr_now): New.
631
632 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
633
634         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
635         decl_constant_value to simplify array bounds.
636
637 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
638
639         * lang-options.h: Add -fms-extensions.
640         * cp-tree.h: Declare flag_ms_extensions.
641         * decl2.c: Define it.
642         * class.c (instantiate_type): Don't complain about taking the address
643         of a bound member function if -fms-extensions.
644         * typeck.c (build_unary_op): Likewise.
645         * decl.c (grokdeclarator): Or about implicit int.
646         * init.c (resolve_offset_ref): Or about implicit '&'.
647
648 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
649
650         * cp-tree.h (minimal_parse_mode): Remove.
651         (finish_label_stmt): New function.
652         * decl.c (saved_scope): Remove minimal parse mode.
653         (maybe_push_to_top_level): Don't save it.
654         (pop_from_top_level): Don't restore it.
655         (define_label): Split out template-handling code to semantics.c.
656         (start_decl): Don't use minimal_parse_mode.
657         (cp_finish_decl): Likewise.
658         (start_function): Don't increment it.
659         (store_return_init): Don't use it.
660         (finish_function): Don't decrement it.
661         * parse.y (label_colon): Use finish_label_stmt throughout.
662         * parse.c: Regenerated.
663         * pt.c (minimal_parse_mode): Don't define it.
664         (tsubst_expr): Use finish_label_stmt.
665         * semantics.c (finish_label_stmt): New function.
666
667         * dump.c (queue): Be careful when computing bitmasks.
668         (dequeue_and_dump): Describe binfos as binfos, not as
669         vectors.
670         
671         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
672         throughout.     
673         * parse.c: Regenerated.
674         
675         * Make-lang.in (CXX_SRCS): Remove sig.c.
676         * Makefile.in (CXX_OBJS): Remove sig.o.
677         (sig.o): Remove.
678         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
679         (CPTI_SIGNATURE_TYPE): Likewise.
680         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
681         (opaque_type_node): Likewise.
682         (signature_type_node): Likewise.
683         (sigtable_entry_type): Likewise.
684         (flag_handle_signatures): Likewise.
685         (lang_type): Remove is_signature, is_signature_pointer,
686         is_signature_reference, has_opaque_typedecls,
687         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
688         signature_pointer_to, signature_reference_to.
689         (IS_SIGNATURE): Remove.
690         (SET_SIGNATURE): Remove.
691         (CLEAR_SIGNATURE): Remove.
692         (IS_SIGNATURE_POINTER): Remove.
693         (IS_SIGNATURE_REFERENCE): Remove.
694         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
695         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
696         (CLASSTYPE_SIGNATURE): Remove.
697         (SIGNATURE_TYPE): Remove.
698         (SIGNATURE_METHOD_VEC): Remove.
699         (SIGNATURE_POINTER_TO): Remove.
700         (SIGNATURE_REFERENCE_TO): Remove.
701         (lang_decl_flags): Remove is_default_implementation.  Rename
702         memfunc_pointer_to to saved_tree.
703         (IS_DEFAULT_IMPLEMENTATION): Remove.
704         (DECL_MEMFUNC_POINTER_TO): Remove.
705         (DECL_MEMFUNC_POINTING_TO): Remove.
706         (DECL_SAVED_TREE): Adjust definition.
707         (tag_types): Remove signature_type_node.
708         (SIGNATURE_FIELD_NAME): Remove.
709         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
710         (SIGNATURE_OPTR_NAME): Likewise.
711         (SIGNATURE_SPTR_NAME): Likewise.
712         (SIGNATURE_POINTER_NAME): Likewise.
713         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
714         (SIGNATURE_REFERENCE_NAME): Likewise.
715         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
716         (SIGTABLE_PTR_TYPE): Likewise.
717         (SIGTABLE_NAME_FORMAT): Likewise.
718         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
719         (SIGTABLE_TAG_NAME): Likewise.
720         (SIGTABLE_VB_OFF_NAME): Likewise.
721         (SIGTABLE_VT_OFF_NAME): Likewise.
722         (finish_base_specifiers): Change prototype.
723         (build_signature_pointer_type): Remove.
724         (build_signature_reference_type): Remove.
725         (build_signature_pointer_constructor): Remove.
726         (build_signature_method_call): Remove.
727         (build_optr_ref): Likewise.
728         (append_signature_fields): Likewise.
729         (signature_error): Likewise.
730         * call.c (build_this): Remove signature support.
731         (build_over_call): Likewise.
732         (build_new_method_call): Likewise.
733         * class.c (add_implicitly_declared_members): Likewise.
734         (finish_struct_1): Likewise.
735         (finish_struct): Likewise.
736         * cvt.c (cp_convert_to_pointer): Likewise.
737         (convert_to_pointer_force): Likewise.
738         (ocp_convert): Likewise.
739         * decl.c (sigtable_decl_p): Remove.
740         (init_decl_processing): Remove support for signatures.
741         (cp_finish_decl): Likewise.
742         (grokdeclarator): Likewise.
743         (grokparms): Likewise.
744         (xref_tag): Likewise.
745         (start_function): Likewise.
746         (start_method): Likewise.
747         * decl2.c (finish_sigtable_vardecl): Remove.
748         (flag_handle_signatures): Remove.
749         (lang_f_options): Remove handle-signatures.
750         (grokfield): Remove support for signatures.
751         (grokbitfield): Likewise.
752         (finish_file): Likewise.
753         (reparse_absdcl_as_casts): Likewise.
754         * error.c (dump_type_real): Likewise.
755         (dump_function_decl): Likewise.
756         * friend.c (make_friend_class): Likewise.
757         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
758         * hash.h: Regenerated.
759         * init.c (build_new_1): Remove support for signatures.
760         * lang-options.h: Remove -fhandle-signatures,
761         -fno-handle-signatures. 
762         * lex.c (init_parse): Remove support for signatures.
763         (yyprint): Likewise.
764         * lex.h (rid): Remove RID_SIGNATURE.
765         * method.c (build_decl_overload_real): Remove support for
766         signatures. 
767         (hack_identifier): Likewise.
768         * parse.y (base_class): Likewise.
769         (base_class.1): Likewise.
770         (access_specifier): Likewise.
771         * search.c (lookup_member): Likewise.
772         * semantics.c (finish_qualified_object_call_expr): Likewise.
773         (finish_template_type_parm): Likewise.
774         (begin_class_definition): Likewise.
775         (finish_base_specifier): Likewise.
776         * sig.c: Remove.
777         * tree.c (build_cplus_method_type): Remove support for signatures.
778         * typeck.c (require_complete_type): Likewise.
779         (c_sizeof): Likewise.
780         (c_alignof): Likewise.
781         (build_object_ref): Likewise.
782         (build_component_ref): Likewise.
783         (build_indirect_ref): Likewise.
784         (build_c_cast): Likewise.
785         (build_modify_expr): Likewise.
786         (convert_for_initialization): Likewise.
787         * typeck2.c (signature_error): Remove.
788         (store_init_value): Remove support for signatures.
789         (digest_init): Likewise.
790         (build_x_arrow): Likewise.
791         (build_functional_cast): Likewise.
792         * xref.c (GNU_xref_decl): Likewise.
793         
794 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
795
796         * lex.c (do_identifier): Remove unnecessary lookup of class field.
797
798 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
799
800         * decl2.c (set_decl_namespace): Do not complain about non-matching
801         decls if processing a template.
802
803 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
804
805         * decl.c (build_ptrmemfunc_type): Handle qualified
806         pointer-to-member types here.
807         * tree.c (cp_build_qualified_type_real): Simplify handling here.
808
809 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
810
811         * decl.c: Remove redundant prototype for `print_error_function'.
812         (lang_print_error_function): Constify a char*.
813
814         * lex.c (lang_identify): Likewise.
815
816 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
817
818         * Makefile.in: Update dependencies.
819         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
820         NULL_RTX.
821         * decl.c: Include "function.h"
822         (cleanup_label, return_label): Delete declarations.
823         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
824         (finish_function): Rename last_parm_insn variable to
825         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
826         * decl2.c: Include "function.h".
827         (rtl_expr_chain): Delete declaration.
828         * method.c: Include "function.h"
829         * tree.c (build_vbase_pointer_fields): Don't initialize
830         DECL_SAVED_INSNS with NULL_RTX.
831         * typeck.c: Include "function.h"
832
833 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
834
835         * semantics.c (begin_function_try_block, finish_function_try_block,
836         finish_function_handler_sequence): New fns.
837         * parse.y (function_try_block): Use them.
838         * pt.c (instantiate_decl): Likewise.
839
840         * cp-tree.h: Declare in_function_try_handler.
841         * decl.c: Define it.
842         (start_function): Clear it.
843         (struct cp_function, push_cp_function_context): Save it.
844         (pop_cp_function_context): Restore it.
845         * parse.y (function_try_block): Set and clear it.
846         * except.c (expand_end_catch_block): Rethrow if we reach the end
847         of a function-try-block handler in a ctor or dtor.
848         * typeck.c (c_expand_return): Complain about returning from a
849         function-try-block handler of a ctor.
850
851         * parse.y (function_try_block): Call end_protect_partials
852         before expand_start_all_catch.
853
854 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
855
856         * decl.c (struct binding_level): Add eh_region field.
857         (push_binding_level): Set it.
858         (define_label): Complain about jumping into an EH block.
859
860         * ptree.c (print_lang_type): Print the real type of a PMF.
861         Print what exceptions a fn type throws.
862
863 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
864
865         * class.c (count_fields, add_fields_to_vec): Add static prototype.
866
867         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
868         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
869         char*.
870
871         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
872         Constify a char*.
873
874         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
875         char*.
876
877         * dump.c (queue_and_dump_index, dump_int, dump_string,
878         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
879         a char*.
880         (dump_stmt): Add static prototype.
881
882         * errfn.c (cp_thing): Constify a char*.
883
884         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
885         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
886         dump_expr): Constify a char*.
887
888         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
889         read_line_number): Add static prototype.
890         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
891         (real_yylex): Move label `letter' into the scope where it is used.
892
893         * method.c (build_mangled_template_parm_index, build_overload_int,
894         build_decl_overload_real, get_id_2): Constify a char*.
895
896         * search.c (check_final_overrider): Make static.
897
898         * typeck.c (composite_pointer_type): Constify a char*.
899
900 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
901
902         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
903         we're looking at a class.
904
905         * decl.c (lookup_name_real): Set the complain flag if we're
906         looking for a namespace member.
907
908         * lex.c (real_yylex): We can have a number with no digits.
909
910         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
911
912         * search.c (binfo_from_vbase): New fn.
913         * cp-tree.h: Declare it.
914         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
915         from pointer to member of virtual base.  
916         * typeck.c (get_delta_difference): Likewise.
917
918 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
919
920         * pt.c (tsubst): Use build_index_type to build in-template array
921         index type.  Fixes g++.oliva/dwarf1.C.
922         * decl.c (grokdeclarator): Likewise, just for consistency, as it
923         doesn't seem to trigger the bug without it.
924
925 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
926
927         * typeck2.c (add_exception_specifier): Use complete_type.
928
929 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
930
931         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
932         (dump_binary_op): Bulletproof.
933         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
934         * tree.c (search_tree): Don't enumerate all the nodes of classes
935         `1', `2', and `<'; handle them generically.  Don't be sorry about
936         "unrecognized tree codes"; just abort.
937         (no_linkage_check): Don't do linkage checks for templates.
938         
939         * tree.c (cp_build_qualified_type_real): Handle
940         pointer-to-member-function types correctly.
941
942 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
943
944         * decl.c (pushdecl): Only give an error for shadowing a parm 
945         from *this* function.
946
947 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
948
949         * typeck2.c: Update URLs and mail addresses.
950
951 1999-08-04  Nathan Sidwell  <nathan@acm.org>
952
953         * cp-tree.h (empty_except_spec): New global var.
954         (compexcepttypes): Remove prototype.
955         (comp_except_specs): Prototype new global function.
956         (add_exception_specifier): Prototype new global function.
957         * decl.c (empty_except_spec): Define new global var.
958         (duplicate_decls): Use comp_except_specs, reword error message.
959         (init_decl_processing): Initialize empty_except_spec.
960         Adjust build_exception_variant calls.
961         * parse.y (exception_specification_opt): Use empty_except_spec.
962         (ansi_raise_identifier): Call check_for_new_type.
963         (ansi_raise_identifiers): Use add_exception_specifier.
964         * pt.c (tsubst): Use add_exception_specifier to build exception
965         specifier.
966         * search.c (check_final_overrider): New static function, broken
967         out of get_matching_virtual. Check throw specifiers, reword
968         diagnostics.
969         (get_matching_virtual): Use check_final_overrider.
970         * tree.c (build_exception_variant): Use comp_except_specs.
971         * typeck.c (compexcepttypes): Remove.
972         (comp_except_types): New static function, helper for
973         comp_except_specs. Compare two types as exception specifiers.
974         (comp_except_specs): New global function, compare two exception
975         specifiers.
976         (comptypes): Adjust for comp_except_specs.
977         * typeck2.c (add_exception_specifier): New global function.
978         
979         * class.c (check_for_override): Reword error message.
980
981 1999-08-03  Nathan Sidwell  <nathan@acm.org>
982
983         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
984         * cp-tree.h (struct lang_type): Added non_pod_class flag.
985         (CLASSTYPE_NON_POD_P): New macro to access it.
986         * class.c (finish_struct_1): Determine non-PODness.
987         Check for arrays of pointers (-Weffc++).
988         Remove array inspection duplicated code.
989         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
990         Use CLASSTYPE_NON_POD_P.
991
992 1999-08-03  Nathan Sidwell  <nathan@acm.org>
993
994         * class.c (duplicate_tag_error): Preserve template information.
995
996 1999-08-03  Nathan Sidwell  <nathan@acm.org>
997
998         * decl.c (start_enum): Show location of previous definition.
999         * parse.y (enumlist_opt): New reduction.
1000         (structsp): Simplify enum rules to use enumlist_opt.
1001
1002 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
1003
1004         * lex.c (yyprint): Handle PFUNCNAME.
1005
1006         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
1007         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
1008
1009 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
1010
1011         * decl.c (start_decl): Set attributes before duplicate_decls call.
1012
1013 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
1014
1015         * Make-lang.in (CXX_SRCS): Add dump.c.
1016         * Makefile.in (CXX_OBJS): Add dump.o.
1017         (dump.o): New target.
1018         * cp-tree.h (DECL_CONV_FN_P): Document.
1019         (DECL_OVERLOADED_OPERATOR_P): New function.
1020         (TYPE_PTRMEM_CLASS_TYPE): New macro.
1021         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1022         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
1023         (ASM_VOLATILE_P): New macro.
1024         (STMT_LINENO): Likewise.
1025         (cp_namespace_decls): New function.
1026         (dump_node_to_file): New function.
1027         * decl.c (cp_namespace_decls): New function.
1028         (walk_namespaces_r): Use it.
1029         (wrapup_globals_for_namespace): Likewise.
1030         * decl2.c (flag_dump_translation_unit): New variable.
1031         (lang_decode_option): Handle -fdump-translation-unit.
1032         (finish_file): If flag_dump_translation_unit is set, dump the
1033         translation unit.
1034         * dump.c: New file.
1035         * lang-options.h: Add -fdump-translation-unit.
1036         * pt.c (tsubst_template_parms): Robustify.
1037         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
1038         (tsubst_expr): Use STMT_LINENO.
1039         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
1040         for invalid cv-qualifiers even while building templates.
1041         
1042 1999-08-02  Richard Henderson  <rth@cygnus.com>
1043
1044         * call.c: Include defaults.h instead of expr.h.
1045         * decl.c: Likewise.
1046         * pt.c: Likewise.
1047         * typeck.c: Include defaults.h.
1048
1049 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
1050
1051         * lex.c (errorcount, sorrycount): Don't declare.
1052         * repo.c (errorcount, sorrycount): Likewise.
1053         * typeck2.c (errorcount, sorrycount): Likewise.
1054
1055 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
1056
1057         * call.c (convert_default_arg, build_over_call): Change all uses of
1058         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
1059         Ensure expr.h is included.
1060         * decl.c (grokparams): Ditto.
1061         * pt.c (tsubst_decl): Ditto.
1062         * typeck.c (convert_arguments): Ditto.
1063
1064 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
1065
1066         * class.c (mark_overriders): Fix order of args to overrides.
1067         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
1068         functions with the same name.
1069
1070 1999-08-02  Richard Henderson  <rth@cygnus.com>
1071
1072         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
1073
1074 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
1075
1076         * call.c (build_conditional_expr): Fix typo in comment.
1077
1078 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
1079
1080         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
1081         case_stack; use in_control_zone_p.
1082         * typeck.c (c_expand_return): Likewise.
1083
1084 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
1085
1086         * except.c (catch_clauses): Delete declaration.
1087
1088 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
1089
1090         * call.c (build_conditional_expr): Call convert_from_reference to
1091         avoid reference/non-reference type confusion.  Fix typo.
1092
1093 1999-07-30  Richard Henderson  <rth@cygnus.com>
1094
1095         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
1096         * cp-tree.h (initializer_constant_valid_p): Remove.
1097
1098 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
1099
1100         * call.c (conditional_conversion): Don't build BASE_CONVs for
1101         conversions between things that have the same type.
1102         (build_conditional_expr): Tweak.
1103         (convert_like): Some BASE_CONVs really do require the generation
1104         of code.
1105         
1106         * init.c (perform_member_init): Don't go through build_modify_expr
1107         for simple initializations.
1108
1109 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
1110
1111         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
1112         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
1113         virtual functions and MI.  Simplify.
1114
1115         * method.c: Remove prototype for largest_union_member.
1116         * pt.c (determine_specialization): Fix uninitialized warning.
1117         * lex.c (real_yylex): Likewise.
1118
1119 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
1120
1121         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
1122         here too.
1123
1124         * cp-tree.h (BINFO_VIRTUALS): Document new format.
1125         * class.c (modify_one_vtable): Change prototype accordingly.
1126         (modify_all_vtables): Likewise.
1127         (modify_all_direct_vtables): Likewise.
1128         (modify_all_indirect_vtables): Likewise.
1129         (build_vtable_entry_for_fn): New function.
1130         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
1131         (modify_vtable_entry): Likewise.
1132         (add_virtual_function): Likewise.
1133         (build_vtbl_initializer): New function.
1134         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
1135         (fixup_vtable_deltas1): Likewise.
1136         (fixup_vtable_deltas): Likewise.
1137         (override_one_vtable): Likewise.
1138         (finish_struct_1): Likewise.
1139
1140         * error.c (dump_expr): Likewise.
1141         * search.c (get_abstract_virtuals_1): Likewise.
1142         (get_abstract_virtuals): Likewise.
1143         (expand_upcast_fixups): Likewise.
1144         * tree.c (debug_binfo): Likewise.
1145         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
1146         __pure_virtual here.
1147         
1148 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
1149
1150         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
1151         as per 1999-07-26 change.
1152
1153         * typeck.c (c_sizeof): Don't allow non-static data members.
1154         (expr_sizeof): Likewise.
1155
1156 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
1157
1158         * input.c (feed_input): Only touch lineno and input_filename
1159         if !USE_CPPLIB.  Save the old values before setting the new ones.
1160
1161         * input.c (feed_input): Add file, line parms.
1162         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
1163         (real_yylex): Check linemode before input_redirected().
1164
1165         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
1166         from op new to warning.
1167
1168 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
1169
1170         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
1171         * call.c: All uses changed.
1172         * typeck.c: Likewise.
1173
1174 1999-07-26  Nathan Sidwell  <nathan@acm.org>
1175
1176         * exception.cc (__cplus_type_matcher): Match __eh_matcher
1177         prototype.
1178
1179 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
1180
1181         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
1182         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
1183         (strip_top_quals): Declare.
1184         (ncp_convert): Likewise.
1185         (type_after_usual_arithmetic_converions): Likewise.
1186         (composite_pointer_type): Likewise.
1187         * call.c (strip_top_quals): Don't make it static.
1188         (promoted_arithmetic_type_p): New function.
1189         (conditional_conversion): Likewise.
1190         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
1191         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
1192         for converting a type to itself.
1193         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
1194         (implicit_conversion): Make sure the from and to types are
1195         complete.
1196         (add_builtin_candidate): Correct handling of ?: operator.
1197         (add_builtin_candidates): Improve documentation.
1198         (build_conditional_expr): New function.
1199         (can_convert): Implement in terms of can_convert_arg.
1200         (ncp_convert): New function.
1201         * typeck.c (type_after_usual_arithmetic_conversions): New
1202         function, split out from common_type.
1203         (composite_pointer_type): New function, split out from
1204         build_conditional_expr.
1205         (common_type): Use type_after_usual_arithmetic_conversions.
1206         Remove redundant attribute merging.
1207         (comptypes): Tidy.  Handle COMPLEX_TYPE.
1208         (build_binary_op_nodefault): Use null_ptr_cst_p.
1209         (build_conditional_expr): Remove.
1210         (convert_for_assignment): Use new conversion functions.
1211         
1212         * cp-tree.h (abstract_virtuals_error): Change declaration.
1213         * typeck2.c (abstract_virtuals_error): Check to see if an error
1214         ocurred, and return a boolean value accordingly.
1215         (build_functional_cast): Adjust accordingly.
1216         * class.c (finish_struct_1): Likewise.
1217         * cvt.c (ocp_convert): Likewise.
1218         * decl.c (cp_finish_decl): Likewise.
1219         (grokparams): Likewise.
1220         (grok_op_properties): Likewise.
1221         (start_function): Likewise.
1222         * init.c (build_new_1): Likewise.
1223
1224         * pt.c (unify): Don't get confused by pointers-to-member functions.
1225
1226         * search.c (build_cplus_new): Robustify.
1227         
1228 1999-07-24  Richard Henderson  <rth@cygnus.com>
1229
1230         * decl.c (ptr_type_node, va_list_type_node): New.
1231         * gxx.gperf (__builtin_va_arg): New.
1232         * parse.y (VA_ARG): New token.
1233         (unary_expr): Recognize it.
1234
1235 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
1236
1237         * g++FAQ.texi: Deleted per Joe Buck's request.
1238         * Makefile.in: Corresponding changes.
1239
1240 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
1241
1242         * lex.c: Sync with C frontend.
1243         (whitespace_cr): New fn.
1244         (skip_white_space): Use it.
1245         (init_parse): Reorder.
1246         (yyprint): Support CONSTANT.
1247         (pragma_getc, pragma_ungetc): Bring back.
1248         (read_line_number): Change in_system_header directly.
1249         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
1250         (parse_float): Update to C version.
1251         (yylex): Handle '$' under the letter case.
1252         Remove looking_for_typename handling.
1253         Support hex floating point constants.
1254         Follow C's lead for choosing type of integer constants.
1255         Rearrange stuff to match C frontend.
1256         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
1257         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
1258
1259 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
1260
1261         * call.c (reference_binding): Tweak.
1262         (mayble_handle_implicit_object): Use direct_reference_binding to
1263         create the right implicit conversion sequence.
1264
1265 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
1266
1267         * pt.c (convert_nontype_argument): Don't call decl_constant_value
1268         if we're converting to a reference type.
1269
1270         * call.c (NEED_TEMPORARY_P): New macro.
1271         (standard_conversion): Set it, for derived-to-base conversions.
1272         (reference_related_p): New function.
1273         (reference_compatible_p): Likewise.
1274         (convert_class_to_reference): Likewise.
1275         (direct_reference_binding): Likewise.
1276         (reference_binding): Rework for standards-compliance.
1277         (convert_like): Adjust accordingly.
1278         (maybe_handle_ref_bind): Simplify; the right conversion sequences
1279         are now built up in reference_binding.
1280         (initialize_reference): New function.
1281         * cp-tree.h (ICS_USER_FLAG): Document.
1282         (ICS_THIS_FLAG): Likewise.
1283         (ICS_BAD_FLAG): Likewise.
1284         (NEED_TEMPORARY_P): Likewise.
1285         (cp_lvalue_kind): New type.
1286         (real_lvalue_p): Return it.
1287         * error.c (dump_expr): Provide more accurate representation for
1288         AGGR_INIT_EXPRs.
1289         * init.c (expand_default_init): Do not try to perform implicit
1290         conversions for a brace-enclosed initializer.
1291         * search.c (lookup_conversions): Document.
1292         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
1293         appropriately.
1294         (real_lvalue_p): Adjust accordingly.
1295         (lvalue_p): Likewise.
1296         (build_cplus_new): Don't allow the creation of an abstract class.
1297         * typeck.c (convert_for_initialization): Use initialize_reference.
1298         
1299 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
1300
1301         * lex.c (real_yylex) : Correct the test for overflow when lexing
1302         integer literals.
1303
1304 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
1305
1306         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
1307         not DECL_BUILT_IN, to determine if a function is internally declared.
1308         (duplicate_decls): Likewise.  Improve handling of builtins.
1309         (push_overloaded_decl): Remove special handling of builtins.
1310
1311         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
1312
1313         * decl.c (grokdeclarator): Pull out decl_constant_value in
1314         templates, too.
1315
1316         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
1317         * cp-tree.h, pt.c, semantics.c: Adjust.
1318         * method.c (largest_union_member): Remove.
1319
1320         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
1321
1322         * lex.c (token_getch, token_put_back): New fns.
1323         (real_yylex): Use them.
1324
1325         * lex.c (lang_init): Generalize.
1326         (lang_init_options): Tell cpplib this is C++.
1327         (nextchar): Remove.  Replace uses with put_back.
1328         (skip_white_space): Handle linemode here.  Optimize for cpplib.
1329         (extend_token_buffer_to): New fn.
1330         (extend_token_buffer): Use it.
1331         (read_line_number, check_newline): Just deal with tokens.
1332         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
1333         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
1334         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
1335         * parse.y (PAREN_STAR_PAREN): Remove.
1336         * input.c: Don't use the putback machinery with cpplib.
1337         (sub_getch): Fold back into getch.
1338         (getch): Don't handle linemode here.
1339         (feed_input): Unget any text in the token buffer.
1340
1341         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
1342         nextyychar, nextyylval): Remove.
1343
1344 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
1345             Jason Merrill  <jason@yorick.cygnus.com>
1346
1347         * lex.c (indent_level): New variable.
1348         (init_parse): Set cpp_token to CPP_DIRECTIVE.
1349         (consume_string): Make this smart about USE_CPPLIB.
1350         (yyungetc): Use put_back function.
1351         (pragma_getc, pragma_ungetc): Functions deleted.
1352         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
1353         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
1354         pragma_ungetc.
1355         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
1356         Also, clean up cases where we redundantly set token_buffer[0].
1357         (read_line_number): New fn.
1358         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
1359         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
1360         (sub_getch): Conditionalize out code that's not appropriate if
1361         USE_CPPLIB.
1362         (put_back): Rewrite in case USE_CPPLIB is defined.
1363         (input_redirected): Ditto.
1364
1365 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1366
1367         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
1368         c_global_trees and accessor macros defined in c-common.h.
1369         (cp_tree_index): New enumeration.
1370         (cp_global_trees): Declare new array.  Add accessor macros for it, and
1371         delete declarations of tree nodes replaced by it.
1372         (builtin_function): Delete macro, add declaration for new function.
1373         Include c-common.h.
1374         * decl.c: Delete definitions for tree nodes that were replaced by
1375         cp_global_trees and c_global_trees.
1376         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
1377         to generate the common builtins here.
1378         (builtin_function): New function.
1379         * decl2.c (abort_fndecl): Delete declaration.
1380         * except.c (expand_builtin_return_address): Delete declaration.
1381         (builtin_return_address_fndecl): Delete variable.
1382         (const_ptr_type_node): Delete declaration.
1383         * lex.c (cons_up_default_function): Delete declaration of
1384         void_list_node.
1385         * parse.y (void_list_node): Delete declaration.
1386         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
1387         Delete variables.
1388         (const_string_type_node): Delete declaration.
1389         * search.c (abort_fndecl): Delete declaration.
1390         * Makefile.in: Update dependencies.
1391
1392 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
1393
1394         * pt.c (check_default_tmpl_args): Move test for missing default
1395         arguments here, from ...
1396         (end_template_parm_list): Here.
1397
1398 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
1399
1400         * decl.c (lookup_nested_type): Remove.
1401         (pushtag): Don't call it.
1402
1403 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
1404
1405         * Makefile.in (INTERFACE): Bump to 2.
1406
1407 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
1408         
1409         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
1410         instructions to gcc.gnu.org.  Removed e-mail address.
1411
1412 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
1413
1414         * pt.c (determine_specialization): Tighten error-checking.
1415         (end_template_parm_list): Likewise.
1416
1417 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
1418
1419         * pt.c (check_default_tmpl_args): Handle friends defined in the
1420         class just like member functions defined in the class.
1421
1422 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
1423             Jason Merrill  <jason@yorick.cygnus.com>
1424
1425         * cp-tree.h (struct lang_decl): Added field for storing sorted
1426         FIELD_DECLs (used in TYPE_DECLs).
1427         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
1428         (DECL_SORTED_FIELDS): New macro.
1429         * class.c (method_name_cmp): New function.
1430         (finish_struct_methods): Modified to support sorting and searching
1431         methods.
1432         (finish_struct_anon): Changed code in inner loop to use ELT rather 
1433         than UELT (which required an extra indirection for every reference).
1434         (field_decl_cmp): New function to support sorting FIELD_DECLs.
1435         (finish_struct_1): Sort fields.
1436         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
1437         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
1438         Also, switch to using array indexing rather than a changing pointer.
1439         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
1440         DECL_SORTED_FIELDS.
1441
1442 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
1443
1444         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
1445         casts in system headers or extern "C" blocks.
1446
1447         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
1448         errors to pedwarn.
1449
1450 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
1451
1452         * decl2.c (write_virtuals): Deleted declaration.
1453         * cp-tree.h (write_virtuals): Deleted extern declaration.
1454         * class.c (finish_struct_1): Removed #if 0'd code that mentions
1455         write_virtuals.
1456         * semantics.c (begin_class_definition): Rewrite code to not depend
1457         on write_virtuals.
1458
1459         * lex.c (cp_pragma_interface): New function.
1460         (cp_pragma_implementation): Likewise.
1461         (handle_cp_pragma): Call them.
1462
1463         * typeck.c (comptypes): Simplify C code in look_hard.
1464
1465         * xref.c (PALLOC): Use xcalloc, not calloc.
1466         (SALLOC): Use xmalloc, not malloc.
1467
1468         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
1469
1470         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
1471         is NO_DEBUG.
1472
1473         * decl.c (duplicate_decls): If a redeclaration doesn't match the
1474         initial declaration, then don't save the inline info and by all
1475         means don't mark the function as a builtin function.
1476
1477         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
1478         CURRENT_CLASS_TYPE is 0.
1479
1480         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
1481         NULL_TREE.
1482
1483         * ptree.c (print_lang_type): Added vtable-needs-writing.
1484
1485 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
1486
1487         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
1488
1489 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
1490
1491         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
1492         Merged into c-common.
1493
1494 1999-07-05  Dave Brolley  <brolley@cygnus.com>
1495
1496         * lex.c (errorcount): Declare it.
1497         (finish_parse): Update errorcount for when using CPPLIB.
1498
1499 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
1500
1501         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
1502         parameters.
1503         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
1504         * decl.c (push_class_binding): Use it.
1505         (lookup_name_real): Likewise.
1506
1507 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
1508
1509         * cp-tree.h (widest_integer_literal_type_node,
1510         widest_unsigned_literal_type) : New.
1511         * decl.c (widest_integer_literal_type_node,
1512         widest_unsigned_literal_type) : New.
1513         (init_decl_processing): Handle/use the two new types.
1514         * lex.c (real_yylex): Same.
1515         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
1516         Same. 
1517
1518 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
1519
1520         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
1521         to anonymous cv-qualified types.
1522
1523 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
1524
1525         * lex.c (real_yylex) : Change integer literal overflow handling to
1526         be like c-lex.c.
1527
1528         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
1529
1530 1999-06-28  Richard Henderson  <rth@cygnus.com>
1531
1532         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
1533
1534 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
1535
1536         * error.c (dump_type_real): Handle TREE_LIST again.
1537
1538         * typeck.c (comp_target_parms): Don't complain about 
1539         converting from () to (...) if !flag_strict_prototype.
1540
1541         * decl.c (grokdeclarator): Update the names of all variants when
1542         de-anonymizing.
1543
1544 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
1545
1546         * init.c (expand_aggr_vbase_init): Rename to
1547         construct_virtual_bases.  Conditionalize construction here, 
1548         rather than ...
1549         (emit_base_init): Here.
1550
1551 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
1552
1553         * semantics.c (finish_asm_statement): Apply decay conversions to
1554         input operands.
1555
1556         * decl.c (expand_static_init): When building an anonymous function
1557         for use with atexit, compute its body before and after entering
1558         the function.
1559
1560         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
1561         EXIT_EXPR.
1562         
1563 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
1564
1565         * init.c (expand_aggr_vbase_init): Add flag parameter.
1566         (build_partial_cleanup_for): Remove, inlining into ..
1567         (expand_cleanup_for_base): ... here.  Take flag parameter.
1568         (emit_base_init): Pass the in_chrg parameter to
1569         emit_aggr_vbase_init. 
1570         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
1571         
1572 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
1573
1574         * decl2.c (import_export_decl): Use same_type_p, rather than
1575         relying on pointer-equality for types.
1576
1577         * method.c (do_build_copy_constructor): Simplify.
1578
1579         * call.c (build_method_call): Remove bogus code for two-argument
1580         delete.
1581         * init.c (build_new_1): Expand on comment, and remove dead code.
1582
1583         * init.c (expand_cleanup_for_base): New function, split out
1584         from ...
1585         (emit_base_init): Here.
1586         (expand_aggr_vbase_init): Use it.
1587
1588 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
1589
1590         * cp-tree.h (class_cache_firstobj): Declare.
1591         (maybe_push_cache_obstack): Rename to push_cache_obstack.
1592         * class.c (permanent_obstack): Remove declaration.
1593         (class_cache_firstobj): Make it global.
1594         (add_method): Don't use permanent_obstack directly.
1595         (pushclass): Only free the class_cache_obstack if we know how far
1596         back to free it.
1597         (maybe_push_cache_obstack): Rename to push_cache_obstack.
1598         * decl.c: Remove dead comment.
1599         (saved_scope): Add class_cache_firstobj.
1600         (push_to_top_level): Save it.
1601         (pop_from_top_level): Restore it.
1602         (push_class_level_binding): Use push_cache_obstack, not
1603         maybe_push_cache_obstack.
1604         * search.c (push_class_decls): Likewise.
1605         
1606 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1607
1608         * pt.c (tsubst_friend_function): Push into namespace of friend
1609         function before pushdecl'ing it.
1610
1611 1999-06-14  Nathan Sidwell  <nathan@acm.org>
1612
1613         * call.c (build_new_op): Remove REF_BIND from all operands.
1614
1615 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
1616
1617         * init.c (build_new_1): Look up operator delete even if there was
1618         no explicit new placement.
1619
1620 1999-06-08  Nathan Sidwell  <nathan@acm.org>
1621
1622         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
1623         of ...
1624         (build_throw): ... here. Call it.
1625         (process_start_catch_block): Call it.
1626
1627 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
1628
1629         * search.c (convert_pointer_to_single_level): Reimplement without
1630         using get_binfo.
1631
1632 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
1633
1634         * method.c (is_back_referenceable_type): Back-reference bools when
1635         not squangling.
1636
1637 1999-06-07  Dave Brolley  <brolley@cygnus.com>
1638
1639         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
1640         * input.c (putback_buffer): New structure type.
1641         (putback): Replaces putback_char member.
1642         (putback): Replaces putback_char static variable.
1643         (feed_input): Use putback.
1644         (end_input): Use putback.
1645         (sub_getch): Use putback.
1646         (put_back): Use putback.
1647
1648 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
1649
1650         * decl.c (grokdeclarator): Fix typo in last change.
1651
1652 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
1653
1654         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
1655         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
1656
1657 1999-06-04  Nathan Sidwell  <nathan@acm.org>
1658
1659         * except.c (build_throw): Check throw expression validity.
1660
1661 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
1662
1663         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
1664         just because flag_signed_bitfields is false.
1665
1666 1999-06-03  Nathan Sidwell  <nathan@acm.org>
1667
1668         * semantics.c (begin_class_definition): Update the struct's
1669         location here ...
1670         * class.c (finish_struct): ... rather than here.
1671
1672         * decl.c (make_typename_type): Don't rely on uninitialized
1673         variable.
1674
1675 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1676
1677         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
1678
1679 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
1680
1681         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
1682         and friends rather than messing with current_obstack directly.
1683         (cp_build_qualified_type_real): Rework ARRAY_TYPE
1684         allocation to match practice throughout the rest of the 
1685         compiler.
1686
1687 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
1688
1689         * lex.c (make_lang_type): Create TYPE_BINFO for
1690         TEMPLATE_TYPE_PARMs just like for non-template types.
1691
1692         * decl.c (start_decl): Move checks on initialization to ...
1693         (cp_finish_decl): Here.  Tidy formatting slightly.
1694
1695 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
1696
1697         * decl.c (add_binding): Don't complain about a redeclaration of a
1698         semantically identical typedef in a local scope.
1699
1700 1999-05-28  Nathan Sidwell  <nathan@acm.org>
1701
1702         * decl.c (complete_array_type): Allocate off same obstack. Fix
1703         DO_DEFAULT comment to match reality.
1704
1705         * friend.c (make_friend_class): Fix diagnostic typo.
1706
1707 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
1708
1709         * decl.c (lookup_namespace_name): Handle getting a
1710         TEMPLATE_ID_EXPR.
1711         (expand_static_init): Don't call pushdecl for implicitly declared
1712         `atexit' used to register destructors.
1713
1714 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
1715
1716         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
1717         intialize a vtable.
1718
1719         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
1720         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
1721         by combining TEMPLATE_INFO and LEVEL into a single union.
1722         (DECL_TEMPLATE_INFO): Reformat.
1723         (DECL_SAVED_TREE): Document.
1724         (DECL_TEMPLATE_INJECT): Remove.
1725         * class.c (finish_struct): Remove code to deal with
1726         DECL_TEMPLATE_INJECT. 
1727
1728         * decl.c (maybe_process_template_type_declaration): Handle all new
1729         types in templates uniformly.
1730         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
1731         DECL_CONTEXT.
1732         * pt.c (lookup_template_class): Inject template instantiations of
1733         forward-declarations.
1734         (instantiate_class_template): Remove code processing
1735         DECL_TEMPLATE_INJECT.
1736         
1737         * pt.c (lookup_template_class): Tweak lookup to find member
1738         templates.
1739
1740         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
1741         ASM_CV_QUAL.
1742         * semantics.c (finish_asm_stmt): Make strings permanent if they're
1743         used in a template.
1744         
1745 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
1746
1747         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
1748         parts of pointer to data member types.
1749
1750 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
1751
1752         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
1753         and then make it look like `abort'.  Just use `abort' instead.
1754         
1755         * typeck.c (build_static_cast): Don't allow static_casts that cast
1756         away constness.
1757         (casts_away_constness_r): New function.
1758         (casts_away_constness): Likewise.
1759
1760         * decl.c (lookup_tag): Remove code no longer needed after
1761         name-lookup improvements.
1762         * decl2.c (handle_class_head): Make error-recovery more robust.
1763         * friend.c (make_friend_class): Reject templated typename types.
1764         * lex.c (is_global): A template parameter isn't global.
1765         * parse.y (class_head): Robustify.
1766         * parse.c: Regenerated.
1767         
1768 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
1769
1770         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
1771         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
1772         
1773         * cp-tree.h (push_nested_namespace): Declare.
1774         (pop_nested_namespace): Likewise.
1775         * decl.c (push_nested_namespace): New function.
1776         (pop_nested_namespace): Likewise.
1777         * pt.c (instantiate_class_template): Use them.
1778
1779         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
1780
1781         * cp-tree.h (cplus_expand_constant): Declare.
1782         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
1783         converted from one pointer-to-object type to another.
1784         * expr.c (cplus_expand_constant): Don't make it static.
1785         * typeck.c (build_component_ref): Don't crash when presented with
1786         a component which is a TEMPLATE_DECL.
1787         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
1788         cast from a pointer-to-member constant to its own type does not
1789         result in a valid non-type template argument.
1790
1791 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
1792             Nathan Sidwell  <nathan@acm.org>
1793         
1794         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
1795         * cp-tree.h: Fix typo in documentation on pointers-to-members.
1796         (cp_build_qualified_type): Make it a macro.
1797         (cp_build_qualified_type_real): Declare.
1798         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
1799         problem with template parameters and restrict-qualification.
1800         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
1801         * hash.h: Regenerated.
1802         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
1803         the enumeration.
1804         (NORID): Remove definition.
1805         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
1806         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
1807         (fn_type_unification): Check that the function type resulting from
1808         the deduction is legal.
1809         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
1810         (unify): Use cp_build_qualified_type_real.
1811         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
1812         (cp_build_qualified_type): Rename to ...
1813         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
1814         and modify appropriately.
1815         
1816         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
1817         reveal optimization opportunities.
1818
1819         * pt.c (tsubst): Don't issue error messages when we're not
1820         complaining, even if we see a qualified function type.
1821         (check_cv_quals_for_unify): Don't allow a qualified function
1822         type.
1823
1824 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
1825
1826         * class.c (instantiate_type): Downgrade errors for object-dependent
1827         memfn refs to pedwarn.
1828
1829 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
1830
1831         * decl.c (grokdeclarator): Don't treat [] as indicating a
1832         zero-sized array in a typedef.
1833
1834         * call.c (build_object_call): Don't look at DECL_NAME for a type.
1835         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
1836         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
1837
1838         * pt.c (for_each_template_parm): Rework to match documentation.
1839         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
1840
1841 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
1842
1843         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
1844
1845         * class.c (finish_base_struct): Allow non-COM bases for COM classes
1846         except at the leftmost position.
1847         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
1848         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
1849         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
1850
1851         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
1852         (build_cplus_new): Make sure that what we return is of the right type.
1853
1854 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
1855
1856         * cp-tree.h (make_ptrmem_cst): New function.
1857         * expr.c (cplus_expand_constant): Split out from ...
1858         (cplus_expand_expr): Here.  Use cplus_expand_constant.
1859         (init_cplus_expand): Set lang_expand_constant.
1860         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
1861
1862         * tree.c (make_ptrmem_cst): Define.
1863         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
1864         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
1865
1866 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
1867
1868         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
1869
1870         * decl2.c (start_static_storage_duration_function): Fix comment.
1871         (finish_file): Create static storage duration functions lazily.
1872
1873 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
1874
1875         Implement anonymous structs.
1876         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
1877         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
1878         * class.c (finish_struct_1): Remove redundant check for anon struct.
1879         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
1880         (check_tag_decl): Check for anonymous struct here.
1881         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
1882         * init.c (sort_member_init, emit_base_init): Handle getting fields
1883         as well as names in current_member_init_list.
1884         (perform_member_init): Handle getting an anon aggr.
1885         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
1886         (do_build_copy_constructor): Likewise.
1887
1888 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
1889
1890         * tree.c (cp_build_qualified_type): Don't allow qualified function
1891         types.
1892
1893 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
1894
1895         * gxxint.texi: Fix typo.
1896
1897 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
1898
1899         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
1900         * class.c (finish_struct_1): Use CLASS_TYPE_P.
1901         * ptree.c (print_lang_type): Likewise.
1902         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
1903         IS_AGGR_TYPE_CODE.
1904         * typeck2.c (digest_init): Likewise.
1905
1906 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
1907
1908         * call.c (joust): Compare the types of the conv ops, not the
1909         target types of the conversions.
1910
1911 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1912
1913         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
1914         was not given.
1915
1916 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
1917
1918         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
1919         * decl.c (grokfndecl): Don't allow inline declarations of friend
1920         template specializations, or friend template specializations with
1921         default arguments.
1922         * pt.c (tsubst): Handle substitution into array types that does
1923         not yield a fixed upper bound, even when not processing a
1924         template.
1925         (tsubst_copy): Deal with the fact that the second operand to a
1926         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
1927         * search.c (marked_pushdecls_p): Don't descend into
1928         TEMPLATE_TYPE_PARMs and the like.
1929         (unmarked_pushdecls_p): Likewise.
1930         
1931         * call.c (build_over_call): Don't throw away
1932         initializations/copies of empty classes; use MODIFY_EXPR and
1933         INIT_EXPR as for non-empty classes.
1934         * class.c (finish_struct_1): Put the padding byte for an empty
1935         class on the TYPE_NONCOPIED_PARTS list for the class.
1936
1937 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
1938
1939         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
1940         indicate a reference to a field that is a qualified name.
1941
1942 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
1943
1944         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
1945         ASM_OUTPUT_CONSTRUCTOR.
1946
1947         * friend.c (do_friend): Add attrlist arg.  Remove support for
1948         getting a non-decl as 'decl'.
1949         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
1950         rtl.
1951         (grokdeclarator): Adjust.
1952         * cp-tree.h: Adjust.
1953
1954 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
1955
1956         * cp-tree.h (permanent_p): New function.
1957         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
1958         possibly complex tree node.
1959         * tree.c (mapcar): Adjust comments, and follow coding standards in
1960         conditional.
1961         (permanent_p): New function.
1962
1963 1999-05-13  Per Bothner  <bothner@cygnus.com>
1964
1965         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
1966         primitive Java types, if we actually see `extern "Java"'.
1967
1968 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1969
1970         * lang-specs.h: Pass -$ to the preprocessor.
1971
1972 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
1973
1974         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
1975         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
1976         (resolve_offset_ref): Don't handle a raw baselink.
1977         * cvt.c (build_expr_type_conversion): Likewise.
1978         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
1979         convert_for_initialization): Likewise.
1980         * class.c (instantiate_type): Handle seeing a baselink under an
1981         OFFSET_REF.
1982         * error.c (dump_expr): Likewise.        
1983         * pt.c (for_each_template_parm): Likewise.
1984         (resolve_overloaded_unification): Likewise.
1985         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
1986         * typeck.c (expr_sizeof): Also complain about other permutations
1987         of overloaded functions.
1988
1989 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
1990
1991         * init.c (resolve_offset_ref): Don't return a raw method.
1992         Use BASELINK_P.
1993         * typeck.c (decay_conversion): Don't handle a raw method.
1994         Resolve all OFFSET_REFs.
1995         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
1996         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
1997         same_type_p for pmf bits.  Don't use build_binary_op to compare
1998         raw pointers to methods.
1999         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
2000         to decide when to call resolve_offset_ref.
2001         (build_c_cast, convert_for_initialization): Likewise.
2002         * cvt.c (build_expr_type_conversion): Likewise.
2003
2004 1999-05-06  Nathan Sidwell  <nathan@acm.org>
2005
2006         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
2007
2008 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
2009
2010         * decl2.c (start_objects): Don't let static constructors and
2011         destructors get inlined.
2012
2013         * parse.y (nested_name_specifier): Make sure ordinary types are
2014         complete, just like template types.
2015         * parse.c: Regenerated.
2016
2017         * pt.c (check_explicit_specialization): Improve error messages.
2018
2019 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2020
2021         * typeck.c (string_conv_p): Use same_type_p to check whether we
2022         try to convert between char and wchar_t.
2023
2024 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
2025
2026         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
2027         lookup to error_mark_node here.
2028         (lookup_member): Revise documentation.  Add comments.  Don't set
2029         the TREE_TYPE to error_mark_node here, and don't build up an extra
2030         TREE_LIST for ambiguous lookups.
2031         (setup_class_bindings): Adjust accordingly.
2032         (push_class_decls): Revise out-of-date comments.
2033         
2034         * typeck.c (build_const_cast): Tighten checks for legality.
2035
2036 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2037
2038         * init.c (build_member_call): Lookup names coming from
2039         namespace-scoped LOOKUP_EXPR.
2040
2041 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
2042
2043         * gxxint.texi: Add documentation for 'I'.
2044
2045 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2046
2047         * tinfo.cc (operator==): Qualify type_info with std::.
2048
2049 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
2050
2051         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
2052         (DECL_COMDAT): Remove definition.
2053
2054 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
2055
2056         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
2057         change.
2058
2059 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
2060
2061         * class.c (build_vtable): Use build_lang_decl when building
2062         vtables, not just build_decl.
2063         (prepare_fresh_vtable): Likewise.
2064         * decl.c (wrapup_globals_for_namespace): Mark vtables as
2065         DECL_EXTERNAL when calling wrapup_global_declarations.
2066         * decl2.c (priority_info_s): Add initializations_p and
2067         destructions_p members.
2068         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
2069         when deciding what vtables to write out.
2070         (ssdf_decls): New variable.
2071         (ssdf_decls_used): Likewise.
2072         (start_static_storage_duration_function): Deal with being called
2073         multiple times.  Avoid inlining this function.
2074         (generate_inits_for_priority): Deal with reuse of priority map.
2075         (get_priority_info): Clear initializations_p and destructions_p.
2076         (do_static_initialization): Tweak comment.
2077         (do_static_destruction): Likewise.  Fix condition on sentries for
2078         destruction.
2079         (generate_ctor_or_dtor_function): Call all of the static storage
2080         duration functions.
2081         (generate_ctor_or_dtor_function_for_priority): Check
2082         initializations_p and destructions_p to see what priorities need
2083         initialization functions.
2084         (finish_file): Rework to generate multiple static storage duration
2085         functions, rather than just one.
2086
2087         * typeck.c (build_const_cast): Tweak last change to handle
2088         templates correctly.
2089
2090         * typeck.c (build_const_cast): Disallow use of const_cast to
2091         anything but a pointer or reference type.
2092
2093 1999-04-30  Nathan Sidwell  <nathan@acm.org>
2094
2095         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
2096         signature type.
2097
2098 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
2099
2100         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
2101         (finish_file): Indent comments properly.
2102
2103 1999-04-29  Richard Henderson  <rth@cygnus.com>
2104
2105         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
2106         (do_static_destruction): Likewise.
2107
2108 1999-04-29  Nathan Sidwell  <nathan@acm.org>
2109
2110         * cp-tree.h (TYPE_NOTHROW_P): New macro.
2111         * decl2.c (delete_sanity): Warn on deleting void *.
2112         * init.c (build_new_1): Use TYPE_NOTHROW_P.
2113         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
2114         throwing operator new.
2115
2116 1999-04-28  Nathan Sidwell  <nathan@acm.org>
2117
2118         * cp-tree.h (build_component_addr): Remove prototype.
2119         * typeck.c (build_component_addr): Make static. Remove MSG
2120         argument.
2121         (build_component_addr): Remove MSG parameter, clean up
2122         comment.
2123         (build_x_function_call): Use cp_error.
2124         (build_unary_op): Adjust call of build_component_addr.
2125
2126 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
2127
2128         * pt.c (tsubst_friend_class): Check for NULL.
2129
2130 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2131
2132         * search.c (binfo_for_vtable): Initialize bfvi.var.
2133
2134 1999-04-27  Nathan Sidwell  <nathan@acm.org>
2135
2136         * rtti.c (build_x_typeid): Check rtti is enabled.
2137
2138 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
2139
2140         * search.c (is_subobject_of_p): Make sure we're looking at the
2141         right baseclasses.
2142
2143 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
2144
2145         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
2146
2147 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
2148
2149         * decl2.c (finish_file): Tweak handling of extern inlines so that
2150         they are not unnecessarily put out.
2151
2152         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
2153         such as base classes.
2154
2155 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
2156
2157         * tree.c (build_exception_variant): Fix typo: use the chain of U,
2158         not trying V, while cycling through U.
2159
2160 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
2161
2162         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
2163         preserves_first_arg.  Enlarge dummy accordingly.
2164         (DECL_TINFO_FN_P): New macro.
2165         (SET_DECL_TINFO_FN_P): Likeiwse.
2166         (DECL_RETURNS_FIRST_ARG): Remove.
2167         (DECL_PRESERVES_THIS): Likewise.
2168         (DECL_INIT_PRIORITY): New macro.
2169         (finish_struct_1): Change prototype.
2170         (cat_namespace_levels): Remove prototype.
2171         (vtable_decl_p): New prototype.
2172         (vtype_decl_p): Likewise.
2173         (sigtable_decl_p): Likewise.
2174         (walk_globals_pred): New typedef.
2175         (walk_globals_fn): Likewise.
2176         (walk_globals): New prototype.
2177         (walk_namespaces_fn): New typedef.
2178         (walk_namespaces): New prototype.
2179         (wrapup_globals_for_namespace): Likewise.
2180         (walk_vtables): Remove prototype.
2181         (walk_sigtables): Likewise.
2182         (instantiate_pending_templates): New prototype.
2183         * class.c (finish_struct_1): Don't return a value.
2184         * decl.h (pending_statics): Remove declaration.
2185         * decl.c (walk_namespaces_r): New function.
2186         (walk_globals_r): Likewise.
2187         (vtable_decl_p): Likewise.
2188         (vtype_decl_p): Likewise.
2189         (sigtable_decl_p): Likewise.
2190         (walk_namespaces): Likewise.
2191         (walk_globals_data): New type.
2192         (walk_globals): New function.
2193         (wrapup_globals_for_namespace): Likewise.
2194         (expand_static_init): Remove assertion.  Remove redundancy in
2195         conditional.  Don't put static data members in static_aggregates
2196         Tidy.
2197         (finish_function): Remove redundancy in conditional.  Don't set
2198         DECL_RETURNS_FIRST_ARG.
2199         (cat_namespace_levels): Remove.
2200         * decl2.c: Include splay-tree.h and varray.h.
2201         (priority_info_s): New structure.
2202         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
2203         conventions.
2204         (prune_vtable_vardecl): Likewise.
2205         (finish_sigtable_vardecl): Likewise.
2206         (setup_initp): Remove.
2207         (do_dtors): Remove.
2208         (do_ctors): Remove.
2209         (start_static_storage_duration_function): New function.
2210         (generate_inits_for_priority): Likewise.
2211         (finish_static_storage_duration_function): Likewise.
2212         (get_priority_info): Likewise.
2213         (do_static_initialization): Likewise.
2214         (do_static_destruction): Likewise.
2215         (do_static_initialization_and_destruction): Likewise.
2216         (generate_ctor_or_dtor_function): Likewise.
2217         (generate_ctor_and_dtor_functions_for_priority): Likewise.
2218         (pending_statics): Make it a varray.
2219         (pending_statics_used): New variable.
2220         (saved_inlines): Make it a varray.
2221         (saved_inlines_used): New variable.
2222         (finish_static_data_member): Change method of updating
2223         pending_statics.
2224         (mark_inline_for_output): Remove #if 0'd code.  Change method of
2225         updating saved_inlines.
2226         (walk_vtables): Remove.
2227         (walk_sigtables): Likewise.
2228         (import_export_decl): Use DECL_TINFO_FN_P.
2229         (pending_templates): Remove declaration.
2230         (maybe_templates): Likewise.
2231         (static_aggregates_initp): Likewise.
2232         (setup_initp): Likewise.
2233         (finish_objects): Simplify.
2234         (INITIALIZE_P_IDENTIFIER): New macro.
2235         (PRIORITY_IDENTIFIER): New macro.
2236         (SSDF_IDENTIFIER): New macro.
2237         (initialize_p_decl): New variable.
2238         (priority_decl): Likewise.
2239         (ssdf_decl): Likewise.
2240         (priority_info_map): Likewise.
2241         (finish_file): Recode output of static intializers and other
2242         file-scope finalization tasks.
2243         * error.c (OB_END_TEMPLATE_ID): New macro.
2244         (dump_type_real): Use it.
2245         (dump_decl): Likewise.
2246         (dump_function_name): Likewise.
2247         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
2248         interface.
2249         (check_newline): Use walk_globals, not walk_vtables.
2250         * pt.c (pending_tempalte_expansions): Remove.
2251         (set_vardecl_interface_info): Likewise.
2252         (pending_templates): Make static.
2253         (maybe_templates): Likewise.
2254         (instantiate_class_template): Adjust call to finish_struct_1.
2255         (instantiate_pending_templates): New function.
2256         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
2257         * tree.c (static_aggregates_initp): Remove.
2258         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
2259         instead.
2260         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
2261
2262         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
2263         with the RTL code RETURN.
2264         * hash.h: Regenerated.
2265         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
2266         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
2267         * parse.c: Regenerated.
2268         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
2269         it.
2270         (inline_parm_levels): New variable.
2271         (inline_parm_levels_used): Likewise.
2272         (maybe_begin_member_template_processing): Update them.
2273         (maybe_end_member_template_processing): Use them, rather than
2274         guessing how many levels to pop.
2275
2276         * decl.c (make_typename_type): Tighten error-checking.
2277
2278 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
2279
2280         * cp-tree.h (build_binary_op): Remove unneeded parameter.
2281         * class.c (build_vrable_entry_ref): Adjust call to
2282         build_binary_op.
2283         * decl.c (expand_static_init): Likewise.
2284         (grokdeclarator): Likewise.
2285         (finish_function): Likewise.
2286         * decl2.c (delete_sanity): Likewise.
2287         (do_dtors): Likewise.
2288         (do_ctors): Likewise.
2289         * error.c (dump_type_suffix): Likewise.
2290         * expr.c (cplus_expand_expr): Likewise.
2291         * init.c (resolve_offset_ref): Likewise.
2292         (build_new): Likewise.
2293         (build_new_1): Likewise.
2294         (build_vec_delete_1): Likewise.
2295         (expand_vec_init_catch_clause): Likewise.
2296         (build_delete): Likewise.
2297         * pt.c (tsubst): Likewise.
2298         * rtti.c (synthesize_tinfo_fn): Likewise.
2299         * search.c (expand_upcast_fixups): Likewise.
2300         (expand_direct_vtbls_init): Likewise.
2301         * typeck.c (get_member_function_from_ptrfunc): Likewise.
2302         (build_binary_op_nodefault): Likewise.
2303         (point_int_sum): Likewise.
2304         (pointer_diff): Likewise.
2305         (build_unary_op): Likewise.
2306         (build_modify_expr): Likewise.
2307         (get_delta_difference): Likewise.
2308         (build_ptrmemfunc): Likewise.
2309         (expand_ptrmemfunc_cst): Likewise.
2310
2311 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
2312
2313         * decl.c (grokfndecl): Always call cplus_decl_attributes.
2314         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
2315
2316 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
2317
2318         * cp-tree.h (finish_static_data_member_decl): New function.
2319         * decl2.c (finish_static_data_member_decl): Split out from ...
2320         (grokfield): Here.
2321         * pt.c (instantiate_class_template): Use it here instead of
2322         trying to fake it.
2323         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
2324         finish_static_data_member_decl will do that.  Explicit set
2325         DECL_EXTERNAL to match non-template processing.
2326
2327 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
2328
2329         * cp-tree.h (finish_class_definition): Add parameter.
2330         * parse.y (structsp): Use it.  Don't call pop_scope here.
2331         * parse.c: Regenerated.
2332         * semantics.c (finish_class_definition): Pop it here.
2333
2334 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
2335
2336         * decl.c (xref_tag): Revise handling of nested template
2337         declarations.
2338         * pt.c (check_explicit_specialization): Tweak handling of friend
2339         templates in template classes.
2340         (tsubst_friend_class): Handle friend declarations for nested
2341         member template classes.
2342
2343 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
2344
2345         * class.c (finish_struct): Remove unused variable.
2346         (pushclass): Likewise.
2347         (invalidate_class_lookup_cache): Likewise.
2348         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
2349         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
2350         doesn't get obliterated.
2351         (make_typename_type): Handle template classes correctly.
2352
2353         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
2354         (storetags): Declare.
2355         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
2356         (pushclass): Likewise.  Use storetags to install tag declarations,
2357         not pushtag.
2358         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
2359         * decl.c (storetags): Make it global.
2360         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
2361         implicit typename declaration.
2362         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
2363         * method.c (hack_identifier): Likewise.
2364         * search.c (lookup_member): Likewise.
2365
2366         * decl.c (warn_about_implicit_typename_lookup): New function.
2367         (lookup_name_real): Use it.  Rework handling of implicit typename
2368         extension.
2369
2370 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
2371
2372         * cp-tree.h (lookup_nested_field): Remove.
2373         * class.c (push_nested_class): Handle UNION_TYPEs.
2374         (pop_nested_class): Likewise.
2375         * decl.c (lookup_name_real): Don't call lookup_nested_field.
2376         (start_decl): Use push_nested_class, not just pushclass.
2377         (cp_finish_decl): Use pop_nested_class, not just popclass.
2378         * search.c (lookup_nested_field): Remove.
2379
2380         * cp-tree.h (lang_type): Add documentation.
2381         * decl2.c (handle_class_head): Create template declarations here,
2382         as appropriate.
2383         * parse.y (class_head): Return whether or not we entered a new
2384         scope, as well as the type named.
2385         (named_class_head): Likewise.
2386         (named_complex_class_head_sans_basetype): Likewise.
2387         (structsp): Adjust accordingly.  Pop scope when required.
2388         * parse.c: Regenerated.
2389         * pt.c (check_default_tmpl_args): Robustify.
2390         (redeclare_class_template): Likewise.
2391         (instantiate_class_template): An instantiation of an
2392         anonymous union is itself an anonymous union.
2393         * semantics.c (begin_class_definition): Don't create template
2394         declarations here.
2395
2396 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
2397
2398         * parse.y (after_type_declarator_intern): New nonterminal.
2399         (after_type_declarator): Use it.
2400         (direct_after_type_declarator): Likewise.  Move above
2401         nonnested_type to fix reduce/reduce conflict resolution.
2402         (declmods): Reducing from just 'attributes' has EMPTY precedence.
2403         * Makefile.in (CONFLICTS): Update.
2404
2405         * decl.c (define_label): Downgrade error for jumping over a
2406         non-POD decl to pedwarn.
2407
2408 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
2409
2410         * cp-tree.h (popclass): Change declaration.
2411         (pop_nested_class): Likewise.
2412         (poplevel_class): Remove declaration.
2413         * call.c (convert_default_argument): Pass no arguments to
2414         popclass.
2415         * class.c (finish_struct_1): Likewise.
2416         (finish_struct): Likewise.
2417         (popclass): Remove argument.  Simplify code accordingly.
2418         (pop_nested_class): Likewise.
2419         * decl.c (poplevel_class): Declare it here, and make it static.
2420         (poplevel): Handle class scopes.
2421         (poplevel_class): Don't take an rgument.  Simplify.
2422         (pop_everything): Pass no arguments to pop_nested_class.
2423         (cp_finish_decl): Pass no arguments to popclass.
2424         (grokdeclarator): Pass no arguments to pop_nested_class.
2425         (finish_function): Likewise.
2426         * decl2.c (grokfield): Likewise.
2427         (pop_scope): Pass no arguments to popclass.
2428         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
2429         * pt.c (instantiate_class_template): Move call to pushclass, and
2430         document.  Pass no arguments to popclass.
2431         (regenerate_decl_from_template): Likewise.
2432
2433 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
2434
2435         * typeck.c (build_unary_op): Handle taking the address of a unique
2436         bound non-static member function.
2437
2438 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2439
2440         * lang-options.h (-Wdeprecated): New flag.
2441         * decl2.c (warn_deprecated): New flag.
2442         (lang_decode_option): Deprecated this-is-variable,
2443         external-templates, alt-external-templates.
2444         Support -Wdeprecated.
2445         * errfn.c (cp_deprecated): New function.
2446
2447 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
2448
2449         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
2450         of the decls themselves.
2451
2452         * pt.c (tsubst_function_type): Copy attributes over.
2453
2454         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
2455         and com_interface.
2456         * cp-tree.h: Add prototype.
2457         * decl.c (init_decl_processing): Set valid_lang_attribute.
2458
2459 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
2460
2461         * class.c (finish_struct_1): Look at the const-ness of the field's
2462         type, not the TREE_READONLY-ness of the declaration.
2463         * method.c (synthesize_method): Likewise.
2464         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
2465         creating new declarations.
2466
2467 1999-04-13  Mike Stump  <mrs@wrs.com>
2468
2469         * decl2.c (import_export_decl): Because vtables always reference
2470         virtual functions, even if they are inlined, don't allow
2471         -fno-implement-inlines to not emit them, instead, emit them with
2472         the vtable.
2473         * decl.c (start_function): Likewise.
2474
2475 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
2476
2477         * cp-tree.h (struct lang_type): Add com_interface.
2478         (CLASSTYPE_COM_INTERFACE): New macro.
2479         * class.c (set_rtti_entry): COM interface classes have no RTTI
2480         entries in their vtables; adjust.
2481         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
2482         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
2483         finish_struct_1): Likewise.
2484         * decl2.c (mark_vtable_entries): Likewise.
2485         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
2486         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
2487         expand_upcast_fixups): Likewise.
2488         * tree.c (debug_binfo): Likewise.
2489
2490         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
2491         * typeck.c (comptypes): If we get it, ignore attributes.
2492         * class.c (instantiate_type): Use BASELINK_P.  Change complain
2493         parameter to flags; 2 means ignore attributes.
2494         * call.c (build_op_delete_call): Pass it.
2495
2496         * decl.c (xref_tag): Only complain once about using a typedef-name
2497         with 'struct'.  Downgrade to pedwarn.
2498
2499         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
2500
2501         * parse.y (absdcl_intern): New nonterminal.
2502         (absdcl, direct_abstract_declarator): Use it.
2503
2504         * pt.c (lookup_template_class): Look through implict typename.
2505
2506 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
2507
2508         * friend.c (add_friend): Deal gracefully with error_mark_node.
2509         * method.c (build_overload_value): Handle pointers-to-members as
2510         template parameters.
2511
2512         * decl.c (push_binding): Fix typo in comment.
2513
2514 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
2515
2516         * error.c (dump_type_real): If a typename is a template-id, put
2517         out the template arguments.
2518         (dump_expr): Handle TEMPLATE_ID_EXPR.
2519         * pt.c (lookup_template_class): Now that full arguments are
2520         available everywhere, remove code that tried to guess them.
2521
2522 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
2523
2524         * decl.c (make_typename_type): Complain if we don't find a type
2525         when trying to make a typename type for a non-template type.
2526
2527 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
2528
2529         * decl.c (start_decl): Pass attributes to grokdeclarator.
2530         (grokdeclarator): Handle attributes on constructor-syntax
2531         initializers.
2532
2533 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
2534
2535         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
2536         don't have types.
2537
2538         * search.c (template_self_reference_p): Tweak.
2539
2540 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
2541
2542         * init.c (build_offset_ref): Don't build yet another weird data
2543         structure to describe overloaded functions.
2544
2545 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
2546
2547         * cp-tree.h (BASELINK_P): New macro.
2548         (SET_BASELINK_P): Likewise.
2549         * init.c (build_member_call): Remove needless assignment in if
2550         statement.
2551         * search.c (lookup_field_r): Fix handling when we are looking
2552         specifically for a type; these are not hidden by functions and
2553         variables.
2554         (lookup_member): Use SET_BASELINK_P.
2555         * tree.c (is_overloaded_fn): Use BASELINK_P.
2556         (really_overloaed_fn): Likewise.
2557         (get_first_fn): Likewise.
2558
2559 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
2560
2561         * decl.c (lookup_name_current_level): Tweak, and improve
2562         documentation.
2563
2564         * class.c (maybe_fixup_vptrs): Remove declaration.
2565         (build_class_init_list): Likewise.
2566         * decl.c (pushdecl_class_level): Call check_template_shadow here
2567         ...
2568         (push_class_level_binding): ... not here.
2569         * search.c (dfs_push_type_decls): Only avoid
2570         template-self-reference TYPE_DECLs if they are from base classes.
2571
2572 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
2573
2574         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
2575         nodes.  Tidy.
2576
2577 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
2578
2579         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
2580         (finish_struct_1): Don't call build_class_init_list.
2581
2582 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
2583
2584         * tinfo.h (__class_type_info): Fix illegal declaration.
2585
2586         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
2587         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
2588         (IDENTIFIER_CLASS_VALUE): Improve documentation.
2589         (is_properly_derived_from): Declare.
2590         (invalidate_class_lookup_cache): Likewise.
2591         (maybe_maybe_note_name_used_in_class): Likewise.
2592         (note_name_declared_in_class): Likewise.
2593         (push_using_decl): Remove duplicate declaration.
2594         (id_in_current_class): Remove declaration.
2595         (push_class_binding): Change prototype.
2596         (clear_identitifer_class_values): Declare.
2597         * call.c (is_properly_derived_from): Make it global.
2598         (build_new_function_call): Be careful about updating candidates.
2599         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
2600         asked to make illegal calls.
2601         * class.c: Include splay-tree.h.
2602         (class_stack_node): Add names_used slot.
2603         (check_member_decl_is_same_in_complete_scope): Remove.
2604         (add_method): Fix comment.  Push the declaration into class
2605         scope.
2606         (finish_struct_1): When popping the class, pop the bindings too.
2607         Remove check for data member/function member conflict.
2608         (finish_struct): Remove calls to
2609         check_member_decl_is_same_in_complete_scope.  Change calls to
2610         popclass.
2611         (pushclass): Clear names_used in the class stack entry.
2612         Use invalidate_class_lookup_cache to remove cached entries, rather
2613         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
2614         before entering a new class.  Remove dead code.  Don't mess with
2615         current_function_decl when pushing declarations.
2616         (invalidate_class_lookup_cache): New function, split out from ...
2617         (popclass): Here.  Clean up names_used on our way out.
2618         (instantiate_type): Adjust.
2619         (build_self_reference): Don't push the declaration here.
2620         (maybe_note_name_used_in_class): New function.
2621         (note_name_declared_in_class): Likewise.
2622         * decl.c (add_binding): Change prototype.
2623         (find_class_binding_level): New function.
2624         (innermost_nonclass_level): Likewise.
2625         (current_binding_level): Update documentation.
2626         (inner_binding_level): Remove.  Replace with current_binding_level
2627         throughout.
2628         (push_binding_level): Remove special handling of
2629         class_binding_level.
2630         (pop_binding_level): Likewise.  Use find_class_binding_level.
2631         (suspend_binding_level): Likewise.
2632         (global_bindings_p): Use innermost_nonclass_level.
2633         (toplevel_bindings_p): Likewise.
2634         (namespace_bindings_p): Likewise.
2635         (pseudo_global_level_p): Likewise.
2636         (push_binding): Clear INHERITED_VALUE_BINDING_P.
2637         (add_binding): Check for illegal multiple declarations.  Return a
2638         value indicating whether or not the new binding was legal.
2639         (push_local_binding): Skip over class binding levels.  Check
2640         return value from add_binding.
2641         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
2642         note_name_declared_in_class.
2643         (pushlevel_class): Remove "fake out the rest of the compiler"
2644         code.
2645         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
2646         (clear_identifier_class_values): New function.
2647         (pop_from_top_level): Use it.
2648         (pop_everything): Tweak.
2649         (maybe_process_template_type_declaration): Don't push the
2650         declaration for the template here.
2651         (pushtag): Don't push tag declarations into class scope here.
2652         (pushdecl): Apply DeMorgan's law for readability.
2653         (pushdecl_class_level): Remove special-case code for
2654         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
2655         (push_class_level_bindng): Deal with inherited bindings.
2656         (lookup_name_real): Remove special-case code for
2657         TYPE_BEING_DEFINED, and some implicit typename magic.
2658         (grokdeclarator): Handle COMPONENT_REF for a template function.
2659         (build_enumerator): Don't call pushdecl_class_level here.
2660         (id_in_current_class): Remove.
2661         * decl2.c (grokfield): Don't call pushdecl_class_level or
2662         check_template_shadow.
2663         * errfn.c (cp_file_of): Don't declare.
2664         (cp_line_of): Likewise.
2665         * error.c (dump_decl): Handle an OVERLOAD.
2666         (cp_file_of): Likewise.
2667         (cp_line_of): Likewise.
2668         * init.c (build_member_call): Handle a COMPONENT_REF.
2669         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
2670         pushdecl_class_level.
2671         * method.c (hack_identifier): Build COMPONENT_REFs for references
2672         to member templates as well as member functions.  Remove dead
2673         code.
2674         * parse.y (left_curly): Remove.
2675         (nonnested_type): Call maybe_note_name_used_in_class, not
2676         pushdecl_class_level.
2677         * parse.c: Regenerated.
2678         (nested_name_specifier_1): Likewise.
2679         * pt.c (check_explicit_specialization): Adjust, for robustness.
2680         (check_template_shadow): Handle OVERLOADs.
2681         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
2682         TEMPLATE_DECL, if appropriate.
2683         * search.c (envelope_add_decl): Remove.
2684         (dfs_pushdecls): Likewise.
2685         (dfs_compress_decls): Likewise.
2686         (dfs_push_decls): New function.
2687         (dfs_push_type_decls): Likewise.
2688         (setup_class_bindings): Likewise.
2689         (template_self_reference_p): Likewise.
2690         (lookup_field_r): Use it.
2691         (looup_member): Remove old comment.  Deal with ambiguity.
2692         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
2693         and remove envelope processing.
2694         * semantics.c (begin_class_definition): Let pushclass push
2695         declarations for base classes.
2696         (finish_member_declaration): Push declarations into class scope.
2697         * typeck.c (build_component_ref): Just put an OVERLOAD into the
2698         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
2699         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
2700         * Makefile.in (class.o): Depend on splay-tree.h.
2701
2702 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
2703
2704         * cvt.c (convert_pointer_to_real): Use same_type_p.
2705         * typeck.c (comp_target_types): Use same_type_p.
2706
2707 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
2708
2709         * semantics.c (begin_inline_definitions,
2710         finish_inline_definitions): Rename from finish_default_args and
2711         begin_inline_definitions, respectively, to something that isn't a
2712         total lie.  :)
2713         * parse.y (structsp): Adjust.
2714
2715         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
2716         (list_hash_lookup): Likewise.
2717         (hash_tree_chain): Adjust.
2718         * pt.c (tsubst): Adjust.
2719         (tsubst_arg_types): Use plain hash_tree_cons.
2720         * cp-tree.h (hash_tree_cons_simple): Lose.
2721         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
2722
2723 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2724
2725         * Makefile.in (hash.h): Generate using gperf language 'C', not
2726         'KR-C', so gperf uses the `const' keyword on strings.
2727
2728         * gxx.gperf (resword): Const-ify a char*.
2729
2730 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
2731
2732         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
2733         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
2734         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
2735         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
2736         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
2737         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
2738         tree.c: Adjust.
2739
2740 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
2741
2742         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
2743
2744 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
2745
2746         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
2747
2748 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
2749
2750         * cp-tree.h (add_friend): Declare.
2751         (add_friends): Likewise.
2752         * friend.c (add_friend): Make it global.  Don't add to
2753         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
2754         (add_friends): Make it global.
2755         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
2756         befriending class is a template.
2757         * parse.y (component_decl_1): Fix typo in comment.
2758         * parse.c: Regenerated.
2759         * pt.c (instantiate_class_template): Use add_friend and
2760         add_friends rather that duplicating some of their functionality
2761         here.
2762
2763 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
2764
2765         * call.c (build_field_call): Unify 'this' and non-'this' cases.
2766
2767         * typeck.c (build_indirect_ref): Check for 'this' sooner.
2768
2769 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2770
2771         * call.c (op_error): Const-ify a char*.
2772         (add_candidate, source_type, add_warning): Add static prototype.
2773         (print_z_candidates): Const-ify a char*.
2774
2775         * class.c (resolve_address_of_overloaded_function,
2776         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
2777         (get_vtable_name, finish_struct_1): Const-ify a char*.
2778
2779         * cvt.c (convert_to_reference): Likewise.
2780
2781         * decl.c (redeclaration_error_message, record_builtin_type,
2782         record_unknown_type, member_function_or_else, bad_specifiers):
2783         Likewise.
2784         (find_binding, select_decl, unqualified_namespace_lookup,
2785         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
2786         Add static prototype.
2787         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
2788         implicitly_declare, record_builtin_java_type, define_function,
2789         grok_op_properties, tag_name): Const-ify a char*.
2790
2791         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
2792         (define_function, finish_builtin_type): Const-ify a char*.
2793         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
2794         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
2795         (file_name_nondirectory): Const-ify a char*.
2796         (init_filename_times): Don't prototype.
2797         (compiler_error): Prototype.
2798         (yyerror, init_repo): Const-ify a char*.
2799         (build_srcloc): Don't prototype.
2800         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
2801         Const-ify a char*.
2802         (warn_for_assignment): Don't prototype.
2803         (convert_for_initialization, readonly_error, check_for_new_type,
2804         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
2805         Const-ify a char*.
2806
2807         * decl2.c (acceptable_java_type, output_vtable_inherit,
2808         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
2809         merge_functions, decl_namespace, validate_nonmember_using_decl,
2810         do_nonmember_using_decl): Add static prototype.
2811         (lang_f_options): Const-ify a char*.
2812         (finish_builtin_type): Likewise.
2813         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
2814         prototype.
2815
2816         * errfn.c: Include cp-tree.h.
2817         (cp_thing): Add static prototype.
2818         (compiler_error): Don't protoptype.
2819         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
2820         passing it to `cp_thing'.
2821
2822         * error.c (interesting_scope_p): Add static prototype.
2823
2824         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
2825         a char*.
2826
2827         * init.c (compiler_error): Don't prototype.
2828         (member_init_ok_or_else): Const-ify a char*.
2829         (build_java_class_ref): Add static prototype.
2830
2831         * lex.c (compiler_error): Don't prototype.
2832         (get_time_identifier, interface_strcmp, extend_token_buffer,
2833         handle_cp_pragma): Const-ify a char*.
2834         (is_global, init_filename_times): Add static prototype.
2835         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
2836         (compiler_error): Change from fixed args to variable args.
2837         (yyerror): Const-ify a char*.
2838
2839         * parse.y (cond_stmt_keyword): Const-ify a char*.
2840         (parse_decl): Add static prototype.
2841
2842         * pt.c (template_args_equal, print_template_context): Likewise.
2843         (print_candidates, check_default_tmpl_args): Const-ify a char*.
2844         (instantiate_class_template): Likewise.
2845
2846         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
2847
2848         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
2849         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
2850
2851         * search.c (lookup_field_info, lookup_member): Likewise.
2852         (lookup_member): Cast the first argument of `bzero' to a PTR.
2853
2854         * sig.c (compiler_error): Don't prototype.
2855         (build_signature_pointer_or_reference_nam): Const-ify a char*.
2856         (get_sigtable_name, build_member_function_pointer): Likewise.
2857
2858         * tree.c (compiler_error): Don't prototype.
2859         (no_linkage_helper, build_srcloc): Add static prototype.
2860         (build_vbase_pointer_fields): Const-ify a char*.
2861         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
2862
2863         * typeck.c (compiler_error): Don't prototype.
2864         (convert_for_assignment): Const-ify a char*.
2865         (comp_cv_target_types): Add static prototype.
2866         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
2867         build_component_addr, build_unary_op, convert_for_initialization):
2868         Const-ify a char*.
2869
2870         * typeck2.c (ack): Add static prototype and change from fixed args
2871         to variable args.
2872         (readonly_error, check_for_new_type): Const-ify a char*.
2873
2874         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
2875         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
2876         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
2877         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
2878         gen_assign, GNU_xref_member): Const-ify a char*.
2879
2880 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2881
2882         * gxxint.texi: Remove old discussion on copying virtual bases.
2883
2884 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
2885
2886         * Make-lang.in: Remove all references to g++.o/g++.c.
2887         Link g++ from gcc.o.
2888
2889 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
2890
2891         * decl2.c (comdat_linkage): Treat vtables like functions.
2892
2893 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
2894
2895         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
2896
2897 1999-03-25  Nathan Sidwell  <nathan@acm.org>
2898
2899         * decl.c (init_decl_processing): Add `signed' type as a synonym
2900         for `int'.
2901
2902 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
2903
2904         * typeck.c (common_type): Handle cv-qual unification for pointers
2905         to members.
2906
2907         * decl.c (unqualified_namespace_lookup): Return error_mark_node
2908         on error.
2909         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
2910         * lex.c (do_identifier): If we got error_mark_node, call
2911         lookup_name again.
2912
2913 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2914
2915         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
2916         classes.
2917
2918 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
2919
2920         * decl.c (lookup_name_real): Do nested field lookup regardless of
2921         TYPE_BEING_DEFINED.
2922
2923 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
2924
2925         * cp-tree.h (lang_type): Remove has_assignment and
2926         has_real_assignment.  Add befriending_classes.
2927         (TYPE_HAS_ASSIGNMENT): Remove.
2928         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
2929         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
2930         (lang_decl): Document.
2931         (DECL_BEFRIENDING_CLASSES): New macro.
2932         (FRIEND_NAME): Move declaration to more obvious location.
2933         (FRIEND_DECLS): Likewise.
2934         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
2935         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
2936         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
2937         (grok_op_properties): Likewise.
2938         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
2939         (add_friend): Likewise.  Don't do weird things with assignment
2940         operators.  Update DECL_BEFRIENDING_CLASSES.
2941         (add_friends): Don't do weird things with assignment operators.
2942         (make_friend_class): Likewise.  Update
2943         CLASSTYPE_BEFRIENDING_CLASSES.
2944         * pt.c (instantiate_class_template): Don't set
2945         TYPE_HAS_ASSIGNMENT.
2946         (tsubst_copy): Substitute the TREE_TYPE for more unary
2947         expressions.
2948         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
2949         * search.c (protected_accessible_p): New function.
2950         (friend_accessible_p): Likewise.
2951         (accessible_p): Use them.
2952
2953 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
2954
2955         * pt.c (convert_nontype_argument): Don't create things that aren't
2956         PTRMEM_CSTs when applying a qualification conversion to a
2957         PTRMEM_CST.
2958
2959 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
2960
2961         * Makefile.in (OBJS): Don't mention hash.o.
2962         (OBJDEPS): Likewise.
2963
2964 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
2965
2966         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
2967         * decl.c (expand_static_init): Make sure we don't add any after
2968         then.
2969
2970         * decl.c (cp_finish_decl): Move intelligence about handling
2971         DECL_COMDAT for variables from here...
2972         * decl2.c (comdat_linkage): ...to here.
2973         (maybe_make_one_only): Tweak.
2974         (import_export_decl): Call comdat_linkage for variables, too.
2975         (finish_file): Handle template statics properly.
2976
2977 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
2978
2979         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
2980         Document internals of pointer-to-member-functions.
2981         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
2982         (PFN_FROM_PTRMEMFUNC): Likewise.
2983         (build_type_conversion): Remove unused parameter.
2984         (build_ptrmemfunc1): Declare.
2985         (expand_ptrmemfunc_cst): New function.
2986         (delta2_from_ptrmemfunc): Likewise.
2987         (pfn_from_ptrmemfunc): Likewise.
2988         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
2989         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
2990         (convert_to_reference): Remove unused parameter to
2991         build_type_conversion.
2992         (ocp_convert): Likewise.
2993         (build_user_type_conversion): Likewise.
2994         * error.c (dump_expr): Handle NULL pointer-to-member functions.
2995         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
2996         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
2997         open when handling pointer-to-member functions.
2998         * pt.c (convert_nontype_argument): Clean up error messages.  Be
2999         more stringent with pointers-to-members.
3000         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
3001         (build_unary_op): Tidy ever-so-slightly.
3002         (build_conditional_expr): Remove extra parameter to
3003         build_type_conversion.
3004         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
3005         we're using.
3006         (expand_ptrmemfunc_cst): Define.
3007         (delta2_from_ptrmemfunc): Likewise.
3008         (pfn_from_ptrmemfunc): Likewise.
3009
3010 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
3011
3012         * init.c (build_member_call): Handle template-id expressions
3013         correctly.
3014         * typeck.c (build_x_function_call): Likewise.
3015
3016 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
3017
3018         * friend.c (make_friend_class): Avoid core dump when
3019         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
3020
3021 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
3022
3023         * decl.c (start_function): Suppress normal linkage heuristics
3024         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
3025
3026 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
3027
3028         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
3029         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
3030
3031 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3032
3033         * parse.y (named_complex_class_head_sans_basetype):
3034         Do not push a scope for error_mark_node.
3035         (maybe_base_class_list): Likewise.
3036
3037         * decl.c (start_decl): Check for error_mark_node as a type.
3038         Detected by g++.brendan/array-refs.C.
3039         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
3040         (maybe_build_cleanup_1): Likewise.  Detected by
3041         g++.jason/incomplete1.C.
3042
3043         * tree.c (build_dummy_object): Use void_zero_node instead of the
3044         error_mark_node.
3045         (is_dummy_object): Check for such a node.
3046         Detected by g++.bob/inherit1.C
3047
3048 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
3049
3050         * method.c (old_backref_index): Split out...
3051         (flush_repeats): From here.  Rename back from try_old_backref.
3052         (build_mangled_name): Put back some old-style repeat handling.
3053
3054 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3055
3056         * lex.c: Don't include setjmp.h.
3057         (parse_float): New static function.
3058         (pf_args): New struct.
3059         (real_yylex): Use them in call to `do_float_handler'.
3060
3061 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
3062
3063         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
3064         * tree.c (layout_basetypes): Not here.
3065         * search.c (dfs_search): Remove; no longer used.
3066
3067 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
3068
3069         * decl2.c (validate_nonmember_using_decl): Issue sensible
3070         error-messages on bogus qualifiers.
3071
3072 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
3073
3074         * call.c (add_function_candidate): Fix uninitialized variable.
3075
3076         * Makefile.in (search.o): Add dependency on varray.h.
3077
3078 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
3079
3080         * decl.c (duplicate_decls): Use same_type_p.
3081         * method.c (try_old_backref): Renamed from flush_repeats.  Use
3082         same_type_p.  Don't try to handle repeats.  Return success.
3083         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
3084         calls from old-style code, too.
3085         (check_ktype): Use same_type_p.
3086         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
3087         (build_qualified_name): Simplify logic.
3088         (process_overload_item): Strip typedefs and quals at the top.
3089         (build_mangled_name_for_type_with_Gcode): Remove call to
3090         type_canonical_variant.
3091         (build_mangled_name): Likewise.  Remove support for old-style
3092         repeats, which have been disabled since 2.7.2.  Don't mess with
3093         TREE_USED.
3094         (build_decl_overload_real): Don't mess with TREE_USED.
3095
3096 1999-03-13  Nathan Sidwell  <nathan@acm.org>
3097
3098         * error.c (cp_printers): Add 'F' escape character.
3099         (dump_type_real): Remove TREE_LIST (fnargs) printing.
3100         Functionality moved to dump_parameters.
3101         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
3102         (dump_function_decl): Extend meaning of V parameter.  Use
3103         dump_parameters and dump_exception_spec.
3104         (dump_parameters): New static function.
3105         (dump_exception_spec): New static function.
3106         (fndecl_as_string): Change argument semantics.  Use
3107         dump_function_decl directly.
3108
3109         * sig.c (build_signature_table_constructor): Use cp_error.
3110
3111 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3112
3113         * semantics.c (finish_switch_cond): Handle error cases gracefully.
3114         Detected by g++.law/enum5.C.
3115
3116         * typeck.c (build_modify_expr): Check for errors after resolving
3117         offsets.  Detected by g++.brendan/static1.C.
3118
3119         * decl.c (complete_array_type): Ignore initial_value if it is an
3120         error.  Detected by g++.benjamin/17930.C.
3121
3122         * typeck2.c (process_init_constructor): Return error if one argument
3123         is in error.  Detected by g++.benjamin/13478.C.
3124
3125 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3126
3127         * decl.c (select_decl): Allow class templates when we need types.
3128         * decl2.c (ambiguous_decl): Likewise.
3129
3130 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
3131
3132         * lex.c (do_identifier): Correct call to enforce_access.
3133         * search.c (accessible_p): Tweak comment.
3134
3135 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
3136
3137         * semantics.c (begin_class_definition): Call build_self_reference.
3138         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
3139
3140         * search.c (assert_canonical_unmarked): Fix typo in prototype.
3141
3142         * search.c (dfs_canonical_queue): New function.
3143         (dfs_assert_unmarked_p): Likewise.
3144         (assert_canonical_unmarked): Likewise.
3145         (access_in_type): Use it.
3146         (accessible_p): Likewise.  Walk the whole tree when umarking.
3147
3148         * sig.c (build_signature_table_constructor): Use accessible_p
3149         instead of compute_access.
3150
3151 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
3152
3153         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
3154
3155 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
3156
3157         * cp-tree.h (flag_access_control): Declare.
3158         (TREE_VIA_PPUBLIC): Document.
3159         (DECL_NONSTATIC_MEMBER_P): New macro.
3160         (enforce_access): Return an indication of whether or not access
3161         was permitted.
3162         (build_self_reference): Change prototype.
3163         (compute_access): Replace with ...
3164         (accessible_p): New function.
3165         (dfs_walk): Change prototype.
3166         (dfs_unmark): Likewise.
3167         (markedp): Likewise.
3168         * call.c (enforce_access): Use accessible_p.
3169         * class.c (build_self_reference): Insert the declaration into the
3170         list of members for this type, and make it public.
3171         * decl.c (xref_basetypes): Avoid ill-timed recursion.
3172         * init.c (build_offset_ref): Use lookup_member, not three separate
3173         name-lookups.  Call enforce_access rather than checking for
3174         illegal accesses here.
3175         (resolve_offset_ref): Likewise.
3176         * lex.c (do_identifier): Likewise.
3177         * method.c (hack_identifier): Likewise.
3178         * parse.y (self_reference): Remove.
3179         (opt_component_decl_list): Don't use it.
3180         * parse.c: Regenerated.
3181         * pt.c (print_candidates): Generalize to handle lists of
3182         overloaded functions.
3183         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
3184         not set.
3185         (get_template_base): Use new calling convention for dfs_walk.
3186         * search.c: Include varray.h.  Add prototypes.
3187         (dfs_walk): Accept a data pointer to pass to the work functions.
3188         All callers changed.  All work functions changed.
3189         (breadth_first_search): Rename to bfs_walk, and make consistent
3190         with dfs_walk.
3191         (dfs_walk_real): New function.
3192         (canonical_binfo): New function.
3193         (context_for_name_lookup): Likewise.
3194         (shared_marked_p): Likewise.
3195         (shared_unmarked_p): Likewise.
3196         (lokup_field_queue_p): Likewise.
3197         (lookup_field_r): Generalize to handle both functions and fields.
3198         (lookup_field): Just call lookup_member.
3199         (lookup_fnfields): Likewise.
3200         (lookup_member): Move body of lookup_field here and generalize.
3201         (dfs_accessible_queue_p): Likewise.
3202         (dfs_accessible_p): Likewise.
3203         (dfs_access_in_type): Likewise.
3204         (access_in_type): Likewise.
3205         (compute_access): Remove, and replace with ...
3206         (accessible_p): New function.
3207         (vbase_types): Remove.
3208         (vbase_decl_ptr_intermediate): Likewise.
3209         (vbase_decl_ptr): Likewise.
3210         (vbase_init_result): Likewise.
3211         (closed_envelopes): Likewise.
3212         (bvtable): Likewise.
3213
3214 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
3215
3216         * call.c (add_function_candidate): Check for proper number of args
3217         before checking the validity of those args.
3218
3219 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
3220
3221         * cp-tree.h (struct lang_type): Add anon_union field.
3222         (ANON_UNION_TYPE_P): Use it instead of examining type.
3223         (SET_ANON_UNION_TYPE_P): New macro.
3224         * decl.c (check_tag_decl): Use it.
3225
3226         * search.c (compute_access): Handle non-type contexts earlier, and
3227         handle NULL_TREE.
3228
3229         * tree.c (build_exception_variant): Use copy_to_permanent.
3230
3231         * decl2.c (setup_initp): Give statics with no priority the default
3232         priority here.
3233         (do_dtors, do_ctors, finish_file): Remove special handling of
3234         non-prioritized statics.
3235
3236 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
3237
3238         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
3239         * decl.c (make_typename_type): Don't issue an error if an
3240         immediate lookup fails; it migt be resolved later.
3241         * friend.c (is_friend): Add comment.
3242         * search.c (breadth_first_search): Add POSTFN and DATA
3243         parameters.  Tidy.  All callers changed.
3244         (lookup_field_queue_p): New function.
3245         (lookup_field_r): Likewise.
3246         (lookup_field_post): Likewise.
3247         (lookup_field): Use them, via breadth_first_search, instead of
3248         duplicating logic.
3249         (compute_access): Robustify.
3250         (lookup_fnfield_info): New structure.
3251
3252 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
3253
3254         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
3255
3256 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
3257
3258         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
3259         cc happy.
3260
3261         * decl2.c (import_export_class): Also return if
3262         CLASSTYPE_INTERFACE_ONLY is set.
3263
3264 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3265
3266         * decl.c (push_overloaded_decl): Only overwrite the old binding if
3267         there was one.
3268         * decl2.c (do_local_using_decl): Fix loop termination.
3269
3270 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
3271
3272         * cp-tree.h (determine_specialization): Don't declare.
3273         * pt.c (determine_specialization): Make it static.  Eliminate
3274         complain parameter.  Note that decl is always non-NULL now, and
3275         simplify accordingly.
3276
3277         * decl.c (maybe_push_to_top_level): Always call
3278         push_cp_function_context.
3279         (pop_from_top_level): Always call pop_cp_function_context.
3280
3281 1999-02-26  Nathan Sidwell  <nathan@acm.org>
3282
3283         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
3284         diagnostics.
3285         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
3286         * init.c (build_new_1): Extra arg to complete_type_or_else.
3287         (build_delete): Likewise.
3288         * typeck.c (require_complete_type): Likewise.
3289         (pointer_int_sum): Likewise.
3290         (pointer_diff): Likewise.
3291         (build_component_ref): Likewise.
3292
3293         * typeck2.c (incomplete_type_error): Always use cp_error.
3294         Show declaration of undefined type, if appropriate.
3295         Deal with UNKNOWN_TYPE nodes.
3296
3297         * typeck.c (require_complete_type): Use TYPE_SIZE as
3298         size_zero_node to mean incomplete type.
3299         (require_complete_type_in_void): New function.
3300         (build_compound_expr): Call complete_type_in_void for LHS.
3301         (build_c_cast): Call complete_type_in_void for void cast.
3302         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
3303         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
3304         require_complete_type_in_void.  Call it.
3305         * cp-tree.h (require_complete_type_in_void): Prototype new function.
3306
3307         * typeck.c (convert_arguments): Use alternative format for
3308         function decls.  Don't require_complete_type here.  Simplify
3309         diagnostic printing.
3310         (convert_for_initialization): Don't require_complete_type on RHS yet.
3311         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
3312
3313         * call.c (build_over_call): Cope with qualified void return type.
3314         * semantics.c (finish_call_expr): Likewise.
3315         * typeck.c (build_function_call_real): Likewise.
3316         (c_expand_return): Likewise.
3317         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
3318
3319         * call.c (print_z_candidates): Use alternate print format, to be
3320         consistent with (pt.c) print_candidates.
3321         * method.c (hack_identifier): List candidate members.
3322         * search.c (lookup_field): Build ambiguous list, and show it, if
3323         ambiguous.
3324
3325 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
3326
3327         * typeck.c (decay_conversion): Don't confuse constant array
3328         variables with their initializers.
3329
3330         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
3331         merging decls.
3332         * pt.c (regenerate_decl_from_template): Tweak for clarity.
3333         (instantiate_decl): Mark a decl instantiated before regenerating
3334         it to avoid recursion.
3335         * tree.c (mapcar): Don't call decl_constant_value unless we know
3336         something is TREE_READONLY_DECL_P.
3337
3338         * class.c (check_for_override): Don't stop checking when we find
3339         the first overridden function.  Delete #if 0'd code.
3340         * search.c (get_matching_virtual): Likewise.
3341
3342 1999-02-25  Richard Henderson  <rth@cygnus.com>
3343
3344         * lang-specs.h: Define __FAST_MATH__ when appropriate.
3345
3346 1999-02-24  Mike Stump  <mrs@wrs.com>
3347
3348         * typeck.c (convert_for_assignment): Allow boolean integral constant
3349         expressions to convert to null pointer.
3350
3351 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3352
3353         * decl.c (lookup_namespace_name): Resolve namespace aliases.
3354
3355         * class.c (push_nested_class): Allow namespaces.
3356
3357         * decl2.c (set_decl_namespace): Add friendp parameter.
3358         * decl.c (grokfndecl): Pass it.
3359         (grokvardecl): Likewise.
3360         * cp-tree.h: Change declaration.
3361
3362 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
3363
3364         * pt.c (tsubst): Allow an array of explicit size zero.
3365
3366 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
3367
3368         * errfn.c: Change varargs code to look like toplev.c.
3369
3370         * method.c (process_modifiers): Don't prepend 'U' for char or
3371         wchar_t.
3372
3373 1999-02-20  Craig Burley  <craig@jcb-sc.com>
3374
3375         * Make-lang.in (cplib2.ready): Don't consider updating
3376         cplib2 stuff if the current directory isn't writable, as
3377         it won't work (such as during a `make install').
3378
3379 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
3380
3381         * decl2.c (start_objects): Make file scope constructors and
3382         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
3383         ASM_OUTPUT_DESTRUCTOR are defined.
3384
3385 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
3386
3387         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
3388         (fn_type_unification): Adjust prototype.
3389         (lookup_fnfields_1): Declare.
3390         * call.c (add_template_candidate_real): Adjust call to
3391         fn_type_unification.
3392         * class.c (add_method): Don't allow duplicate declarations of
3393         constructors or destructors.
3394         (resolve_address_of_overloaded_function): Remove unused variable.
3395         Adjust call to fn_type_unification.
3396         * decl.c (grokfndecl): Be more robust in the face of illegal
3397         specializations.
3398         * decl2.c (check_classfn): Remove hokey handling of member
3399         templates.
3400         * pt.c (determine_specialization): Improve comments.  Adjust to
3401         handle template argument deduction as per the standard.
3402         (check_explicit_specialization): Fix comment spacing.  Handle
3403         type-conversion operators correctly.  Improve error-recovery.
3404         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
3405         (get_bindings_real): Simplify handling of static members.
3406         * search.c (lookup_fnfields_1): Make it have external linkage.
3407         * typeck.c (compparms): Fix comment.
3408         (build_unary_op): Don't try to figure out which template
3409         specialization is being referred to when when the address-of
3410         operator is used with a template function.
3411
3412 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3413
3414         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
3415         keyword to match an analogous change at the top level.
3416
3417         * tree.c (lvalue_or_else): Likewise.
3418
3419 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
3420
3421         * decl.c (xref_basetypes): Comment.
3422         * pt.c (instantiate_class_template): Use xref_basetypes.
3423
3424 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
3425
3426         * cp-tree.h (tsubst): Change prototype.
3427         (tsubst_expr): Likewise.
3428         (tsubst_copy): Likewise.
3429         (type_unification): Remove prototype.
3430         * call.c (convert_default_arg): Adjust call to tsubst_expr.
3431         * class.c (resolve_address_of_overloaded_function): Just use
3432         fn_type_unification.
3433         * decl.c (grokdeclarator): Adjust call to tsubst.
3434         * method.c (build_template_parm_names): Likewise.
3435         * pt.c (GTB_VIA_VIRTUAL): New macro.
3436         (GTB_IGNORE_TYPE): Likewise.
3437         (resolve_overloaded_unification): Add `complain' parameter.
3438         (try_one_overload): Likewise.
3439         (tsubst_template_arg_vector): Likewise.
3440         (tsubst_template_parms): Likewise.
3441         (tsubst_aggr_type): Likewise.
3442         (tsubst_arg_types): Likewise.
3443         (tsubst_call_declarator_parms): Likewise.
3444         (unify): Remove explicit_mask.
3445         (type_unification_real): Likewise.
3446         (get_template_base_recursive): Likewise.
3447         (coerce_template_template_parms): Provide prototype.
3448         (tsubst_function_type): Likewise.
3449         (try_class_unification): New function.
3450         All callers changed to use new complain parameter.
3451         (get_template_base): Use try_class_unification.
3452         (unify): Adjust handling of classes derived from template types.
3453         (fn_type_unification): Substitute explicit arguments before
3454         unification.
3455
3456 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
3457
3458         * decl.c (pushdecl): Remove dead code.
3459
3460 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
3461
3462         * decl2.c (finish_objects): Fix code I missed in previous change.
3463
3464 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
3465
3466         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
3467         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
3468
3469         * pt.c (maybe_process_partial_specialization): Complain about
3470         'template <>' on non-specialization.
3471
3472 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
3473
3474         * decl.c (grokdeclarator): Catch wierd declarators.
3475         * decl2.c (finish_file): Don't abort because of namespace parsing
3476         failure.
3477         (check_decl_namespace): Remove.
3478
3479 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
3480
3481         * cp-tree.h (get_template_base): Don't declare.
3482         (dfs_walk): Declare.
3483         (dfs_unmark): Likewise.
3484         (markedp): Likewise.
3485         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
3486         targs to get_template_base.
3487         (get_template_base_recursive): Move here from search.c.  Check to
3488         see that the base found can be instantiated to form the desired
3489         type.
3490         (get_template_base): Likewise.
3491         (get_class_bindings): Simplify.
3492         * search.c (get_template_base_recursive): Move to pt.c.
3493         (get_template_base): Likewise.
3494         (markedp): Make it global.
3495         (dfs_walk): Likewise.
3496         (dfs_unmark): Likewise.
3497
3498 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
3499
3500         * pt.c (maybe_process_partial_specialization): Complain about
3501         specialization in wrong namespace.
3502         * tree.c (decl_namespace_context): New fn.
3503
3504 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
3505
3506         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
3507         * pt.c (coerce_template_template_parms): Handle nested
3508         template template parameters.
3509
3510 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
3511
3512         * typeck2.c: Update email addresses.
3513
3514 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
3515
3516         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
3517         turned off.
3518
3519 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
3520
3521         * lex.c (retrofit_lang_decl): Split out...
3522         (build_lang_decl): From here.
3523         * decl.c (pushdecl): Call it for functions generated by the middle
3524         end that don't have DECL_LANG_SPECIFIC.
3525         * cp-tree.h: Declare it.
3526
3527         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
3528         (start_objects, finish_objects): Only use special
3529         init_priority code if the user specified a priority.
3530         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
3531         objects.
3532
3533 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
3534
3535         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
3536         mkstemp.o.  Get them from libiberty now.
3537         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
3538
3539 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
3540
3541         * decl2.c (lang_decode_option): Use read_integral_parameter.
3542
3543 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
3544
3545         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
3546         before calling complete_type_or_else.
3547
3548 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3549
3550         * input.c (inline): Don't define, its handled by system.h.
3551
3552 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
3553
3554         * decl2.c: Don't define flag_no_ident here.  Don't process
3555         -f(no-)ident here.
3556         * cp-tree.h: Don't declare flag_no_ident here.
3557         * lang-specs.h: Map -Qn to -fno-ident.
3558
3559 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
3560
3561         * cp-tree.h (struct tree_binding): Replace scope field with a union.
3562         (BINDING_SCOPE): Adjust.
3563         * decl.c (BINDING_LEVEL): Adjust.
3564
3565 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
3566
3567         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
3568         member constants.
3569
3570         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
3571         a ctor initializer.
3572
3573         * tree.c (equal_functions): Fix name in prototype.
3574
3575         * decl.c (push_local_binding): Add FLAGS argument.
3576         (pushdecl, push_overloaded_decl): Pass it.
3577         * decl2.c (do_local_using_decl): Likewise.
3578         * cp-tree.h: Adjust prototype.
3579         * decl.c (poplevel): Fix logic.
3580
3581         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
3582         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
3583         (cat_namespace_levels): Don't loop forever.
3584
3585 1999-01-25  Richard Henderson  <rth@cygnus.com>
3586
3587         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
3588
3589 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
3590
3591         * class.c (resolve_address_of_overloaded_function): Mark the
3592         chosen function used.
3593
3594         * call.c (build_call): Make sure that a function coming in has
3595         been marked used already.
3596         * decl.c (expand_static_init): Call mark_used instead of
3597         assemble_external.
3598         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
3599         alloc_eh_object, expand_throw): Likewise.
3600         * init.c (build_builtin_delete_call): Likewise.
3601         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
3602         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
3603         expand_generic_desc): Likewise.
3604
3605 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3606
3607         * tree.c (equal_functions): New function.
3608         (ovl_member): Call it.
3609
3610 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
3611
3612         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
3613
3614 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3615
3616         * decl.c (decls_match): Return 1 if old and new are identical.
3617         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
3618
3619 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
3620
3621         * decl.c (start_function): Make member functions one_only on windows.
3622         * decl2.c (import_export_decl): Likewise.
3623
3624         * decl.c (grokdeclarator): Don't complain about implicit int in
3625         a system header.  Change same-name field check to not complain in
3626         a system header instead of within extern "C".
3627
3628 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
3629
3630         * cp-tree.h (PUSH_GLOBAL): New macro.
3631         (PUSH_LOCAL): Likewise.
3632         (PUSH_USING): Likewise.
3633         (namespace_bindings_p): Declare.
3634         (push_overloaded_decl): Likewise.
3635         * decl.c (push_overloaded_decl): Don't make it static.  Check for
3636         illegal declarations after using declarations here.
3637         (namespace_bindings_p): Likewise.
3638         (duplicate_decls): Don't consider declarations from different
3639         namespaces to be the same.
3640         (pushdecl): Use symbolic PUSH_ constants in calls to
3641         push_overloaded_decl.
3642         (push_overloaded_decl_1): Likewise.
3643         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
3644         (do_nonmember_using_decl): Check for illegal using declarations
3645         after ordinary declarations here.
3646         (do_local_using_decl): Call pushdecl to insert declarations.
3647
3648 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
3649
3650         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
3651
3652 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
3653
3654         * tree.c (build_cplus_array_type_1): Don't call build_array_type
3655         for types involving template parameters.
3656
3657         * cp-tree.h (PARM_DECL_EXPR): Delete.
3658         (convert_default_arg): Change prototype.
3659         (check_default_argument): Declare.
3660         (search_tree): Likewise.
3661         * call.c (convert_default_arg): Take the function to which the
3662         default argument belongs as a parameter, and do any necessary
3663         instantiation here, instead of ...
3664         (build_over_call): Here.
3665         * decl.c (local_variable_p): New function.
3666         (check_default_argument): Likewise, split out and tidied from ...
3667         (grokparms): Here.
3668         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
3669         * pt.c (tsubst_call_declarator_parms): New function.
3670         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
3671         with CALL_EXPRs, rather than trying to be clever.
3672         (tsubst): Use tsubst_call_declarator_parms.
3673         * tree.c (search_tree): Don't make it static.
3674         * typeck.c (convert_arguments): Use new interface to
3675         convert_default_arg.
3676
3677 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
3678
3679         * error.c (dump_function_decl): Don't print the argument types for
3680         a function when the verbosity level is negative.
3681
3682         * call.c (build_over_call): Check format attributes at call-time.
3683
3684         * pt.c (tsubst_copy): Fix comment.
3685         (unify): Don't allow unification with variable-sized arrays.
3686
3687         * semantics.c (finish_stmt_expr): When processing a template make
3688         the BIND_EXPR long-lived.
3689
3690 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
3691
3692         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
3693         (import_export_vtable): Not here.
3694
3695 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
3696
3697         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
3698         non-static member function.
3699
3700 1999-01-18  Nathan Sidwell  <nathan@acm.org>
3701
3702         * class.c (instantiate_type): Only diagnose illegal address of member
3703         function if complaining.
3704
3705         * decl.c (lookup_name_real): Remove duplicate code.
3706
3707 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
3708
3709         * tree.c (copy_template_template_parm): Use permanent_obstack.
3710
3711 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
3712
3713         * pt.c (unify): Remove restrictions on deduction of argument
3714         of template template parameters.
3715
3716 1999-01-18  Nathan Sidwell  <nathan@acm.org>
3717
3718         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
3719
3720         * class.c (resolve_address_of_overloaded_function): Show list of
3721         all candidates, when none of them match.
3722
3723 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
3724
3725         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
3726         definition of 'casting away const' in reinterpret_cast<>.
3727
3728 1999-01-18  Graham  <grahams@rcp.co.uk>
3729
3730         * cvt.c: Add include for decl.h, remove extern for
3731         static_aggregates which is now provided by decl.h.
3732
3733         * Makefile.in (cvt.o): Add dependency for decl.h and missing
3734         dependencies for convert.h and flags.h.
3735
3736 1999-01-18  Nathan Sidwell  <nathan@acm.org>
3737
3738         * decl2.c (do_dtors): Set current location to that of the
3739         decl, for sensible diagnostics and debugging.
3740         (check_classfn): Issue `incomplete type' error, if
3741         class is not defined.
3742
3743 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
3744
3745         * cp-tree.h: Add prototype for bound_pmf_p.
3746
3747 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
3748             Manfred Hollstein <manfred@s-direktnet.de>
3749
3750         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
3751         -Wreturn-type.
3752
3753 1999-01-16  Nathan Sidwell  <nathan@acm.org>
3754
3755         * cp-tree.h (struct lang_type): Added has_mutable flag.
3756         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
3757         (TYPE_HAS_MUTABLE_P): New macro to read it.
3758         (cp_has_mutable_p): Prototype for new function.
3759         * class.c (finish_struct_1): Set has_mutable from members.
3760         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
3761         it contains a mutable.
3762         * typeck.c (cp_has_mutable_p): New function.
3763
3764 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
3765
3766         * pt.c (process_template_parm): Ignore top-level qualifiers on
3767         non-type parameters.
3768
3769         * decl.c (start_function): Use current_function_parms in the call
3770         to require_complete_type_for_parms, not the probably empty
3771         DECL_ARGUMENTS.
3772
3773 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
3774
3775         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
3776
3777         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
3778         that we don't suppress the other copies.
3779         * lex.c (handle_cp_pragma): Likewise.
3780
3781 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
3782
3783         * decl.c (grokdeclarator): Undo 1998-12-14 change.
3784         * tree.c (build_cplus_array_type_1): Likewise.
3785         * pt.c (instantiate_class_template): Remove misleading comment.
3786         (tsubst_aggr_type): Substitute if there are template parameters,
3787         regardless of whether or not they use template arguments.
3788         (unify): Likewise, but for unification.
3789
3790 1999-01-12  Richard Henderson  <rth@cygnus.com>
3791
3792         * cp-tree.h (flag_permissive): Declare extern.
3793
3794 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
3795
3796         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
3797         here.
3798         (lang_type): Add is_partial_instantiation.  Decrease width of
3799         dummy.
3800         (PARTIAL_INSTANTIATION_P): New macro.
3801         (OPERATOR_TYPENAME_P): Remove.
3802         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
3803         OPERATOR_TYPENAME_P.
3804         (grok_op_properties): Likewise.
3805         * friend.c (do_friend): Handle friends that are member functions
3806         correctly.
3807         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
3808         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
3809         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
3810         any more partial instantiation than is absolutely necessary for
3811         implicit typename.  Set PARTIAL_INSTANTIATION_P.
3812         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
3813         * semantics.c (begin_class_definition): Handle partial
3814         specializations of a type that was previously partially
3815         instantiated.
3816
3817 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
3818
3819         * g++spec.c (LIBSTDCXX): Provide default definition.
3820         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
3821
3822 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3823
3824         * Make-lang.in (g++.o): Depend on prefix.h.
3825
3826 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
3827
3828         * tree.c (bound_pmf_p): New fn.
3829         * typeck.c (build_c_cast): Use it.
3830
3831         * decl.c (grok_op_properties): Use same_type_p.
3832
3833 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3834
3835         * Makefile.in (cvt.o): Depend on toplev.h.
3836
3837         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
3838
3839         * cvt.c: Include toplev.h.
3840
3841         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
3842         definitions.
3843
3844         * init.c (expand_vec_init): Initialize variable `itype'.
3845
3846         * lex.c (yyerror): Cast the argument passed to a ctype function to
3847         an unsigned char.
3848
3849         * method.c (build_mangled_C9x_name): Wrap prototype and definition
3850         in "HOST_BITS_PER_WIDE_INT >= 64".
3851
3852         * typeck.c (build_binary_op): Mark parameter `convert_p' with
3853         ATTRIBUTE_UNUSED.
3854
3855 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
3856
3857         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
3858         * tree.c (build_exception_variant): Don't crash on empty throw
3859         specs.
3860
3861 1998-12-18  DJ Delorie  <dj@cygnus.com>
3862
3863         * cvt.c (convert_to_reference): Check for both error_mark_node
3864         and NULL_NODE after call to convert_for_initialization.
3865
3866 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
3867
3868         * error.c (interesting_scope_p): New fn.
3869         (dump_simple_decl): Use it.
3870         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
3871         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
3872
3873 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
3874
3875         * class.c (resolve_address_of_overloaded_function): Do conversion
3876         to correct type here, rather than ...
3877         (instantiate_type): Here.
3878
3879         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
3880         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
3881         (decl_template_parm_p): Remove.
3882         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
3883         parameter.
3884         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
3885         * pt.c (push_inline_template_parms_recursive): Set it.
3886         (decl_template_parm_p): Remove.
3887         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
3888         (process_template_parm): Set it.
3889
3890 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
3891
3892         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
3893         if configured with cpplib.
3894
3895 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
3896
3897         * decl.c (poplevel): Make sure ns_binding is initialized.
3898
3899         * decl.c (finish_function): Undo inadvertent change in previous
3900         patch.
3901
3902 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
3903
3904         * class.c (pushclass): Tweak handling of class-level bindings.
3905         (resolve_address_of_overloaded_function): Update pointer-to-member
3906         handling.
3907         (instantiate_type): Likewise.
3908         * cvt.c (cp_convert_to_pointer): Likewise.
3909         * decl.c (pop_binding): Take the DECL to pop, not just the name.
3910         Deal with `struct stat' hack.
3911         (binding_level): Add to documentation.
3912         (push_binding): Clear BINDING_TYPE.
3913         (add_binding): New function.
3914         (push_local_binding): Use it.
3915         (push_class_binding): Likewise.
3916         (poplevel): Adjust calls to pop_binding.
3917         (poplevel_class): Likewise.
3918         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
3919         declarations to current binding level.
3920         (push_class_level_binding): Likewise.
3921         (push_overloaded_decl): Adjust handling of OVERLOADs in local
3922         bindings.
3923         (lookup_namespace_name): Don't crash when confronted with a
3924         TEMPLATE_DECL.
3925         (lookup_name_real): Do `struct stat' hack in local binding
3926         contexts.
3927         (build_ptrmemfunc_type): Adjust documentation.
3928         (grokdeclarator): Don't avoid building real array types when
3929         processing templates unless really necessary.
3930         (finish_method): Adjust calls to pop_binding.
3931         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
3932         not reparse_decl_as_expr.
3933         (build_expr_from_tree): Deal with a template-id as the function to
3934         call in a METHOD_CALL_EXPR.
3935         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
3936         (maybe_adjust_types_For_deduction): Don't do peculiar things with
3937         METHOD_TYPEs here.
3938         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
3939         pointer-to-member types where necessary.
3940         * tree.c (build_cplus_array_type_1): Don't avoid building real
3941         array types when processing templates unless really necessary.
3942         (build_exception_variant): Compare the exception lists correctly.
3943
3944 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
3945
3946         * cp-tree.def (CPLUS_BINDING): Update documentation.
3947         * cp-tree.h (LOCAL_BINDING_P): New macro.
3948         (lang_identifier): Rename local_value to bindings.
3949         (tree_binding): Make `scope' of type `void*', not `tree'.
3950         (BINDING_SCOPE): Update documentation.
3951         (IDENTIFIER_LOCAL_VALUE): Remove.
3952         (IDENTIFIER_CLASS_VALUE): Document.
3953         (IDENTIFIER_BINDING): New macro.
3954         (IDENTIFIER_VALUE): Likewise.
3955         (TIME_IDENTIFIER_TIME): Likewise.
3956         (TIME_IDENTIFIER_FILEINFO): Likewise.
3957         (IMPLICIT_TYPENAME_P): Likewise.
3958         (set_identifier_local_value): Remove.
3959         (push_local_binding): New function.
3960         (push_class_binding): Likewise.
3961         * class.c (pushclass): Update comments; use push_class_binding.
3962         * decl.c (set_identifier_local_value_with_scope): Remove.
3963         (set_identifier_local_value): Likewise.
3964         (push_binding): New function.
3965         (pop_binding): Likewise.
3966         (binding_level): Update documentation.  Remove shadowed.
3967         (BINDING_LEVEL): New macro.
3968         (free_binding_nodes): New variable.
3969         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
3970         BLOCK_VARs when doing for-scope extension.  Remove effectively
3971         dead code.
3972         (pushlevel_class): Tweak formatting.
3973         (poplevel_class): Adjust for new name-lookup scheme.
3974         (print_binding_level): Likewise.
3975         (store_bindings): Likewise.
3976         (pushdecl): Likewise.
3977         (pushdecl_class_level): Likewise.
3978         (push_class_level_binding): Likewise.
3979         (push_overloaded_decl): Update comments.  Adjust for new
3980         name-lookup scheme.
3981         (lookup_name_real): Likewise.
3982         (lookup_name_current_level): Likewise.
3983         (cp_finish_decl): Likewise.
3984         (require_complete_types_for_parms): Likewise.  Remove misleading
3985         #if 0'd code.
3986         (grok_parms): Likewise.  Don't call
3987         require_complete_types_for_parms here.
3988         (grok_ctor_properties): Don't treat templates as copy
3989         constructors.
3990         (grop_op_properties): Or as assignment operators.
3991         (start_function): Document.  Adjust for new name-lookup scheme.
3992         (finish_function): Likewise.
3993         * decl2.c (do_local_using_decl): Use push_local_binding.
3994         * lex.c (begin_definition_of_inclass_inline): New function, split
3995         out from ...
3996         (do_pending_inlines): Here, and ...
3997         (process_next_inline): Here.
3998         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
3999         (init_filename_times): Likewise.
4000         (extract_interface_info): Likewise.
4001         (ste_typedecl_interface_info): Likewise.
4002         (check_newline): Likewise.
4003         (dump_time_statistics): Likewise.
4004         (handle_cp_pragma): Likewise.
4005         (do_identifier): Adjust for new name-lookup scheme.
4006         * parse.y (function_try_block): Return ctor_initializer_opt value.
4007         (fndef): Use it.
4008         (fn.defpen): Pass appropriate values to start_function.
4009         (pending_inline): Use functor_try_block value, and pass
4010         appropriate values to finish_function.
4011         * pt.c (is_member_template): Update documentation; remove handling
4012         of FUNCTION_DECLs.  As per name, this function should deal only in
4013         TEMPLATE_DECLs.
4014         (decl_template_parm_p): Change name of olddecl parameter to decl.
4015         (check_template_shadow): Adjust for new name-lookup scheme.
4016         (lookup_template_class): Likewise.
4017         (tsubst_decl): Tweak so as not to confuse member templates with
4018         copy constructors and assignment operators.
4019         (unify): Handle UNION_TYPEs.
4020         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
4021         (lang_print_xnode): Adjust for new name-lookup scheme.
4022         * typeck.c (mark_addressable): Likewise.
4023         (c_expand_return): Likewise.
4024
4025 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
4026
4027         * decl.c (grokdeclarator): Allow field with same name as class
4028         in extern "C".
4029
4030         * decl.c (lookup_name_real): Don't limit field lookup to types.
4031         * class.c (check_member_decl_is_same_in_complete_scope): No error
4032         if icv and x are the same.
4033         * lex.c (do_identifier): Tweak error message.
4034
4035 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
4036
4037         * decl.c (start_enum): Use push_obstacks, not
4038         end_temporary_allocation.
4039         (finish_enum): Call pop_obstacks.
4040
4041 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
4042
4043         * class.c (instantiate_type): Return error_mark_node rather than
4044         junk.
4045
4046 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
4047
4048         * cp-tree.h (most_specialized_instantiation): New function.
4049         (print_candidates): Likewise.
4050         * class.c (validate_lhs): Remove.
4051         (resolve_address_of_overloaded_function): New function, split out
4052         and then substantially reworked, from ...
4053         (instantiate_type): Use it.  Simplify.
4054         * cvt.c (convert_to_reference): Complain when caller has indicated
4055         that's the right thing to do.  Don't crash if instantiate_type
4056         fails.
4057         * pt.c: Substitute `parameters' for `paramters' throughout.
4058         (print_candidates): Don't make it static.
4059         (most_specialized_instantiation): Split out from ...
4060         (most_specialized): Here.
4061
4062 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
4063
4064         * lex.c (lang_init_options): Initialize cpplib.
4065         * decl2.c (parse_options,cpp_initialized): Removed.
4066         (lang_decode_option): Move initialization of cpplib to
4067         lang_init_options.
4068
4069 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
4070
4071         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
4072         well as the TYPE_DECL, when a typedef name is assigned to a
4073         previously anonymous type.
4074
4075 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
4076
4077         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
4078         __cp_eh_info for getting the eh info pointer.  Add table_index to
4079         field list.
4080         (push_eh_cleanup): Don't increment 'handlers' data field.
4081         (process_start_catch_block): Don't set the 'caught' field.
4082
4083         * cp/exception.cc (CP_EH_INFO): New macro for getting the
4084         exception info pointer within library routines.
4085         (__cp_eh_info): Use CP_EH_INFO.
4086         (__start_cp_handler): Get exception info pointer, set caught field,
4087         and increment the handlers field.  Avoids this being done by handlers.
4088         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
4089         (uncaught_exception): Use CP_EH_INFO macro.
4090
4091 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
4092
4093         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
4094
4095 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
4096
4097         * lex.c (check_newline): Add support for \ as `natural'
4098         characters in file names in #line to be consistent with #include
4099         handling.  We support escape processing in the # 1 "..." version of
4100         the command.  See also support in cp/lex.c.
4101
4102 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
4103
4104         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
4105         structure.
4106
4107 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
4108
4109         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
4110
4111         * error.c (dump_simple_decl): Also print namespace context.
4112         (dump_function_decl): Likewise.
4113
4114         * decl2.c (ambiguous_decl): Don't print old value if it's
4115         error_mark_node.
4116
4117         * decl.c (lookup_name_real): Fix handling of local types shadowed
4118         by a non-type decl.  Remove obsolete code.
4119         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
4120
4121         * lang-options.h: Add -fpermissive.
4122         * decl2.c: Likewise.
4123         * cp-tree.h: Add flag_permissive.
4124         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
4125         were specified, set flag_pedantic_errors.
4126         * call.c (build_over_call): Turn dropped qualifier messages
4127         back into pedwarns.
4128         * cvt.c (convert_to_reference): Likewise.
4129         * typeck.c (convert_for_assignment): Likewise.
4130
4131 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
4132
4133         * decl2.c (coerce_new_type): Use same_type_p.
4134         (coerce_delete_type): Likewise.
4135
4136         * call.c (check_dtor_name): Return 1, not error_mark_node.
4137
4138 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
4139
4140         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
4141         if MULTIPLE_SYMBOL_SPACES.
4142
4143         * pt.c (check_template_shadow): New fn.
4144         * decl2.c (grokfield): Use it.
4145         * decl.c (pushdecl): Likewise.
4146         (pushdecl_class_level): Likewise.
4147         (start_method): Likewise.
4148         (xref_tag): Don't try to use 't' if we're defining.
4149
4150         * call.c (check_dtor_name): Just return an error_mark_node.
4151         * pt.c (lookup_template_class): Complain about using non-template here.
4152         * parse.y (apparent_template_type): Not here.
4153
4154         * pt.c (check_explicit_specialization): Complain about specialization
4155         with C linkage.
4156
4157         * lang-options.h: Add -f{no-,}implicit-inline-templates.
4158
4159         * pt.c (convert_nontype_argument): Don't assume that any integer
4160         argument is intended to be a constant-expression.
4161
4162 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
4163
4164         * class.c (handle_using_decl): Fix comment.  Don't lookup
4165         constructors in base classes.
4166         (validate_lhs): Fix typo in comment.
4167         * search.c (lookup_field_1): Don't return a USING_DECL.
4168
4169         * cp-tree.h (DECL_ACCESS): Improve documentation.
4170
4171         * decl.c (expand_static_init): Don't set the initialization-done
4172         flag until the initialization is done.
4173
4174 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
4175
4176         * decl2.c (validate_nonmember_using_decl): Complain about using
4177         declarations for class members.
4178
4179 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
4180
4181         * typeck2.c (process_init_constructor): Use same_type_p.
4182
4183         * decl.c (check_tag_decl): Don't warn about null decl inside a
4184         class.
4185
4186         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
4187         UNIFY_ALLOW_NONE.
4188         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
4189         (resolve_overloaded_unification): Strip baselinks.
4190
4191 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4192
4193         * g++spec.c: Don't prototype xmalloc.
4194
4195 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
4196
4197         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
4198
4199         * decl.c (check_tag_decl): Do complain about null friend decl at
4200         file scope.
4201
4202 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
4203
4204         * lex.c (make_lang_type): Clear the whole struct lang_type, not
4205         only the first multiple of sizeof (int).
4206
4207 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
4208
4209         * decl.c (start_decl): An explicit specialization of a static data
4210         member is only a definition if it has an initializer.
4211
4212         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
4213         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
4214         cp_finish_decl.
4215         * init.c (expand_default_init): Check for DIRECT_BIND instead of
4216         DECL_ARTIFICIAL.
4217
4218         * call.c (build_over_call): Use build_decl.
4219
4220         * except.c (expand_throw): Just use convert, not
4221         build_reinterpret_cast.
4222
4223         * lex.c (handle_generic_pragma): Use token_buffer.
4224
4225         * decl.c (check_tag_decl): Don't complain about null friend decl.
4226
4227 1998-11-24  Dave Pitts  <dpitts@cozx.com>
4228
4229         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
4230         first position.
4231         * lex.c (check_newline): Use ISALPHA.
4232         (readescape): Use ISGRAPH.
4233         (yyerror): Use ISGRAPH.
4234
4235 1998-11-24  Nathan Sidwell  <nathan@acm.org>
4236
4237         * search.c (get_abstract_virtuals): Do not use initial
4238         CLASSTYPE_ABSTRACT_VIRTUALS.
4239         * typeck2.c (abstract_virtuals_error): Show location of abstract
4240         declaration.
4241         * call.c (build_new_method_call): Use
4242         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
4243         * class.c (finish_struct_bits): Don't bother working out whether
4244         get_abstract_virtuals will do anything, just do it.
4245
4246 1998-11-24  Graham  <grahams@rcp.co.uk>
4247
4248         * typeck.c (build_component_ref): Remove unused statement.
4249
4250 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
4251
4252         * class.c (add_method): Catch invalid overloads.
4253
4254         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
4255         * search.c (lookup_conversions): Handle getting real OVERLOADs.
4256         (add_conversions): Likewise.  Revert last change.
4257         * call.c (add_conv_candidate): Pass totype to add_candidate instead
4258         of fn.  Don't add a new candidate if the last one was for the same
4259         type.
4260         (print_z_candidates): Handle getting a type as a function.
4261         (joust): If we got two conversion candidates to the same type,
4262         just pick one.
4263         (build_object_call): Lose 'templates'.
4264         (build_user_type_conversion_1): Handle getting real OVERLOADs.
4265
4266 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
4267
4268         * typeck2.c (process_init_constructor): If there are elements
4269         that don't have initializers and they need to have constructors
4270         run, supply them with initializers.
4271
4272         * class.c (finish_struct_1): A class with a 0-width bitfield is
4273         still empty.
4274
4275 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
4276
4277         * pt.c (instantiate_class_template): Don't try to figure out what
4278         specialization to use for a partial instantiation.  Correct
4279         typos in a couple of comments.  Avoid calling uses_template_parms
4280         multiple times.
4281
4282 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
4283
4284         * method.c (process_overload_item): Add call to
4285         build_mangled_C9x_name for intTI_type_nodes.
4286         (build_mangled_C9x_name): Add prototype, define.
4287         * decl.c (init_decl_processing): Add names for
4288         TImode_type_node.
4289
4290 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
4291
4292         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
4293
4294         * class.c (finish_struct_1): Set things up for 0-width bitfields
4295         like we do for others.
4296
4297         * decl.c (check_tag_decl): New fn.
4298         (shadow_tag): Split out from here.
4299         * decl2.c (grok_x_components): Call it.
4300
4301 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
4302
4303         * decl.c: Lose warn_about_return_type.
4304         (grokdeclarator): Always complain about implicit int, except for
4305         `main () { ... }'.
4306
4307         * decl.c (tag_name): New fn.
4308         (xref_tag): Complain about using typedef-name after class-key.
4309
4310         * init.c (expand_vec_init): Also keep going if from_array.
4311
4312         * tree.c (is_overloaded_fn): Also handle the output of
4313         build_offset_ref.
4314
4315         * decl.c (grokdeclarator): Use constructor_name when comparing
4316         field name against enclosing class.
4317         * class.c (finish_struct_anon): Likewise.
4318
4319 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
4320
4321         * decl.c (poplevel): Remove code to handle KEEP == 2.
4322         (finish_function): Don't confuse BLOCK-order when
4323         processing a destructor.
4324
4325 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
4326
4327         * decl.c (require_complete_types_for_parms): Call layout_decl
4328         after we've completed the type.
4329
4330 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4331
4332         * decl2.c (validate_nonmember_using_decl): Allow using templates
4333         from the global namespace.
4334
4335 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
4336
4337         Handle specifying template args to member function templates.
4338         * tree.c (build_overload): Always create an OVERLOAD for a template.
4339         * search.c (add_conversions): Handle finding an OVERLOAD.
4340         * decl2.c (check_classfn): Likewise.
4341         * lex.c (identifier_type): See through a baselink.
4342         * parse.y (do_id): Don't call do_identifier if we got a baselink.
4343         * class.c (instantiate_type, case TREE_LIST): Recurse.
4344
4345         * decl.c (grokdeclarator): Allow a boolean constant for array
4346         bounds, odd as that sounds.
4347
4348         * pt.c (unify): Be more strict about non-type parms, except for
4349         array bounds.
4350         (UNIFY_ALLOW_INTEGER): New macro.
4351
4352 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
4353
4354         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
4355
4356 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
4357
4358         * semantics.c (begin_class_definition): Call
4359         maybe_process_partial_specialization before push_template_decl.
4360         Don't call push_template_decl for a specialization.
4361         * search.c (lookup_field): Do return a member template class.
4362         * decl2.c (handle_class_head): Handle member template classes.
4363
4364         * decl.c (grokdeclarator): A parm type need not be complete.
4365
4366         * pt.c (convert_nontype_argument): Fix thinko.
4367
4368 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
4369
4370         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
4371         (global_delete_fndecl): New variable.
4372         * decl.c (global_delete_fndecl): Define it.
4373         (init_decl_processing): Set it.
4374         * init.c (build_builtin_delete_call): Use it.
4375         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
4376         nodes.
4377
4378 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
4379
4380         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
4381         type.
4382
4383         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
4384         * call.c (build_object_call): Also support references to functions.
4385         * typeck.c (convert_for_initialization): Don't decay a function
4386         if the target is a reference to function.
4387
4388         * search.c (add_conversions): Get all the overloads from a class.
4389
4390         * decl.c (grok_ctor_properties): Complain about any constructor
4391         that will take a single arg of the class type by value.
4392
4393         * typeck2.c (build_functional_cast): Can't create objects of
4394         abstract classes this way.
4395         * cvt.c (ocp_convert): Likewise.
4396
4397         * decl.c (grokfndecl): Member functions of local classes are not
4398         public.
4399
4400 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
4401
4402         * Make-lang.in (cc1plus): Add dependency on hash.o.
4403
4404 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
4405
4406         * search.c (get_abstract_virtuals): Complain about virtuals with
4407         no final overrider.
4408         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
4409         with no final overrider.
4410         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
4411         on virtuals with no final overrider.
4412
4413         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
4414
4415         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
4416         after layout_type.
4417
4418         * friend.c (do_friend): Don't set_mangled_name_for_decl.
4419
4420         * class.c (finish_struct_anon): Complain about non-fields.
4421         * decl2.c (build_anon_union_vars): Likewise.
4422
4423         * decl.c (grokdeclarator): Normal data members can't have the same
4424         name as the class, either.
4425         * class.c (finish_struct_anon): Neither can members of an
4426         anonymous union.
4427
4428 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
4429
4430         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
4431         (TYPE_BINFO): Likewise.
4432         (IS_AGGR_TYPE): Tweak.
4433         (SET_IS_AGGR_TYPE): New macro.
4434         (CLASS_TYPE_P): Tweak.
4435         (lang_type): Group mark bitfields together.  Remove linenum.
4436         (CLASSTYPE_SOURCE_LINE): Remove macro.
4437         (CLASSTYPE_MARKED_N): New macro.
4438         (SET_CLASSTYPE_MARKED_N): Likewise.
4439         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
4440         (CLASS_TYPE_MARKED_*): Use them.
4441         (SET_CLASSTYPE_MARKED_*): Likewise.
4442         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
4443         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4444         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
4445         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
4446         * class.c (class_cache_obstack): New variable.
4447         (class_cache_firstobj): Likewise.
4448         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
4449         (pushclass): Free the cache, when appropriate.
4450         (popclass): Tidy.
4451         (maybe_push_cache_obstack): Use class_cache_obstack.
4452         * decl.c (include hash.h).
4453         (typename_hash): New function.
4454         (typename_compare): Likewise.
4455         (build_typename_type): Check the hash table to avoid creating
4456         duplicates.
4457         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
4458         (grokdeclarator): Use CLASS_TYPE_P.
4459         (xref_basetypes): Likewise.
4460         (start_function): Likewise.  Don't put current_class_ref on the
4461         permanent obstack.
4462         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
4463         and TYPE_TI_ARGS.
4464         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
4465         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
4466         fields for types other than class types.  Do clear TYPE_ALIAS_SET
4467         for types other than class types, though.
4468         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
4469         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4470         * pt.c (process_template_parm): Don't set
4471         CLASSTYPE_GOT_SEMICOLON.
4472         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4473         Coerce arguments on the momentary obstack.
4474         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4475         (instantiate_class_template): Calculate template arguments on the
4476         momentary obstack.  Tidy.
4477         (tsubst_template_arg_vector): Use make_temp_vec.
4478         (tsubst_aggr_type): Put template arguments on the momentary
4479         obstack.
4480         (tsubst_decl): Likewise.
4481         (tsubst): Copy the array bounds index to the permanent obstack
4482         before building index types.  Use new macros.
4483         (unify): Use new macros.
4484         (do_type_instantiation): Likewise.
4485         * search.c (lookup_fnfields_1): Use new macros.
4486         (dfs_pushdecls): Build envelopes on the cache obstack.
4487         (dfs_compress_decls): Use new macros.
4488         (push_class_decls): Build on the cache obstack.
4489         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
4490         * sign.c (build_signature_pointer_or_reference_type): Use
4491         SET_IS_AGGR_TYPE.
4492         * tree.c (make_binfo): Check CLASS_TYPE_P.
4493         (copy_template_template_parm): Adjust.
4494         (make_temp_vec): Use push_expression_obstack.
4495         * typeck.c (complete_type): Use new macros.
4496         (comptypes): Likewise.
4497
4498 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
4499
4500         * pt.c (tsubst): Add diagnostics for invalid array, reference
4501         and pointer to member types.
4502
4503 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
4504
4505         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
4506
4507         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
4508         Simplify.
4509
4510         * parse.y (structsp): Fix cut-and-paste error.
4511
4512         * init.c (build_new): Complain about non-integral size.
4513
4514         * parse.y (unary_expr): Complain about defining types in sizeof.
4515
4516         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
4517
4518         * rtti.c (build_x_typeid): Complain about typeid without
4519         including <typeinfo>.
4520         (get_typeid): Likewise.  Complain about typeid of incomplete type.
4521         (get_tinfo_fn_dynamic): Likewise.
4522         (get_typeid_1): Not static anymore.
4523         * except.c (build_eh_type_type): Use get_typeid_1.
4524
4525         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
4526         ambiguous or private bases.  Fix warning for reference cast.
4527
4528 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
4529
4530         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
4531         * decl.c (duplicate_decls): Remove special-case code to deal with
4532         template friends, and just do the obvious thing.
4533         * pt.c (register_specialization): Tweak for clarity, and also to
4534         clear DECL_INITIAL for an instantiation before it is merged with a
4535         specialization.
4536         (check_explicit_specialization): Fix indentation.
4537         (tsubst_friend_function): Handle both definitions in friend
4538         declaration and outside friend declarations.
4539         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
4540         (regenerate_decl_from_template): Tweak accordingly.
4541         (instantiate_decl): Likewise.
4542
4543 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
4544
4545         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
4546         member function reference to error.
4547         * cvt.c (ocp_convert): Complain about converting an overloaded
4548         function to void.
4549
4550         * init.c (build_offset_ref): Just return a lone static member
4551         function.
4552
4553         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
4554         not internal ones.
4555
4556         * typeck.c (build_binary_op_nodefault): Improve error handling.
4557
4558         * decl.c (grokfndecl): Complain about making 'main' a template.
4559
4560         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
4561
4562         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
4563         TYPE_DECL in a template.
4564
4565 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
4566
4567         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
4568
4569         * decl.c (struct cp_function): Add named_label_uses.
4570         (push_cp_function_context): Save it.
4571         (pop_cp_function_context): Restore it.
4572         (define_label): Also complain about jumping into the scope of
4573         non-POD objects that don't have constructors.
4574         * tree.c (pod_type_p): New fn.
4575
4576         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
4577         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
4578         (get_tinfo_fn): Not here.
4579         * repo.c (repo_get_id): Abort if we get called for an incomplete
4580         type.
4581
4582 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
4583
4584         * except.c (expand_throw): Make sure first argument to
4585         __cp_push_exception is of type `void*' to avoid spurious error
4586         messages.
4587
4588 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
4589
4590         * pt.c (try_one_overload): Take orig_targs again.  Only check for
4591         mismatches against them; we don't care what a previous call found.
4592         (resolve_overloaded_unification): Adjust.
4593
4594         * search.c (lookup_field): Don't return anything for a non-type
4595         field from a dependent type.
4596         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
4597         in an array declarator.
4598         (start_decl): Push into the class before looking for the field.
4599
4600 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
4601
4602         * method.c (build_overload_value): Handle REFERENCE_TYPE.
4603
4604 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4605
4606         * decl.c (grokdeclarator): Allow namespace-scoped members if they
4607         are friends.
4608
4609 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
4610
4611         * pt.c (tsubst_decl): Don't mess with the global value of an
4612         un-mangled DECL_ASSEMBLER_NAME.
4613
4614 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
4615
4616         * decl.c (init_decl_processing): Remove CYGWIN conditional
4617         since CYGWIN is now able to deal with trapping signals.
4618
4619 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4620
4621         * cp-tree.h: Don't include gansidecl.h.
4622         * exception.cc: Include gansidecl.h (since we don't include config.h)
4623         * g++spec.c: Don't include gansidecl.h.
4624
4625 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
4626
4627         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
4628         size of dummy.
4629         (DECL_DEFINED_IN_CLASS_P): New macro.
4630         (TEMPLATE_PARMS_FOR_INLINE): Document.
4631         (check_static_variable_definition): New function.
4632         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
4633         appropriate.
4634         (check_static_variable_definition): Split out from ...
4635         (grokdeclarator): Here.
4636         * pt.c (check_default_tmpl_args): New function, split out from ...
4637         (push_template_decl_real): Here.
4638         (instantiate_template): Fix comment.
4639
4640 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
4641
4642         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
4643         (CP_TYPE_VOLATILE_P): Likewise.
4644         (CP_TYPE_RESTRICT_P): Likewise.
4645
4646 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
4647
4648         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
4649
4650 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
4651
4652         * class.c (instantiate_type): Be more helpful.
4653
4654         * decl2.c (import_export_decl): Call import_export_class.
4655
4656         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
4657         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
4658         * pt.c (tsubst_copy): Likewise.
4659
4660 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
4661
4662         * init.c (expand_vec_init): Fix off-by-one error.
4663
4664 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
4665
4666         * parse.y (apparent_template_type): New type.
4667         (named_complex_class_head_sans_basetype): Use it.
4668         * Makefile.in (CONFLICTS): One new conflict.
4669         * parse.c: Regenerated.
4670
4671 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
4672
4673         * cp-tree.h (COMPARE_STRICT): New macro.
4674         (COMPARE_BASE): Likewise.
4675         (COMPARE_RELAXED): Likewise.
4676         (COMPARE_REDECLARATION): Likewise.
4677         (same_type_p): Likewise.
4678         (same_or_base_type_p): Likewise.
4679         * call.c (standard_conversion): Use them, in place of comptypes
4680         with numeric arguments.
4681         (reference_binding): Likewise.
4682         (convert_like): Likewise.
4683         (build_over_call): Likewise.
4684         (is_subseq): Likewise.
4685         (is_properly_derived_from): Likewise.
4686         (compare_ics): Likewise.
4687         (joust): Likewise.
4688         * class.c (delete_duplicate_fields_1): Likewise.
4689         (resolves_to_fixed_type_p): Likewise.
4690         (instantiate_type): Likewise.  Remove #if 0'd code.
4691         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
4692         (pushdecl): Likewise.
4693         (lookup_name_real): Likewise.
4694         (grokdeclarator): Likewise.  Check for illegal array declarations.
4695         (grokparms): Likewise.
4696         (grok_op_properties): Likewise.
4697         * decl2.c (check_classfn): Likewise.
4698         * friend.c (is_friend): Likewise.
4699         (make_friend_class): Likewise.
4700         * init.c (expand_aggr_init): Likewise.
4701         (expand_vec_init): Likewise.
4702         * pt.c (is_member_template_class): Remove declaration.
4703         (is_specialization_of): Use COMPARE_* and new macros.
4704         (comp_template_parms): Likewise.
4705         (convert_nontype_argument): Likewise.
4706         (coerce_template_template_parms): Likewise.
4707         (template_args_equal): Likewise.
4708         (lookup_template_class): Likewise.
4709         (type_unification_real): Likewise.
4710         (unify): Likewise.
4711         (get_bindings_real): Likewise.
4712         * search.c (covariant_return_p): Likewise.
4713         (get_matching_virtual): Likewise.
4714         * sig.c (match_method_types): Likewise.
4715         * tree.c (vec_binfo_member): Likewise.
4716         (cp_tree_equal): Likewise.
4717         * typeck.c (common_type): Likewise.
4718         (comp_array_types): Likewise.  Get issues involving unknown array
4719         bounds right.
4720         (comptypes): Update comments.  Use new flags.
4721         (comp_target_types): Use new macros.
4722         (compparms): Likewise.
4723         (comp_target_parms): Likewise.
4724         (string_conv_p): Likewise.
4725         (build_component_ref): Likewise.
4726         (build_indirect_ref): Likewise.
4727         (build_conditional_expr): Likewise.
4728         (build_static_cast): Likewise.
4729         (build_reinterpret_cast): Likewise.
4730         (build_const_cast): Likewise.
4731         (build_modify_expr): Likewise.
4732         (convert_for_assignment): Likewise.
4733         (comp_ptr_ttypes_real): Likewise.
4734         (ptr_reasonably_similar): Likewise.
4735         (comp_ptr_ttypes_const): Likewise.
4736
4737 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
4738
4739         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
4740
4741 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
4742
4743         * decl2.c (delete_sanity): Pass integer_zero_node, not
4744         integer_two_node, to build_vec_delete.
4745         * init.c (build_array_eh_cleanup): Remove.
4746         (expand_vec_init_try_block): New function.
4747         (expand_vec_init_catch_clause): Likewise.
4748         (build_vec_delete_1): Don't deal with case that auto_delete_vec
4749         might be integer_two_node anymore.
4750         (expand_vec_init): Rework for initialization-correctness and
4751         exception-correctness.
4752         * typeck2.c (process_init_constructor): Make mutual exclusivity
4753         of cases more obvious.
4754
4755 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
4756
4757         * decl.c (lookup_name_real): OK, only warn if not lexing.
4758         Simplify suggested fix.
4759
4760         * cp-tree.h (IDENTIFIER_MARKED): New macro.
4761         * search.c (lookup_conversions): Use breadth_first_search.
4762         (add_conversions): Avoid adding two conversions to the same type.
4763         (breadth_first_search): Work with base binfos, rather
4764         than binfos and base indices.
4765         (get_virtual_destructor): Adjust.
4766         (tree_has_any_destructor_p): Adjust.
4767         (get_matching_virtual): Adjust.
4768
4769         * pt.c (push_template_decl_real): Generalize check for incorrect
4770         number of template parms.
4771         (is_member_template_class): #if 0.
4772
4773 1998-10-29  Richard Henderson  <rth@cygnus.com>
4774
4775         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
4776         last.
4777
4778 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
4779
4780         * lex.c: Call check_newline from lang_init always.  After
4781         calling cpp_start_read, set yy_cur and yy_lim to read from the
4782         cpplib token buffer.
4783
4784 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
4785
4786         * class.c (instantiate_type): Don't consider templates for a normal
4787         match.
4788
4789         * class.c (finish_struct_1): Don't complain about non-copy
4790         assignment ops in union members.
4791
4792         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
4793         (prepare_fresh_vtable): Likewise.
4794         (finish_struct_1): Don't call import_export_class.
4795         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
4796         (finish_prevtable_vardecl): Lose.
4797         (finish_file): Don't call it.
4798         * pt.c (instantiate_class_template): Likewise.
4799         * cp-tree.h: Remove it.
4800
4801         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
4802         * decl.c (finish_function): Not here.
4803         (start_function): Do set DECL_INITIAL.
4804
4805         * pt.c (push_template_decl_real): Complain about default template
4806         args for enclosing classes.
4807
4808         * call.c (add_function_candidate): Treat conversion functions
4809         as coming from the argument's class.
4810         * cp-tree.h (DECL_CONV_FN_P): New fn.
4811         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
4812         * class.c (add_method): Use DECL_CONV_FN_P.
4813         * decl2.c (check_classfn): Likewise.
4814         * error.c (dump_function_name): Likewise.
4815         (dump_function_decl): Likewise.
4816         * pt.c (fn_type_unification): Likewise.
4817         * search.c (add_conversions): Likewise.
4818
4819 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
4820
4821         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
4822         * method.c (hack_identifier): Also check for using RESULT_DECL
4823         from outer context.
4824
4825 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
4826
4827         * decl.c (grokdeclarator): Use type_quals, rather than constp,
4828         consistently.
4829
4830 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
4831
4832         * call.c (standard_conversion): instantiate_type here.
4833         (reference_binding): And here.
4834         (implicit_conversion): Not here.
4835         (build_op_delete_call): No need to cons up an OVERLOAD.
4836         * cvt.c (cp_convert_to_pointer): instantiate_type here.
4837         (convert_to_reference): And here.
4838         * decl.c (grok_reference_init): Not here.
4839         (grokparms): Or here.
4840         * typeck2.c (digest_init): Or here.
4841         * typeck.c (decay_conversion): Take the address of overloaded
4842         functions, too.
4843         (require_instantiated_type): Lose.
4844         (convert_arguments): Don't handle unknown types here.
4845         (build_c_cast): Likewise.
4846         (build_binary_op): Gut.
4847         (build_conditional_expr): Don't require_instantiated_type.
4848         (build_modify_expr): Likewise.
4849         (build_static_cast): Don't instantiate_type.
4850         (build_reinterpret_cast): Likewise.
4851         (build_const_cast): Likewise.
4852         (convert_for_initialization): Likewise.
4853         (build_ptrmemfunc): Use type_unknown_p.
4854         (convert_for_assignment): Also do default_conversion on overloaded
4855         functions.  Hand them off to ocp_convert.
4856
4857 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
4858
4859         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
4860         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
4861
4862         * class.c (finish_struct_1): Use build_cplus_array_type to build
4863         array types.
4864         * decl.c (init_decl_processing): Likewise.
4865         * except.c (expand_end_eh_spec): Likewise.
4866         * search.c (expand_upcast_fixups): Simplify very slightly.
4867
4868 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
4869
4870         * decl.c (grokdeclarator): Complain about a variable using
4871         constructor syntax coming back null from start_decl.
4872
4873         * friend.c (make_friend_class): Complain about trying to make
4874         a non-class type a friend.
4875
4876         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
4877         (start_function): Not here.
4878
4879 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
4880
4881         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
4882
4883 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
4884
4885         * typeck2.c (process_init_constructor): Only skip anonymous fields
4886         if they are bitfields.
4887
4888         * cp-tree.def (TYPEOF_TYPE): New code.
4889         * error.c (dump_type_real): Handle it.
4890         * pt.c (tsubst): Likewise.
4891         * tree.c (search_tree): Likewise.
4892         * semantics.c (finish_typeof): New fn.
4893         * parse.y (typespec): Use it.
4894         * cp-tree.h: Declare it.
4895
4896 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
4897
4898         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
4899
4900 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
4901
4902         * typeck.c (convert_arguments): Don't handle pmf references
4903         specially.
4904
4905         * init.c (build_member_call): Don't try to convert to the base type
4906         if it's ambiguous or pedantic.
4907
4908         * typeck2.c (check_for_new_type): Only depend on pedantic for
4909         C-style casts.
4910
4911 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
4912
4913         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
4914         non-converting constructors.
4915
4916 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4917
4918         * gxxint.texi: Correct documentation for n, N, Q, and B.
4919
4920 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4921
4922         * parse.y (condition): Convert VAR_DECL from reference to indirect
4923         reference.
4924
4925 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
4926
4927         * exception.cc (__cp_pop_exception): Free the original exception
4928         value, not the potentially coerced one.
4929
4930 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
4931
4932         * Makefile.in (hash.h): Run gperf when necessary.
4933
4934         * cp-tree.h (CP_TYPE_READONLY): Remove.
4935         (CP_TYPE_VOLATILE): Likewise.
4936         (CP_TYPE_QUALS): New macro.
4937         (CP_TYPE_CONST_P): Likewise.
4938         (CP_TYPE_VOLATILE_P): Likewise.
4939         (CP_TYPE_RESTRICT_P): Likewise.
4940         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
4941         (cp_build_type_variant): Rename to ...
4942         (cp_build_qualified_type): New function.
4943         (c_apply_type_quals_to_decl): Declare.
4944         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
4945         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
4946         (cp_type_qual_from_rid): New function.
4947         (compparms): Remove unused parameter.  All callers changed.
4948         (cp_type_quals): New function.
4949         (at_least_as_qualified_p): Likewise.
4950         (more_qualified_p): Likewise.
4951
4952         * call.c (standard_conversion): Replace calls to
4953         cp_build_type_variant with cp_build_qualified_type.  Use
4954         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
4955         compare them.  Use CP_TYPE_* macros to check qualifiers.
4956         (reference_binding): Likewise.
4957         (implicit_conversion): Likewise.
4958         (add_builtin_candidates): Likewise.
4959         (build_over_call): Likewise.
4960         * class.c (overrides): Compare all qualifiers, not just `const',
4961         on method declarations.
4962         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
4963         (convert_pointer_to_real): Likewise.
4964         (type_promotes_to): Likewise.
4965         * decl.c (check_for_uninitialized_const_var): New function.
4966         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
4967         (cp_finish_decl): Use check_for_uninitialized_const_var.
4968         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
4969         handle `restrict'.
4970         (grok_ctor_properties): Likewise.
4971         (grok_op_properties): Likewise.
4972         (start_function): Likewise.
4973         (rever_static_member_fn): Likewise.
4974         * decl2.c (grok_method_quals): Likewise.
4975         (grokfield): Likewise.
4976         * error.c (dump_readonly_or_volatile): Rename to ...
4977         (dump_qualifiers): New function.  Handle `restrict'.
4978         (dump_type_real): Use it.
4979         (dump_aggr_type): Likewise.
4980         (dump_type_prefix): Likewise.
4981         (dump_type_suffix): Likewise.
4982         (dump_function_decl): Likewise.
4983         (cv_as_string): Likewise.
4984         * gxx.gperf: Add __restrict and __restrict__.
4985         * gxxint.texi: Document `u' as used for `__restrict', and a few
4986         other previously undocumented codes.
4987         * hash.h: Regenerated.
4988         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
4989         (build_member_call): Likewise.
4990         (build_new_1): Likewise.
4991         * lex.c (init_parse): Add entry for RID_RESTRICT.
4992         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
4993         (cp_type_qual_from_rid): Define.
4994         * lex.h (enum rid): Add RID_RESTRICT.
4995         * method.c (process_modifiers): Deal with `restrict'.
4996         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
4997         * parse.c: Regenerated.
4998         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
4999         (tsubst_aggr_type): Likewise.
5000         (tsubst): Likewise.
5001         (check_cv_quals_for_unify): Likewise.
5002         (unify): Likewise.
5003         * rtti.c (init_rtti_processing): Likewise.
5004         (build_headof): Likewise.
5005         (get_tinfo_var): Likewise.
5006         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
5007         (expand_class_desc): Likewise.
5008         (expand_attr_desc): Likewise.
5009         (synthesize_tinfo_fn): Likewise.
5010         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
5011         (get_matching_virtual): Likewise.
5012         (expand_upcast_fixups): Likewise.
5013         * sig.c (build_signature_pointer_or_reference_name): Take
5014         type_quals, not constp and volatilep.
5015         (build_signature_pointer_or_reference_type): Likewise.
5016         (match_method_types): More CP_TYPE_QUALS conversion, etc.
5017         (build_signature_pointer_constructor): Likewise.
5018         (build_signature_method_call): Likewise.
5019         * tree.c (build_cplus_array_type): Likewise.
5020         (cp_build_type_variant): Rename to ...
5021         (cp_build_qualified_type): New function.  Deal with `__restrict'.
5022         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
5023         (build_exception_variant): Likewise.
5024         (mapcar): Likewise.
5025         * typeck.c (qualif_type): Likewise.
5026         (common_type): Likewise.
5027         (comptypes): Likewise.
5028         (comp_cv_target_types): Likewise.
5029         (at_least_as_qualified_p): Define.
5030         (more_qualified_p): Likewise.
5031         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
5032         (compparms): Likewise.
5033         (inline_conversion): Likewise.
5034         (string_conv_p): Likewise.
5035         (build_component_ref): Likewise.
5036         (build_indirect_ref): Likewise.
5037         (build_array_ref): Likewise.
5038         (build_unary_op): Likewise.
5039         (build_conditional_expr): Likewise.
5040         (build_static_cast): Likewise.
5041         (build_c_cast): Likewise.
5042         (build_modify_expr): Likewise.
5043         (convert_For_assignment): Likewise.
5044         (comp_ptr_ttypes_real): Likewise.
5045         (cp_type_quals): New function.
5046
5047 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
5048
5049         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
5050         (CP_TYPE_VOLATILE): Likewise.
5051         * decl.c (grokdeclarator): Use them.
5052         * tree.c (canonical_type_variant): Likewise.
5053
5054 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5055
5056         * parse.y (named_class_head): Push into class while parsing the
5057         base class list.
5058         * decl2.c (push_scope, pop_scope): New functions.
5059         * cp-tree.h: Declare them.
5060         * init.c (build_new_1): Delay cleanup until end of full expression.
5061
5062 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
5063
5064         * typeck.c (build_component_ref): Use of a type here is an error.
5065
5066 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
5067
5068         Revamp references to member functions.
5069         * method.c (hack_identifier): Call build_component_ref for a
5070         reference to a member function.
5071         * typeck.c (build_component_ref): Only return a single function
5072         if it's static.  Otherwise, return a COMPONENT_REF.
5073         (build_x_function_call): Handle a COMPONENT_REF.
5074         (build_unary_op): Handle all unknown-type things.
5075         * decl2.c (arg_assoc): Handle COMPONENT_REF.
5076         * class.c (instantiate_type): Complain if the function we get is a
5077         nonstatic member function.  Remove code for finding "compatible"
5078         functions.
5079         * pt.c (tsubst_copy): Handle NOP_EXPR.
5080         * tree.c (build_dummy_object): New fn.
5081         (maybe_dummy_object): New fn.
5082         (is_dummy_object): New fn.
5083         * cp-tree.h: Declare them.
5084         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
5085         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
5086         * init.c (build_member_call): Use maybe_dummy_object and
5087         is_dummy_object.
5088         (build_offset_ref): Use maybe_dummy_object.
5089         (resolve_offset_ref): Use is_dummy_object.
5090         * typeck.c (build_x_function_call): Call build_dummy_object.
5091         (unary_complex_lvalue): Call is_dummy_object.
5092
5093         * typeck.c (build_component_addr): Make sure field is a field.
5094
5095         * call.c (build_new_op): Delete obsolete code.
5096
5097         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
5098
5099 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5100
5101         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
5102         std if std is ignored.
5103
5104 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
5105
5106         * decl.c (grokvardecl): Fix thinko.
5107
5108         * decl.c (grokdeclarator): Embedded attrs bind to the right,
5109         not the left.
5110
5111         * parse.y (fn.def2): Fix 'attrs' format.
5112
5113 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
5114
5115         * Makefile.in (CONFLICTS): Update.
5116         * parse.y (expr_or_declarator_intern): New rule.
5117         (expr_or_declarator, direct_notype_declarator, primary,
5118         functional_cast): Use it.
5119         (notype_declarator_intern): New rule.
5120         (notype_declarator, complex_notype_declarator): Use it.
5121
5122 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
5123
5124         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
5125         (grokvardecl): Likewise.
5126
5127 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5128
5129         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
5130         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
5131
5132         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
5133
5134         * pt.c (process_partial_specialization): Cast 1st argument of
5135         `bzero' to (PTR).
5136
5137         * tree.c (build_base_fields): Cast `base_align' to (int) when
5138         comparing against one.
5139
5140 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
5141
5142         * decl.c (lookup_name_real): Handle template parameters for member
5143         templates where said parameters have the same name as the
5144         surrounding class.
5145
5146         * decl.c (expand_static_init): Build cleanups before entering the
5147         anonymous function used to do them to avoid access-checking
5148         confusion.
5149
5150         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
5151         accidentally removed by previous change, and make DECL_RTL here.
5152         * class.c (add_method): Don't make DECL_RTL here.
5153
5154         * pt.c (for_each_template_parm): Don't examine uninstantiated
5155         default arguments.
5156
5157 1998-10-16  Dave Brolley  <brolley@cygnus.com>
5158
5159         * lex.c (real_yylex): Fix unaligned access of wchar_t.
5160
5161 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
5162
5163         * class.c (add_method): Fix documentation to reflect previous
5164         changes.  Check for duplicate method declarations here.
5165         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
5166         correctly; such things never match.
5167         (grokfndecl): Don't look for duplicate methods here.
5168         * decl2.c (check_classfn): Don't assume names are mangled.
5169         Don't add bogus member function declarations to a class before the
5170         class type is complete.
5171         (grokfield): Reformat error message.
5172         * method.c (set_mangled_name_for_decl): Don't mangle names while
5173         processing_template_decl.
5174
5175 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
5176
5177         * typeck.c (build_indirect_ref): Complain about a pointer to data
5178         member, too.
5179         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
5180         data member.
5181         * init.c (resolve_offset_ref): Don't undo the above.
5182
5183         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
5184         (struct lang_decl_flags): Add `bitfield'.
5185         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
5186         DECL_BIT_FIELD.
5187         * decl2.c (grokbitfield, grok_alignof): Likewise.
5188         * init.c (build_offset_ref): Likewise.
5189         * typeck.c (build_component_addr, expr_sizeof): Likewise.
5190         * cvt.c (build_up_reference): Don't crash if taking the address
5191         returns error_mark_node.
5192
5193         * decl.c (grokfndecl): Also check ctype when checking for ::main().
5194
5195 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
5196
5197         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
5198         Do mangling here.
5199         (grokdeclarator): Instead of here.
5200         * friend.c (do_friend): Lose special handling of ::main and
5201         __builtin_*.
5202         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
5203
5204         * spew.c (yylex): Clear looking_for_typename if we got
5205         'enum { ... };'.
5206
5207 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
5208
5209         * class.c (maybe_warn_about_overly_private_class): Improve error
5210         messages for class with only private constructors.
5211
5212         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
5213         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
5214         (build_typename_type): New function.
5215         * decl.c (build_typename_type): Broken out from ...
5216         (make_typename_type): Use it.
5217         * search.c (lookup_field): Likewise.
5218
5219 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5220
5221         * pt.c (convert_nontype_argument): Check against type_referred_to.
5222         * decl.c (grokvardecl): Check for declarator name before building
5223         DECL_ASSEMBLER_NAME.
5224
5225 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
5226
5227         * pt.c (lookup_template_class): Add comment.
5228         (instantiate_class_template): Don't mark the _TYPE node for
5229         member class templates as an instantiation.
5230
5231 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
5232
5233         * decl.c (grokfndecl): Fix my thinko.
5234
5235 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
5236
5237         * tinfo2.cc (fast_compare): Remove.
5238         (before): Just use strcmp.
5239         * tinfo.cc (operator==): Just use strcmp.
5240
5241 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
5242
5243         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
5244         declarations.
5245
5246 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
5247
5248         * cp-tree.h (specializations_of_same_template_p): Remove.
5249         * search.c (get_template_base): Don't use it.
5250         (get_template_base_recursive): Likewise.
5251         * pt.c (specializations_of_same_template_p): Remove.
5252         (unify): Don't use it.
5253         (lookup_template_class): Find the correct parent when setting
5254         CLASSTYPE_TI_TEMPLATE.
5255
5256 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
5257
5258         * tinfo.cc (operator==): Always compare names.
5259
5260 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
5261
5262         * decl.c (start_function): Fix cut-and-paste error.
5263
5264 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
5265
5266         * inc/typeinfo: Add #pragma interface.
5267         (operator!=): Just call operator==.
5268         * tinfo.cc: Add #pragma implementation.
5269         (operator==): Move from inc/typeinfo and tinfo2.cc.
5270         Check __COMMON_UNRELIABLE instead of _WIN32.
5271
5272         * typeck2.c (my_friendly_abort): Add URL.
5273
5274 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
5275
5276         * decl.c (start_method): Added extra parameter for attributes.
5277         * cp-tree.h (start_method): Update prototype.
5278         * parse.y (fn.def2): Update start_method parameter list.
5279
5280 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
5281
5282         * cp-tree.h (specializations_of_same_template_p): Declare.
5283         * pt.c (specializations_of_same_template_p): New function.
5284         (unify): Use it.
5285         * search.c (get_template_base): Use it.
5286         (get_template_base_recursive): Likewise.
5287
5288 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
5289
5290         * decl2.c (start_objects): Add new variable `joiner' and
5291         initialize it properly.
5292
5293 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
5294
5295         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
5296         change to vtable types.
5297
5298         * cvt.c (ocp_convert): Avoid infinite recursion caused by
5299         1998-10-03 change.
5300
5301 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
5302
5303         * pt.c (resolve_overloaded_unification): New fn.
5304         (try_one_overload): Likewise.
5305         (unify): Don't fail on unknown type.
5306         (type_unification_real): Likewise.  Use resolve_overloaded_unification
5307         to handle an overloaded argument.
5308         (template_args_equal): Split out...
5309         (comp_template_args): From here.
5310         (determine_specialization): Also allow a template with more
5311         parms than were explicitly specified.
5312         * cp-tree.h: Add template_args_equal.
5313         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
5314
5315 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
5316
5317         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
5318         change.
5319
5320 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
5321
5322         * typeck.c (unsigned_type): Only return TItype nodes when
5323         HOST_BITS_PER_WIDE_INT is >= 64 bits.
5324         (signed_type): Likewise.
5325         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
5326         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5327         (init_decl_processing): Only create TItype nodes when
5328         HOST_BITS_PER_WIDE_INT is >= 64 bits.
5329         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
5330         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5331
5332 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5333
5334         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
5335         (gxx.gperf): Update comments describing invocation flags.
5336         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
5337
5338 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
5339
5340         * class.c (finish_struct_1): Add commentary on previous change.
5341
5342         * cp-tree.h (vtbl_ptr_type_node): New variable.
5343         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
5344         already of the right type.
5345         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
5346         Simplify code to grow vtable.
5347         * decl.c (vtbl_ptr_type_node): Define.
5348         (init_decl_processing): Initialize it.
5349
5350 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
5351
5352         * cp-tree.def (PTRMEM_CST): New tree node.
5353         * cp-tree.h (ptrmem_cst): New type.
5354         (lang_type): Remove local_typedecls.
5355         (dummy): Increase to 12 bits from 11.
5356         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
5357         (PTRMEM_CST_CLASS): New macro.
5358         (PTRMEM_CST_MEMBER): Likewise.
5359         (current_access_specifier): New variable.
5360         (current_class_type): Remove duplicate declaration.
5361         (finish_struct): Change prototype.
5362         (unreverse_member_declarations): New function.
5363         (pushdecl_class_level): Change prototype.
5364         (grok_enum_decls): Remove.
5365         (fixup_anonymous_union): New function.
5366         (grok_x_components): Change prototype.
5367         (tsubst_chain): Remove.
5368         (finish_member_template_decl): Likewise.
5369         (check_explicit_specialization): Fix indentation.
5370         (finish_class_definition): Change prototype.
5371         (finish_member_class_template): Likewise.
5372         (finish_member_declaration): New function.
5373         (check_multiple_declarators): Likewise.
5374         * class.c (class_stack_node_t): New type.
5375         (current_class_base): Remove.
5376         (current_class_stack): Change type.
5377         (current_access_specifier): New variable.
5378         (grow_method): Remove.
5379         (check_member_decl_is_same_in_complete_scope): Break out from
5380         finish_struct.
5381         (make_method_vec): New function.
5382         (free_method_vec): Likewise.
5383         (add_implicitly_declared_members): Break out from finish_struct_1.
5384         (free_method_vecs): New variable.
5385         (add_method): Rework for direct use from parser.
5386         (handle_using_decl): Watch for NULL_TREE while iterating through
5387         CLASSTYPE_METHOD_VEC.
5388         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
5389         just do some error-checking.
5390         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
5391         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
5392         (finish_struct): Change prototype.  Simplify; fields and methods
5393         are already set up at this point.
5394         (init_class_processing): Set up current_class_stack.
5395         (pushclass): Save current_access_specifier.
5396         (popclass): Restore it.
5397         (currently_open_class): Simplify.
5398         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
5399         * decl.c (saved_scope): Add access_specifier.
5400         (maybe_push_to_top_level): Save it.
5401         (pop_from_top_level): Restore it.
5402         (maybe_process_template_type_declaration): Use
5403         finish_member_declaration.
5404         (pushtag): Likewise.
5405         (pushdecl_class_level): Don't return a value.
5406         (fixup_anonymous_union): Break out from grok_x_components.
5407         (shadow_tag): Use it.
5408         (xref_tag): Complain about using an elaborated type specifier to
5409         reference a template type parameter or typedef name.
5410         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
5411         (current_local_enum): Remove.
5412         (build_enumerator): Call finish_member_declaration.
5413         (grok_enum_decls): Remove.
5414         * decl2.c (grok_x_components): Simplify.
5415         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
5416         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
5417         (merge_functions): Add to comment.
5418         (arg_assoc_type): Prototype.
5419         (arg_assoc): Pass as many arguments as there are parameters.
5420         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
5421         OFFSET_REF.
5422         * expr.c (cpls_expand_expr): Remove dead code.  Handle
5423         PTRMEM_CST.
5424         * friend.c (do_friend): Lookup friends when in nested classes.
5425         Change comments.
5426         * init.c (build_offset_ref): Do lookup even for classes that are
5427         only partially defined.
5428         (decl_constant_value): Remove dead code.
5429         * method.c (build_overload_value): Remove hack where by TYPE was
5430         not a TYPE.  Handle PTRMEM_CST.
5431         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
5432         should go.
5433         * parse.y (components, notype_components, component_decl,
5434         component_decl_1, component_declarator, component_declarator0):
5435         Now all are itype rather than ttype.  Rework to add members to
5436         classes on the fly.
5437         (typesqpecqual_reserved): Use check_multiple_declarators.
5438         (structsp): Update class to finish_class_definition.
5439         (do_xref_defn): Unsplit into named_class_head.
5440         (access_specifier): Set current_access_specifier.
5441         * pt.c (set_current_access_from_decl): New function.
5442         (finish_member_template_decl): Don't take the parameters.
5443         (comp_template_args): Make more robust.
5444         (lookup_template_class): Don't use current_local_enum.
5445         (for_each_template_parm): Handle PTRMEM_CST.
5446         (instantiate_class_template): Use set_current_access_from_decl,
5447         finish_member_declaration and unreverse_member_declarations.  Set
5448         lineno/input_filename before generating implicit member functions.
5449         (type_unification_real): Don't assume back-unification happens
5450         only for the last argument.
5451         (regenerate_decl_from_template): Call pushclass a bit earlier.
5452         (tsubst_chain): Remove.
5453         (tsubst_enum): Use set_current_access_from_decl.
5454         (set_mangled_name_for_template_decl): Fix indentation.
5455         * search.c (lookup_fnfields_1): Change iteration through
5456         CLASSTYPE_METHOD_VEC.
5457         (dfs_pushdecls): Likewise.
5458         (dfs_compress_decls): Likewise.
5459         (add_conversions): Likewise.
5460         * semantics.c (finish_class_definition): Don't take components.
5461         Change call to finish_struct.
5462         (finish_member_declaration): New function.
5463         (finish_member_class_template): Don't take template parameters.
5464         Change call to grok_x_components.  Call finish_member_template_decl.
5465         (check_multiple_declarators): New function.
5466         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
5467         a passed in fieldlist.
5468         * tree.c (search_tree): Handle PTRMEM_CST.
5469         (mapcar): Likewise.
5470         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
5471         INTEGER_CSTs, for pointer-to-data members.
5472
5473         * call.c (resolve_args): Resolve template specializations, if
5474         possible.
5475
5476 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5477
5478         * Makefile.in (spew.o): Depend on toplev.h.
5479
5480         * call.c (compare_ics): Initialize variables `deref_from_type2',
5481         `deref_to_type1' and `deref_to_type2'.
5482
5483         * except.c (get_eh_type): Hide prototype and definition.
5484         (process_start_catch_block_old): Remove unused static prototype.
5485
5486         * pt.c (tsubst_decl): Initialize variable `argvec'.
5487
5488         * spew.c: Include toplev.h.
5489
5490 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
5491
5492         * pt.c (instantiate_decl): Do save and restore file position.
5493
5494 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5495
5496         * method.c (build_decl_overload_real): Clear
5497         numeric_output_need_bar after __.
5498
5499 1998-10-05  Nathan Sidwell  <nathan@acm.org>
5500
5501         * call.c (build_new_method_call): Issue 'incomplete type' error,
5502         if class is not defined.
5503
5504 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5505
5506         * call.c (build_object_call): Move declaration of variable
5507         `fn' into the scope where it is used.  Don't access variable
5508         `fn' when it is uninitialized, instead use `fns'.
5509
5510 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5511
5512         * errfn.c (cp_thing): Print buf as a string not as a printf format
5513         to avoid problems with the operator%.  Consequently, `%%' sequences
5514         in format are copied as `%' in buf.
5515
5516 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
5517
5518         * pt.c (pop_tinst_level): Call extract_interface_info.
5519         (instantiate_decl): Don't save and restore file position.
5520
5521         * decl.c (cp_finish_decl): Make statics in extern inlines and
5522         templates common, if possible and the target doesn't support weak
5523         symbols.
5524
5525         * decl.c (grokdeclarator): Remove redundant calls to
5526         build_type_variant and some duplicated code.
5527         * sig.c (build_signature_reference_type): Only take the type parm.
5528         (build_signature_pointer_type): Likewise.
5529         * tree.c (build_cplus_method_type): Adjust.
5530         * cp-tree.h: Update.
5531
5532 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
5533
5534         * call.c (build_over_call): Make pedwarns about dropped qualifiers
5535         into full-fledged errors.
5536         * cvt.c (convert_to_reference): Likewise.
5537         * typeck.c (convert_for_assignment): Likewise.
5538
5539         * search.c (expand_upcast_vtables): In addition to unsetting
5540         TREE_READONLY, remove top-level const type qualifier.
5541
5542 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
5543
5544         * class.c (current_class_ptr, current_class_ref): Clarify
5545         documentation.
5546         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
5547         NOP type conversions.
5548         * decl.c (decls_match): Use comptypes directly; ignore
5549         qualifiers on the DECL.
5550         (duplicate_decls): Remove qualifier checks on DECL.
5551         (grokdeclarator): Make the type built up include top-level
5552         qualifiers.
5553         * decl2.c (do_dtors): Fix spelling error.
5554         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
5555         when printing type information.
5556         * init.c (build_new_1): Add documentation.  Deal with the fact
5557         that type of allocated memory now contains qualifiers.
5558         * lex.c (is_global): Improve error-recovery.
5559         * sig.c (build_member_function_pointer): Don't cast away const
5560         on fields of sigtable_entry_type.
5561         * tree.c (lvalue_type): Don't look at top-level qualifiers on
5562         expressions.
5563         * typeck.c (decay_conversion): Likewise.
5564         (build_component_ref): Make sure the type of the COMPONENT_REF
5565         contains top-level qualifiers, as appropriate.  Improve
5566         error-handling.
5567         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
5568         (build_array_ref): Likewise.
5569         (build_unary_op): Improve error-recovery.
5570         (unary_complex_lvalue): Make taking the address a bound member
5571         function an error, not a sorry.
5572         (build_conditional_expr): Look at the type qualifiers, not the
5573         qualifiers on the expression itself.
5574
5575 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
5576
5577         * decl2.c (merge_functions): Remove duplicates.
5578
5579         * decl2.c: Add -f{no-,}implicit-inline-templates.
5580         (import_export_decl): Check it.
5581
5582         * decl.c (lookup_name_real): Template parms also take precedence
5583         over implicit typename.  Only warn if yylex.
5584
5585         * typeck.c (build_conditional_expr): Only fold if ifexp is an
5586         INTEGER_CST.
5587
5588         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
5589         instead of linkage.
5590
5591 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
5592
5593         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
5594         * class.c (build_vbase_pointer): Use it.
5595         * rtti.c (expand_class_desc): Likewise.
5596         * tree.c (build_vbase_pointer_fields): Likewise.
5597
5598 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
5599
5600         * decl.c (start_decl): Add invocation of
5601         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
5602         (start_function): Add invocation of
5603         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
5604
5605         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
5606         HANDLE_GENERIC_PRAGMAS.
5607
5608 1998-09-28  Anthony Green  <green@cygnus.com>
5609
5610         * semantics.c (finish_asm_stmt): Always permit volatile asms.
5611
5612 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
5613
5614         * decl.c (grokdeclarator): Tighten checks for invalid
5615         destructors.  Improve error-messages and error-recovery.
5616         * decl2.c (check_classfn): Don't assume that mangled destructor
5617         names contain type information.
5618
5619 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
5620
5621         * search.c (get_base_distance): Remove assert.
5622
5623         * decl2.c (build_anon_union_vars): Don't process a field with no
5624         name.
5625         (finish_anon_union): Also complain about local anon unions with no
5626         members.
5627
5628 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5629
5630         * decl.c (lookup_namespace_name): If the name is a namespace,
5631         return it immediately.
5632
5633 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5634
5635         * cp-tree.h (define_case_label): Remove unused parameter.
5636         (check_java_method): Likewise.
5637         (grokclassfn): Likewise.
5638         (expand_aggr_init): Likewise.
5639         (build_x_delete): Likewise.
5640         (maybe_end_member_template_processing): Likewise.
5641         (unshare_base_binfos): Add prototype.
5642         (string_conv_p): Likewise.
5643         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
5644
5645         * cvt.c (build_up_reference): Remove unused parameter
5646         `checkconst', all callers changed.
5647         (build_type_conversion): Mark parameter `code' with
5648         ATTRIBUTE_UNUSED.
5649         (build_expr_type_conversion): Initialize variable `conv'.
5650
5651         * decl.c (push_namespace): Initialize variable `d'.
5652         (define_case_label): Remove unused parameter `decl', all callers
5653         changed.
5654
5655         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
5656         `argc' with ATTRIBUTE_UNUSED.
5657         (grokclassfn): Remove unused parameter `cname', all callers
5658         changed.
5659         (check_java_method): Likewise for parameter `ctype'.
5660         (copy_assignment_arg_p): Mark parameter `virtualp' with
5661         ATTRIBUTE_UNUSED.
5662         (finish_prevtable_vardecl): Likewise for parameter `prev'.
5663
5664         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
5665
5666         * init.c (expand_aggr_init_1): Remove unused parameter
5667         `alias_this', all callers changed.
5668         (expand_aggr_init): Likewise.
5669         (expand_default_init): Likewise.
5670         (build_new_1): Initialize variable `susp'.
5671         (build_x_delete): Remove unused parameter `type', all callers
5672         changed.
5673
5674         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
5675         ATTRIBUTE_UNUSED.
5676         (readescape): Use (unsigned) value in shift.
5677         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
5678         comparing to a signed quantity.
5679
5680         * pt.c (maybe_end_member_template_processing): Remove unused
5681         parameter `decl', all callers changed.
5682         (check_explicit_specialization): Add braces around empty body in
5683         an else-statement.
5684         (current_template_args): Initialize variable `args'.
5685         (lookup_template_class): Likewise for variable `prev_local_enum'.
5686         (tsubst_decl): Likewise for variable `r'.
5687         (set_mangled_name_for_template_decl): Initialize variable
5688         `context'.
5689
5690         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
5691         Likewise for variable `i'.
5692         (yylex): Initialize variable `trrr'.
5693
5694         * typeck.c (compparms): Mark variable `strict' with
5695         ATTRIBUTE_UNUSED.
5696
5697         * xref.c (simplify_type): Cast argument of ctype function to
5698         `unsigned char'.
5699
5700 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
5701
5702         * cp-tree.h (language_lvalue_valid): Remove.
5703         * decl.c (grokdeclarator): Don't disallow references to functions.
5704         * tree.c (lvalue_p_1): New function, combining duplicated
5705         code from ...
5706         (lvalue_p): Use it.
5707         (real_lvalue_p): Likewise.
5708         * typeck.c (language_lvalue_valid): Remove.
5709         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
5710         they don't have TREE_READONLY set.
5711         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
5712
5713 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
5714
5715         * spew.c (yylex): Give diagnostic.
5716         * hash.h (is_reserved_word): Add export.
5717         * gxx.gperf: Likewise.
5718         * lex.h (rid): Add RID_EXPORT.
5719         * lex.c (init_parse): Likewise.
5720
5721 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
5722
5723         * friend.c (do_friend): Make warning a full sentence.
5724
5725 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
5726
5727         * parse.y (component_decl_list): Improve error-recovery.
5728
5729 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
5730
5731         * decl.c (make_typename_type): Move error to point where name
5732         variable can be used by dump_type.
5733
5734 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
5735
5736         * decl.c (grokfndecl): Improve error-recovery.
5737         * decl2.c (grokfield): Likewise.
5738         * pt.c (finish_member_template_decl): Likewise.
5739
5740 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5741
5742         * method.c (hack_identifier): Finding multiple members is always
5743         an error.
5744
5745 1998-09-21  Per Bothner  <bothner@cygnus.com>
5746
5747         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
5748
5749 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
5750
5751         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
5752
5753 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
5754
5755         * class.c (maybe_warn_about_overly_private_class): Reformat.
5756
5757 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
5758
5759         * exception.cc (__cplus_type_matcher): Realign some code.
5760
5761 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
5762
5763         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
5764         (tinfo2.o): Likewise.
5765         (exception.o): Likewise.
5766         (new.o): Likewise.
5767         (opnew.o): Likewise.
5768         (opnewnt.o): Likewise.
5769         (opvnew.o): Likewise.
5770         (opvnewnt.o): Likewise.
5771         (opdel.o): Likewise.
5772         (opdelnt.o): Likewise.
5773         (opvdel.o): Likewise.
5774         (opvdelnt.o): Likewise.
5775
5776 1998-09-16  Richard Henderson  <rth@cygnus.com>
5777
5778         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
5779
5780 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
5781
5782         * call.c (build_field_call): Handle static data members too.
5783
5784         * typeck.c (comptypes): When comparing pointer types, check
5785         whether referred types match even in strictest modes.
5786
5787 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
5788
5789         * cp-tree.h: Revert previous change.
5790         (finish_struct_methods): Remove declaration.
5791         * class.c: Revert previous change.
5792         (maybe_warn_about_overly_private_class): New function.
5793         (finish_struct_methods): Declare here, and make static.  Remove
5794         unnecessary parameters.  Tidy slightly.  Use
5795         maybe_warn_about_overly_private_class.
5796         (finish_struct_1): Adjust.  Remove check for private constructors,
5797         now done elsewhere.
5798         (finish_struct): Adjust.
5799
5800 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
5801
5802         * except.c (expand_start_catch_block): No need to check for new
5803         exception model.
5804         (process_start_catch_block_old): Deleted.
5805         (process_start_catch_block): Add call to start_decl_1().
5806         (expand_end_catch_block): Add call to end_catch_handler().
5807         * exception.cc (__cplus_type_matcher): Only check the exception
5808         language if there is an exception table.
5809
5810 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
5811
5812         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
5813         as used to prevent conflicts with virtual function tables.
5814
5815 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
5816
5817         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
5818         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
5819         * class.c (maybe_class_too_private_p): New function.
5820         (finish_struct_methods): Use it.
5821         (finish_struct_1): Likewise.
5822         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
5823         appropriate.
5824
5825         * pt.c (check_specialization_scope): Fix spelling error.
5826         (check_explicit_specialization): Remove code to handle explicit
5827         specializations in class scope; they are now correctly diagnosed
5828         as errors.
5829
5830 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
5831
5832         * decl.c (pushdecl): Don't copy types if the
5833         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
5834         type.
5835
5836 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5837
5838         * class.c (get_enclosing_class): New function.
5839         (is_base_of_enclosing_class): Likewise.
5840         * cp-tree.h (get_enclosing_class): Declare.
5841         (is_base_of_enclosing_class): Likewise.
5842         * pt.c (coerce_template_parms): Use them.
5843
5844 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
5845
5846         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
5847         null to decide whether to use it.
5848
5849         * error.c (dump_type_real): Handle NAMESPACE_DECL.
5850         * parse.y (base_class.1): Avoid crash on error.
5851
5852 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5853
5854         * decl.c (make_typename_type): If context is a namespace, the code
5855         is in error.
5856
5857 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
5858
5859         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
5860
5861 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
5862
5863         * cp-tree.h (anonymous_namespace_name): Declare.
5864         * decl.c: Define it.
5865         (push_namespace): Use anonymous_namespace_name, rather than local
5866         static anon_name.
5867         * error.c (dump_decl): If a namespace is named
5868         anonymous_namespace_name, call it {anonymous}.
5869
5870         * decl.c (grokparms): Distinguish between references and pointers
5871         in error message.
5872
5873 1998-09-08  Richard Henderson  <rth@cygnus.com>
5874             Mark Mitchell  <mark@markmitchell.com>
5875
5876         * pt.c (process_partial_specialization): Consistently allocate
5877         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
5878         tpd.parms, where appropriate.
5879
5880 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
5881
5882         * Makefile.in (INCLUDES): Update after recent toplevel gcc
5883         reorganizations.
5884
5885 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
5886
5887         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
5888         * class.c (finish_struct): Remove hackery to deal with explicit
5889         specializations in class scope.
5890         * decl.c (grokfndecl): Improve error-recovery.
5891         * decl2.c (grokfield): Likewise.
5892         * pt.c (check_specialization_scope): New function.
5893         (begin_specialization): Call it.
5894         (process_partial_specialization): New function, split out from
5895         push_template_decl.  Check partial specializations more
5896         stringently.
5897         (push_template_decl): Call it.
5898         (check_explicit_specialization): Don't attempt to handle explicit
5899         specializations in class scope.
5900         (template_parm_data): Document.  Add current_arg and
5901         arg_uses_template_parms.
5902         (mark_template_parm): Set it.
5903         (tsubst_arg_types): Remove unused variable.
5904         * semantics.c (begin_class_definition): Tweak.
5905
5906 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
5907
5908         * inc/typeinfo (type_info::type_info(const char*)): Make
5909         `explicit'.
5910
5911         * cp-tree.h (hash_tree_cons_simple): New macro.
5912         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
5913         (coerce_template_parms): Use make_temp_vec, instead of
5914         make_tree_vec.  Document this behavior.
5915         (lookup_template_class): Likewise.
5916         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
5917         Remove dead code (and add assertion to check its deadness).  Fix
5918         bug w.r.t. exception specifications.
5919
5920 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
5921
5922         * decl2.c (import_export_vtable): Always make artificials comdat.
5923         (import_export_decl): Likewise.
5924         * pt.c (mark_decl_instantiated): Likewise.
5925
5926 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
5927
5928         * cp-tree.h (finish_globally_qualified_member_call_expr):
5929         Rename to ...
5930         (finish_qualified_call_expr).
5931         * semantics.c: Likewise.
5932         * parse.y (primary): Use it.
5933         * method.c (hack_identifier): Remove redundant code.
5934
5935         * init.c (resolve_offset_ref): Call convert_from_reference to
5936         handle members of reference type.  Improve error recovery.
5937
5938 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
5939
5940         * cp-tree.h: Declare warn_nontemplate_friend.
5941         * decl2.c (lang_decode_option): Set.
5942         * lang-options.h: Add -Wnon-template-friend.
5943         * friend.c (do_friend): Use to toggle non-template function warning.
5944
5945 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
5946
5947         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
5948         corresponding INTEGER_CSTs when processing_template_decl.
5949         * pt.c (tsubst_enum): Tweak accordingly.
5950
5951 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5952
5953         * decl.c (pushdecl_class_level): Add warning here.
5954         (pushdecl): Tweak.
5955
5956 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
5957
5958         * cvt.c (convert_pointer_to_real): Tidy.
5959         * search.c (get_base_distance_recursive): Simplify.
5960         (get_base_distance): Likewise.
5961
5962         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
5963         parms.
5964
5965 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
5966
5967         * lex.c (check_newline):  Call HANDLE_PRAGMA before
5968         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
5969         if unknown pragmas are encountered.
5970         (handle_sysv_pragma): Interpret return code from
5971         handle_pragma_token ().  Return success/failure indication rather
5972         than next unprocessed character.
5973         (pragma_getc): New function: retrieves characters from the
5974         input stream.  Defined when HANDLE_PRAGMA is defined.
5975         (pragma_ungetc): New function: replaces characters back into the
5976         input stream.  Defined when HANDLE_PRAGMA is defined.
5977
5978 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
5979
5980         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
5981         * class.c (build_vtable_entry_ref): Likewise.
5982
5983 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
5984
5985         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
5986         * decl2.c (import_export_decl): Likewise.
5987         * pt.c (instantiate_decl): Use it.
5988
5989 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
5990
5991         * decl.c (lookup_name_real): Also do implicit typename thing for
5992         artificial TYPE_DECLs.
5993         * search.c (lookup_field): Likewise.
5994         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
5995         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
5996         (enter_scope_of): Extract type from implicit typename.
5997         (begin_class_definition): Likewise.
5998         * lex.c (identifier_type): Handle implicit typename when checking
5999         for SELFNAME.
6000
6001         * cp-tree.h: Declare flag_strict_prototype.
6002         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
6003         -fstrict-prototype.
6004         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
6005         specified, set it to the value of pedantic.
6006
6007 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
6008
6009         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
6010
6011 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
6012
6013         * decl.c (finish_enum): Handle member enums of classes declared in
6014         template functions.
6015
6016         * decl2.c (grok_x_components): Strip attributes before calling
6017         groktypename.
6018
6019 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
6020
6021         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
6022         -fenum-int-equivalence and -fno-nonnull-objects.
6023         * class.c (check_for_override): Remove support for -fall-virtual.
6024         (finish_struct_1): Likewise.
6025         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
6026         * typeck.c (build_binary_op_nodefault): Likewise.
6027         * cvt.c (ocp_convert): Likewise.
6028         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
6029         * class.c (build_vbase_path): Likewise.
6030
6031 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
6032
6033         * Makefile.in (INTERFACE): New, set to 1.
6034
6035 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
6036
6037         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
6038         comparing with global_namespace.
6039         (dump_aggr_type): Likewise.
6040
6041         * decl.c (grokfndecl): Issue error on declaration of friend
6042         templates with explicit template arguments.
6043
6044         * pt.c (convert_template_argument): New function, split out
6045         from...
6046         (coerce_template_parms): Here.
6047         (tsubst): Attempt better error-recovery.
6048
6049 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6050
6051         * pt.c (decl_template_parm_p): Add checks for
6052         TEMPLATE_TEMPLATE_PARM.
6053
6054 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
6055
6056         * lex.c (do_identifier): Fix thinko in previous change.
6057
6058 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
6059
6060         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
6061         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
6062
6063 1998-08-28  Richard Henderson  <rth@cygnus.com>
6064
6065         Add support for discarding unused virtual functions.
6066         * lang-options.h: Add -fvtable-gc.
6067         * cp-tree.h: Add flag_vtable_gc.
6068         * decl2.c (output_vtable_inherit): New fn.
6069         (finish_vtable_vardecl): Call it.
6070         * class.c (build_vtable_entry_ref): New fn.
6071         (build_vtbl_ref): Call it.
6072
6073 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
6074
6075         * cp-tree.h (build_enumerator): Take the enumeration type as a
6076         parameter.
6077         * decl.c (finish_enum): Don't set the TREE_TYPE for the
6078         enumeration constant values if we're processing_template_decls.
6079         Don't set the type for the CONST_DECLs either; that's done in
6080         build_enumerator.
6081         (build_enumerator): Take the enumeration type as a
6082         parameter.
6083         * lex.c (do_identifier): Don't resolve enumeration constants while
6084         processing template declarations, even if they happen to be
6085         TEMPLATE_PARM_INDEXs.
6086
6087         * parse.y (current_enum_type): New variable.
6088         (primary): Don't allow statement-expression in local classes just
6089         as we don't in global classes.
6090         (structsp): Use current_enum_type.
6091         (enum_list): Likewise.
6092         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
6093         finish_enum; they no longer occur.
6094
6095         * cp-tree.h (finish_base_specifier): New function.
6096         * parse.y (base_class): Use it.
6097         * semantics.c (finish_base_specifier): Define it.
6098
6099         * parse.y (structsp): Warn on use of typename outside of template
6100         declarations.
6101
6102 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
6103
6104         * lex.c (handle_cp_pragma): Remove #pragma vtable.
6105         * lang-options.h: Remove +e options.
6106         * decl2.c (lang_decode_option): Likewise.
6107         (import_export_vtable): Don't check write_virtuals.
6108         (finish_vtable_vardecl, finish_file): Likewise.
6109         * search.c (dfs_debug_mark): Likewise.
6110         * semantics.c (begin_class_definition): Likewise.
6111         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
6112
6113         * call.c (build_over_call): Check flag_elide_constructors.
6114         * decl2.c: flag_elide_constructors defaults to 1.
6115         * typeck.c (convert_arguments): Remove return_loc parm.
6116         (build_function_call_real): Adjust.
6117
6118         * search.c: Tear out all mi_matrix and memoize code.
6119         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
6120         * lang-options.h: Remove documentation for -fhandle-exceptions,
6121         -fmemoize-lookups and -fsave-memoized.
6122         * cp-tree.h: Lose mi_matrix and memoize support.
6123         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
6124         * class.c: Lose struct class_level.
6125         (pushclass, popclass): Lose memoize support.
6126         * init.c (build_offset_ref): Likewise.
6127
6128         Never change BINFO_INHERITANCE_CHAIN.
6129         * init.c (emit_base_init): Change modification of
6130         BINFO_INHERITANCE_CHAIN to an assert.
6131         * search.c (get_base_distance_recursive): Likewise.
6132         (get_base_distance): Likewise.
6133         (lookup_member): Likewise.
6134         (convert_pointer_to_single_level): Likewise.
6135         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
6136         (lookup_fnfields): Likewise.
6137         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
6138         (unshare_base_binfos): Don't call propagate_binfo_offsets.
6139         (layout_basetypes): Call propagate_binfo_offsets instead of
6140         unshare_base_binfos.
6141         * decl.c (xref_basetypes): Call unshare_base_binfos.
6142         * pt.c (instantiate_class_template): Likewise.
6143         * tree.c (reverse_path): Remove 'copy' parm; always make a
6144         temporary copy.
6145         * class.c (build_vbase_path): Just call it.
6146         * search.c (compute_access): Likewise.  Don't re-reverse.
6147
6148 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
6149
6150         * class.c (build_vbase_path): Use reverse_path.
6151         (finish_base_struct): Move warnings for inaccessible bases to
6152         layout_basetypes.
6153         (modify_one_vtable): Remove check of TREE_USED (binfo).
6154         (fixup_vtable_deltas1): Likewise.
6155         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
6156         (xref_tag): Remove binfos parameter.
6157         (make_binfo): Remove chain parameter.
6158         (reverse_path): Add copy parameter.
6159         * decl.c (init_decl_processing): Change calls to xref_tag.
6160         (xref_tag): Remove binfos parameter.
6161         (xref_basetypes): Change calls to make_binfo.
6162         * decl2.c (grok_x_components): Change calls to xref_tag.
6163         (handle_class_head): Likewise.
6164         * friend.c (do_friend): Likewise.
6165         * lex.c (make_lang_type): Change calls to make_binfo.
6166         * parse.y (structsp): Change calls to xref_tag.
6167         (named_complex_class_head_sans_basetype): Likewise.
6168         (named_class_head): Likewise.
6169         * rtti.c (init_rtti_processing): Likewise.
6170         * search.c (compute_access): Change calls to reverse_path.
6171         (dfs_get_vbase_types): Change calls to make_binfo.
6172         (get_vbase_types): Remove dead code.
6173         * tree.c (unshare_base_binfos): Change calls to make_binfo.
6174         (layout_basetypes): Warn here about inaccessible bases.
6175         (make_binfo): Remove chain parameter.
6176         (reverse_path): Add copy parameter.
6177
6178 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
6179
6180         * class.c: #if 0 complete_type_p.
6181         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
6182         * method.c (process_overload_item): Likewise.
6183         * typeck.c (comp_target_types): Likewise.
6184
6185         Stop sharing binfos for indirect virtual bases.
6186         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
6187         (layout_basetypes): Likewise.
6188         (unshare_base_binfos): Copy vbases, too.
6189         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
6190         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
6191         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
6192         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
6193         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
6194         reference to BINFO_VIA_PUBLIC.
6195         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
6196         (push_class_decls): Use them.
6197         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
6198         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
6199
6200 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
6201
6202         * decl.c (build_enumerator): Set DECL_CONTEXT for the
6203         CONST_DECLs.
6204
6205 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
6206
6207         * cp-tree.h (finish_enum): Change prototype.
6208         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
6209         VALUES parameter.  Don't try to compute mins/maxs if
6210         processing_template_decl.
6211         * parse.y (structsp): Use new calling sequence for finish_enum.
6212         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
6213         (lookup_template_class): Remove unused variables.  Tweak.
6214         Register enums on instantiation list before substituting
6215         enumeration constants.
6216         (tsubst_decl): Remove unused variables.
6217         (regenerate_decl_from_template): Likewise.
6218
6219         * decl.c (duplicate_decls): Don't obliterate the
6220         DECL_TEMPLATE_INFO for a template if we're not replacing it with
6221         anything.
6222
6223         * lex.c (do_identifier): Fix typo in comment.
6224
6225 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6226
6227         * errfn.c: Remove stdarg.h/varargs.h.
6228         * tree.c: Likewise.
6229
6230 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
6231
6232         * pt.c (tsubst_copy): Only do typename overloading on an
6233         IDENTIFIER_NODE that happens to look like a typename if it actually
6234         has a type for us to use.
6235
6236 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
6237
6238         * typeck.c (comp_cv_target_types): Split out...
6239         (comp_target_types): From here.  Don't allow cv-qual changes under
6240         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
6241         (build_ptrmemfunc): Pass 1 to nptrs.
6242         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
6243
6244 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
6245
6246         * search.c (dependent_base_p): Don't compare a binfo to
6247         current_class_type; use the TREE_TYPE of the binfo instead.
6248
6249         * cp-tree.h (CLASS_TYPE_P): Revise definition.
6250
6251 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
6252
6253         * decl.c (duplicate_decls): Don't complain about different
6254         exceptions from an internal decl even if pedantic.
6255
6256         * typeck.c (convert_for_assignment): Converting from pm of vbase
6257         to derived is an error, not a sorry.
6258
6259         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
6260         * class.c (fixed_type_or_null): Rename from
6261         resolves_to_fixed_type_p.  Return the dynamic type of the
6262         expression, if fixed, or null.
6263         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
6264         does not match the static type.
6265         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
6266         resolves_to_fixed_type_p again.
6267
6268 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
6269
6270         * pt.c (tsubst_decl): Move special case code for dealing with
6271         tricky friend templates here from ...
6272         (regenerate_decl_from_template): Here.
6273
6274 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
6275
6276         * decl.c (start_decl): Remove redundant linkage check.
6277
6278 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
6279
6280         * typeck.c (c_expand_return): Handle the case that valtype
6281         is wider than the functions return type.
6282
6283 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
6284
6285         * cp-tree.h (CLASS_TYPE_P): New macro.
6286         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
6287         * pt.c (process_template_parm): Undo previous change.
6288
6289 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
6290
6291         * cp-tree.h: Declare.
6292         * pt.c (decl_template_parm_p): New function.
6293         * decl.c (pushdecl): Check decls for redeclaring template parms.
6294         (xref_tag): Make redeclaration an error, print decl.
6295         * decl2.c (grokfield): Check field_decls for redeclaration as well.
6296
6297 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
6298
6299         * parse.y (primary): Fix up the type of string constants.
6300
6301 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
6302
6303         * typeck.c (convert_for_initialization): Move check for odd uses
6304         of NULL to avoid duplicate warnings.
6305
6306 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
6307
6308         * tree.c (lvalue_type): Fix for arrays.
6309         * typeck.c (string_conv_p): New fn.
6310         (convert_for_assignment): Use it.
6311         (build_unary_op): Use lvalue_type.
6312         * call.c (standard_conversion, convert_like): Use string_conv_p.
6313         (add_function_candidate): Use lvalue_type.
6314         * cvt.c (convert_to_reference): Likewise.
6315         * decl2.c (lang_decode_option): Ignore -traditional.
6316         * decl.c (init_decl_processing): flag_writable_strings inhibits
6317         flag_const_strings.
6318
6319 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
6320
6321         * lang-options.h (lang_options): Add fconst-strings to the list
6322         of valid options.
6323         * decl2.c (lang_f_options, lang_decode_option): Likewise.
6324
6325 1998-08-24  Nathan Sidwell  <nathan@acm.org>
6326
6327         * lex.c (real_yylex): Don't warn about long long constants if
6328         we're allowing long long.
6329
6330 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6331
6332         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
6333         accessing bindings directly.
6334
6335         * search.c (my_tree_cons): Reimplement.
6336
6337         * lang-specs.h: Remove __HONOR_STD.
6338         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
6339
6340 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
6341
6342         * decl.c (grokdeclarator): Complain about in-class initialization
6343         of aggregates and/or references.
6344         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
6345         TEMPLATE_TYPE_PARMs.
6346
6347         * decl2.c (grok_array_decl): Add comment.
6348         (mark_used): Don't instantiate an explicit instantiation.
6349         * friend.c (make_friend_class): Remove bogus comment.  Fix check
6350         for partial specializations.
6351         * pt.c (check_explicit_specialization): Don't
6352         SET_DECL_EXPLICIT_INSTANTIATION here.
6353         (mark_decl_instantiated): Or here.
6354         (do_decl_instantiation): Do it here, instead.  Add checks for
6355         duplicate explicit instantiations, etc.  Tidy.
6356         (do_type_instantiation): Likewise.
6357         (instantiate_decl): Improve comments.  Complain about explicit
6358         instantiations where no definition is available.
6359
6360         * cp-tree.h (ansi_null_node): Remove.
6361         * call.c (build_over_call): Warn about converting NULL to an
6362         arithmetic type.
6363         * cvt.c (build_expr_type_conversion): Likewise.  Use
6364         null_ptr_cst_p instead of expanding it inline.
6365         * decl.c (ansi_null_node): Remove.
6366         (init_decl_processing): Make null_node always have integral type.
6367         * except.c (build_throw): Warn about converting NULL to an
6368         arithmetic type.
6369         * lex.c (init_parse): Remove handling of ansi_null_node.
6370         * pt.c (type_unification_real): Don't convert NULL to void* type.
6371         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
6372         (convert_for_assignment): Warn about converting NULL to an
6373         arithmetic type.
6374         (convert_for_initialization): Likewise.
6375
6376 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
6377
6378         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
6379         * pt.c (coerce_template_parms): Use no_linkage_check.
6380         * decl.c (grokvardecl): Likewise.
6381         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
6382
6383         * method.c (process_overload_item): Remove useless code.
6384
6385 1998-08-20  Per Bothner  <bothner@cygnus.com>
6386
6387         Handle new'ing of Java classes.
6388         * init.c (build_class_classref):  New function.
6389         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
6390         constructor does not return this;  don't need to exception-protect.
6391
6392         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
6393         * decl2.c (acceptable_java_type):  Handle template-derived types.
6394
6395 1998-08-20  Per Bothner  <bothner@cygnus.com>
6396
6397         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
6398
6399 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
6400
6401         * decl.c (duplicate_decls): Always merge the old and new patterns
6402         for templates, regardless of whether or not the new one has
6403         DECL_INITIAL.  Don't throw away specializations.  Merge
6404         DECL_SAVED_TREE.
6405         * pt.c (tsubst_decl): Use the right pattern when calculating the
6406         complete args for a new template instance.
6407         (do_decl_instantiation): Fix typo in comment.
6408         (regenerate_decl_from_template): Deal with tricky friend template
6409         case.
6410         (instantiate_decl): Likewise.
6411
6412 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
6413
6414         * init.c (build_builtin_delete_call): Add missing assemble_external
6415         call.
6416
6417 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
6418
6419         * parse.y (notype_unqualified_id): Also accept ~A<int>.
6420
6421 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
6422
6423         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
6424         arithmetic.
6425         * except.c (build_throw): Warn when NULL is thrown, even with
6426         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
6427         thrown expression.
6428
6429         * cp-tree.h (ansi_null_node): New variable.
6430         * decl.c (ansi_null_node): New variable.
6431         (init_decl_processing): Initialize its type.
6432         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
6433         for null_node in non-ANSI mode.
6434         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
6435         place of null_node to avoid spurious errors.
6436
6437 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
6438
6439         * cp-tree.h (enter_scope_of): New function.
6440         * parse.y (complex_direct_notype_declarator): Use it.
6441         * semantics.c (enter_scope_of): New function.
6442
6443 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
6444
6445         * decl.c (grokparms): No, here.
6446
6447         * decl.c (grokdeclarator): Catch parm with pointer to array of
6448         unknown bound here...
6449         * method.c (process_overload_item): ...not here.
6450
6451         * gxxint.texi: Remove obsolete documentation of overloading code.
6452
6453         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
6454         * class.c (finish_struct_bits): Likewise.
6455
6456         * tree.c (lvalue_type): Fix for arrays.
6457         * typeck.c (build_unary_op): Use lvalue_type.
6458         * call.c (add_function_candidate): Likewise.
6459         * cvt.c (convert_to_reference): Likewise.
6460
6461         * decl2.c (lang_decode_option): Ignore -traditional.
6462
6463         * init.c (build_offset_ref): Don't mess with error_mark_node.
6464         * lex.c (do_scoped_id): Use cp_error.
6465
6466         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
6467
6468 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6469
6470         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
6471
6472 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
6473
6474         * cp-tree.h (set_identifier_local_value): Provide prototype.
6475
6476         * decl2.c (do_namespace_alias): Remove unused variables `binding'
6477         and `old'.
6478
6479 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
6480
6481         * Makefile.in: Rename BBISON to BISON so that it can be properly
6482         inherited from the parent makefile.
6483
6484 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
6485
6486         * lang-options.h: Add -finit-priority.
6487         * decl2.c: Likewise.  Check flag_init_priority instead of
6488         USE_INIT_PRIORITY.
6489
6490         * decl2.c (setup_initp): New fn.
6491         (start_objects, finish_objects, do_ctors): Handle init_priority.
6492         (do_dtors, finish_file): Likewise.
6493
6494 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
6495
6496         * pt.c (tsubst_copy): Hush warning.
6497
6498         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
6499
6500 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
6501
6502         * pt.c (print_template_context): Don't abort when instantiating a
6503         synthesized method.
6504
6505         * decl.c (grokdeclarator): Issue errors on namespace qualified
6506         declarators in parameter lists or in class scope.
6507
6508 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
6509
6510         * pt.c (check_explicit_specialization): Don't abort on bogus
6511         explicit instantiations.
6512
6513 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
6514
6515         * typeck.c (require_complete_type): Use complete_type_or_else.
6516         (complete_type_or_else): Always return NULL_TREE on failure, as
6517         documented.
6518
6519         * pt.c (tsubst_aggr_type): Prototype.
6520         (tsubst_decl): New function, split out from tsubst.  Set
6521         input_filename and lineno as appropriate.
6522         (pop_tinst_level): Restore the file and line number saved in
6523         push_tinst_level.
6524         (instantiate_class_template): Set input_filename and lineno as
6525         appropriate.
6526         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
6527         context for a TYPENAME_TYPE is complete.
6528
6529         * decl2.c (grokbitfield): Issue errors on bitfields declared with
6530         function type.
6531         (do_dtors): As in do_ctors, pretend to be a member of the same
6532         class as a static data member while generating a call to its
6533         destructor.
6534
6535         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
6536         conversions, even in complex virtual base class hierarchies.
6537
6538 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
6539
6540         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
6541         (TYPE_TEMPLATE_INFO): Likewise.
6542         (SET_TYPE_TEMPLATE_INFO): Likewise.
6543         (ENUM_TI_TEMPLATE): Likewise.
6544         (ENUM_TI_ARGS): Likewise.
6545         (lookup_nested_type_by_name): Remove.
6546         * decl.c (maybe_process_template_type_declaration): Handle enums.
6547         (start_enum): Don't check for primary-template enum declarations
6548         here.
6549         (finish_enum): Clean up, document.  Make sure template enum
6550         constants get the correct type.
6551         (build_enumerator): Copy initializers for template enumerations,
6552         too.
6553         (grok_enum_decls): Document.
6554         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
6555         better.  Build LOOKUP_EXPRs for local variables, even if they are
6556         TREE_PERMANENT.
6557         * pt.c (tsubst_enum): Remove field_chain parameter.
6558         (template_class_depth): Include the depth of surrounding function
6559         contexts.
6560         (push_template_decl): Check for primary-template enum declarations
6561         here.  Deal with enumeration templates.
6562         (lookup_template_class): Likewise.
6563         (for_each_template_parm): Likewise.
6564         (instantiate_class_template): Don't call tsubst_enum directly,
6565         call tsubst instead, to instantiate enums.  Deal with all
6566         field_chain issues here, not in tsubst_enum.
6567         (lookup_nested_type_by_name): Remove.
6568         (tsubst_aggr_type): Revise handling of enumeration types.
6569         (tsubst): Likewise.
6570         (tsubst_copy): Likewise.
6571         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
6572
6573 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
6574
6575         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
6576         uses template parameters.
6577         * method.c (build_template_parm_names): Use the full set of
6578         template arguments for tsubst'ing.
6579         (build_overload_identifier): Pass the full set of template
6580         arguments to build_template_parm_names, not just the
6581         innermost_args.
6582         * pt.c (TMPL_ARGS_DEPTH): Define using
6583         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
6584         (NUM_TMPL_ARGS): New macro.
6585         (add_outermost_template_args): Deal with the case where the outer
6586         args will be completely discarded.
6587         (coerce_template_parms): Use the full set of template arguments
6588         for tsubst'ing.  Simplify.  Add some asserts.  Improve
6589         error messages.
6590         (lookup_template_class): Pass the full set of template arguments
6591         to coerce_template_parms.
6592         (tsubst): Add assertion.
6593         (do_type_instantiation): Don't instantiate member template
6594         classes.
6595
6596         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
6597         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
6598
6599 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
6600
6601         * method.c (set_mangled_name_for_decl): Change return type to void.
6602
6603         * decl.c (lookup_name_real): A namespace-level decl takes priority
6604         over implicit typename.  Avoid doing the same lookup twice.
6605
6606         * search.c (dependent_base_p): New fn.
6607         (dfs_pushdecls, dfs_compress_decls): Use it.
6608
6609         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
6610         virtual functions if the type doesn't have any.
6611
6612 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
6613
6614         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
6615         uses template parameters.
6616
6617 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
6618
6619         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
6620         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
6621         * lex.c (do_identifier): Don't use a second argument, or a type,
6622         when building LOOKUP_EXPRs.
6623         (do_identifier): Likewise.
6624         (do_scoped_id): Likewise.
6625         * method.c (hack_identifier): Improve error message.
6626         * pt.c (lookup_template_function): Don't needlessly call
6627         copy_to_permanent or build_min.
6628         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
6629         necessary.
6630         (do_decl_instantiation): Improve error message.
6631         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
6632         (build_min): Copy the type to the permanent obstack, too.
6633
6634 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
6635
6636         * init.c (init_init_processing): Remove BI* handling.
6637         (build_builtin_call): Remove.
6638         (build_builtin_delete_call): New fn.
6639         (build_delete): Use it.
6640
6641 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
6642
6643         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
6644         (maybe_check_template_type): New function.
6645         * decl.c (maybe_process_template_type_declaration): New function,
6646         split out from pushtag  Call maybe_check_template_type.
6647         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
6648         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
6649         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
6650         * pt.c (template_class_depth_real): Generalization of ...
6651         (template_class_depth): Use it.
6652         (register_specialization): Use duplicate_decls for duplicate
6653         declarations of specializations.
6654         (maybe_check_template_type): New function.
6655         (push_template_decl_real): Fix comment.
6656         (convert_nontype_argument): Likewise.
6657         (lookup_template_class): Likewise.  Avoid an infinite loop on
6658         erroneous code.
6659         (tsubst_friend_function): Fix comment.
6660         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
6661         an IDENTIFIER_NODE.
6662         * semantics.c (begin_function_definition): Use
6663         reset_specialization to note that template headers don't apply
6664         directly to declarations after the opening curly for a function.
6665
6666 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
6667
6668         * decl.c (push_overloaded_decl): Use current_namespace instead of
6669         DECL_CONTEXT (decl) to determine where we go.
6670
6671         * decl.c (lookup_name_real): Fix typo.
6672
6673 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
6674
6675         * friend.c (is_friend): Be lenient with member functions to deal
6676         with nested friends.
6677
6678 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
6679
6680         * class.c (finish_struct_1): Convert integer_zero_node to
6681         ssizetype before passing it to set_rtti_entry.
6682         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
6683         of any size to a pointer.
6684
6685 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
6686
6687         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
6688         (build_template_decl_overload): Remove.
6689         (set_mangled_name_for_decl): New function.
6690         (innermost_args): Remove is_spec parameter.
6691         (most_specialized, most_specialized_class): Remove declarations.
6692         (lookup_template_class): Add entering_scope parameter.
6693         (maybe_process_partial_specialization): New function.
6694         (finish_template_decl): Likewise.
6695         (finish_template_type): Likewise.
6696         * class.c (finish_struct): Clean up processing of member template
6697         specializations.
6698         * decl.c (pushtag): Fix formatting.
6699         (lookup_tag): Improve handling of pseudo-global levels.
6700         (make_typename_type): Adjust call to lookup_template_class.
6701         (shadow_tag): Use maybe_process_partial_specialization.
6702         (xref_tag): Improve handling of member friends.
6703         (start_function): Call push_nested_class before
6704         push_template_decl.  Don't call push_template_decl for
6705         specializations.
6706         * decl2.c (grok_x_components): Don't call xref_tag for
6707         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
6708         (grokclassfn): Use set_mangled_name_for_decl.
6709         (arg_assoc_class): Adjust call to innermost_args.
6710         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
6711         * error.c (dump_function_name): Improve printing of template
6712         function names.
6713         * friend.c (is_friend): Don't compare types of decls to determine
6714         friendship, unless flag_guiding_decls.
6715         (make_friend_class): Partial specializations cannot be friends.
6716         (do_friend): Use set_mangled_name_for_decl.  Call
6717         push_template_decl_real instead of push_template_decl.
6718         * method.c (build_decl_overload_real): Remove prototype.  Give it
6719         external linkage.
6720         (build_overload_identififer): Adjust call to innermost_args.
6721         (build_template_decl_overload): Remove.
6722         (set_mangled_name_for_decl): New function.
6723         * parse.y (.finish_template_type): New non-terminal.
6724         (template_def): Use finish_template_decl.  Use template_extdef
6725         instead of extdef.
6726         (template_extdef, template_datadef): New non-terminals, containing
6727         only those rules for things which can be templates.
6728         (datadef): Tidy.
6729         (template_type, self_template_type): Use .finish_template_type.
6730         (named_class_head): Use maybe_process_partial_specialization.
6731         * pt.c (mangle_class_name_for_template): Remove context parameter.
6732         (get_class_bindings): Remove outer_args parameter.
6733         (complete_template_args): Remove.
6734         (add_outermost_template_args): New function.
6735         (register_specialization): Return the specialization.
6736         (unregister_specialization): New function.
6737         (tsubst_template_parms): Likewise.
6738         (most_specialized, most_specialized_class): Prototype here as
6739         static.
6740         (original_template): Rename to most_general_template.
6741         (tsubst_template_parms): New function.
6742         (set_mangled_name_for_template_decl): Likewise.
6743         (TMPL_ARGS_DEPTH): New macro.
6744         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
6745         (TMPL_ARGS_LEVEL): New macro.
6746         (SET_TMPL_ARGS_LEVEL): Likewise.
6747         (TMPL_ARG): Likewise.
6748         (SET_TMPL_ARG): Likewise.
6749         (TMPL_ARGS_DEPTH): Likewise.
6750         (finish_member_template_decl): Use finish_template_decl.
6751         (maybe_process_partial_specialization): New function, split out
6752         from tsubst.
6753         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
6754         (maybe_begin_member_template_processing): Use new macros.
6755         (is_member_template): Likewise.
6756         (is_member_template_class): Likewise.
6757         (add_to_template_args): Likewise.  Deal with multiple levels of
6758         args.
6759         (maybe_process_partial_specialization): New function.
6760         (retrieve_specialization): Add consistency check.
6761         (determine_specialization): Return full argument list.
6762         (check_explicit_specialization): Tweak friend handling.  Use full
6763         argument lists.  Simplify.
6764         (current_template_args): Use new macros.
6765         (push_template_decl_real): Change ill-named mainargs to specargs.
6766         Check that a partial specialization actually specializes at least
6767         one parameter.   Improve friend handling.  Modify for full
6768         template arguments.
6769         (classtype_mangled_name): Don't mangle the names of
6770         specializations.
6771         (lookup_template_class): Add entering_scope parameter.  Use it to
6772         avoid finding a template type when an instantiation is required.
6773         Simplify.  Use full template arguments.
6774         (tsubst_friend_function): Use unregister_specialization.  Use new
6775         macros.  Use full template arguments.
6776         (tsubst_friend_class): Substitute, using tsubst_template_parms,
6777         into the template parameters before passing them to
6778         redeclare_class_template.
6779         (instantiate_class_template): Simplify.  Use full template
6780         arguments.  Adjust calls to get_class_bindings.  Use
6781         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
6782         (innermost_args): Use new macros.
6783         (tsubst_aggr_type): New function, split out from tsubst.
6784         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
6785         conventions for lookup_template_class.  Refine handling of partial
6786         instantiations.   Remove calls to complete_template_args.
6787         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
6788         and set_mangled_name_for_template_decl.
6789         (tsubst_copy): Use tsubst_aggr_type.
6790         (instantiate_template): Use full template arguments.
6791         (more_specialized): Improve formatting.
6792         (more_specialized_class): Adjust calls to get_class_bindings.
6793         (get_bindings_real): Don't call complete_template_args.
6794         (most_specialized): Don't overwrite input; create a new list.
6795         (most_specialized_class): Use most_general_template.
6796         (regenerate_decl_from_template): Use unregister_specialization.
6797         Use full template arguments.
6798         (instantiate_decl): Use full template arguments.
6799         (set_mangled_name_for_template_decl): New function.
6800         * semantics.c (begin_class_definition): Use
6801         maybe_process_partial_specialization.
6802         (finish_member_class_template): New function.
6803         (finish_template_decl): Likewise.
6804         (finish_template_type): Likewise.
6805         (typeck.c): Don't crash after issuing a compiler_error.
6806         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
6807
6808 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
6809
6810         * typeck2.c (build_functional_cast): Handle default-initialization.
6811
6812         * call.c (build_over_call): Pass 1 to popclass.
6813
6814         * parse.y (direct_notype_declarator): Add precedence declaration
6815         to notype_unqualified_id case.
6816         * Makefile.in (EXPECT): Adjust.
6817
6818         * tree.c (ovl_member): Fix for single function in OVL.
6819
6820 1998-07-27  Dave Brolley  <brolley@cygnus.com>
6821
6822         * c-lex.c (yylex): Fix boundary conditions in character literal and
6823         string literal loops.
6824
6825 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
6826
6827         * decl.c (lookup_name_real): OK, do return the from_obj value
6828         unless got_object depends on template parms.
6829
6830         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
6831
6832         * pt.c (coerce_template_parms): Also complain about local enums.
6833
6834         * cp-tree.h: Add prototype for set_identifier_local_value.
6835         * decl.c (set_identifier_local_value_with_scope): Make static,
6836         prototype.
6837         * search.c (covariant_return_p): Likewise.
6838         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
6839
6840         * call.c (build_method_call): Only pull out the type of a destructor
6841         if it's a template type parm.
6842         * decl.c (lookup_name_real): Never return the from_obj value.
6843
6844 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
6845
6846         * except.c (process_start_catch_block_old): Call start_decl_1 for
6847         catch parm.
6848         * decl.c (start_decl_1): Avoid duplicate error.
6849
6850         * init.c (expand_default_init): Only perform the initialization if
6851         it will do something.
6852
6853 1998-07-23  H.J. Lu  (hjl@gnu.org)
6854
6855         * parse.y (base_class): Check for invalid base class.
6856
6857 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
6858
6859         * decl2.c (import_export_template): Fold in...
6860         (import_export_class): ...to here.  Handle dllimport/export.
6861
6862         * class.c (build_vtable): Pass at_eof to import_export_vtable.
6863         (prepare_fresh_vtable): Likewise.
6864         * decl2.c (import_export_class): Split out...
6865         (finish_prevtable_vardecl): From here.
6866         * class.c (finish_struct_1): Call import_export_class if at_eof.
6867
6868         * decl.c (start_function): #if 0 mysterious code I wrote and have
6869         forgotten why.
6870         * rtti.c (get_tinfo_fn): If this is for a class type, set
6871         DECL_CONTEXT.
6872
6873 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
6874
6875         * inc/exception: Change terminate and unexpected to ().
6876
6877         * parse.y (named_class_head_sans_basetype_defn): A
6878         named_class_head_sans_basetype followed by '{' or ':' is a defn.
6879
6880 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
6881
6882         * tree.c (canonical_type_variant): New fn to handle arrays.
6883         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
6884         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
6885         * method.c (process_overload_item): Use build_overload_value for
6886         arrays.
6887
6888 1998-07-20  Dave Brolley  <brolley@cygnus.com>
6889
6890         * lex.c (mbchar.h): #include it.
6891         (GET_ENVIRONMENT): New macro.
6892         (init_parse): Set character set based on LANG environment variable.
6893         (real_yylex): Handle multibyte characters in character literals.
6894         (real_yylex): Handle multibyte characters in string literals.
6895
6896 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
6897
6898         * lex.c (do_identifier): Look for class value even if we don't
6899         have a global value.  Do implicit declaration if parsing is 2.
6900         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
6901         lookup.
6902
6903 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
6904
6905         * decl.c (pushtag): Revert previous change.
6906         * pt.c (lookup_template_class): Don't put out debugging
6907         information for types that use template parameters.
6908
6909         * decl.c (pushtag): Don't put out debugging information for
6910         compiler-generated typedefs.
6911
6912         * error.c (dump_type_real): Don't crash when presented with
6913         intQI_type_node or the like.
6914
6915         * semantics.c (finish_translation_unit): Fix spelling error in
6916         comment.
6917
6918 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
6919
6920         * decl.c (lookup_name_real): Pull out single function here.
6921         (select_decl): Not here.
6922         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
6923
6924         * decl.c (qualify_lookup): Tweak again.
6925
6926         * pt.c (lookup_template_class): Don't mess with the context of the
6927         instantiation.
6928         * decl2.c (current_decl_namespace): Remove special handling for
6929         templates.
6930
6931         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
6932         a member template specialization.
6933
6934         * tree.c (ovl_member): Use decls_match to compare functions.
6935         * decl.c (decls_match): Check the context of a function.
6936
6937         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
6938         in Koenig lookup support rules.
6939         * semantics.c (finish_call_expr): Handle the new cases.
6940
6941         * typeck.c (build_x_function_call): Handle overloaded methods.
6942
6943         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
6944
6945 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
6946
6947         * semantics.c (finish_object_call_expr): Revert previous change.
6948         * call.c (build_new_method_call): Likewise.  Instead, convert
6949         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
6950
6951 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
6952
6953         * decl.c (qualify_lookup): Handle templates.
6954
6955         * decl2.c (do_using_directive): Don't pass ancestor.
6956         * decl.c (push_using_directive): Calculate ancestor.
6957
6958         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
6959         * decl.c (pushdecl): Move type shadowing handling from here...
6960         (duplicate_decls): ...to here.
6961         * decl.c (set_identifier_local_value_with_scope): New fn.
6962         (pushdecl): Use it.
6963         (set_identifier_local_value, lookup_type_current_level): New fns.
6964         * decl2.c (do_local_using_decl): Handle types and binding level
6965         stuff properly.
6966
6967         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
6968         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
6969         (lookup_namespace_name): Likewise.
6970         * typeck.c (build_unary_op): Not here anymore.
6971
6972         * decl2.c (do_class_using_decl): Make sure we get an identifier.
6973         * class.c (handle_using_decl): Ignore TYPE_DECLs.
6974
6975         * decl.c (qualify_lookup): New fn.
6976         (lookup_name_real): Use it.
6977
6978 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
6979
6980         * decl2.c (add_using_namespace): When directly using a namespace
6981         that was indirect before, promote it.
6982
6983         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
6984         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
6985         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
6986         * decl.c (select_decl): Replace two flag parameters by one.
6987         (unqualified_namespace_lookup): Likewise, pass flag.
6988         (lookup_flags): New function.
6989         (lookup_name_real): Compute flags, pass them.
6990         (lookup_namespace_name): Call with zero-flag.
6991         * decl2.c (ambiguous_decl): Add flag parameter, complain only
6992         according to flags.
6993         (lookup_using_namespace, qualified_lookup_using_namespace):
6994         Add flag parameter, pass them through.
6995         * lex.c (do_scoped_id): Call with zero-flag.
6996
6997 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
6998
6999         * typeck.c (convert_for_assignment): Use comptypes.
7000
7001 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
7002
7003         * semantics.c (finish_object_call_expr): Move test for the
7004         function called being a TYPE_DECL to ...
7005         * call.c (build_new_method_call): Here.
7006
7007 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
7008
7009         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
7010         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
7011
7012         * lex.c (looking_for_typename): Don't initialize.
7013
7014         * decl2.c (ambiguous_decl): Clarify error message.
7015
7016         * decl.c (push_using_directive): Iterate over namespaces used
7017         indirectly.
7018
7019 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7020
7021         * decl2.c (add_using_namespace): Iterate over namespaces used
7022         indirectly.
7023
7024         * decl.c (lookup_name_real): Accept namespace aliases as locals.
7025         (cat_namespace_levels): Ignore aliases.
7026         (duplicate_decls): Ignore duplicate aliases.
7027         * decl2.c (do_namespace_alias): Process block level namespace
7028         aliases.  Store alias with pushdecl.  Remove odr errors.
7029         * parse.y (namespace_alias): New non-terminal.
7030         (extdef): Use it.
7031
7032 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
7033
7034         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
7035         Handle TEMPLATE_TYPE_PARM.
7036         (arg_assoc): Rewrite.
7037
7038         * pt.c (complete_template_args): Don't look at the context unless
7039         we have to.
7040
7041         * method.c (build_decl_overload_real): Fix namespace handling.
7042
7043         * typeck.c (build_unary_op): Extract a lone function from an
7044         OVERLOAD.
7045
7046         * call.c (build_scoped_method_call): Handle getting a namespace
7047         for basetype in a destructor call.
7048         (check_dtor_name): Handle enums.
7049
7050         * parse.y (using_directive): New nonterminal.
7051         (extdef, simple_stmt): Use it.
7052
7053 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7054
7055         * decl2.c (add_function): Move error message ...
7056         (arg_assoc_namespace): ... from here.
7057
7058 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
7059
7060         * parse.y (namespace_qualifier): Fix multiple level handling.
7061         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
7062         (arg_assoc): Don't skip the first argument of a function.
7063
7064 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
7065
7066         * search.c (my_tree_cons): Clean up.
7067
7068 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
7069
7070         * call.c (joust): Don't warn about "confusing" conversions to the
7071         same type.
7072
7073 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7074
7075         * class.c (push_nested_class): Complain about namespaces.
7076         * decl.c (start_decl): Enter the object's namespace.
7077         (cp_finish_decl): Leave it.
7078         (grokdeclarator): Likewise.
7079         * decl2.c (check_decl_namespace): New function.
7080         (finish_file): Call it.
7081         * parse.y (complex_direct_notype_declarator): Set complexity
7082         of namespace-qualified ids to -1, enter the namespace.
7083
7084         * method.c (build_template_decl_overload): Expect _DECL as first
7085         parameter.  Put context temporarily into current_namespace.
7086         * pt.c (check_explicit_specialization): Change caller.
7087         (tsubst): Likewise.
7088
7089         * init.c (build_offset_ref): Call mark_used and
7090         convert_from_reference for namespace members.
7091
7092 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7093
7094         * search.c (my_tree_cons): The bitfield is at index 2.
7095
7096 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
7097
7098         * lang-options.h: Format changed to work with new --help support
7099         in gcc/toplev.c
7100
7101 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7102
7103         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
7104         Do Koenig lookup in CALL_EXPR.
7105         (arg_assoc): Handle error_mark.
7106         * lex.c (is_global): New function.
7107         (do_identifier): Expect arguments for Koenig lookup.
7108         * parse.y (primary): Add rules for calls of unqualified function calls.
7109         (do_id): Change call of do_identifier.
7110         * pt.c (finish_stmt_expr): Likewise.
7111         * semantics.c (finish_id_expr): Likewise.
7112         (finish_call_expr): Add integer parameter to indicate
7113         argument-dependent lookup.
7114
7115         * decl.c (struct binding_level): New field using_directives.
7116         (push_using_decl): Not sorry anymore.
7117         (push_using_directive): New function.
7118         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
7119         (unqualified_namespace_lookup): New function, code from ...
7120         (lookup_name_real): ... here.
7121         * decl2.c (lookup_using_namespace): Pass using list instead of
7122         initial scope.
7123         (validate_nonmember_using_decl): New function.
7124         (do_nonmember_using_decl): New function.
7125         (do_toplevel_using_decl): Use them.
7126         (do_local_using_decl): New function.
7127         (do_using_directive): Support block-level directives.
7128         * parse.y (simple_stmt): Support using declarations and
7129         directives.
7130         (namespace_qualifier, namespace_using_decl): New non-terminals.
7131
7132         * xref.c (classname): New function.
7133         (GNU_xref_hier): Change class and base parameters to tree.
7134         * decl.c (xref_baseypes): Change caller.
7135         * friend.c (make_friend_class): Likewise.
7136
7137 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7138
7139         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
7140         comparison.
7141
7142         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
7143         template template parameter, record its use.
7144         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
7145         its template arguments if exists.
7146
7147         * pt.c (coerce_template_template_parms): New function equivalent
7148         to coerce_template_parms when IS_TMPL_PARM is true.
7149         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
7150         all callers changed.
7151
7152         (coerce_template_parms): Access ARGLIST properly when creating a
7153         new vector.  Only accept implicit TYPE_DECL as valid argument for
7154         a template template parameter when it is a base class of
7155         current_class_type.  Don't display error message when COMPLAIN is
7156         false.
7157
7158 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
7159
7160         * repo.c (get_base_filename): Use file_name_nondirectory.
7161         (open_repo_file): Likewise.
7162         * cp-tree.h (file_name_nondirectory): Add prototype.
7163
7164 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
7165
7166         * friend.c (do_friend): Pull the identifier out of declarator.
7167         Use cp_error and friends.
7168         * decl2.c (qualified_lookup_using_namespace): Fix call to
7169         purpose_member.
7170         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
7171         (grokvardecl): Use DECL_CLASS_SCOPE_P.
7172         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
7173         * class.c (warn_hidden): Fix for OVERLOAD.
7174         From grahams@rcp.co.uk:
7175         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
7176         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
7177
7178 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
7179
7180         * g++.1 (-traditional): Remove duplicated documentation.
7181
7182 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
7183
7184         * method.c (flush_repeats): Add nrepeats parameter.
7185         (issue_nrepeats): Likewise.
7186         (is_back_referenceable_type): New function.  Don't back-reference
7187         TEMPLATE_TYPE_PARMs as well as simple types like integers.
7188         (build_mangled_name_for_type): Likewise.
7189         (build_mangled_name_for_type_with_Gcode): Likewise.
7190         (lasttype): Remove.
7191         (nrepeats): Likewise.
7192         (Nrepeats): Likewise.
7193         (start_squangling): Don't clear the variables removed above.
7194         (end_squangling): Likewise.
7195         (flush_repeats): Tidy.  Use nrepeats parameter rather than
7196         Nrepeats global.
7197         (issue_nrepeats): Likewise, but with nrepeats global.  Use
7198         is_backreferenceable_type.
7199         (build_overload_nested_name): Tidy.  Add comment.  Use
7200         build_mangled_name_for_type.
7201         (build_underscore_int): Comment.
7202         (build_overload_scope_ref): Use build_mangled_name_for_type.
7203         (build_overload_int): Likewise.
7204         (build_template_template_parm_names): Tidy.
7205         (build_template_parm_names): Use build_mangled_name_for_type.
7206         (build_overload_identifier): Add comments.
7207         (build_mangled_name_for_type_with_Gcode): Split out from
7208         build_mangled_name.
7209         (build_mangled_name_for_type): Use it.
7210         (build_mangled_name): Rework to use build_mangled_name_for_type
7211         and to not use global nrepeats/Nrepeats.  Tidy.
7212         (process_modifiers): Tidy.
7213         (check_btype): Use is_backreferenceable_type.  Add comment.
7214         Rename `node' to `type'.
7215         (process_overload_item): Set numeric_output_need_bar here.
7216         Use build_mangled_name_for_type.  Tidy.
7217         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
7218         build_mangled_name_for_type.
7219
7220         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
7221         for TYPE_DECLs.
7222
7223 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
7224
7225         * cp-tree.h (warn_long_long): Define.
7226         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
7227         warning "ANSI C++ does not support `long long'".
7228         * decl2.c (warn_long_long): Define.
7229         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
7230
7231 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
7232
7233         * decl.c (xref_tag): Handle attributes between 'class' and name.
7234         * parse.y (aggr): Likewise.
7235         * semantics.c (finish_class_definition): Likewise.
7236         * Makefile.in (EXPECTED): Adjust.
7237
7238         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
7239         * decl2.c: Define them.
7240         (lang_decode_option): Handle them.
7241         * lang-options.h: Add -foptional-diags.
7242         * class.c (finish_struct): Don't complain about multiple meanings of
7243         name if -fno-optional-diags.
7244         * decl.c (pushdecl_class_level): Likewise.
7245         * lex.c (real_yylex): Check warn_multichar.
7246
7247 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
7248
7249         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
7250
7251         * tree.c (make_binfo): Fix length.
7252
7253 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
7254
7255         * decl2.c (lang_decode_option): Remove warn_template_debugging.
7256         * lang-options.h: Likewise.
7257
7258 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7259
7260         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
7261         (process_start_catch_block): Likewise for variables
7262         `false_label_rtx', `call_rtx' and `return_value_rtx'.
7263
7264 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
7265
7266         * tree.c (build_srcloc): Make sure we allocate this node on the
7267         permanent obstack.
7268
7269 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
7270
7271         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
7272         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
7273         (lang_specific_driver): Only add -lm automatically if need_math is
7274         nonzero.
7275
7276 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
7277
7278         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
7279
7280 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7281
7282         * Makefile.in (EXPR_H): New dependency variable.
7283         (decl2.o): Depend on $(EXPR_H).
7284         (typeck.o): Likewise.
7285         (init.o): Likewise.
7286         (expr.o): Likewise.
7287
7288 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
7289
7290         * decl.c (start_enum): Put local enums on permanent_obstack.
7291
7292 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
7293
7294         * cp-tree.h (c_get_alias_set): Declare.
7295         * decl.c (init_decl_processing): Set lang_get_alias_set.
7296
7297 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
7298
7299         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
7300         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
7301         flag for all function decls which are in the exception table.
7302         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
7303         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
7304         code is emitted for any referenced rtti function.
7305
7306 1998-06-25  Dave Brolley  <brolley@cygnus.com>
7307
7308         * lang-specs.h: Use new | syntax to eliminate
7309         string concatenation.
7310
7311 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
7312
7313         * cp-tree.h (CP_DECL_CONTEXT): New macro.
7314         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
7315         * method.c (build_overload_nested_name): Likewise.
7316         * sig.c (build_signature_pointer_or_reference_type): Don't set
7317         DECL_CONTEXT.
7318
7319 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7320
7321         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
7322         * cp-tree.h (FROB_CONTEXT): New macro.
7323         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
7324         * decl.c (namespace_binding): Replace NULL_TREE with
7325         global_namespace.
7326         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
7327         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
7328         Likewise.
7329         * decl.c (pushtag): Use FROB_CONTEXT.
7330         (pushdecl, make_typename_type, define_function, grokdeclarator):
7331         Likewise.
7332         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
7333         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
7334         Likewise.
7335         * decl2.c (decl_namespace): Return global_namespace if no context.
7336         * method.c (build_overload_nested_name): Expect null as context.
7337         * pt.c (mangle_class_name_for_template): Do nothing for null
7338         contexts.
7339         (lookup_template_class): Allow for null id_context.
7340
7341 1998-06-25  Richard Henderson  <rth@cygnus.com>
7342
7343         * method.c (emit_thunk): Set current_function_is_thunk for the
7344         ASM_OUTPUT_MI_THUNK case as well.
7345
7346 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
7347
7348         * exception.cc (__cplus_type_matcher): Get a match_info pointer
7349         instead of an exception table entry as a parameter.
7350
7351 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
7352
7353         * parse.y (function_try_block): Don't call start_catch_handler.
7354         * except.c (call_eh_info): Remove coerced field from declaration.
7355         (build_eh_type_type_ref): New function to create an address of a
7356         rtti function for the new style exception tables.
7357         (expand_start_catch_block): Split function, this contains the
7358         common part.
7359         (process_start_catch_block_old): New function to perform the rest
7360         of expand_start_catch_block under old style exceptions.
7361         (process_start_catch_block_old): New function to perform the rest
7362         of expand_start_catch_block under new style exceptions.
7363         (expand_end_catch_block): Only pop the false label off the stack under
7364         the old style of exceptions.
7365         * semantics.c (finish_try_block): Don't call start_catch_handler.
7366         * exception.cc (struct cp_eh_info): Add original_value field.
7367         (__cplus_type_matcher): Perform type matching on the original exception
7368         value, and if we have a match, set the current value.
7369         (__cp_push_exception): Set the original exception value.
7370
7371 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
7372
7373         * call.c (joust): Fix confusing conversion warning.
7374
7375         * call.c (build_op_delete_call): Add placement parm.  Check
7376         LOOKUP_SPECULATIVELY.
7377         * cp-tree.h, decl2.c, init.c: Adjust.
7378         * decl.c (finish_function): Use it.
7379
7380         * pt.c (tsubst): Diagnose creating void fields or variables.
7381
7382 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7383
7384         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
7385
7386         * cp-tree.h (check_dtor_name): Add prototype.
7387
7388         * init.c (expand_member_init): Remove unused variables
7389         `ptr_type_node', `parm' and `rval'.
7390
7391         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
7392         in call to fprintf.
7393         (lang_print_xnode): Likewise.
7394
7395         * typeck2.c (enum_name_string): Cast argument to sprintf to long
7396         and use %ld specifier.
7397
7398         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
7399         specifier in call to fprintf.
7400         (GNU_xref_member): Cast argument to sprintf to int.
7401
7402 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
7403
7404         * typeck2.c (pop_init_level): Warn about implicit zero initialization
7405         of struct members.
7406
7407 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7408
7409         * cp-tree.h: Prototype function `check_java_method'.
7410
7411 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
7412
7413         * class.c (finish_struct): Make conflicting use of id a pedwarn.
7414         * decl.c (pushdecl_class_level): Likewise.
7415
7416 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
7417
7418         * pt.c (convert_nontype_argument): Issue an error when presented
7419         with an integer (real) constant that cannot be simplified to an
7420         INT_CST (REAL_CST).
7421
7422         * cp-tree.h (c_get_alias_set): Remove declaration added in
7423         1998-06-13 change that should never have been checked in.
7424
7425 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
7426
7427         * typeck.c (build_binary_op_nodefault): Change % in format strings
7428         to %%.
7429
7430         * decl.c (grokvardecl): Don't build_static_name for decls that
7431         aren't at namespace scope.
7432
7433         * init.c (perform_member_init): Catch default-initialization of
7434         references.
7435
7436 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
7437
7438         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
7439
7440 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
7441
7442         * method.c (hack_identifier): Complain about getting a namespace
7443         or class template.
7444         * typeck.c (decay_conversion): Remove check for namespaces.
7445         * typeck2.c (incomplete_type_error): Likewise.
7446         * parse.y (template_arg): Add PTYPENAME expansion.
7447
7448 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
7449
7450         * decl.c (grokvardecl): Don't build external assembler names for
7451         TYPENAMEs in other namespaces as there is no declarator.
7452         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
7453         info from DECL_CONTEXT if it is NULL.
7454
7455 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
7456
7457         * call.c (check_dtor_name): Split out.
7458         (build_scoped_method_call): Use it.
7459         (build_method_call): Use it.
7460         * init.c (build_offset_ref): Use it.
7461
7462         * typeck.c (build_static_cast): Fix handling of pointers to members.
7463
7464         * decl.c (finish_function): Just return nothing from a constructor.
7465         * typeck.c (c_expand_return): Complain about returning a void
7466         expression from a destructor.
7467
7468 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
7469
7470         * class.c (alter_access): Accept a BINFO explaining how to get
7471         from the entity whose accessed is being altered to the type doing
7472         the altering.
7473         (handle_using_decl): New function containing code split out from ...
7474         (finish_struct_1): Here.
7475
7476         * cp-tree.h (complete_type_or_else): Declare.
7477         * init.c (build_new_1, build_delete): Use it.
7478         * typeck.c (require_complete_type): Use complete_type, rather than
7479         expanding it inline.
7480         (complete_type_or_else): New function.
7481         (build_component_ref): Use it.
7482         (pointer_int_sum): Make sure the type pointed to is complete.
7483         (pointer_diff): Likewise.
7484
7485         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
7486         types.
7487
7488         * search.c (get_matching_virtual): Note that member templates
7489         cannot override virtual functions.
7490
7491 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
7492
7493         * pt.c (check_explicit_specialization): If DECLARATOR turned into
7494         an error_mark_node from lookup_template_function, return the same.
7495         (determine_specialization): Also make sure TEMPLATE_ID isn't an
7496         error_mark_node, before we try to read its operands.
7497         * decl.c (grokdeclarator): If we got an error_mark_node from
7498         check_explicit_specialization, just return it right back.
7499
7500 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
7501
7502         * class.c (instantiate_type): Don't treat template-ids that don't
7503         specify any template arguments as equivalent to ordinary
7504         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
7505         pointer-to-members for member templates.  Tidy slightly.
7506         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
7507         * init.c (build_offset_ref): Handle template-ids like ordinary
7508         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
7509         offset part of the OFFSET_REF.
7510         * typeck.c (build_unary_op): Change check for unknown types to
7511         look for OFFSET_REFs, not SCOPE_REFs.
7512
7513 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
7514
7515         * pt.c (is_member_template_class): New function.
7516         (push_template_decl_real): Use it.
7517
7518 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
7519
7520         * friend.c (do_friend): Add support for nested classes using
7521         member functions of the enclosing class as friends.
7522
7523 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
7524
7525         * call.c (convert_default_arg): Make global, not static.
7526         (convert_arg_for_ellipsis): Split out from ...
7527         (build_over_call): Here.
7528         * cp-tree.h (convert_default_arg); Declare.
7529         (convert_arg_to_ellipsis): Likewise.
7530         (do_member_init): Remove.
7531         * init.c (do_member_init): Remove; this code is dead.
7532         (expand_member_init): Remove much of this code; it is dead.
7533         * typeck.c (convert_arguments): Use convert_default_arg and
7534         convert_arg_for_ellipsis, rather than duplicating here.
7535
7536         * call.c (convert_like): Don't fail silently if
7537         build_user_type_conversion fails.  Always return error_mark_node
7538         for failure.
7539
7540 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
7541
7542         * search.c (covariant_return_p): Complain about ambiguous base.
7543
7544         * typeck.c (build_component_ref): Diagnose ref to nested type.
7545
7546 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
7547
7548         * decl.c (grokparms): Check that INIT isn't an error_mark_node
7549         before giving error about invalid type for default arg.
7550
7551 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
7552
7553         * call.c (build_method_call): Fix thinko.
7554
7555 1998-06-10  Dave Brolley  <brolley@cygnus.com>
7556
7557         * decl2.c (lang_decode_option): New argc/argv interface.
7558         * cp-tree.h (lang_decode_option): New argc/argv interface.
7559         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
7560         specified for cpplib-enabled compilers.
7561         * lex.c (lang_init): Don't check_newline for cpplib.
7562         (init_parse): Don't initialize cpplib here.
7563
7564 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
7565
7566         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
7567         piece before checking DECL_MUTABLE_P.
7568
7569 1998-06-10  John Carr  <jfc@mit.edu>
7570
7571         * tree.c (debug_binfo): Make printf format match arguments.
7572
7573         * error.c (OB_PUTI): Make printf format match arguments.
7574
7575 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
7576
7577         * init.c (perform_member_init): Handle default-initialization.
7578
7579         * except.c (build_throw): Handle throwing NULL.
7580
7581         * typeck.c (build_x_function_call): Use resolve_offset_ref.
7582
7583         * search.c (compute_access): Only strip an anonymous union
7584         for a FIELD_DECL.
7585
7586         * call.c (add_builtin_candidates): Tweak.
7587
7588         * cvt.c (build_expr_type_conversion): Restore code for conversion
7589         from class types.
7590         * decl2.c (delete_sanity): Use it.  Clean up.
7591
7592         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
7593
7594 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
7595
7596         * typeck.c (c_expand_return): Don't warn about void expressions on
7597         return statements in functions returning void.
7598
7599 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
7600
7601         * pt.c (fn_type_unification): Revise documentation.  Tidy.
7602         (type_unification): Likewise.
7603
7604 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
7605
7606         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
7607         expand_end_catch.
7608         * parse.y (function_try_block): Rename expand_start_catch, and delete
7609         expand_end_catch.
7610         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
7611         expand_end_catch.
7612
7613 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
7614
7615         * search.c (lookup_member): New fn.
7616         * class.c (finish_struct_1): Use it.
7617         * decl.c (lookup_name_real): Use it.
7618
7619 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7620
7621         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
7622
7623         * cp-tree.h: Add prototype for `maybe_print_template_context' and
7624         `maybe_make_one_only'.
7625
7626         * decl.c (auto_function): Remove unused variable `decl'.
7627
7628         * decl2.c: Include dwarf2out.h and dwarfout.h.
7629
7630         * lex.c: Remove redundant declarations of `set_float_handler' and
7631         `asm_out_file'.
7632
7633 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
7634
7635         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
7636         time flag.  Call __cp_eh_info instead of __cp_exception_info.
7637         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
7638         (__cp_exception_info): Return offset into cp_eh_info structure to
7639         match what use to be the start of this structure.
7640         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
7641         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
7642         compile time flag.
7643         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
7644         __cp_eh_info instead of __cp_exception_info.
7645
7646 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
7647
7648         * decl.c (cp_finish_decl): Disable inlining of extern inlines
7649         with static variables.
7650
7651 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
7652
7653         * init.c (build_offset_ref): Correct previous change to use build,
7654         not build_min.
7655
7656 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
7657
7658         * class.c (instantiate_type): Handle pointer-to-members where the
7659         member is a template.
7660         * init.c (build_offset_ref): Likewise.
7661         * typeck.c (build_unary_op): Likewise.
7662
7663 1998-06-07  Richard Henderson  <rth@cygnus.com>
7664
7665         * lex.c (lang_init_options): New function.
7666         (lang_init): Remove flag_exceptions == 2 hack.
7667
7668 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
7669
7670         * search.c (envelope_add_decl): Tweak for implicit typename.
7671
7672         * call.c (joust): Also warn about confusing conversion op/constructor
7673         overload resolution.
7674
7675         * spew.c (yylex): Also return the TYPE_DECL if got_object.
7676         Don't clear got_object after '~'.
7677         * call.c (build_scoped_method_call): Tweak destructor handling.
7678         (build_method_call): Likewise.
7679         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
7680         TYPE_MAIN_VARIANT for destructors.
7681         * semantics.c (finish_object_call_expr): Complain about calling a
7682         TYPE_DECL.
7683
7684 1998-06-05  Per Bothner  <bothner@cygnus.com>
7685
7686         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
7687         Define - update needed by gcc.c change.
7688
7689 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
7690
7691         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
7692
7693 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
7694
7695         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
7696         * decl.c (lookup_name_real): Add namespaces_only parameter.
7697         If set, return only NAMESPACE_DECLs.
7698         (select_decl): Likewise.
7699         (identifier_type_value): Give additional parameter.
7700         (lookup_name_nonclass): Likewise.
7701         (lookup_name): Likewise.
7702         (find_binding): Skip namespace aliases.
7703         (binding_for_name): Likewise.
7704         (push_namespace): Check for namespace aliases.
7705         (lookup_name_namespace_only): New function.
7706         (begin_only_namespace_names, end_only_namespace_names): New functions.
7707         * decl2.c (set_decl_namespace): Skip namespace aliases.
7708         (do_using_directive): Likewise.
7709         (do_namespace_alias): Produce namespace aliases, fix alias
7710         redeclaration.
7711         * error.c (dump_decl): Support SCOPE_REF.
7712         * parse.y (extdef): Wrap lookup with namespace_only for namespace
7713         aliases and using declarations.
7714
7715 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
7716
7717         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
7718
7719         * error.c (dump_expr): Clean up NEW_EXPR case.
7720
7721 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7722
7723         Suggested by Brendan Kehoe
7724         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
7725         treat it as using ::decl.
7726
7727         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
7728
7729         * tree.c (mapcar): Support NEW_EXPR.
7730
7731         * error.c (dump_expr): Support NEW_EXPR.
7732
7733 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
7734
7735         * method.c (make_thunk): Use overload machinery to make name.
7736         * search.c (covariant_return_p): New fn.
7737         (get_matching_virtual): Use it.
7738
7739         * init.c (build_new_1): Fix check for void.
7740
7741 1998-06-01  Per Bothner  <bothner@cygnus.com>
7742
7743         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
7744         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
7745         java_int_type_node, java_long_type_node, java_float_type_node,
7746         java_double_type_node, java_char_type_node, java_boolean_type_node):
7747         New "primitive" types, with predefined names __java_byte etc.
7748         (record_builtin_java_type):  New function.
7749         (init_decl_processing):  Make Java types with record_builtin_java_type.
7750         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
7751         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
7752         (grokfndecl):  Call check_java_method for Java classes.
7753         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
7754         (process_overload_item):  Match types against specific
7755         java_XX_type_node types, rather than using is_java_type.
7756         * class.c (finish_struct_1):  Don't add default copy constructor
7757         or operator= if TYPE_FOR_JAVA.
7758         (pop_lang_conext):  Restore strict_prototyp proper if Java.
7759         * decl2.c (acceptable_java_type, check_java_method):  New functions.
7760         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
7761         (tsubst):  Move common statement after if statement.
7762         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
7763
7764 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
7765
7766         * pt.c (for_each_template_parm): Use first_rtl_op.
7767
7768         * tree.c (build_cplus_array_type_1): Also check index_type for
7769         template parms.
7770
7771 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
7772
7773         * pt.c (tsubst): Always copy BINFO_BASETYPES.
7774
7775 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
7776
7777         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
7778         TYPE_SIZE_UNIT too.
7779
7780 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
7781
7782         * decl.c (grokdeclarator): Don't complain about in-class
7783         initialization of static consts if we don't really know the type
7784         of the variable.
7785
7786 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
7787
7788         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
7789         * method.c (build_destructor_name): New fn.
7790         * decl2.c (maybe_retrofit_in_chrg): Split out...
7791         (grokclassfn): From here.  Reorganize.
7792         * decl.c (grok_ctor_properties): Make sure ctors for types with
7793         vbases have the in_chrg parm.
7794         * pt.c (instantiate_class_template): Update
7795         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
7796         grok_*_properties.
7797         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
7798
7799 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
7800
7801         * pt.c (instantiate_decl): Make test for whether or not static
7802         variables should be instantiated early match its comment.
7803
7804 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
7805
7806         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
7807         a member.
7808         (start_function): Call check_default_args.
7809         * decl2.c (grokfield): Don't call check_default_args.
7810         (check_default_args): Use cp_error_at.
7811         * lex.c (do_pending_defargs): Call check_default_args.
7812
7813 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
7814
7815         * call.c (build_method_call): Make sure get_type_value returns
7816         something before we try to use its TYPE_MAIN_VARIANT.
7817         (build_scoped_method_call): Likewise.
7818
7819 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
7820
7821         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
7822         initialize an array.
7823
7824         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
7825         DECL_VIRTUAL_P.
7826
7827         * friend.c (do_friend): Clarify template warning.
7828
7829 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
7830
7831         * decl.c (shadow_label): Don't treat decls as identifiers.
7832         (maybe_push_to_top_level): Clear shadowed_labels.
7833
7834         * pt.c (instantiate_decl): Reset lineno and filename after calling
7835         regenerate_decl_from_template.
7836
7837         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
7838         error_mark_node.
7839
7840 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
7841
7842         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
7843
7844 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
7845
7846         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
7847         (convert_nontype_argument): Handle cases when nontype template
7848         parameters become classes after substitution.
7849
7850 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
7851
7852         * friend.c (is_friend): Use comptypes, rather than == to compare
7853         types.  Modify for new representation of template friends.
7854         (make_friend_class): Likewise.
7855         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
7856         (instantiate_class_template): Deal with template friends.
7857
7858         * decl.c (store_parm_decls): Remove redundant call to
7859         expand_main_function.
7860
7861 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7862
7863         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
7864         DECL_USE_TEMPLATE.
7865
7866 1998-05-26  Per Bothner  <bothner@cygnus.com>
7867
7868         * language_as_string:  Handle lang_java.
7869
7870 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
7871
7872         * decl.c (pushdecl): Don't copy the type_decl.
7873
7874 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7875
7876         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
7877         current_class_type.
7878         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
7879
7880         * parse.y (complex_direct_notype_declarator): Use $1 to access
7881         scope of notype_qualified_id.
7882
7883 1998-05-26  Dave Brolley  <brolley@cygnus.com>
7884
7885         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
7886         (init_parse): Initialize cpplib interface.
7887
7888         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
7889         empty continuation.
7890
7891 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
7892
7893         * decl.c (pushtag): Avoid crashing on erroneous input.
7894
7895 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7896
7897         * decl.c (push_namespace): Only produce one unique name for
7898         anonymous namespaces.
7899         (get_unique_name): Remove.
7900
7901 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
7902
7903         * call.c (tourney): Don't do any extra comparisons.
7904
7905         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
7906
7907         * cp-tree.h (processing_template_parmlist): Declare.
7908         * decl.c (pushtag): Don't call push_template_decl when we
7909         shouldn't.
7910         * pt.c (processing_template_parmlist): New variable.
7911         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
7912         (complete_template_args): Use it.
7913         (add_to_template_args): Likewise.
7914         (innermost_args): Likewise.
7915         (tsubst): Likewise.
7916         (begin_template_parm_list): Use processing_template_parmlist.
7917         (end_template_parm_list): Likewise.
7918
7919         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
7920         * decl.c (grokdeclarator): Use it.
7921         * decl2.c (grok_x_components): Likewise.
7922         * init.c (initializing_context): Likewise.
7923         * method.c (do_build_copy_constructor): Likewise.
7924         (do_build_assign_ref): Likewise.
7925         * search.c (compute_access): Likewise.
7926         * typeck.c (build_component_ref): Likewise.
7927
7928         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
7929         unnamed type a typedef name "for linkage purposes".
7930
7931         * pt.c (lookup_template_class): Don't look at
7932         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
7933
7934         * method.c (build_overload_int): Handle error cases gracefully.
7935
7936         * pt.c (instantiate_decl): Handle static member variables
7937         correctly.
7938
7939         * pt.c (tsubst): Use the tsubst'd type when producing new
7940         TEMPLATE_PARM_INDEX nodes.
7941
7942 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
7943
7944         * tree.c (cp_tree_equal): Handle pointers to member functions.
7945
7946         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
7947         sure the type of the REF_BIND is a reference type.
7948         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
7949         target_type for clarity.
7950
7951         * parse.y (xcond): Move call to condition_conversion ...
7952         * semantics.c (finish_for_cond): Here.
7953         * parse.c: Regenerated.
7954
7955 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
7956
7957         * decl.c (push_namespace): Namespaces have type void.
7958         * typeck2.c (incomplete_type_error): Complain about namespace
7959         used as expression.
7960         * typeck.c (decay_conversion): Likewise.
7961
7962 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7963
7964         * error.c (dump_expr): Support namespaces.
7965
7966 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
7967
7968         * cp-tree.def: Add SRCLOC.
7969         * cp-tree.h: Add struct tree_srcloc and accessor macros.
7970         * tree.c (build_srcloc, build_srcloc_here): New fns.
7971         * pt.c (add_pending_template): Use build_srcloc_here.
7972         (push_tinst_level): Update last_template_error_tick before erroring.
7973         (instantiate_decl): Restore lineno and input_filename before
7974         calling add_pending_template.
7975         * decl2.c (finish_file): Set up lineno and input_filename for
7976         pending templates.
7977
7978 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
7979
7980         * decl.c (lang_print_error_function): New fn.
7981         (init_decl_processing): Set print_error_function to use it.
7982         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
7983
7984         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
7985         ICS_BAD_FLAG.
7986
7987         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
7988         copy-initialization.
7989
7990         * class.c (build_vtable_entry): Use int_fits_type_p.
7991         (build_vtable): Pass a signed offset to build_vtable_entry.
7992         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
7993         set_rtti_entry): Likewise.
7994
7995 1998-05-22  Per Bothner  <bothner@cygnus.com>
7996
7997         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
7998         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
7999
8000 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
8001
8002         * pt.c (print_template_context): Use fprintf instead of cp_error.
8003
8004         * pt.c (determine_specialization): Just return an error_mark_node.
8005         Also print the decl we want in error messages.  If we complain,
8006         return error_mark_node.
8007         (tsubst_friend_function): Set lineno and input_filename so
8008         error messages will be useful.
8009         (instantiate_template): Just return an error_mark_node.
8010         (check_explicit_specialization): Don't mess with a returned
8011         error_mark_node.
8012
8013         * pt.c (print_template_context): Add new argument.
8014         (maybe_print_template_context): New fn.
8015         (push_tinst_level): Increment tinst_level_tick.
8016         (pop_tinst_level): Likewise.
8017         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
8018         xrealloc instead of xmalloc.
8019
8020         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
8021
8022 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
8023
8024         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
8025         if the template we looked up is the same as the one we already
8026         have.
8027
8028 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
8029
8030         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
8031         (cpp_reader,parse_in): Add for cpplib.
8032         (check_newline): Call handle_sysv_pragma with new interface.
8033         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
8034
8035         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
8036         (sub_getch): Call GETC for cpplib.
8037
8038         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
8039         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
8040
8041         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
8042
8043 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
8044
8045         * decl2.c (maybe_make_one_only): New fn.
8046         (import_export_vtable): Use it.
8047         (import_export_decl): Likewise.
8048         * pt.c (mark_decl_instantiated): Likewise.
8049
8050 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
8051
8052         * decl2.c (find_representative_member): Rename to ...
8053         (build_anon_union_vars): New function.
8054         (finish_anon_union): Fix stupidity of previous change.
8055
8056 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
8057
8058         * decl.c (grokfndecl): Handle definition of specialization in
8059         friend declaration.
8060
8061         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
8062
8063 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
8064
8065         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
8066         to look for type declarations.
8067         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
8068         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
8069         (finish_member_class_template): Declare.
8070         * decl.c (pushtag): Put member class templates on the
8071         CLASSTYPE_TAGS list, just as for ordinary member classes.
8072         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
8073         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
8074         IDENTIFIER_NAMESPACE_VALUEs.
8075         * parse.y (component_decl): Move code to ...
8076         * semantics.c (finish_member_class_template): New function.
8077         Don't put member class templates on the list of components for a
8078         class.
8079         * parse.c: Regenerated.
8080         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
8081         In fact, don't use DECL_CONTEXT at all here.
8082
8083 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8084
8085         * decl.c (record_unknown_type): New function.
8086         (init_decl_processing): Call it for the unknown and global type
8087         nodes.
8088
8089 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
8090
8091         * decl2.c (find_representative_member): New function.
8092         (finish_anon_union): Use it.
8093
8094         * cp-tree.h (MAIN_NAME_P): New macro.
8095         (DECL_MAIN_P): Likwise.
8096         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
8097         (grokfndecl): Use the new macros.
8098         (grokdeclarator): Likewise.
8099         (start_function): Likewise.
8100         (store_parm_decls): Likewise.
8101         (finsh_function): Likewise.
8102         * friend.c (do_friend): Likewise.
8103         * typeck.c (build_function_call_real): Likewise.
8104         (build_unary_op): Likewise.
8105
8106 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
8107
8108         * decl2.c (start_objects, finish_objects, do_dtors,
8109         do_ctors): Split out from...
8110         (finish_file): ...here.
8111
8112 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
8113
8114         * tree.c (is_overloaded_fn): Don't abort on placeholders from
8115         push_class_decls.
8116
8117 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
8118
8119         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
8120
8121         * error.c (dump_expr): Handle an ARROW_EXPR.
8122
8123 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
8124
8125         * decl.c (saveable_obstack): Declare.
8126         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
8127         declare, if necessary.
8128
8129 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
8130
8131         * call.c (compare_qual): Remove.
8132         (is_subseq): Tweak.
8133         (is_properly_derived_from): New function.
8134         (maybe_handle_ref_bind): Likewise.
8135         (maybe_handle_implicit_object): Likewise.
8136         (compare_ics): Modify substantially to bring into conformance with
8137         the standard.
8138         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
8139         (comp_cv_qualification): Declare.
8140         (comp_cv_qual_signature): Likewise.
8141         * typeck.c (comp_cv_qualification): Likewise.
8142         (comp_cv_qual_signature): Likewise.
8143
8144 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8145
8146         * Makefile.in (parse.o): Depend on toplev.h.
8147
8148         * class.c (typecode_p): Remove prototype and definition.
8149
8150         * cp-tree.h (currently_open_class, is_empty_class, member_p):
8151         Add prototype.
8152
8153         * decl.c (push_overloaded_decl_top_level): Remove prototype and
8154         definition.
8155
8156         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
8157         in call to `cp_thing'.
8158         (cp_warning): Likewise for function pointer `warning'.
8159
8160         * except.c (do_function_call): Remove prototype and definition.
8161         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
8162
8163         * method.c (is_java_type): Add prototype and make it static.
8164
8165         * parse.y: Include toplev.h.
8166
8167         * pt.c (type_unification): Remove unused variable `arg'.
8168         (instantiate_decl): Likewise for `save_ti'.
8169
8170         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
8171
8172 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
8173
8174         * init.c (build_member_call): Handle template_ids.
8175         * parse.y (primary): Add global_scope template_id.
8176
8177 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
8178
8179         * decl2.c (get_sentry): Use end_temporary_allocation.
8180         Don't declare permanent_obstack.
8181
8182 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
8183
8184         * parse.y (.finish_new_placement): New non-terminal.
8185         (unary_expr, new_type_id): Use it.
8186         * parse.c: Regenerated.
8187
8188 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
8189
8190         * pt.c (redeclare_class_template): Say where the original definition
8191         of the template-parameter's default argument appeared.
8192
8193 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
8194
8195         * call.c (build_over_call): Tweak empty class handling.
8196
8197         * decl.c (make_typename_type): Use currently_open_class.
8198
8199         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
8200
8201 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8202
8203         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
8204         for a type unless it is one.
8205
8206         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
8207
8208 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
8209
8210         * Makefile.in (program_transform_name, objdir): Define.
8211
8212         * Makefile.in (BISON): Use bison from the build tree if it exists.
8213         (FLEX): Likewise.
8214
8215 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8216
8217         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
8218
8219         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
8220
8221 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
8222
8223         * call.c (build_scoped_method_call): Likewise.
8224
8225 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
8226
8227         * init.c (build_new_1): Call suspend_momentary around the creation
8228         of values that must be saved for exception handling.
8229         * parse.y (.build_new_placement): New non-terminal.
8230         (unary_expr, new_placement): Use it.
8231         * parse.c: Regenerated.
8232
8233 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
8234
8235         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
8236         old and new types.
8237
8238         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
8239         canonical type.
8240
8241         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
8242
8243 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
8244
8245         * decl.c (start_decl): Revert problem change.
8246
8247         * Makefile.in (CONFLICTS): Fix.
8248
8249 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8250
8251         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
8252
8253 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
8254
8255         * class.c (finish_struct_1): Use BINFO_SIZE.
8256
8257         * decl.c (start_decl): Use 'tem'.
8258
8259 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
8260
8261         * exception.cc: Include eh-common.h.
8262         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
8263         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
8264         (__cp_push_exception): Initialize eh_info struct as well.
8265         * except.c: Remove local structs and include eh-common.h.
8266         (init_exception_processing): Set language and version codes.
8267         (call_eh_info): Add presence of eh_info to runtime description of
8268         struct cp_eh_info.
8269         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
8270         * semantics.c (finish_try_block): Call start_catch_block() and
8271         end_catch_block().
8272         * parse.y (function_try_block): Call start_catch_block() and
8273         end_catch_block().
8274
8275 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
8276
8277         * typeck.c (original_type): New function.
8278         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
8279         to see if they're actually the same.
8280         * cp-tree.h (original_type): Declare.
8281
8282 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8283
8284         * Makefile.in (lex.o): Depend on output.h.
8285
8286         * call.c (add_function_candidate): Remove unused variable `cand'.
8287         (add_conv_candidate): Likewise.
8288         (build_builtin_candidate): Likewise.
8289
8290         * cp-tree.h: Add prototype for `types_overlap_p'.
8291
8292         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
8293
8294         * decl2.c (merge_functions): Remove unused variables `tmp' and
8295         `tempn'.
8296
8297         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
8298         (code_as_string): Likewise.
8299         (language_as_string): Likewise.
8300         (parm_as_string): Likewise.
8301         (op_as_string): Likewise.
8302         (assop_as_string): Likewise.
8303         (cv_as_string): Likewise.
8304
8305         * lex.c: Include output.h.
8306
8307         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
8308
8309         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
8310         ATTRIBUTE_UNUSED.
8311
8312         * tinfo.cc (__class_type_info::dcast): Change the type of variable
8313         `i' from int to size_t.
8314
8315         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
8316         ATTRIBUTE_UNUSED.
8317
8318 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
8319
8320         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
8321         DECL_NAMESPACE_SCOPE_P.
8322         (lang_decl_name): Likewise.
8323         * pt.c (tsubst_friend_function, tsubst): Likewise.
8324         * decl.c (pushdecl, redeclaration_error_message, start_decl,
8325         cp_finish_decl, start_function): Likewise.
8326         * class.c (finish_struct_1): Likewise.
8327         * call.c (build_over_call): Likewise.
8328         (compare_ics): Use DERIVED_FROM_P.
8329
8330 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
8331
8332         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
8333         * method.c (build_mangled_name): Use it.
8334         (build_decl_overload_real): Likewise.
8335
8336         * error.c (dump_simple_decl): New function, broken out from ...
8337         (dump_decl): Use it.
8338
8339 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
8340
8341         * ptree.c (lang_print_xnode): Add missing `break'.
8342
8343         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
8344
8345         * call.c (add_template_candidate): Adjust for changes to
8346         fn_type_unification.
8347         (add_template_candidate_real): Likewise.
8348         (add_template_conv_candidate): Likewise.
8349         (build_user_type_conversion_1): Likewise.
8350         (build_new_function_call): Likewise.
8351         (build_object_call): Likewise.
8352         (build_new_op): Likewise.
8353         (build_new_method_call): Likewise.
8354         * class.c (instantiate_type): Likewise.
8355         * cp-tree.h (unification_kind_t): New type.
8356         (fn_type_unification): Adjust prototype.
8357         (type_unificaiton): Likewise.
8358         * pt.c (UNIFY_ALLOW_NONE): New macro.
8359         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
8360         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
8361         (UNIFY_ALLOW_DERIVED): Likewise.
8362         (unify): Change prototype.
8363         (maybe_adjust_types_for_deduction): New function.
8364         (check_cv_quals_for_unify): Likewise.
8365         (determine_specialization): Adjust.
8366         (fn_type_unification): Likewise.
8367         (type_unification): Likewise.
8368         (type_unification_real): Likewise.  Use
8369         maybe_adjust_types_for_deduction.  Fix mishandling of
8370         back-unification of template functions passed as arguments.  Pass
8371         appropriate combination of UNIFY_ALLOW_* to unify.
8372         (unify): Remove unused NTPARMS parameter.  Use
8373         check_cv_quals_for_unify.  Remove bogus code that allowed
8374         too-generous unification in order to adhere more closely to standard.
8375         (get_bindings_real): Adjust.
8376         (get_class_bindings): Likewise.
8377
8378         * method.c (build_overload_identifier): Only use the innermost
8379         template arguments when mangling.
8380         * pt.c (tsubst_template_argument_vector): New function.
8381         (complete_template_args): Deal with the situation where the
8382         extra_args contain more than one level of arguments.
8383         (lookup_template_class): Deal with member template classes, which
8384         may have more than one level of arguments.
8385         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
8386         Improve handling of member template classes.  Use
8387         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
8388         tsubst_template_argument_vector where appropriate.
8389         (regenerate_decl_from_template): Break out from ...
8390         (instantiate_decl): Here.
8391
8392         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
8393         * parse.h: Regenerated.
8394         * parse.c: Really regenerated.
8395
8396         * cp-tree.h (finish_unary_op_expr): New function.
8397         (finish_id_expr): Likewise.
8398         (begin_new_placement): Likewise.
8399         (finish_new_placement): Likewise.
8400         (finish_declarator): Likewise.
8401         (finish_translation_unit): Likewise.
8402         (finish_parmlist): Likewise.
8403         (begin_class_definition): Likewise.
8404         (finish_class_definition): Likewise.
8405         (finish_default_args): Likewise.
8406         (finish_inline_definitions): Likewise.
8407         * parse.y (GCC_ASM_KEYWORD): Remove.
8408         (TYPENAME_ELLIPSIS): Likewise.
8409         * parse.c: Regenerated.
8410         Use new functions in semantics.c in the actions for many rules.
8411         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
8412         * hash.h: Regenerated.
8413         * semantics.c (finish_expr_stmt): Allow NULL expr.
8414         (finish_unary_op_expr): New function, containing
8415         code previously in parse.y.
8416         (finish_id_expr): Likewise.
8417         (begin_new_placement): Likewise.
8418         (finish_new_placement): Likewise.
8419         (finish_declarator): Likewise.
8420         (finish_translation_unit): Likewise.
8421         (finish_parmlist): Likewise.
8422         (begin_class_definition): Likewise.
8423         (finish_class_definition): Likewise.
8424         (finish_default_args): Likewise.
8425         (finish_inline_definitions): Likewise.
8426
8427 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
8428
8429         * typeck.c (build_c_cast): Don't decay arrays and functions to
8430         pointer type when converting to a class type.
8431
8432 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
8433
8434         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
8435         (DECL_CLASS_SCOPE_P): Likewise.
8436
8437 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
8438
8439         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
8440         * decl2.c (constructor_name_full): Likewise.
8441
8442 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
8443
8444         * tree.c (mapcar): Add OVERLOAD support.
8445
8446         * init.c (resolve_offset_ref): We must use basetype_path before we
8447         destroy it with a call to convert_pointer_to.
8448
8449 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
8450
8451         * class.c (currently_open_class): New fn.
8452         * decl.c (lookup_name_real): Use it.
8453         * search.c (lookup_field): Likewise.
8454
8455 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8456
8457         * cp-tree.def (OVERLOAD): New node.
8458         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
8459         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
8460         (NAMESPACE_BINDING): Remove.
8461         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
8462         namespace_binding.
8463         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
8464         Define.
8465         (tree_overload): New struct.
8466         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
8467         (REAL_IDENTIFIER_TYPE_VALUE): Define.
8468         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
8469         (lang_decl_flags): Remove in_namespace.
8470         (lang_decl): Remove chain.
8471         (DECL_CHAIN, DECL_NAMESPACE): Remove.
8472         (flag_honor_std): Declare extern.
8473         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
8474         namespace_binding, set_namespace_binding,
8475         lookup_function_nonclass, cat_namespace_levels,
8476         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
8477         scratch_ovl_cons, ovl_member, build_overload): Declare.
8478         (decl_list_length, get_namespace_id, current_namespace_id,
8479         overloaded_globals_p): Remove.
8480         (lookup_using_namespace, qualified_lookup_using_namespace): Change
8481         return type.
8482         (push_scratch_obstack): New macro.
8483         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
8484         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
8485         convs, fns.
8486         (build_new_function_call): Iterate using OVL_CHAIN.
8487         Print DECL_NAME in when reporting ambiguities.
8488         (build_object_call): Iterate using OVL_NEXT for fns, convs.
8489         (build_new_op): Call lookup_function_nonclass.
8490         Iterate using OVL_NEXT.
8491         (build_op_delete_call): Change detection of members.
8492         Do not wrap TREE_LIST around fields and single global functions.
8493         (build_over_call): Don't push a class level if the context is a
8494         namespace.
8495         (build_new_method_call): Iterate using OVL_NEXT.
8496         * class.c (add_method): Chain overloaded members using
8497         build_overload.  Remove copying of method.
8498         (grow_method): When iterating through the obstack, expect OVERLOAD
8499         nodes.  Chain overload members.
8500         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
8501         nodes in call to get_baselinks.
8502         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
8503         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
8504         fdecls that are OVERLOAD nodes.
8505         (validate_lhs): New function.
8506         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
8507         code.  Use DECL_NAME in error messages.  Split code between global
8508         and member function processing.
8509         * decl.c (global_type_node): New static variable.
8510         (in_std): New global.
8511         (struct binding_level): New field usings.
8512         (resume_binding_level): Assert that we are not in a class.
8513         (toplevel_bindings_p): Just check for namespace_p or
8514         pseudo_global.
8515         (resume_level): Remove.
8516         (find_binding): New function.
8517         (binding_for_name): Call it.
8518         (namespace_binding, set_namespace_binding): New functions.
8519         (push_namespace): Associate binding level with new namespace,
8520         resume_binding_level for existing namespace.  Remove old code.
8521         Fake std by counting.
8522         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
8523         (maybe_push_to_top_level): Save current namespace.
8524         (pop_from_top_level): Restore saved namespace.
8525         (pop_namespace): Call suspend_binding_level.  Remove old code.
8526         (cat_namespace_levels): New function.
8527         (set_identifier_type_value_with_scope): For namespace bindings,
8528         set BINDING_TYPE, and use global_type_node.
8529         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
8530         (identifier_type_value): New function.
8531         (pushtag): If no context, use current_namespace.
8532         (duplicate_decls): Don't process DECL_CHAIN.
8533         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
8534         already set.  Never reset it to NULL_TREE.  Lookup global variables
8535         in their namespace.  Push overloaded templates if they are on
8536         namespace level.
8537         (pushdecl_namespace_level): New function.
8538         (pushdecl_top_level): Implement using pushdecl_namespace_level.
8539         (pushdecl_using_decl): New function.
8540         (overloaded_globals_p): Remove.
8541         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
8542         them.  Use namespace_binding and set_namespace_value.
8543         (redeclaration_error_message): Complain if the declarations come
8544         from different namespaces.
8545         (lookup_tag): On namespace level, look in the BINDING_TYPE.
8546         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
8547         old code.
8548         (select_decl): New function.
8549         (lookup_name_real): Call it for qualified and unqualified lookup.
8550         Pass tree_bindings from the stack.
8551         If prefer_type is 1, also accept namespaces.
8552         (lookup_function_nonclass): New function.
8553         (init_decl_processing): Set the binding level of the global
8554         namespace to global_binding_level.
8555         Build a proper type list for __builtin_apply.
8556         Initialize std_node to "fake std" if flag_honor_std is set.
8557         Initialize global_type_node.
8558         Allocated bad_alloc in namespace std if flag_honor_std.
8559         (define_function): Set the DECL_CONTEXT to the current_namespace.
8560         (start_decl): A namespace is not considered as a context here.  If
8561         the DECL_CONTEXT is a namespace, push the decl.
8562         (cp_finish_decl): Check for namespaces used as initializers.
8563         (grokfndecl): Add namespace parameter.  Remove processing of
8564         DECL_CHAIN.
8565         (grokvardecl): Add namespace parameter.
8566         (grokdeclarator): Process SCOPEs that are namespaces.  For
8567         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
8568         (start_function): Check for contexts that are namespaces.
8569         Set context for declarations that have not been pushed.
8570         (store_parm_decls): Check for ::main only.
8571         (finish_function): Likewise.
8572         (start_method): Check for contexts that are namespaces.
8573         (start_method): Remove DECL_CHAIN processing.
8574         * decl2.c (flag_honor_std): Declare.
8575         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
8576         (decl_namespace_list): New static global.
8577         (grok_x_components): Ignore namespaces as type contexts.
8578         (check_classfn): Expect OVERLOAD nodes.
8579         (grokfield): Remove DECL_CHAIN processing.
8580         (finish_file): Call cat_namespace_levels.
8581         (merge_functions): New function.
8582         (ambiguous_decl): Rewrite.
8583         (lookup_using_namespace): Produce tree_bindings.
8584         (qualified_lookup_using_namespace): Likewise.
8585         (set_decl_namespace, decl_namespace, current_decl_namespace,
8586         push_decl_namespace, pop_decl_namespace): New functions.
8587         (arg_lookup): New struct.
8588         (add_function, arg_assoc_namespace, arg_assoc_class,
8589         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
8590         New functions.
8591         (get_namespace_id, current_namespace_id): Remove.
8592         (do_toplevel_using_decl): Rewrite.
8593         (do_class_using_decl): Complain about namespace qualifiers.
8594         (do_using_directive): Sorry if not on namespace level.  Complain
8595         about unknown namespaces.
8596         * error.c (dump_aggr_type): Check for namespace contexts.
8597         * except.c (init_exception_processing): Push terminate into std.
8598         * friend.c (is_friend): A namespace is not a context, here.
8599         * init.c (expand_member_init): Remove DECL_CHAIN processing.
8600         (build_offset_ref): Process OVERLOAD nodes.
8601         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
8602         * lex.c (identifier_type): Loop using OVL_CHAIN.
8603         (see_typename): Set looking_for_typename to 2.
8604         (real_yylex): Likewise.
8605         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
8606         (do_scoped_id): Expect OVERLOAD nodes.
8607         Change calling convention for qualified_lookup_using_namespace.
8608         (build_lang_decl): Don't set in_namespace anymore.
8609         * method.c (typevec_size): New global.
8610         (build_overload_nested_name): Return if global_namespace.
8611         Otherwise, always expect a declaration context.
8612         (build_qualified_name): Likewise.
8613         Make sure we don't write beyond typevec_size.
8614         (build_decl_overload_real): Likewise.
8615         Allocate one extra slot for the namespace.
8616         (hack_identifier): Mark code dead.
8617         Process OVERLOAD and NAMESPACE_DECL nodes.
8618         * parse.y (program): Pop namespaces until in global namespace.
8619         (extdef): In a using-declaration, don't discard the identifier if
8620         there is no declaration.
8621         (left_curly): Ignore type contexts which are namespaces.
8622         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
8623         used as scope.
8624         * pt.c (template_class_depth): Expect types to be namespaces.
8625         (determine_specialization): Simplify by expecting OVERLOAD nodes.
8626         (push_template_decl): Push into namespace level.
8627         Reset ctx if it is a namespace.
8628         Set DECL_CONTEXT to current_namespace if not set already.
8629         Ignore real contexts that are namespaces.
8630         (mangle_class_name_for_template): Skip global_namespace.
8631         Mangle other namespaces as declarations.
8632         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
8633         (lookup_template_class): Push into namespace of context.
8634         If the context is a namespace, set it to global_namespace.
8635         Use id_context for mangling.
8636         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
8637         (tsubst_friend_function): Ignore namespace contexts.
8638         Push into namespace level.
8639         (tsubst): Handle NAMESPACE_DECL nodes.
8640         Remove DECL_CHAIN processing.
8641         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
8642         * ptree.c (print_lang_identifier): Print bindings.
8643         (lang_print_xnode): Print OVERLOAD nodes.
8644         * rtti.c (init_rtti_processing): Push type_info into std.
8645         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
8646         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
8647         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
8648         lookup_fnfields_here): Likewise.
8649         Process all nodes, instead of going through TREE_CHAIN.
8650         * sig.c (build_signature_pointer_or_reference_type): Set context
8651         to global_namespace.
8652         (build_signature_table_constructor): Expect OVERLOAD nodes.
8653         * spew.c (yylex): Save old setting of looking_for_typename.
8654         * tree.c (decl_list_length): Remove.
8655         (binding_init): New function.
8656         (count_functions): Rewrite.
8657         (is_overloaded_fn): Expect OVERLOAD nodes.
8658         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
8659         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
8660         ovl_member): New functions.
8661         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
8662         (type_unknown_p): Likewise.
8663         (require_instantiated_type): Likewise.
8664         (build_component_ref): Declare code dead.
8665         (build_x_function_call): Create and expect OVERLOAD nodes.
8666         (build_function_call_real): Check for ::main only.
8667         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
8668         (convert_for_assignment): Check for TREE_LIST before accessing
8669         TREE_VALUE.
8670         * decl.c (duplicate_decls): Check for namespace bindings instead
8671         of global bindings.
8672         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
8673         lookup_name_current_level, start_decl, xref_tag,
8674         finish_enum): Likewise.
8675         * init.c (build_offset_ref): Likewise.
8676         * search.c (lookup_field): Likewise.
8677         (lookup_fnfields): Likewise.
8678         (dfs_debug_mark): Likewise.
8679         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
8680         (poplevel_class, pop_from_top_level): Likewise.
8681         * decl2.c (finish_method): Likewise.
8682         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
8683         * decl.c (record_builtin_type): Likewise.
8684         (init_decl_processing, grokfndecl): Likewise.
8685         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
8686         (make_lang_type): Likewise.
8687         * parse.y (make_thunk): Likewise.
8688         * pt.c (tsubst): Likewise.
8689         * tree.c (debug_binfo): Likewise.
8690         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
8691         tinfo2.cc, inc/new.h: Add std qualifications.
8692         * inc/new: Wrap with namespace std if __HONOR_STD.
8693         * inc/typeinfo: Likewise.
8694
8695 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
8696
8697         * call.c (build_user_type_conversion_1): Handle second_conv
8698         properly for templates.
8699
8700 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
8701
8702         * method.c (build_decl_overload_real): Set TREE_USED flag to
8703         zero for build_type_variants nodes as well.
8704
8705 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
8706
8707         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
8708
8709 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
8710
8711         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
8712         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
8713         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
8714         xref.o): Add toplev.h dependencies.
8715
8716 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
8717
8718         * errfn.c (cp_error, cp_warning): Remove declarations for
8719         error and warning respectively.
8720
8721 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8722
8723         * error.c: Convert to using ctype macros defined in system.h.
8724         * method.c: Likewise.
8725         * xref.c: Likewise.
8726         * lex.c: Likewise.  Also remove redundant system header stuff.
8727
8728 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
8729
8730         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
8731         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
8732         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
8733         xref.c: Add include of toplev.h.
8734
8735 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
8736
8737         * tree.c (perm_manip): Also regenerate the RTL of an extern.
8738         (copy_to_permanent): Use end_temporary_allocation.
8739
8740 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
8741
8742         * init.c (expand_vec_init): The initialization of each array
8743         element is a full-expression.
8744
8745 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
8746
8747         * method.c (build_mangled_name): Add a call to build_type_variant
8748         to get the right type.
8749
8750 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
8751
8752         * Makefile.in: Add .SUFFIXES.
8753
8754         * cp-tree.def: Remove NAMESPACE_DECL.
8755
8756 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
8757
8758         * call.c (build_over_call): Do evaluate arg even if it has empty
8759         class type.
8760         * decl.c (start_function): Don't push a member function.
8761
8762 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
8763
8764         * Makefile.in (g++FAQ.info): Put -o option before input file.
8765
8766 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
8767
8768         * gxxint.texi: Add info for squangling codes K and B.
8769
8770 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
8771
8772         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
8773         the expression in templates.
8774         (finish_stmt_expr): Likewise.
8775
8776 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
8777
8778         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
8779
8780 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
8781
8782         * decl.c (maybe_push_to_top_level): Always clear
8783         current_template_parms and processing_template_decl.
8784         (pushtag): Remove check of current_class_type and some comments,
8785         since maybe_push_to_top_level no longer creates confusion.
8786
8787 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
8788
8789         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
8790         (DECL_CLASS_TEMPLATE_P): Likewise.
8791         (DECL_PRIMARY_TEMPLATE): Likewise.
8792         (PRIMARY_TEMPLATE_P): Use it.
8793         (push_template_decl_real): New function.
8794         (redeclare_class_template): Take new template parameters as
8795         input.
8796         (is_specialization_of): New function.
8797         (comp_template_args): Declare.
8798         * decl.c (pushtag): Handle friend template classes.
8799         (xref_tag): Likewise.  Use new calling convention for
8800         redeclare_class_template.
8801         * decl2.c (grok_x_components): Handle friend templates.
8802         * friend.c (is_friend): Use is_specialization_of where
8803         appropriate.  Deal with friend class templates.
8804         (make_friend_class): Let a class template be friends with itself.
8805         * pt.c (comp_template_args): Remove declaration.
8806         (tsubst_friend_class): New function.
8807         (push_template_decl_real): New function.
8808         (push_template_decl): Use it.
8809         (redeclare_class_template): Adjust for new calling convention.
8810         (comp_template_args): Give it external linkage.
8811         (instantiate_class_type): Use tsubst_friend_class to deal
8812         with friend templates.
8813         * typeck.c (comptypes): Use comp_template_args, rather than
8814         expanding it inline.
8815         * parse.y (component_decl): Handle a nested template type
8816         like other component type declarations.
8817
8818         * pt.c (check_explicit_specialization): Handle overloaded
8819         constructors correctly.
8820
8821         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
8822         (lookup_template_class): Use it.
8823
8824 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
8825
8826         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
8827         * cp-tree.h: Add WRAPPER support.
8828         * call.c (add_candidate): Split out from add_*_candidate fns.
8829         (build_over_call): Take the candidate instead of function and args.
8830         Enforce access control here.  Emit overload warnings here.
8831         (add_warning): New fn.
8832         (joust): Add WARN parm.  If not set, call add_warning instead of
8833         printing a warning.  Re-enable some warnings.
8834         (tourney): Pass it.
8835         (convert_like): Adjust.
8836         (build_new_op): Adjust.
8837         (build_new_function_call): Adjust.
8838         (build_user_type_conversion_1): Adjust.
8839         (USER_CONV_FN): Adjust.
8840         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
8841         build_int_wrapper): New fns.
8842
8843 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
8844
8845         * pt.c (unify): Fix typo in previous change.
8846
8847 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
8848
8849         * error.c (dump_type_real): Declare canonical_name.
8850
8851         * typeck.c (comp_target_types): Fix PMFs.
8852
8853 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
8854
8855         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
8856         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
8857         TEMPLATE_DECL.
8858
8859         * pt.c (tsubst): Decrease the template-level of
8860         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
8861         TEMPLATE_PARM_INDEX.
8862         (template_decl_level): New function.
8863         (unify): Make sure to record unifications for template
8864         parameters, even when the parameters exactly match the arguments.
8865         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
8866         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
8867         aren't from the level we're currently working on.
8868
8869 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
8870
8871         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
8872
8873         * decl2.c (check_member_template): Set DECL_IGNORED for member
8874         class templates, too.
8875
8876         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
8877
8878 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8879
8880         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
8881
8882 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
8883
8884         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
8885         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
8886         (init_decl_processing): Handle TI types.
8887         * typeck.c (unsigned_type, signed_type): Handle TI types.
8888
8889 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
8890
8891         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
8892         New local added_libraries.  Increment count when add library to
8893         arglist.
8894
8895 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
8896
8897         * cp-tree.h (type_as_string_real): New function.
8898         * pt.c (mangle_class_name_for_template): Use it.
8899         * error.c (dump_aggr_type): Change prototype.
8900         (dump_type_prefix): Likewise.
8901         (dump_type_suffix): Likewise.
8902         (dump_type_real): Convert from dump_type.  If desired, the
8903         "canonica" name of a typedef, i.e., the name of the underlying
8904         type, can be printed.
8905         (dump_type): Call dump_type_real.
8906
8907 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
8908
8909         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
8910
8911         * typeck.c (comp_target_types): Tweak pedantic case.
8912         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
8913         Return -1 or 1 instead of 1 or 2.
8914         (compparms): Remove STRICT handling.
8915         (convert_for_assignment): Fix handling of pmfs.
8916
8917 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
8918
8919         * typeck.c (comp_target_types): Handle references like pointers.
8920         (comp_target_parms): Note that return code from comp_target_types
8921         can be negative to indicate failure.
8922
8923 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8924
8925         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
8926         which requires a working target compiler to build.
8927
8928 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
8929
8930         * tree.c (avoid_overlap): Add prototype.
8931
8932         * spew.c (num_tokens): Add prototype.
8933         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
8934
8935         * search.c (dfs_check_overlap): Add prototype.
8936         (dfs_no_overlap_yet): Likewise.
8937
8938         * pt.c (original_template): Add prototype.
8939         (inline_needs_template_parms): Likewise.
8940         (push_inline_template_parms_recursive): Likewise.
8941         (retrieve_specialization, register_specialization): Likewise.
8942         (print_candidates, reduce_template_parm_level): Likewise.
8943         (build_template_decl, mark_template_parm): Likewise.
8944         (tsubst_friend_function, get_bindings_real): Likewise.
8945
8946         * method.c (start_squangling): Add prototype.
8947         (end_squangling, check_ktype, issue_ktype): Likewise.
8948         (build_overloaded_scope_ref, check_btype): Likewise.
8949         (build_mangled_template_parm_index): Likewise.
8950
8951         * lex.c (init_cpp_parse): Add prototype.
8952         (handle_cp_pragma, handle_sysv_pragma): Likewise.
8953         (reduce_cmp, token_cmp): Likewise.
8954
8955         * except.c (call_eh_info): Add prototype.
8956         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
8957         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
8958
8959         * decl2.c (is_namespace_ancestor): Add prototype.
8960         (namespace_ancestor, add_using_namespace): Likewise.
8961         (ambiguous_decl): Likewise.
8962
8963         * decl.c (indent): Add prototype.
8964
8965         * call.c (add_template_candidate_real): Add prototype.
8966
8967 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
8968
8969         * decl2.c (build_expr_from_tree): Just return a PMF.
8970
8971 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
8972
8973         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
8974         when doing initializations.
8975
8976         * pt.c (unify): Use comptypes to compare type args.
8977
8978 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
8979
8980         * decl.c (duplicate_decls): Fix check for when it's safe to free
8981         the new decl.
8982
8983         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
8984         to type_as_string.
8985
8986 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
8987
8988         * pt.c (build_template_parm_index): Add prototype.
8989
8990         * search.c (my_tree_cons): Don't clear words outside the
8991         newly allocated node.
8992
8993 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
8994
8995         * lex.c (init_parse): Now returns char* containing the filename.
8996
8997 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
8998                           Jeff Law   <law@cygnus.com>
8999
9000         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
9001         than a pointer.
9002
9003 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9004
9005         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
9006
9007 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9008
9009         * decl.c (duplicate_decls): Don't warn for redundant decls if
9010         friend: let add_friend take care of it.
9011
9012 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
9013
9014         * sig.c (build_signature_pointer_constructor): Don't set
9015         TREE_HAS_CONSTRUCTOR for a signature pointer.
9016         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
9017         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
9018         here, too.
9019         * typeck.c (build_unary_op): Only allow taking the address of a
9020         real constructor.
9021         * typeck2.c (digest_init): Simplify.
9022         (store_init_value): Don't pedwarn about using { } for pmfs.
9023
9024 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
9025
9026         * cp-tree.h (start_decl):  Update prototype.
9027         * decl.c (start_decl):  Like the C version, new parameters
9028         for the attributes.  Call cplus_decl_attributes here,
9029         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
9030         (grokdeclarator):  Pass NULL for new start_decl arguments.
9031         * pt.c (tsubst_expr):  Likewise.
9032         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
9033         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
9034         * lex.c (build_lang_decl): Add lang_name_java.
9035         * class.c (push_lang_context): Add lang_name_java.
9036         * method.c (build_mangled_name): Check for is_java_type.
9037
9038 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9039
9040         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
9041         * call.c (build_scoped_method_call): Check for TREE_CODE for
9042         VOID_TYPE instead of type ==  void_type_node.
9043         (build_method_call): Likewise.
9044         * decl.c (lookup_name_real): Likewise.
9045         (grokdeclarator): Likewise.
9046         (start_decl): Likewise.
9047         (grokparms): Likewise.
9048         (start_function): Likewise.
9049         (finish_function): Likewise.
9050         (start_method): Likewise.
9051
9052 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
9053
9054         * lex.c (finput): New variable.
9055         (init_cpp_parse):  Renamed from init_parse.
9056         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
9057         (finish_parse): New function.
9058         * cp-tree.h (init_lex, init_parse): Remove declarations.
9059
9060 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
9061
9062         * call.c (build_call): Still evaluate the actual argument.
9063         * class.c (is_empty_class): Update for -fnew-abi.
9064
9065         * decl2.c: -fnew-abi implies -fsquangle.
9066
9067         * method.c (do_build_assign_ref): Don't do anything to copy
9068         an empty class.
9069         (do_build_copy_constructor): Likewise.
9070         * call.c (build_over_call): Likewise.
9071
9072 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
9073
9074         * tree.c (avoid_overlap): Return a value.
9075
9076 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
9077
9078         * method.c (check_btype): Add missing argument to xrealloc.
9079         (check_ktype): Likewise.
9080
9081 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
9082
9083         Implement empty base optimization.
9084         * class.c (finish_struct_1): Add vbase fields earlier.  Set
9085         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
9086         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
9087         (types_overlap_p): New fn.
9088         * tree.c (avoid_overlap): New fn.
9089         (build_base_fields): Use it to avoid overlapping empty bases.
9090         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
9091
9092         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
9093
9094         Re-implement allocation of base class subobjects.
9095         * tree.c (unshare_base_binfos): New fn.
9096         (layout_basetypes): Use it.  Now handles offsets of both virtual and
9097         non-virtual bases, after layout_type.
9098         (layout_vbasetypes): Remove.
9099         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
9100         (build_vbase_pointer_fields): Split out from old layout_basetypes.
9101         * class.c (finish_base_struct): Lose offset handling code.
9102         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
9103         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
9104         * cp-tree.h: Adjust.
9105
9106 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
9107
9108         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
9109         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
9110         * class.c (duplicate_tag_error): Likewise.
9111         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
9112         * tree.c (layout_vbasetypes): Update from layout_record, remove
9113         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
9114         (layout_basetypes): Likewise.
9115
9116 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
9117
9118         * class.c, Make sure system.h is included just after config.h.
9119         Delete lingering stdio and errno references too.
9120         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
9121
9122 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
9123
9124         * friend.c (is_friend): Fix access control for local classes.
9125
9126         * class.c (is_empty_class): New fn.
9127         * call.c (build_call): Don't pass empty class objects to a function.
9128
9129 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
9130
9131         * call.c (build_over_call): Do name resolution for default
9132         arguments of function templates in the scope of the templates.
9133
9134 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
9135
9136         * call.c: Include system.h.  Remove includes, declarations and
9137         defines provided by system.h.
9138         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
9139         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
9140         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
9141         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
9142         * typeck2.c, xref.c: Likewise.
9143         * Makefile.in: Dependencies updated as appropriate.
9144         * Make-lang.in: Likewise.
9145
9146 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
9147
9148         * pt.c (fn_type_unification): Allow incomplete unification without
9149         an immediate error message.
9150
9151 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
9152
9153         * tree.c (member_p): New fn.
9154         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
9155         initializing class members.
9156
9157         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
9158         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
9159
9160         * call.c (build_method_call): Handle non-scoped destructors, too.
9161         * pt.c (tsubst_copy): Likewise.
9162
9163         * pt.c (print_template_context): Split out...
9164         (push_tinst_level): ...from here.
9165
9166         * friend.c (is_friend): Don't pass a type to decl_function_context.
9167
9168         * typeck.c (convert_for_initialization): Always hand off
9169         conversions to class type.
9170
9171 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
9172
9173         * friend.c (is_friend): Local classes have the same access as the
9174         enclosing function.
9175
9176 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
9177
9178         * typeck.c (expand_target_expr): Delete dead function.
9179
9180         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
9181
9182         * repo.c (save_string): Delete dead function.
9183
9184         * method.c (thunk_printable_name): Delete dead function.
9185
9186         * lex.c (yynextch): Delete dead function.
9187
9188         * expr.c (tree_extract_aggr_init): #if 0 out.
9189
9190         * except.c (do_unwind): Delete dead function.
9191         (easy_expand_asm): Likewise.
9192
9193         * cvt.c (build_conversion_type_1): Delete dead function.
9194
9195         * cp-tree.h (push_expression_obstack): Declare.
9196
9197         * call.c (source_type): #if 0 out.
9198
9199         * class.c (alter_access): Remove unused label.  Add braces
9200         around empty else clause.
9201
9202         * lex.c (yyprint): Fix argument to printf.
9203
9204 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
9205
9206         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
9207
9208         * pt.c (instantiate_class_template): Make sure template
9209         arguments are permanent.
9210         * init.c (resolve_offset_ref): Don't go looking around in
9211         template types.
9212
9213         * semantics.c: Add routines to handle expressions, and some
9214         declaration processing.
9215         * parse.y: Use them.
9216         (current_class_depth): Move declaration to cp-tree.h.
9217         * parse.c: Regenerated.
9218         * cp-tree.h: Use them.
9219         (current_class_depth): Declare.
9220         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
9221
9222 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
9223
9224         * error.c (dump_decl): Be a bit more explicit with template
9225         type arguments, when verbose.
9226
9227 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
9228
9229         * inc/exception: Reorder closing braces.
9230
9231 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
9232
9233         * pt.c (redeclare_class_template): New function.
9234         * cp_tree.h (redeclare_class_template): Declare it.
9235         * decl.c (xref_tag): Use it.
9236
9237 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
9238
9239         * call.c (build_over_call): Check IS_AGGR_TYPE, not
9240         TYPE_LANG_SPECIFIC.
9241         * typeck.c (convert_arguments): Likewise.
9242
9243         * decl.c (grokdeclarator): Remove const and volatile from type after
9244         setting constp and volatilep.
9245
9246         * class.c (finish_struct_1): Don't warn about bool bitfield larger
9247         than one bit.
9248
9249 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
9250
9251         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
9252
9253 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
9254
9255         * call.c (build_object_call): Complain about ambiguous operator(),
9256         rather that crashing.
9257         (build_new_op): Likewise.
9258         (build_op_delete_call): Likewise.
9259
9260 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
9261
9262         * cvt.c (perform_qualification_conversions): Use comp_target_types
9263         instead of comp_ptr_ttypes.
9264
9265 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
9266
9267         * cp-tree.h (enforce_access): Declare.
9268         * call.c (enforce_access): Make it extern, not static.
9269         * class.c (alter_access): Use enforce_access; modify code for ISO
9270         compliance, rather than ARM rules.
9271
9272 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9273
9274         * cp-tree.h: Fix typo.
9275
9276 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
9277
9278         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
9279         if (aggregate_value_p (type)).
9280
9281         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
9282
9283 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
9284
9285         * tree.c (mapcar): When dealing with a DECL, use it's constant
9286         value, if any.
9287         * pt.c (lookup_template_class): Don't mangle the names of template
9288         classes whose arguments are unknown.
9289
9290         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
9291
9292 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
9293
9294         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
9295
9296 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
9297
9298         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
9299         boolean_type_node to 1.
9300
9301 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
9302
9303         * error.c (dump_expr): Remove unused variable `l'.
9304
9305         * pt.c (for_each_template_parm): New function, created by
9306         converting uses_template_parms.
9307         (tree_fn_t): New typedef.
9308         (uses_template_parms): Use it.
9309         (mark_template_parm): New function.
9310         (push_template_decl): Check that the argument list of a partial
9311         specialization uses all the template parameters.
9312
9313         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
9314         with it; we might want it for debugging.
9315         * cp-tree.h (type_unification): Change interface.
9316         * class.c (finish_struct_1): Skip nested template types, just like
9317         ordinary nested types.
9318         (instantiate_type): Use new interface to type_unification.
9319         * lex.c (init_lex): Add __sz as opname for sizeof.
9320         * method.c (build_overload_scope_ref): New function.
9321         (build_overload_int): Handle complex expressions.  Set
9322         numeric_output_need_bar if necessary.
9323         (build_overload_value): Handle non-PARM_DECL nodes; this
9324         routine is now used by build_overload_int.  Remove some
9325         assignments to numeric_output_need_bar.  Use
9326         build_overload_scope_ref.
9327         (build_qualified_name): Note that some template mangled names end
9328         with digits, and set numeric_output_need_bar appropriately.  Use
9329         build_underscore_int.
9330         * pt.c (unify): Change interface.
9331         (type_unification_real): Likewise.
9332         (determine_specialization): Use new interfaces.
9333         (tsubst): Deal gracefully with situations in which the argument
9334         vector is not fully filled.
9335         (fn_type_unification): Use new interfaces.
9336         (type_unification): Likewise.  Remove NOP_EXPR hack.
9337         (type_unification_real): Likewise.
9338         (unify): Likewise.  Deal with unification of complex expressions.
9339
9340 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
9341
9342         * pt.c (complete_template_args): Initialize skip properly.
9343
9344         * decl.c (make_typename_type): Revert.
9345         (make_implicit_typename): Remove.
9346         (lookup_name_real): Don't call it.  Call lookup_field if we see a
9347         TYPE_DECL from a template base.
9348         * search.c (lookup_field): Do implicit typename stuff.
9349
9350 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
9351                           Geoff Noer    <noer@cygnus.com>
9352
9353         * Makefile.in: Various fixes for building cygwin32 native toolchains.
9354         * Make-lang.in: Likewise.
9355
9356 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9357
9358         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
9359
9360 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
9361
9362         * decl.c (make_implicit_typename): Rewrite removed code.
9363         (make_typename_type): Call it if the type we look up comes from
9364         a base that uses template parms.
9365
9366         * pt.c (complete_template_args): Rewrite.
9367         (tsubst, FUNCTION_DECL): Use it.
9368
9369 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
9370
9371         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
9372         c_expand_asm_operands () if output_operands, input_operands or
9373         clobbers is not NULL_TREE.
9374
9375 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9376
9377         * pt.c (complete_template_args): New function.
9378         (get_bindings): Deal with specializations of function templates
9379         with return type containing parameters from outer class
9380         templates.
9381         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
9382         substitute arguments and compose a new type.
9383
9384 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
9385
9386         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
9387         FUNCTION_DECLs.
9388
9389 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
9390
9391         * decl.c (make_implicit_typename): Lose useless code.
9392
9393         * call.c (standard_conversion): Handle A* -> const A* properly.
9394
9395         * pt.c (get_bindings_real): Rename from get_bindings.  Add
9396         check_rettype parm.
9397         (get_bindings): Pass 1.
9398         (get_bindings_overload): Pass 0.
9399
9400 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
9401
9402         * pt.c (check_explicit_specialization): When reverting a static
9403         member function, also remove the `this' parameter from
9404         last_function_parms.
9405
9406 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
9407
9408         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
9409         a function context.
9410
9411         * decl.c (store_bindings): Use free_binding_vecs.
9412         (pop_from_top_level): Likewise.
9413
9414 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
9415
9416         * decl.c (make_implicit_typename): Only change the type of a
9417         TYPENAME_TYPE.
9418
9419 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
9420
9421         * semantics.c: New file, containing routines to perform the
9422         semantic phase of parsing.
9423         * parse.y: Use it.
9424         * pt.c (tsubst_expr): Likewise.
9425         * cp-tree.h: Declare the various functions in semantics.c.
9426         Provide macros to access _STMT tree nodes.
9427         * cp-tree.def: Add ASM_STMT tree node.
9428         * Makefile.in, Make-lang.in: Add dependencies on and for
9429         semantics.c.
9430
9431 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
9432
9433         * pt.c (push_template_decl): Only check primary templates.
9434
9435         * pt.c (check_explicit_specialization): Complain about default args
9436         in explicit specialization.
9437
9438         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
9439         constructor_declarator.
9440
9441 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
9442
9443         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
9444         has no overloaded operator ->.
9445
9446         * call.c (build_field_call): Don't crash when presented with a
9447         field that is actually a nested type.
9448
9449         * decl.c (pushtag): Deal with friend class injection in local
9450         classes.
9451
9452         * call.c (build_object_call): Don't crash if OBJ is a
9453         pointer-to-member-function.
9454
9455 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
9456
9457         * pt.c (push_template_decl): Complain about template with C linkage,
9458         anonymous template class.
9459
9460 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
9461
9462         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
9463         * search.c: Likewise.
9464
9465         * lex.c (do_pending_defargs): Only call
9466         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
9467
9468         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
9469
9470 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
9471
9472         * parse.y: Deal with CONSTRUCTORS in new_initializers.
9473
9474 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
9475
9476         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
9477         closely mimics the behavior in parse.y.
9478         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
9479         into a compound statement.
9480
9481 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
9482
9483         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
9484         * pt.c (inline_needs_template_parms): New fn.
9485         (original_template): New fn.
9486         (push_inline_template_parms_recursive): New fn.
9487         (maybe_begin_member_template_processing): Use them.
9488         (maybe_end_member_template_processing): Likewise.
9489         (is_member_or_friend_template): Rename to is_member_template.
9490         Member functions of local classes are never member templates.
9491
9492 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9493
9494         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
9495         added in the class scope to catch redefinition error.
9496
9497         * pt.c (reduce_template_parm_level): Also copy
9498         the DECL_TEMPLATE_PARMS field.
9499
9500 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
9501
9502         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
9503         reduced-level template type parameter.
9504
9505 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
9506
9507         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
9508         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
9509         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
9510         * decl.c (duplicate_decls): Propagate it.
9511         * typeck2.c (abstract_virtuals_error): Use two loops to emit
9512         abstract virtual functions and virtual functions which need a
9513         final overrider separately.
9514
9515 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
9516
9517         * lang-specs.h: Properly put brackets around array elements in
9518         initializer.
9519
9520         * typeck.c (build_binary_op_nodefault): Correctly place parens around
9521         && and || in expression.
9522
9523 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
9524
9525         * call.c (default_parm_conversions): Remove prototype definition.
9526         (build_method_call): Remove unused variable result.
9527
9528         * cvt.c (ocp_convert): Remove unused variable conversion.
9529
9530         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
9531
9532         * except.c (do_unwind): #if 0 definition of unused variables fcall
9533         and next_pc.
9534
9535         * expr.c (extract_scalar_init): #if 0 prototype and function
9536         definition.
9537
9538         * init.c (expand_aggr_init_1): Remove unused variable init_type.
9539         (build_new_1): Remove unused variable t.
9540
9541         * pt.c (instantiate_class_template): Remove unused variable newtag;
9542         cast called function return value to void.
9543         (do_decl_instantiation): Remove unused variables name and fn.
9544
9545         * tree.c (get_type_decl): Add default return to shut up compiler from
9546         complaining control reaches end of non-void function.
9547
9548         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
9549
9550 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
9551
9552         * call.c (default_parm_conversions): Remove prototype definition.
9553         (build_method_call): Remove unused variable result.
9554         (build_over_call): Add default case in enumeration switch.
9555
9556 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
9557
9558         * decl2.c (lang_decode_option): Change j's type to size_t.
9559
9560         * tree.c (layout_vbasetypes): record_align and desired_align are of
9561         type unsigned int; const_size and nonvirtual_const_size likewise.
9562
9563 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
9564
9565         * parse.y (new_initializer): Make sure all initializers are
9566         lists.
9567
9568 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
9569
9570         * decl2.c (import_export_decl): Mark tinfo functions for
9571         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
9572
9573 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
9574
9575         * method.c: Fix typo.
9576
9577 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9578
9579         * method.c: Include "system.h" to get stdlib.h, stdio.h,
9580         ctype.h, string.h, etc.
9581         (issue_nrepeats): Add default case in enumeration switch.
9582         (check_btype): Likewise.
9583         (process_overload_item): Likewise.
9584
9585         * Makefile.in (method.o): Depend on system.h.
9586
9587 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
9588
9589         * lex.c (do_scoped_id): Fix parenthesizing.
9590
9591 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
9592
9593         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
9594         FLAG_RTTI is unset, initialize type info machinery and continue
9595         with FLAG_RTTI enabled.
9596         (get_typeid): Likewise.
9597
9598 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
9599
9600         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
9601         from B.
9602
9603 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
9604
9605         * pt.c (finish_member_template_decl): Deal more gracefully with
9606         invalid declarations.
9607
9608 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
9609
9610         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
9611         cp-tree.h: Clean up more old overloading code, old RTTI code, and
9612         some formatting quirks.
9613
9614         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
9615         method.c, pt.c, ptree.c, typeck.c: Remove support for
9616         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
9617         * class.h: Remove.
9618         * Makefile.in: Adjust.
9619
9620         * pt.c (unify): Don't allow reduced cv-quals when strict.
9621
9622         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
9623         *type_unification* and unify.
9624
9625 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
9626
9627         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
9628         (nested_name_specifier): And add it before this use.
9629         (typename_sub0): And this use.  Also add use without the keyword.
9630         (typename_sub1): Likewise.
9631         * pt.c (instantiate_class_template): Don't actually instantiate
9632         anything if our type uses template parms.
9633
9634 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
9635
9636         * decl.c (start_function): Don't call temporary_allocation for a
9637         nested function.
9638
9639 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
9640
9641         * pt.c (instantiate_class_template): Don't mess with friends if
9642         our type uses template parms.
9643
9644 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
9645
9646         * parse.y (nested_name_specifier): Use explicit_template_type.
9647         (typename_sub): Allow a template_type, an explicit_template_type,
9648         or an implicit template type at the end.
9649         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
9650         * decl.c (make_typename_type): Handle template-id where the name
9651         is a TEMPLATE_DECL.
9652         * call.c (build_scoped_method_call): Handle member template
9653         destructor call.
9654         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
9655         destructor is represented by the type.
9656
9657         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
9658         * parse.y (nested_name_specifier): Add 'template' case.
9659         (explicit_template_type): New rule.
9660         (typename_sub): Use it.
9661         * decl.c (make_typename_type): Handle getting a template-id for NAME.
9662         * pt.c (tsubst): Likewise.
9663
9664 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
9665
9666         * pt.c (add_to_template_args): Fix thinko.
9667         (instantiate_class_template): Call it later.
9668
9669         * pt.c (get_class_bindings): Add outer_args parm.
9670         (most_specialized_class): Likewise.
9671         (instantiate_class_template): Pass it.
9672         (more_specialized_class): Likewise.
9673         (lookup_template_class): Get context from template if none
9674         was specified.
9675         (finish_member_template_decl): Don't do anything with a
9676         partial specialization.
9677         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
9678         AGGREGATE_TYPE_P.
9679         * class.c (finish_struct): Member class templates have already been
9680         checked for name clashes.
9681         * decl.c (pushdecl_with_scope): Handle pushing at class level.
9682
9683 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
9684
9685         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
9686         (tsubst, *_PARM): Support multiple levels of template classes.
9687         (instantiate_class_template): Look up the pattern from the
9688         original template.
9689         (lookup_template_class): Handle getting a template for d1.
9690         (push_template_decl): Correct setting of 'primary'.
9691         (reduce_template_parm_level): Add 'levels' parm.
9692         (finish_member_template_decl): Support member class templates.
9693         (template_class_depth): Handle multiple levels.
9694         * parse.y (component_decl_1, fn.def2): Remove member template case.
9695         (component_decl): Add member template cases.
9696         * decl2.c (check_member_template): We now handle member template
9697         classes.
9698         * decl.c (pushtag): Handle member templates.
9699         * method.c (do_inline_function_hair): Don't touch
9700         IDENTIFIER_GLOBAL_VALUE.
9701         * init.c (build_offset_ref): If name isn't an identifier, just
9702         return it.
9703         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
9704
9705         * typeck.c (get_delta_difference): Do adjust for conversions to
9706         and from virtual base.
9707
9708 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
9709
9710         * typeck.c (get_delta_difference): Give hard error for conversion
9711         from virtual base.
9712
9713         * cp-tree.h: Tweak formatting.
9714
9715 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
9716
9717         * decl.c (push_namespace): Handle redeclaration error.
9718
9719         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
9720         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
9721         (NAMESPACE_BINDING): New macro.
9722         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
9723         * *.c: Use them.
9724
9725         * pt.c (push_template_decl): Use innermost_args.
9726
9727         * decl.c (get_unique_name): Tweak from earlier in the name.
9728
9729 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9730
9731         * cp-tree.def: Add CPLUS_BINDING node.
9732         * cp-tree.h (tree_binding): New struct.
9733         (BINDING_SCOPE, BINDING_VALUE): New macros.
9734         (current_namespace, global_namespace): Declare extern.
9735         (struct lang_decl_flags): New field in_namespace.
9736         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
9737         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
9738         (TREE_INDIRECT_USING): New macro.
9739         * decl2.c (current_namespace, global_namespace): Declare.  The
9740         value is a NAMESPACE_DECL now, not a TREE_LIST.
9741         (is_namespace_ancestor, namespace_ancestor): New static functions.
9742         (add_using_namespace, ambiguous_decl): Likewise.
9743         (lookup_using_namespace): New support function for lookup_name.
9744         (qualified_lookup_using_namespace): New support function for
9745         do_scoped_id and lookup_namespace_name.
9746         (get_namespace_id): Mark as obsolete.
9747         (current_namespace_id): Likewise.
9748         (do_namespace_alias): Implement.
9749         (do_using_directive): Implement as call to add_using_namespace.
9750         * decl.c (binding_for_name): New function.
9751         (push_namespace, pop_namespace): Implement.
9752         (push_decl): Don't install a FUNCTION_DECL in the global branch.
9753         (lookup_namespace_name): Implement using qualified lookup.
9754         (lookup_name_real): For global scoping, lookup in
9755         global_namespace.  For namespace scoping, lookup in given
9756         namespace.  For unscoped lookup, iterate over namespace,
9757         considering using directives.
9758         (init_decl_processing): Initialize global_namespace.
9759         (grokvardecl): Build assembler name as static name for globals.
9760         (grokdeclarator): Remove old namespace mangling.
9761         (xref_tag): When installing a global binding for the
9762         tag, make sure we have an identifier.
9763         * method.c (build_overload_nested_name): Mangle namespaces.
9764         (build_qualified_name): Likewise.
9765         (build_decl_overload_real): Likewise.
9766         * lex.c (build_lang_decl): Set namespace for new declaration to
9767         current_namespace.
9768         (do_scoped_id): Find global names in global or current
9769         namespace, or using qualified namespace lookup, depending on
9770         context.
9771         * init.c (build_member_call): When scope is namespace, use
9772         build_x_function_call instead.
9773         (build_offset_ref): When scope is namespace, collapse processing
9774         to lookup_namespace_name instead.
9775         * error.c (dump_decl): Support NAMESPACE_DECL.
9776         * decl.c (pushdecl): Bind globals to current namespace.
9777         (push_overloaded_decl): Likewise.
9778         (lookup_tag): Likewise.
9779         (lookup_name_current_level): Likewise.
9780         (xref_tag): Likewise.
9781         (start_function): Likewise.
9782         * lex.c (do_identifier): Likewise.
9783         (identifier_typedecl_value): Likewise.
9784         (real_yylex): Likewise.
9785         * method.c (do_inline_function_hair): Likewise.
9786         * parse.y (unscoped): Likewise.
9787         * pt.c (check_explicit_specialization): Likewise.
9788         (lookup_template_class): Likewise.
9789         * rtti.c (call_void_fn): Likewise.
9790         * sig.c (build_sigtable): Likewise.
9791         * ptree.c (lang_print_xnode): New function.
9792
9793 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
9794
9795         * pt.c (instantiate_class_template): Don't instantiate if pedantic
9796         and the args use template parms.
9797
9798         * pt.c (push_tinst_level): If the instantiation uses template parms,
9799         fail silently.
9800         * decl.c (xref_basetypes): Do call complete_type for basetypes
9801         that involve template parameters.
9802
9803 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
9804
9805         * typeck2.c (process_init_constructor): Fix labeled init check.
9806
9807 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
9808
9809         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
9810         argument to tsubst and friends.
9811
9812         * pt.c (tsubst, FUNCTION_DECL): Tidy.
9813
9814         * typeck.c (build_x_function_call): Handle static member function
9815         templates like non-templates.  Handle friend templates like normal
9816         function templates.
9817         * pt.c (tsubst, *_PARM): Don't use orig_level.
9818         (get_bindings): Don't call add_to_template_args.
9819         (instantiate_template): Likewise.
9820         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
9821         * ptree.c (print_lang_type): Print index/level for template parms.
9822
9823 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
9824
9825         * Make-lang.in (cc1plus): Note that cc1plus depends on
9826         cp/cp-tree.h and cp/cp-tree.def.
9827
9828         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
9829         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
9830         position in a template parameter list.
9831         * cp-tree.h (template_parm_index): New structure, used as the tree
9832         structure for a TEMPLATE_PARM_INDEX.
9833         (TEMPLATE_PARM_IDX): New macro.
9834         (TEMPLATE_PARM_LEVEL): Likewise.
9835         (TEMPLATE_PARM_DESCENDANTS): Likewise.
9836         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
9837         (TEMPLATE_PARM_DECL): Likewise.
9838         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
9839         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
9840         (TEMPLATE_TYPE_DECL): Likewise.
9841         (TEMPLATE_CONST_IDX): Remove.
9842         (TEMPLATE_CONST_LEVEL): Likewise.
9843         (TEMPLATE_CONST_SET_INFO): Likewise.
9844         (TEMPLATE_TYPE_SET_INFO): Likewise.
9845         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
9846         node.
9847         (TEMPLATE_TYPE_LEVEL): Likewise.
9848         * decl.c (decls_match): Call comp_template_parms, rather than
9849         expanding it inline.
9850         (duplicate_decls): If two template declarations are being merged,
9851         then their TEMPLATE_INFOs should be merged as well.
9852         (grokfndecl): Save template-id information when declaring a friend
9853         with explicit template arguments.  Pass arguments to
9854         check_explicit_specialization via correct convention; at some
9855         point check_explicit_specialization changed, but these call-sites
9856         did not.
9857         (grokdeclarator): Tidy up slightly.
9858         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
9859         two template functions with the same DECL_ASSEMBLER_NAME the same,
9860         since the names are not yet mangled.
9861         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
9862         TEMPLATE_CONST_PARM.
9863         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
9864         decl for a non-type parameter, rather than printing `<tparm ...>'.
9865         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
9866         (do_friend): Deal with template friends.
9867         * lex.c (do_pending_inlines): Call
9868         maybe_begin_member_template_processing, rather than
9869         conditionally calling begin_member_template_processing.
9870         (process_next_inline): Likewise.  Call
9871         maybe_end_member_template_processing, rather than
9872         conditionally calling end_member_template_processing.
9873         (do_pending_defargs): Likewise.
9874         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
9875         TEMPLATE_CONST_PARM.
9876         * method.c (build_mangled_template_parm_index): New function.
9877         (build_overload_value): Use it.
9878         (build_overload_name): Likewise.
9879         * pt.c (finish_member_template_decl): Allow friend declarations.
9880         (template_class_depth): New function.
9881         (is_member_template): Rename, and modify, to become...
9882         (is_member_or_friend_template): New function.
9883         (end_member_template_processing): Rename, and modify, to become...
9884         (maybe_end_member_template_processing).
9885         (build_template_parm_index): New function.
9886         (reduce_template_parm_level): New function.
9887         (process_template_parm): Modify to use build_template_parm_index.
9888         (push_template_decl): Deal with friend templates.
9889         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
9890         TEMPLATE_CONST_PARM.
9891         (tsubst_friend_function): New function.
9892         (instantiate_class_template): Generate the DECL_FRIENDLIST
9893         for a new instantiation by using tsubst_friend_function rather
9894         than just tsubst.
9895         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
9896         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
9897         appropriate new macros.  Use reduce_template_parm_level to
9898         generate lower-level template parameters.  Handle tsubst'ing into
9899         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
9900         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
9901         templates.  Similarly for the template parameters for a new
9902         template.
9903         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
9904         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
9905         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
9906         (get_bindings): Call add_to_template_args if necessary.
9907         (instantiate_decl): Handle instantiations of friend templates.
9908         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
9909         TEMPLATE_TYPE_PARM as a list of fields; it's not!
9910         * spew.c (yylex): Do a little manual constant propagation to
9911         clarify the code.
9912
9913 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
9914
9915         * error.c: Include sys/types.h.
9916
9917 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
9918
9919         * method.c (build_mangled_name): Start CPP directives in column zero.
9920
9921 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
9922
9923         * typeck2.c (process_init_constructor): Sorry about non-trivial
9924         labeled initializers.
9925         * parse.y (initlist): Re-enable labeled initializers.
9926
9927 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9928
9929         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
9930         all callers changed.  Rely on the new parameter instead of arg
9931         being a TREE_LIST when determine whether we are working inside
9932         template template parameter.  Clean up is_type test.
9933
9934 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
9935
9936         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
9937         * typeck2.c (initializer_constant_valid_p): Allow conversions
9938         between pointers and references.
9939
9940 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
9941
9942         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
9943         if pedantic || warn_pointer_arith.
9944
9945 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9946
9947         * pt.c (unify): Handle TEMPLATE_DECL.
9948
9949 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
9950
9951         * cp-tree.h (strip_attrs): Remove decl.
9952
9953 1998-02-18  Doug Evans  <devans@cygnus.com>
9954
9955         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
9956         Update olddecl's attributes too.
9957         (strip_attrs): Remove function.
9958         * typeck.c (common_type): Call merge_machine_type_attributes.
9959
9960 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
9961
9962         * parse.y (initdcl0_innards): New grammar symbol.
9963         (nomods_initdecls, nomods_initdcl0): Change type from itype to
9964         none, since the resulting value is never used.
9965         (parse_decl): New function.
9966         (datadef): Remove redundant actions.
9967         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
9968         * parse.c: Regenerated.
9969
9970 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
9971
9972         * parse.y (simple_stmt): Use getdecls() to check for decl.
9973
9974 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
9975
9976         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
9977         macros.
9978         (c++.install-common): Install c++filt properly as native or as cross
9979         variant.
9980         (c++.uninstall): Add c++filt.
9981
9982 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
9983
9984         * call.c (standard_conversion): Fix multi-level ptr conversions.
9985
9986 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
9987
9988         * init.c (build_new): Propagate error_mark_node up.
9989
9990 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
9991
9992         * parse.y (simple_stmt): If the condition isn't a declaration,
9993         start the controlled block after the test.
9994
9995 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
9996
9997         * call.c (build_over_call): Convert builtin abs, labs and fabs to
9998         tree-codes.
9999         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
10000         builtins.
10001
10002 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10003
10004         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
10005
10006 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10007
10008         * cp-tree.h: Add access_protected_virtual_node.
10009         * class.c (init_class_processing): Initialize it.
10010         * decl.c (xref_basetypes): Use it.
10011         * parse.y (base_class_access_list): Likewise.
10012
10013         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
10014         (c++.install-common): Install c++filt.
10015
10016 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10017
10018         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
10019
10020 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
10021
10022         * call.c (reference_binding): Use comptypes when comparing
10023         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
10024
10025 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
10026
10027         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
10028         (really_overloaded_fn): Move check here from is_overloaded_fn.
10029         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
10030
10031 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
10032
10033         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
10034         conversions.
10035
10036 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
10037
10038         * cp-tree.h (push_template_decl): Return the decl passed in, or an
10039         equivalent duplicate.
10040         * decl.c (pushtag): Use the return value from push_template_decl.
10041         (duplicate_decls): When duplicating a template declaration, merge
10042         the DECL_TEMPLATE_RESULTs as well.
10043         (make_implicit_typename): Don't try to dive into typename types to
10044         find a context for making a new implicit typename.
10045         (start_decl): Use the return value from push_template_decl.
10046         (grokdeclarator): Complain about declarations list `const operator
10047         int'.  Since we don't correctly handle in-class initializations of
10048         non-static data members, complain about this (now illegal)
10049         practice.  Issue an error for initializations of non-const statics
10050         since that is illegal as well, and since we don't handle that case
10051         correctly either.
10052         (start_function): Use the return value from push_template_decl.
10053         (start_method): Likewise.
10054         * decl2.c (grokfield): Likewise.  Since the change to
10055         grokdeclarator ensures that all initialized fields are in fact
10056         static, remove a redundant test for TREE_PUBLIC.
10057         * parse.y (initlist): Disable labeled initializers since they do
10058         not work as per the documentation, and since they do not use the
10059         same syntax as the C front end.
10060         * pt.c (push_template_decl): Return the decl passed in, or an
10061         equivalent duplicate.
10062         (lookup_template_class): When searching in a nested context,
10063         use the right arguments.
10064         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
10065         * typeck.c (build_component_ref): Assign the correct type to the
10066         result of build_vfn_ref.
10067
10068 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
10069
10070         * pt.c (convert_nontype_argument): Fix typo.
10071         (check_explicit_specialization): Allow old-style specialization
10072         of class template members.
10073
10074 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
10075                           Manfred Hollstein  <manfred@s-direktnet.de>
10076
10077         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
10078         when deciding to override DECL_ASSEMBLER_NAME.
10079
10080 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
10081
10082         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
10083         * cp-tree.h (flag_do_squangling): Add declaration.
10084         * lang-options.h: Add -fsquangle and -fno-squangle.
10085         * method.c: Add macros and static variables for squangling.
10086         (build_overload_name): Rename to build_mangled_name, add logic for B
10087         compression, and split into process_modifiers and
10088         process_overload_item.
10089         (process_modifiers): New function, to handle constant, reference,
10090         and pointer types.
10091         (process_overload_item): New function, handles issue of type codes.
10092         (build_overload_name): New function, start squangling and call
10093         build_mangled_name.
10094         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
10095         (start_squangling): New function to initialize squangling structs.
10096         (end_squangling): New function to destroy squangling structs.
10097         (nrepeats): Rename variable to Nrepeats.
10098         (issue_nrepeats): New function for issuing 'n' type repeats.
10099         (check_ktype): New function to check for type K name compression.
10100         (build_overload_nested_name): Add a check for K name compression.
10101         (build_qualified_name): Add a check for K name compression and don't
10102         use DECL_ASSEMBLER_NAME when squangling is on.
10103         (check_btype): New function, checks for B type compression.
10104         (build_static_name, build_decl_overload_real): Initiate squangling.
10105         (build_typename_overload, build_overload_with_type): Initiate
10106         squangling
10107
10108 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
10109
10110         * method.c (make_thunk): Avoid name buffer overflow.
10111
10112 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
10113
10114         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
10115         don't define them yet.
10116
10117         * parse.y (nomods_initdcl0): Add constructor_declarator case.
10118
10119 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10120
10121         * config-lang.in (diff_excludes): Use basename only.
10122
10123 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
10124
10125         * tinfo2.cc: Add tinfo for signed char.
10126
10127 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
10128
10129         * search.c (compute_access): Handle protected constructors in derived
10130         classes as accessible.
10131
10132 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
10133
10134         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
10135         Call convert_from_reference sooner.
10136
10137 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
10138
10139         * cvt.c (ocp_convert): Obtain the constant values from constant
10140         decls even if the destination type is the same as the type of the
10141         decl.
10142
10143         * decl2.c (finish_file): Make sure that static inlines with
10144         definitions are not marked DECL_EXTERNAL before returning.
10145
10146 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10147
10148         * decl.c: Lose arg_looking_for_template.
10149         (lookup_name_real): Likewise.
10150         * parse.y: Lose processing_template_arg, template_arg1.
10151         (primary): Likewise.
10152         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
10153
10154 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10155
10156         * error.c (dump_decl): Fix type of default arguments for template
10157         template parameters and nontype template parameters.
10158         * parse.y (template_parm): Handle invalid default template
10159         template arguments here.
10160
10161         * parse.y (template_parm): Use template_arg instead of PTYPENAME
10162         for default template template argument.
10163         * pt.c (coerce_template_parms): Merge default template argument
10164         codes.  Can treat RECORD_TYPE as template name if it is implicitly
10165         created.  Fix argument index in error message.
10166         * typeck.c (comptypes): Merge template argument comparison codes in
10167         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
10168
10169 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
10170
10171         * lex.c (file_name_nondirectory): Also check for '/'.
10172
10173 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
10174
10175         * parse.y (primary): Deal with statement-expressions in
10176         templates.
10177         * pt.c (tsubst_copy): Handle BIND_EXPR.
10178         * tree.c (mapcar): Likewise.
10179
10180         * call.c (add_template_candidate_real): Pass extra parameter to
10181         fn_type_unification.
10182         * cp-tree.h (fn_type_unification): Add parameter.
10183         * pt.c (fn_type_unification): Add additional parameter to deal with
10184         static member functions.
10185         (get_bindings): Deal with static member functions.
10186
10187         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
10188         (revert_static_member_fn): Declare.
10189         * decl.c (revert_static_member_fn): Remove declaration.  Change
10190         linkage from internal to external.
10191         (cp_finish_decl): Deal with virtual functions in classes local to
10192         template functions.
10193         * decl2.c (finish_file): Don't forget to emit increment/decrement
10194         expressions in initializers for file-scope variables.
10195         * parse.y (typename_sub2): If the typename doesn't names a
10196         template, rather than a type, issue an error message.
10197         * pt.c (check_explicit_specialization): Handle specializations of
10198         static member functions.
10199         (coerce_template_parms): Handle offset references to lists of
10200         member functions.
10201         * search.c (note_debug_info_needed): Don't crash when handed a
10202         type which is being defined.
10203         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
10204         that can happen with some illegal code.
10205
10206 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10207
10208         * call.c (user_harshness): Initialize `code' to 0.
10209         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
10210         (null_ptr_cst_p): Add parentheses around && within ||.
10211         (standard_conversion): Likewise.
10212         (z_candidate): Likewise.
10213         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
10214         (build_object_call): Likewise for `mem_args'.
10215         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
10216         default case in enumeration switch.
10217
10218         * class.c (build_vtable_entry): Add explicit braces to avoid
10219         ambiguous `else'.
10220         (build_class_init_list): Likewise.
10221         (finish_struct_1): Initialize `width' to 0.
10222         (instantiate_type): Initialize `name' to NULL_TREE.  Add
10223         explicit braces to avoid ambiguous `else'.
10224
10225         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
10226         `else'.
10227
10228         * decl.c (grok_reference_init): Eliminate unused parameter, all
10229         callers changed.
10230         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
10231         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
10232         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
10233         (grokdeclarator): Add parentheses around && within ||.  Add
10234         explicit braces to avoid ambiguous `else'.
10235         (grokparms): Initialize `type' to NULL_TREE.
10236         (xref_tag): Remove unused label `just_return'.
10237         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
10238         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
10239         (hack_incomplete_structures): Add parentheses around assignment
10240         used as truth value.
10241
10242         * decl2.c (coerce_delete_type): Hide definition of `e3'.
10243
10244         * error.c: Include <stdlib.h>.
10245         (dump_expr): Change the type of `i' to size_t.  Remove unused
10246         label `error'.
10247
10248         * except.c (init_exception_processing): Remove unused variable `d'.
10249         (expand_throw): Likewise for `label'.
10250
10251         * friend.c (add_friends): Add explicit braces to avoid ambiguous
10252         `else'.
10253
10254         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
10255         (sort_base_init): Likewise for `binfo'.
10256         (expand_member_init): Likewise for `rval'.
10257         (build_member_call): Add parentheses around assignment used as
10258         truth value.
10259         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
10260         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
10261         `old_immediate_size_expand' to 0.
10262         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
10263         (build_vec_delete_1): Remove unused variable `block'.
10264         (expand_vec_init): Initialize `itype' to NULL_TREE.
10265
10266         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
10267         declaration of `index' and `rindex' with autoconf macros.
10268         (reinit_parse_for_expr): Remove unused variables
10269         `look_for_semicolon' and `look_for_lbrac'.
10270         (cons_up_default_function): Initialize `args' to NULL_TREE.
10271         (readescape): Initialize `firstdig' to 0.
10272         (real_yylex): Add parentheses around assignment used as truth value.
10273
10274         * method.c: Include <strings.h> if we don't have <string.h>.
10275         Protect declaration of `index' with autoconf macro.
10276
10277         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
10278         Initialize `type' to NULL_TREE.
10279         (structsp): Remove unused variable `id'.
10280
10281         * pt.c (coerce_template_parms): Add explicit braces to avoid
10282         ambiguous `else'.
10283         (lookup_template_class): Initialize `template' to NULL_TREE.
10284         (instantiate_class_template): Remove unused variable `name' and `e'.
10285         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
10286         (do_poplevel): Initialize `saved_warn_unused' to 0.
10287         (type_unification): Remove unused varable `parm'.
10288         (unify): Likewise for `j'.
10289
10290         * repo.c (init_repo): Add parentheses around assignment used as
10291         truth value.
10292         (finish_repo): Remove unused varable `p'.
10293
10294         * search.c (get_binfo): Initialize `type' to NULL_TREE.
10295         (get_base_distance): Likewise.
10296         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
10297         and `new_v' to NULL_TREE.
10298         (lookup_fnfields): Likewise for `rval_binfo_h'.
10299         (breadth_first_search): Add parentheses around assignment used as
10300         truth value.
10301         (get_template_base): Initialize `type' to NULL_TREE.
10302
10303         * sig.c (append_signature_fields): Initialize `last_mfptr' to
10304         NULL_TREE.
10305         (build_signature_table_constructor): Likewise for
10306         `last_rhs_field', `pfn' and `vt_off'.
10307         (build_sigtable): Likewise for `init'.
10308
10309         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
10310         (propagate_binfo_offsets): Likewise for `delta'.
10311         (hash_tree_cons): Initialize hashcode to 0.
10312         (can_free): Likewise for `size'.
10313         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
10314
10315         * typeck.c (convert_sequence): Hide prototype.
10316         (common_type): Add explicit braces to avoid ambiguous `else'.
10317         (comp_target_types): Likewise.
10318         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
10319         (build_function_call_real): Add explicit braces to avoid ambiguous
10320         `else'.
10321         (convert_arguments): Initialize `called_thing' to 0.
10322         (convert_for_initialization): Initialize `savew' and `savee' to 0.
10323
10324         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
10325         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
10326         (build_x_arrow): Likewise for `last_rval'.
10327
10328         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
10329
10330 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
10331
10332         * decl.c (init_decl_processing): Use set_sizetype.
10333         * decl2.c (sizetype): Don't declare.
10334         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
10335         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
10336         (build_component_addr, unary_complex_lvalue): Likewise.
10337         * rtti.c (expand_class_desc): Likewise.
10338         * class.c (get_vfield_offset): Likewise.
10339
10340 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
10341
10342         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
10343         early to avoid bogus error.  Handle overloaded function
10344         names provided as template arguments correctly.
10345         (coerce_template_parms): Don't mishandle overloaded functions when
10346         dealing with template template parameters.
10347         (lookup_template_class): Issue an error message, rather than
10348         crashing, when the TYPE_DECL provided is not a template type.
10349
10350 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
10351
10352         * class.c (instantiate_type): Don't just return a known type if
10353         it's wrong.
10354
10355 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
10356
10357         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
10358         since that code could never be reached.
10359
10360         * error.c (dump_decl): Avoid aborting in the midst of printing an
10361         error message about an illegal template declaration.
10362
10363         * parse.y (structsp): Print an error message, rather than crashing,
10364         when a class-head does not name a class.
10365
10366         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
10367         template arguments as a g++ extension.
10368
10369         * cp-tree.def (ALIGNOF_EXPR): New tree code.
10370         * decl2.c (grok_alignof): If processing_template_decl, just store
10371         the expression.
10372         * typeck.c (c_alignof): Likewise.
10373         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
10374         * error.c (dump_expr): Likewise.
10375         * pt.c (tsubst_copy): Likewise.
10376         * tree.c (cp_tree_equal): Likewise.
10377         * pt.c (uses_template_parms): Correctly determine whether or not a
10378         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
10379         folding can be done.
10380
10381         * cp-tree.h (grok_enum_decls): Remove type parameter.
10382         * decl.c (grok_enum_decls): Likewise.
10383         * decl2.c (grok_x_components): Call grok_enum_decls
10384         unconditionally, since it will do nothing if there is no
10385         current_local_enum.  Use the new calling sequence.
10386         * pt.c (tsubst_enum): Use the new calling sequence for
10387         grok_enum_decls.
10388
10389         * decl.c (start_function): Make member functions of local classes
10390         in extern inline functions have comdat linkage here...
10391         (grokdeclarator): Rather than here.
10392
10393 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
10394
10395         * pt.c (convert_nontype_argument): Use decl_constant_value.
10396
10397 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
10398
10399         * call.c (add_template_candidate_real): New function.
10400         (add_template_candidate): Use it.
10401         (add_template_conv_candidate): Likewise.
10402         (joust): Pass extra argument to more_specialized.
10403         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
10404         (is_local_class): Remove.
10405         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
10406         * cp-tree.h (is_local_class): Remove.
10407         (perform_array_to_pointer_conversion): Likewise.
10408         (finish_member_template_decl): Add.
10409         (check_explicit_specialization): Return a tree, not an int.
10410         (more_specialized): Take additional argument.
10411         (get_bindings): Likewise.
10412         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
10413         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10414         (perform_array_to_pointer_conversion): Remove.
10415         * decl.c (saved_scope): Add processing_specialization,
10416         processing_explicit_instantiation fields.
10417         (maybe_push_to_top_level): Save them.
10418         (pop_from_top_level): Restore them.
10419         (grokfndecl): Use new return value from
10420         check_explicit_specialization.
10421         (start_decl): Don't check flag_guiding_decls before pushing
10422         decls.
10423         (cp_finish_decl): Remove previous (bogus) change.
10424         (grok_declarator): Use decl_function_context rather than
10425         is_local_class.
10426         * decl2.c (finish_file): Pass extra argument to get_bindings.
10427         (build_expr_from_tree): Let build_x_component_ref check
10428         validity of arguments rather than doing it here.
10429         * lex.c (cons_up_default_function): Remove code fooling with
10430         processing_specialization, processing_explicit_instantiation
10431         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
10432         * method.c (build_overload_identifier): Mangle local classes in
10433         template functions correctly.
10434         * parse.y (finish_member_template_decl): Move to pt.c.
10435         * pt.c (finish_member_template_decl): Moved here from parse.y.
10436         (print_candidates): New function.
10437         (determine_specialization): Change interface.  Properly look for
10438         most specialized versions of template candidates.
10439         (check_explicit_specialization): Fully process explicit
10440         instantiations.
10441         (push_template_decl): Avoid looking at CLASSTYPE fields in
10442         FUNCTION_DECLS.
10443         (determine_overloaded_function): Remove.
10444         (convert_nontype_argument): Change name from
10445         convert_nontype_parameter.  Use determine_overloaded_function
10446         instead of instantiate_type.
10447         (mangle_class_name_for_template): Handle type contexts as well as
10448         function contexts.
10449         (classtype_mangled_name): Likewise.
10450         (lookup_template_class): Likewise.
10451         (tsubst): Likewise.
10452         (more_specialized): Take explict template arguments as a
10453         parameter.
10454         (most_specialized): Likewise.
10455         (get_bindings): Likewise.  Check that return types match before
10456         proclaiming a function a match.
10457         (do_decl_instantiation): Remove code searching for function to
10458         instantiate; that is now done in check_explicit_specialization.
10459         (add_maybe_template): Pass extra argument to get_bindings.
10460         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
10461         implementation.
10462         * typeck.c (build_component_ref): Check for invalid arguments.
10463
10464 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
10465
10466         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
10467         return_target and call_target are equivalent.
10468
10469         * pt.c (type_unification_real): Just accept function parms that
10470         don't use any template parms.
10471
10472 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
10473
10474         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
10475         unset DECL_NOT_REALLY_EXTERN.
10476
10477         * parse.y (typename_sub*): Fix std::.
10478
10479 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
10480
10481         * error.c (dump_decl): Fix type default template args.
10482         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
10483
10484 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
10485
10486         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
10487         (file_name_nondirectory): Use.
10488
10489 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10490
10491         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
10492         that are not really present.  Substitute default arguments in
10493         template template arguments.  Correctly convert TEMPLATE_DECL to
10494         TEMPLATE_TEMPLATE_PARM.
10495         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
10496         are no longer treated specially here.
10497         * parse.y (template_template_parm): Fix copy error.
10498         * decl.c (grokdeclarator): Warn about missing `typename' for nested
10499         type created from template template parameters.
10500         * parse.y (bad_parm): Likewise
10501
10502         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
10503         (push_nested_class): Likewise.
10504         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
10505         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
10506         (copy_template_template_parm): Declare.
10507         * decl.c (arg_looking_for_template): New variable.
10508         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
10509         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
10510         node if arg_looking_for_template is nonzero.
10511         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
10512         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
10513         (grokdeclarator): Handle TEMPLATE_DECL.
10514         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
10515         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
10516         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
10517         (dump_decl): Handle unnamed template type parameters.
10518         Handle template template parameters.
10519         (dump_function_name): Handle template template parameters.
10520         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
10521         Handle TEMPLATE_TEMPLATE_PARM.
10522         * method.c (build_template_template_parm_names): New function.
10523         (build_template_parm_names): Handle TEMPLATE_DECL.
10524         (build_overload_nested_name, build_overload_name):
10525         Handle TEMPLATE_TEMPLATE_PARM.
10526         * parse.y (maybe_identifier): New nonterminal.
10527         (template_type_parm): Use it.
10528         (template_template_parm, template_arg1): New nonterminal.
10529         (template_parm): Add template_template_parm rules.
10530         (template_arg): Set processing_template_arg.
10531         (template_arg1): Rules moved from template_arg.
10532         (primary, nonnested_type): Set arg_looking_for_template if we are
10533         processing template arguments.
10534         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
10535         (process_template_parm): Handle template template parameters.
10536         (coerce_template_parms, comp_template_args): Likewise.
10537         (mangle_class_name_for_template, lookup_template_class): Likewise.
10538         (uses_template_parms): Handle TEMPLATE_DECL and
10539         TEMPLATE_TEMPLATE_PARM.
10540         (current_template_args): Handle TEMPLATE_DECL.
10541         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
10542         * search.c (dfs_walk, dfs_record_inheritance):
10543         Handle TEMPLATE_TEMPLATE_PARM.
10544         * tree.c (copy_template_template_parm): New function.
10545         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
10546         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
10547
10548 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
10549
10550         * decl.c (start_decl): Don't allow duplicate definitions of static
10551         data members.
10552
10553         * call.c (build_user_type_conversion_1): Handle user-defined
10554         template conversion operators correctly.
10555
10556         * decl2.c (build_expr_from_tree): Issue an error message if the
10557         object in a COMPONENT_REF is a TEMPLATE_DECL.
10558
10559         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
10560
10561         * class.c (is_local_class): New function.
10562         * cp-tree.h (is_local_class): Declare it.
10563         (last_tree): Likewise.
10564         (begin_tree): Likewise.
10565         (end_tree): Likewise.
10566         (lookup_template_class): Change prototype.
10567         * decl.c (cp_finish_decl): Check for NULL where necessary.
10568         Consider FUNCTION_DECLS to declare objects with top-level binding,
10569         when calling make_decl_rtl.
10570         (grokdeclarator): Give members of local classes internal linkage.
10571         (start_function): Remove declaration of last_tree.
10572         (finish_function): Set flag_keep_inline_functions around call to
10573         rest_of_compilation if we are processing a member function in a
10574         local class.
10575         (start_method): Call push_template_decl for member functions of
10576         local classes in template functions.
10577         * decl2.c (import_export_decl): Don't give external linkage to
10578         instantiations of templates with internal linkage.
10579         * parse.y (last_tree): Remove declaration.
10580         (template_type): Pass extra parameter to lookup_template_class.
10581         (self_template_type): Likewise.
10582         (structsp): Move call to reset_specialization into left_curly.
10583         (left_curly): Call reset_specialization, and begin_tree.
10584         * pt.c (saved_trees): New variable.
10585         (mangle_class_name_for_template): Change prototype.  Use
10586         additional function context to name local classes in templates
10587         correctly.
10588         (classtype_mangled_name): Pass the context.
10589         (push_template_decl): Handle local classes and templates, and
10590         member functions for such classes.
10591         (convert_nontype_parameter): Fix handling of pointer-to-member
10592         constants.
10593         (lookup_template_class): Handle local classes in templates.
10594         (tsubst): Likewise.  Don't assume that template instantiations
10595         have external linkage; pay attention to the template declaration.
10596         (mark_decl_instantiated): Likewise.
10597         (begin_tree): New function.
10598         (end_tree): Likewise.
10599
10600         * decl.c (xref_basetypes): Don't call complete_type for basetypes
10601         that involve template parameters; that can lead to infinite
10602         recursion unnecessarily.
10603
10604         * pt.c (register_specialization): Do not register specializations
10605         that aren't ready to be registered yet.
10606         (check_explicit_specialization): Handle explicit specialization of
10607         constructors and destructors.
10608         (build_template_decl): New function.
10609         (push_template_delc): Handle out-of-class specializations of
10610         member templates.
10611
10612         * pt.c (check_explicit_specialization): Set up the template
10613         information before registering the specialization.
10614         (coerce_template_parms): Fix thinko.
10615         (tsubst): Handle specializations of member templates correctly.
10616
10617         * class.c (finish_struct_methods): Remove calls to
10618         check_explicit_specialization from here.
10619         (finish_struct): And insert them here.
10620         * cp-tree.h (perform_qualification_conversions): New function.
10621         (perform_array_to_pointer_conversion): Likewise.
10622         (begin_explicit_instantiation): Likewise.
10623         (end_explicit_instantiation): Likewise.
10624         (determine_specialization): Renamed from
10625         determine_explicit_specialization.
10626         (comp_template_parms): New function.
10627         (processing_explicit_instantiation): New variable.
10628         * cvt.c (perform_qualification_conversions): New function.
10629         (perform_array_to_pointer_conversion): Likewise.
10630         * decl.c (duplicate_decls): Don't consider template functions
10631         alike unless they have the same parameters.  Refine handling of
10632         instantiation/specialization mismatches.
10633         (start_decl): Don't call pushdecl for template specializations,
10634         since they don't affect overloading.
10635         (start_function): Likewise.
10636         (grokfndecl): Call check_explicit_specialization a little later.
10637         Don't call duplicate_decls for memberm template specializations.
10638         (grokdeclarator): Don't update template_count for classes that are
10639         themselves specializations.  Remove use of `2' as parameter to
10640         grokfndecl since that value isn't used.
10641         * lex.c (cons_up_default_function): Save and restore
10642         processing_explicit_instantiation around calls to grokfield.
10643         * parse.y (finish_member_template_decl): New function.
10644         (component_decl_1): Use it.
10645         (fn.def2): Likewise.
10646         (template_arg_list_opt): New nonterminal.
10647         (template_type): Use it.
10648         (self_template_type): Likewise.
10649         (template_id): Likewise.
10650         (object_template_id): Likewise.
10651         (notype_template_declarator): Likwise.
10652         (begin_explicit_instantiation): Likewise.
10653         (end_explicit_instantiation): Likewise.
10654         (explicit_instantiation): Use them.
10655         * pt.c (coerce_template_parms): Add parameters.
10656         (processing_explicit_instantiation): New variable.
10657         (convert_nontype_parameter): New function.
10658         (determine_overloaded_function): Likewise.
10659         (begin_explicit_instantiation): Likewise.
10660         (end_explicit_instantiation): Likewise.
10661         (retrieve_specialization): Likewise.
10662         (register_specialization): Likewise.
10663         (processing_explicit_specialization): Removed.
10664         (determine_specialization): Handle specializations of member
10665         functions of template class instantiations.
10666         (check_explicit_specialization): Refine to conform to standard.
10667         (comp_template_parms): New function.
10668         (coerce_template_parms): Call convert_nontype_parameter.
10669         (tsubst): Refine handling of member templates.  Use
10670         register_specialization.
10671         (instantiate_template): Use retrieve_specialization.
10672         (do_decl_instantiation): Likewise.
10673         (instantiate_decl): Likewise.
10674         (type_unification): Improve handling of explict template
10675         arguments.
10676         * tree.c (mapcar): Return error_mark_node, rather than aborting,
10677         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
10678         * typeck.c (build_unary_op): Call determine_specialization, rather
10679         than determine_explicit_specialization.
10680
10681 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
10682
10683         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
10684
10685 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
10686
10687         * error.c (dump_decl): For enum tags, output the tag, not its value.
10688
10689 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
10690
10691         * decl.c (init_decl_processing): Only call init_rtti_processing
10692         FLAG_RTTI is set.
10693
10694 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
10695
10696         * init.c (build_new_1): Split out from build_new.
10697         (build_new): Just return a NEW_EXPR.
10698         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
10699
10700         * decl2.c (get_temp_regvar): Tweak.
10701
10702         * cp-tree.h (TREE_CALLS_NEW): Comment out.
10703         * class.c (resolves_to_fixed_type_p): Remove use.
10704         * method.c (build_opfncall): Likewise.
10705         * call.c (build_new_op): Likewise.
10706
10707 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
10708
10709         * exception.cc (__eh_alloc, __eh_free): New fns.
10710         (__cp_push_exception, __cp_pop_exception): Use them.
10711         (__uncatch_exception): Call terminate here if no exception.
10712         * except.c (build_terminate_handler): New fn.
10713         (expand_start_catch_block): Use it.
10714         (expand_exception_blocks): Likewise.
10715         (alloc_eh_object): New fn.
10716         (expand_throw): Use it.  Protect exception init with terminate.
10717         * typeck.c (build_modify_expr): Remove code that ignores trivial
10718         methods.
10719
10720 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10721
10722         * call.c (add_builtin_candidate): Add default case in enumeration
10723         switch.
10724         (build_new_op): Likewise.
10725         (convert_like): Likewise.
10726         * cvt.c (build_expr_type_conversion): Likewise.
10727         * tree.c (real_lvalue_p): Likewise.
10728         (lvalue_p): Likewise.
10729         (cp_tree_equal): Likewise.
10730         * typeck.c (comptypes): Likewise.
10731         (build_component_ref): Likewise.
10732         (build_function_call_real): Likewise.
10733         (build_binary_op_nodefault): Likewise.
10734         (build_unary_op): Likewise.
10735         (build_modify_expr): Likewise.
10736         * typeck2.c (initializer_constant_valid_p): Likewise.
10737
10738 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
10739
10740         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
10741
10742 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
10743
10744         * pt.c (coerce_template_parms): Make sure to digest_init if
10745         possible.
10746
10747         * decl.c (duplicate_decls): Make the newdecl virtual if the
10748         olddecl was, just as is done with other attributes of olddecl.
10749
10750 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
10751
10752         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
10753         address of an OFFSET_REF.
10754
10755         * cp-tree.def: Add AGGR_INIT_EXPR.
10756         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
10757         AGGR_INIT_EXPR where appropriate.
10758         * expr.c (cplus_expand_expr): Likewise.  Simplify.
10759
10760         * decl2.c (finish_file): Remove call to register_exception_table.
10761
10762 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10763
10764         * pt.c (instantiate_class_template): Don't do injection when
10765         processing_template_decl is true, as pollutes current_binding_level
10766         for base classes.
10767
10768 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
10769
10770         * pt.c (maybe_fold_nontype_arg): Add prototype.
10771
10772 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
10773
10774         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
10775         * error.c (dump_expr): Likewise.
10776
10777 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
10778
10779         * typeck.c (build_function_call_real): Remove "inline called before
10780         definition" pedwarn.
10781
10782         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
10783
10784 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
10785
10786         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
10787
10788         * pt.c (type_unification_real): Change __null to type void* with
10789         a warning.
10790
10791 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
10792
10793         * call.c (implicit_conversion): Don't call
10794         build_user_type_conversion_1 with a NULL expr, since it will
10795         crash.
10796
10797         * pt.c (unify): Don't try to unify array bounds if either array is
10798         unbounded.
10799
10800 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
10801
10802         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
10803         Replace extern decls with casts.
10804
10805         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
10806         Update last_parm_cleanup_insn.
10807         (store_after_parms): Remove.
10808         * cp-tree.h: Adjust.
10809
10810 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
10811
10812         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
10813         (finish_file): Check DECL_COMDAT instead of weak|one_only.
10814         (import_export_vtable): Use make_decl_one_only instead of
10815         comdat_linkage for win32 tweak.
10816         (import_export_decl): Likewise.
10817         * pt.c (mark_decl_instantiated): Likewise.
10818
10819         * decl2.c (finish_file): Lose handling of templates in pending_statics.
10820
10821 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
10822
10823         * decl2.c (finish_file): Lose call to expand_builtin_throw.
10824         * except.c (expand_builtin_throw): Remove.
10825         * cp-tree.h: Remove ptr_ptr_type_node.
10826         * decl.c: Likewise.
10827
10828 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
10829
10830         * decl.c (ptr_ptr_type_node): Define.
10831         (init_decl_processing): Initialize it.
10832         * cp-tree.h: Declare it.
10833         * exception.cc (__cp_exception_info): Use __get_eh_info.
10834         (__cp_push_exception): Likewise.
10835         (__cp_pop_exception): Likewise.
10836
10837         From Scott Snyder <snyder@d0sgif.fnal.gov>:
10838         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
10839         saved_pc.
10840         (init_exception_processing): Removed saved_pc initialization.
10841
10842 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
10843
10844         * pt.c (instantiate_decl): Defer all templates but inline functions.
10845
10846 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
10847
10848         * init.c (expand_vec_init): Don't fold a list of parameters.
10849
10850         * decl.c (copy_args_p): Handle copy elision for types with virtual
10851         bases.
10852         * call.c (build_over_call): Likewise.
10853
10854 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
10855
10856         * pt.c (lookup_template_function): Copy the template arguments,
10857         not just the list containing them, to the permanent obstack.
10858
10859 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
10860
10861         * except.c (expand_start_catch_block): suspend_momentary for the
10862         terminate handler.
10863
10864         * error.c (dump_decl): Handle LOOKUP_EXPR.
10865
10866 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
10867
10868         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
10869         permanent obstack if we are processing a template decl.
10870         * typeck.c (build_static_cast): Likewise.
10871         (build_const_cast): Likewise.
10872         (build_reinterpret_cast): Likewise.
10873
10874         * pt.c (coerce_template_parms): Coerce some expressions, even
10875         when processing_template_decl.
10876
10877 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
10878
10879         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
10880         handling of pointer difference expressions.
10881
10882         * typeck.c (comp_target_types): Comparison of function/method types
10883         is independent of nptrs.
10884
10885 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
10886
10887         * pt.c (tsubst): Avoid creating pointer to reference and
10888         reference to reference types.
10889
10890 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
10891
10892         * parse.y (do_id): New nonterminal.
10893         (template_id): Use it.
10894
10895 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
10896
10897         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
10898         * spew.c (yylex): Don't do_identifier here.
10899         * decl2.c (build_expr_from_tree): Revert last change.
10900
10901         * decl2.c (build_expr_from_tree): Expand the name for a method call.
10902         * parse.y (object_template_id): Don't try to take the DECL_NAME.
10903
10904 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
10905
10906         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
10907         alloc_expr.
10908         * call.c (build_op_delete_call): Adjust.
10909
10910         * except.c (expand_end_catch_block): Lose rethrow region.
10911         (expand_start_catch_block): Likewise.
10912         (expand_end_catch_block): Don't expand_leftover_cleanups.
10913
10914 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10915
10916         * pt.c (tsubst): Remove tree_cons call (places redundant info into
10917         DECL_TEMPLATE_INSTANTIATION).
10918
10919 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
10920
10921         * tree.c (is_overloaded_fn): Handle getting a fn template.
10922         (really_overloaded_fn): Likewise.
10923         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
10924         * pt.c (check_explicit_specialization): Tweak.
10925         (determine_explicit_specialization): Tweak.
10926
10927         * tree.c, cp-tree.h (get_target_expr): New fn.
10928
10929 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
10930
10931         * pt.c (check_explicit_specialization): Fix misspelling in
10932         diagnostic: `preceeded'.
10933         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
10934         `conversiona'.
10935
10936 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
10937
10938         * pt.c (determine_explicit_specialization): Avoid an internal
10939         error for bad specializations.
10940
10941         * method.c (build_overload_value): Handle SCOPE_REF.
10942
10943 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
10944
10945         * class.c (prepare_fresh_vtable): Enable even more complex MI
10946         vtable names.
10947
10948 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
10949
10950         * exception.cc (__check_eh_spec): Optimize a bit.
10951
10952         * exception.cc (__cp_pop_exception): Lose handler arg.
10953         * except.c (do_pop_exception): Likewise.
10954         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
10955         (expand_end_catch_block): Likewise.
10956
10957 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
10958
10959         * pt.c (check_explicit_specialization): Complain about using a
10960         template-id for a non-specialization.
10961
10962 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
10963
10964         * repo.c: Prototype rindex only if needed.
10965         * xref.c: Likewise.
10966
10967 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
10968
10969         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
10970
10971 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
10972
10973         * typeck.c (build_const_cast): Handle references here instead of
10974         handing off to convert_to_reference.
10975
10976         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
10977         TerminateFunctionCall.
10978         (init_exception_processing): Likewise.  Terminate et al are now
10979         the fns, not ADDR_EXPRs.
10980         (various): Lose redundant assemble_external calls.
10981         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
10982
10983         * cp-tree.h (struct lang_decl_flags): Add comdat.
10984         (DECL_COMDAT): New macro.
10985         * decl.c (duplicate_decls): Propagate it.
10986         (cp_finish_decl): Handle it.
10987         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
10988
10989         * class.c: Remove static pending_hard_virtuals.
10990         (add_virtual_function): Take pointers to pending_virtuals
10991         and pending_hard_virtuals.
10992         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
10993
10994 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
10995
10996         * decl2.c (import_export_vtable): If we support one_only but not
10997         weak symbols, mark instantiated template vtables one_only.
10998         (import_export_decl): Likewise for tinfo functions.
10999         (finish_vtable_vardecl): Also write out vtables from explicitly
11000         instantiated template classes.
11001         * pt.c (mark_class_instantiated): Revert last change.
11002
11003         * except.c (expand_throw): Call mark_used on the destructor.
11004
11005 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
11006
11007         * lex.c (lang_init): Enable flag_exceptions by default if no
11008         command line switch was specified.
11009
11010 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
11011
11012         * pt.c (unify): Handle `void' template parameters in
11013         specializations.
11014
11015 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
11016
11017         * rtti.c (build_dynamic_cast): Handle template case here.
11018         (build_dynamic_cast_1): Not here.
11019
11020         * typeck2.c (digest_init): Make copies where appropriate.
11021
11022         * decl2.c (delete_sanity): resolve_offset_ref.
11023
11024         * except.c: Call terminate without caching so many bits.
11025
11026         * except.c (expand_start_catch_block): Fix catching a reference
11027         to pointer.
11028
11029 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
11030
11031         * init.c (build_new): Copy size to the saveable obstack.
11032
11033         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
11034         TRY_CATCH_EXPR for now.
11035
11036 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
11037
11038         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
11039         has DECL_LANG_SPECIFIC.
11040
11041         * exception.cc (struct cp_eh_info): Add handlers field.
11042         (__cp_push_exception): Initialize it.
11043         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
11044         (__throw_bad_exception): Remove.
11045         * except.c (call_eh_info): Add handlers field.
11046         (get_eh_handlers): New fn.
11047         (push_eh_cleanup): Increment handlers.
11048
11049 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
11050
11051         * except.c (expand_start_eh_spec): Use the try/catch code.
11052         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
11053         doing everything inline.
11054         (init_exception_processing): throw_type_match now takes
11055         const void pointers.
11056         * exception.cc (__check_eh_spec): New fn.
11057         * inc/exception: Neither terminate nor unexpected return.
11058         * decl.c: Make const_ptr_type_node public.
11059         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
11060
11061         * except.c (expand_start_catch_block): We only need the rethrow
11062         region for non-sjlj exceptions.
11063         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
11064
11065 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
11066
11067         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
11068         (various.o): Likewise.
11069         * inc/new: Add placement deletes.  Add throw specs for default new.
11070         * new.cc (set_new_handler): Move here from libgcc2.
11071         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
11072         (new): Move from libgcc2.  Throw bad_alloc.
11073         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
11074         * decl.c (init_decl_processing): Update exception specs on new and
11075         delete.
11076
11077         * method.c (build_decl_overload_real): Don't mess with global
11078         placement delete.
11079
11080         * init.c (build_new): Check for null throw spec, not nothrow_t.
11081
11082         * decl.c (duplicate_decls): Don't complain about different exceptions
11083         from an internal declaration.
11084
11085         * call.c (build_op_delete_call): Fix check for member fns again.
11086
11087         * decl2.c (import_export_decl): Interface hackery affects
11088         virtual synthesized methods.
11089
11090 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
11091
11092         * decl.c (start_decl): Don't just complain about a mismatched
11093         scope, fix it.
11094
11095         * decl.c (make_implicit_typename): Handle case where t is not
11096         actually from context.
11097         * tree.c (get_type_decl): Lose identifier case.
11098         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
11099         * parse.y (nonnested_type): Just use lookup_name.
11100         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
11101
11102 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
11103
11104         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
11105         T was built in C language context (for example, by
11106         output_func_start_profiler).
11107
11108 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
11109
11110         * decl.c (make_implicit_typename): New fn.
11111         (lookup_name_real): Use it.  Use current_class_type as the context.
11112
11113 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
11114
11115         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
11116
11117 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
11118
11119         * friend.c (do_friend): Warn about non-template friends in templates.
11120
11121         * call.c (build_op_delete_call): Fix handling of inherited delete.
11122
11123         * search.c (dfs_record_inheritance): Ignore template type parms.
11124
11125 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
11126
11127         * call.c (build_new_op): Fix copy error.
11128         (build_op_new_call): New fn.
11129         (build_op_delete_call): New fn.
11130         * cp-tree.h: Declare them.
11131         * init.c (build_new): Use them.  Support placement delete.
11132         (build_x_delete): Use build_op_delete_call.
11133         (build_delete): Likewise.
11134         * decl2.c (delete_sanity): Likewise.
11135         (coerce_delete_type): Don't complain about placement delete.
11136
11137 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
11138
11139         * call.c (build_new_function_call): Remove unused 'obj' parm.
11140         * cp-tree.h, typeck.c: Adjust.
11141
11142         * init.c (build_new): Make the cleanup last longer.
11143         (expand_vec_init): Call do_pending_stack_adjust.
11144
11145 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
11146
11147         * pt.c (do_type_instantiation): Fix typo.
11148         (mark_class_instantiated): If we support one_only but not weak
11149         symbols, don't mark this as known.
11150
11151         * init.c (build_new): Handle vec delete in EH cleanup.
11152
11153 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11154
11155         * call.c (build_method_call): Call complete_type before checking
11156         for destructor.
11157
11158 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
11159
11160         * decl.c (add_block_current_level): Delete.
11161         * init.c (build_vec_delete_1): Delete build_block and
11162         add_block_current_level calls.
11163
11164 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
11165
11166         * init.c (build_new): Handle freeing allocated memory when the
11167         constructor throws.
11168
11169         * call.c (build_new_method_call): Fix flags arg.
11170
11171         * pt.c (do_type_instantiation): Don't try to instantiate
11172         member templates.
11173         (mark_decl_instantiated): If we support one_only but not
11174         weak symbols, mark this one_only.
11175         * decl2.c (import_export_vtable): Don't defer handling of vtables
11176         if MULTIPLE_SYMBOL_SPACES.
11177
11178 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
11179
11180         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
11181
11182 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
11183
11184         * except.c (do_pop_exception): Return a value.
11185
11186 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
11187
11188         * call.c (build_new_method_call): Handle getting a
11189         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
11190         if we got template parms.
11191         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
11192         not just the args.
11193         * decl2.c (build_expr_from_tree): Tweak last change.
11194         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
11195         (maybe_fold_nontype_arg): Split out from tsubst_copy.
11196         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
11197
11198 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11199
11200         * pt.c (tsubst_copy): Handle explicit template arguments in
11201         function calls.
11202         * typeck.c (build_x_function_call): Likewise.
11203         * decl2.c (build_expr_from_tree): Lookup function name if it
11204         hasn't been done.
11205
11206         * pt.c (tsubst): Instantiate template functions properly when
11207         template parameter does not appear in function arguments and return
11208         type.
11209         (comp_template_args): Handle member templates required by tsubst.
11210
11211 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
11212
11213         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
11214         previous change.
11215
11216 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11217
11218         * pt.c (coerce_template_parms): Tweak error message.
11219
11220         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
11221         return type defaults to `int', even if there are storage-class
11222         specifiers.
11223
11224 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
11225
11226         Complete nested exception support.
11227         * except.c (do_pop_exception): Split out...
11228         (push_eh_cleanup): From here.  Handle the EH region by hand.
11229         (expand_start_catch_block): Add a new level for the catch parm.
11230         Move the rethrow region outside the two cleanup regions.
11231         Protect the initializer for the catch parm with terminate.
11232         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
11233         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
11234         popping off the middle of the stack.
11235         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
11236         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
11237         (build_cplus_new): Only wrap CALL_EXPRs.
11238         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
11239         the constructor call.
11240
11241 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11242
11243         * Make-lang.in (c++.distdir): Make inc subdirectory.
11244
11245 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
11246
11247         * decl2.c (finish_file): Put back some code.
11248
11249 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
11250
11251         * decl2.c (finish_file): Remove redundant code.
11252         * method.c (emit_thunk): Don't let the backend defer generic thunks.
11253
11254 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
11255
11256         * except.c (call_eh_info): Split out...
11257         (push_eh_info): From here.
11258         (expand_builtin_throw): Use it.
11259         (expand_start_catch_block): Move region start back.
11260
11261 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
11262
11263         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
11264         (real_yylex): Record wide strings using target endianness, not host.
11265
11266 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
11267
11268         * repo.c (rindex): Add decl unconditionally.
11269         (get_base_filename, open_repo_file): Don't cast rindex.
11270         * xref.c (rindex): Add decl unconditionally.
11271         (index): Remove unused decl.
11272         (open_xref_file): Don't cast rindex.
11273
11274 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
11275
11276         * class.c (build_vbase_path): Propagate the result type properly.
11277
11278 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
11279
11280         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
11281         remaining use of saved_throw_type with a call to get_eh_type.
11282
11283 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
11284
11285         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
11286         (file_name_nondirectory): New function, doing the same as the macro.
11287         (set_typedecl_interface_info): Use it instead of the macro.
11288         (check_newline): Likewise.
11289         (handle_cp_pragma): Likewise.
11290
11291         * repo.c (get_base_filename): Cast result of rindex to char*.
11292         (open_repo_file): Likewise.
11293         * xref.c (open_xref_file): Likewise.
11294         * error.c (dump_char): Make its arg int, not char.
11295
11296         * except.c (push_eh_info): Pass the number of fields - 1 down, not
11297         the exact number of fields.
11298
11299 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
11300
11301         Support for nested exceptions.
11302         * tinfo2.cc (__is_pointer): New fn.
11303         * exception.cc (struct cp_eh_info): Define.
11304         (__cp_exception_info, __uncatch_exception): New fns.
11305         (__cp_push_exception, __cp_pop_exception): New fns.
11306         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
11307         Lose empty_fndecl.
11308         (init_exception_processing): Likewise.  __eh_pc is now external.
11309         (push_eh_info): New fn.
11310         (get_eh_{info,value,type,caught}): New fns.
11311         (push_eh_cleanup): Just call __cp_pop_exception.
11312         (expand_start_catch_block): Use push_eh_info.  Start the eh region
11313         sooner.
11314         (expand_end_eh_spec): Use push_eh_info.
11315         (expand_throw): Call __cp_push_exception to set up the exception info.
11316         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
11317         when we rethrow.
11318         (expand_builtin_throw): Don't refer to empty_fndecl.
11319
11320 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
11321
11322         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
11323
11324 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
11325
11326         * method.c (build_template_parm_names, build_decl_overload_real):
11327         Add static to definitions.
11328         * pt.c (add_to_template_args, note_template_header,
11329         processing_explicit_specialization, type_unification_real): Likewise.
11330         ({determine,check}_explicit_specialization): Use a single string for
11331         error messages.
11332
11333 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
11334
11335         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
11336         (expand_end_catch_block): Likewise.
11337         (expand_end_eh_spec): Likewise.
11338
11339 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
11340
11341         * decl.c (duplicate_decls): Handle template specializations
11342         correctly.
11343         * error.c (dump_function_name): Fix printing of specializations of
11344         member functions that are not member templates.
11345         * cp-tree.h (processing_specialization): Make global.
11346         * pt.c (processing_specialization): Likewise.
11347         * lex.c (cons_up_default_function): Save and restore
11348         processing_specialization to avoid confusion.
11349
11350 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
11351
11352         * decl.c (init_decl_processing): Give null_node unknown* type.
11353         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
11354         (common_type): Likewise.
11355         * error.c (args_as_string): Recognize null_node.
11356
11357 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11358
11359         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
11360         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
11361
11362         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
11363
11364         * Make-lang.in (g++): Include prefix.o.
11365
11366 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
11367
11368         * pt.c (determine_explicit_specialization): Initialize "dummy"
11369         to keep Purify quiet.
11370
11371 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
11372
11373         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
11374         (build_overload_int): Not here.
11375
11376 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
11377
11378         * class.c (build_type_pathname): Remove.
11379         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
11380
11381 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
11382
11383         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
11384         &&label GNU extension.
11385
11386 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
11387
11388         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
11389         so as to avoid incorrect manglings.
11390         * method.c (build_decl_overload_real): Don't mangle return types
11391         for constructors.
11392
11393 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
11394
11395         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
11396         scratch_tree_cons): Define as macros for now.
11397         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
11398         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
11399         typeck2.c: Use them and the expression_obstack variants.
11400
11401 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11402
11403         * decl.c (store_return_init): Allow classes with explicit ctors to
11404         be used with the named return values extension.
11405
11406 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
11407
11408         * pt.c (instantiate_decl): Fix previous change.
11409
11410 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
11411
11412         * pt.c (tsubst): Fix thinko.
11413         (instantiate_decl): Really use the original template.
11414
11415         * call.c (build_new_method_call): Use simple constructor_name for
11416         error messages.
11417
11418 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
11419
11420         * method.c (build_underscore_int): Don't use ANSI specific
11421         features.
11422
11423 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
11424
11425         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
11426         for our key method; it might have been inlined by -O3.
11427
11428 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
11429
11430         * decl.c (make_typename_type): Do not try to call lookup_field for
11431         non-aggregate types.
11432
11433 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
11434
11435         * typeck.c (build_reinterpret_cast): Tweak.
11436
11437 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
11438
11439         * typeck.c (build_reinterpret_cast): Converting a void pointer
11440         to function pointer with a reinterpret_cast produces a warning
11441         if -pedantic is issued.
11442
11443 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11444
11445         * typeck.c (c_expand_return): Don't warn about returning a
11446         reference-type variable as a reference.
11447
11448 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
11449
11450         * method.c (build_static_name): Fix typo.
11451
11452 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
11453
11454         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
11455         OLDDECL before we try to do DECL_USE_TEMPLATE.
11456
11457 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
11458
11459         * decl.c (duplicate_decls): Don't warn about template instances.
11460
11461         * typeck.c (mark_addressable): Lose ancient code that unsets
11462         DECL_EXTERNAL.
11463
11464         * pt.c (do_decl_instantiation): Lose support for instantiating
11465         non-templates.
11466
11467         * call.c (build_new_function_call): Fix handling of null explicit
11468         template args.
11469         (build_new_method_call): Likewise.
11470
11471 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
11472
11473         * method.c (build_underscore_int): Fix typo.
11474
11475 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
11476
11477         * tree.c (print_lang_statistics): #if 0 call to
11478         print_inline_obstack_statistics until its definition is checked in.
11479
11480 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
11481
11482         * decl2.c (finish_file): Move dump_tree_statistics to end.
11483
11484         * pt.c (instantiate_decl): Look for the original template.
11485         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
11486         of member templates.
11487
11488 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
11489
11490         * Makefile.in (g++FAQ.*): New rules.
11491         (CONFLICTS): Update.
11492         * g++FAQ.texi: Moved from libg++.
11493
11494         * parse.y (PFUNCNAME): Only specify the type once.
11495
11496 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
11497
11498         * lex.c (real_yylex): Clean up the code to fully behave the way
11499         the c-lex.c parser does for complex and real numbers.
11500
11501 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
11502
11503         * method.c (build_decl_overload_real): Reformat.
11504
11505 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
11506
11507         * method.c (synthesize_method): If at_eof, determine our linkage.
11508
11509 1997-09-29  Paul Eggert  <eggert@twinsun.com>
11510
11511         * lex.c (real_yylex): Treat `$' just like `_', except issue a
11512         diagnostic if !dollars_in_ident or if pedantic.
11513
11514         * lang-specs.h (@c++): -ansi no longer implies -$.
11515
11516         * decl2.c (lang_decode_option):
11517         -traditional and -ansi now do not mess with
11518         dollars_in_ident.
11519
11520 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
11521
11522         * Makefile.in (parse.o, decl.o): Also depend on
11523         $(srcdir)/../except.h $(srcdir)/../output.h.
11524         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
11525         $(srcdir)/../except.h $(srcdir)/../output.h.
11526         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
11527         ../insn-codes.h.
11528
11529         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
11530
11531         * expr.c (cplus_expand_expr): Make it static.
11532
11533         * decl2.c, init.c, typeck.c: Include "expr.h".
11534         (expand_expr): Use proper values when calling the function.
11535
11536 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
11537
11538         * lang-options.h: New -Wold-style-cast flag.
11539         * cp-tree.h (warn_old_style_cast): New variable.
11540         * decl2.c (warn_old_style_cast): Likewise.
11541         (lang_decode_option): Support -Wold-style-cast.
11542         (reparse_absdcl_as_casts): Produce old-style-cast warning.
11543
11544 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11545
11546         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
11547         TREE_USED, reset value based on already_used.
11548
11549         * init.c (expand_member_init): Revert change.
11550
11551 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
11552
11553         * cp-tree.h, decl.c, decl2.c, pt.c:
11554         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
11555
11556         * decl2.c (lang_decode_option): Add missing ;.
11557
11558 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
11559
11560         * friend.c (do_friend): Disable injection for all template-derived
11561         decls.
11562         * decl2.c (lang_decode_option): Handle -fguiding-decls.
11563         * parse.y (notype_template_declarator): New nonterminal.
11564         (direct_notype_declarator): Use it.
11565         (complex_direct_notype_declarator): Likewise.
11566         (object_template_id): Accept any kind of identifier after TEMPLATE.
11567         (notype_qualified_id): Don't add template declarators here.
11568
11569 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
11570
11571         * call.c (add_template_candidate): Add explicit_targs parameter.
11572         (build_scoped_method_call): Use it.
11573         (build_overload_call_real): Likewise.
11574         (build_user_type_conversion_1): Likewise.
11575         (build_new_function_call): Likewise.
11576         (build_object_call): Likewise.
11577         (build_new_op): Likewise.
11578         (build_new_method_call): Likewise.
11579         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
11580         (build_new_method_call): Likewise.
11581
11582         * class.c (finish_struct_methods): Add specialization pass to
11583         determine which methods were specializing which other methods.
11584         (instantiate_type): Handle TEMPLATE_ID_EXPR.
11585
11586         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
11587
11588         * cp-tree.h (name_mangling_version): New variable.
11589         (flag_guiding_decls): Likewise.
11590         (build_template_decl_overload): New function.
11591         (begin_specialization): Likewise.
11592         (reset_specialization): Likewise.
11593         (end_specialization): Likewise.
11594         (determine_explicit_specialization): Likewise.
11595         (check_explicit_specialization): Likewise.
11596         (lookup_template_function): Likewise.
11597         (fn_type_unification): Add explicit_targs parameter.
11598         (type_unification): Likewise.
11599
11600         * decl.c (duplicate_decls): Add smarts for explicit
11601         specializations.
11602         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
11603         specializations.
11604         (grokfndecl): Call check_explicit_specialization.
11605
11606         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
11607         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
11608         (check_classfn): Handle specializations.
11609
11610         * error.c (dump_function_name): Print specialization arguments.
11611
11612         * friend.c (do_friend): Don't call pushdecl for template
11613         instantiations.
11614
11615         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
11616
11617         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
11618         and -fno-guiding-decls.
11619
11620         * lex.c (identifier_type): Return PFUNCNAME for template function
11621         names.
11622
11623         * method.c (build_decl_overload_real): New function.
11624         (build_template_parm_names): New function.
11625         (build_overload_identifier): Use it.
11626         (build_underscore_int): New function.
11627         (build_overload_int): Use it.  Add levels for template
11628         parameters.
11629         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
11630         (build_overload_nested_names): Handle template type parameters.
11631         (build_template_decl_overload): New function.
11632
11633         * parse.y (YYSTYPE): New ntype member.
11634         (nested_name_specifier): Use it.
11635         (nested_name_specifier_1): Likewise.
11636         (PFUNCNAME): New token.
11637         (template_id, object_template_id): New non-terminals.
11638         (template_parm_list): Note specializations.
11639         (template_def): Likewise.
11640         (structsp): Likewise.
11641         (fn.def2): Handle member template specializations.
11642         (component_decl_1): Likewise.
11643         (direct_notype_declarator): Handle template-ids.
11644         (component_decl_1): Likewise.
11645         (direct_notype_declarator): Handle template-ids.
11646         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
11647
11648         * pt.c (processing_specializations): New variable.
11649         (template_header_count): Likewise.
11650         (type_unification_real): New function.
11651         (processing_explicit_specialization): Likewise.
11652         (note_template_header): Likewise.
11653         (is_member_template): Handle specializations.
11654         (end_template_decl): Call reset_specialization.
11655         (push_template_decl): Handle member template specializations.
11656         (tsubst): Likewise.
11657         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
11658         (instantiate_template): Handle specializations.
11659         (instantiate_decl): Likewise.
11660         (fn_type_unification): Handle explicit_targs.
11661         (type_unification): Likewise.  Allow incomplete unification
11662         without an error message, if allow_incomplete.
11663         (get_bindings): Use new calling sequence for fn_type_unification.
11664
11665         * spew.c (yylex): Handle PFUNCNAME.
11666
11667         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
11668         (really_overloaded_fn): Likewise.
11669         (get_first_fn): Handle function templates.
11670
11671         * typeck.c (build_x_function_call): Use really_overloaded_fn.
11672         Handle TEMPLATE_ID_EXPR.
11673         (build_x_unary_op): Likewise.
11674         (build_unary_op): Likewise.
11675         (mark_addressable): Templates whose address is taken are marked
11676         as used.
11677
11678 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11679
11680         * decl.c (init_decl_processing): Declare __builtin_constant_p as
11681         accepting any kind of type, not only int.
11682
11683 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
11684
11685         * search.c (get_matching_virtual): Notice virtual bases when sorrying
11686         about covariant returns.
11687
11688         * parse.y (member_init): Also imply typename here.  Remove ancient
11689         extension for initializing base members.
11690
11691 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
11692
11693         Handle multi-level typenames and implicit typename in base list.
11694         * parse.y (typename_sub{,[0-2]}): New rules.
11695         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
11696         (nonnested_type): New rule.
11697         (complete_type_name): Use it.
11698         (base_class.1): Use typename_sub and nonnested_type.
11699         (nested_name_specifier): Don't elide std:: here.
11700         * decl.c (make_typename_type): Handle getting a type for NAME.
11701         (lookup_name_real): Turn std:: into :: here.
11702
11703         Rvalue conversions were removed in London.
11704         * call.c (is_subseq): Don't consider lvalue transformations.
11705         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
11706         (joust): Re-enable ?: kludge.
11707
11708 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
11709
11710         * decl.c (start_function): Up warning of no return type to be a
11711         pedwarn.
11712
11713 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11714
11715         * init.c (expand_member_init): Don't set TREE_USED.
11716         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
11717         set,don't clear TREE_USED wholesale.
11718
11719 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
11720
11721         * call.c (build_over_call): Do require_complete_type before
11722         build_cplus_new.
11723
11724 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
11725
11726         * search.c (lookup_field): Call complete_type in all cases.
11727
11728         * decl.c (finish_function): Just warn about flowing off the end.
11729
11730 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
11731
11732         * decl.c (grokparms): Don't bash a permanent list node if we're
11733         in a function.
11734
11735 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
11736
11737         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
11738
11739 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
11740
11741         * call.c (build_new_op): Give better error for syntactically
11742         correct, but semantically invalid, use of undeclared template.
11743
11744         * call.c (compare_qual): Handle pmfs.
11745
11746         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
11747         after the exception spec.
11748
11749 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
11750
11751         * call.c (null_ptr_cst_p): Integer type, not integral type.
11752
11753         * call.c (joust): Disable warnings until they can be moved to the
11754         right place.
11755
11756 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
11757
11758         * Makefile.in, config-lang.in:  Convert to autoconf.
11759
11760 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
11761
11762         * decl.c (lookup_name_real): Add implicit 'typename' to types from
11763         base classes.
11764
11765         * pt.c (most_specialized_class): Fix typo.
11766         (tsubst): Move constant folding to TREE_VEC case.
11767
11768 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
11769
11770         * pt.c (do_poplevel): Don't warn about unused local variables
11771         while processing_template_decl since we don't always know whether
11772         or not they will need constructing/destructing.
11773
11774         * pt.c (uses_template_parms): Check the values of an enumeration
11775         type to make sure they don't depend on template parms.
11776
11777         * decl.c (make_typename_type): Don't lookup the field if the
11778         context uses template parms, even if we're not
11779         processing_template_decl at the moment.
11780
11781         * pt.c (coerce_template_parms): Avoid looking at the
11782         TYPE_LANG_DECL portion of a typename type, since there won't be
11783         one.
11784         (tsubst): Do constant folding as necessary to make sure that
11785         arguments passed to lookup_template_class really are constants.
11786
11787 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
11788
11789         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
11790         * decl2.c (finish_file): Only register exception tables if we
11791         need to.
11792
11793         * decl.c (init_decl_processing): Add __builtin_[fs]p.
11794
11795 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
11796
11797         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
11798
11799 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
11800
11801         * error.c (dump_decl): Avoid crashing when presented with a
11802         uninitialized constant, as can occur with a template parameter.
11803         (dump_expr): Make sure that there are enough levels of
11804         current_template_parms before we start diving through them.
11805
11806 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
11807
11808         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
11809         c-typeck.c.
11810
11811 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11812
11813         * except.c (expand_throw): Call build_delete for all
11814         exception types, not just objects with destructors.
11815
11816 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
11817
11818         * decl.c (current_local_enum): Remove static.
11819         * pt.c (tsubst_enum): Save and restore value of current_local_enum
11820         in case template is expanded in enum decl.
11821         (instantiate_class_template): Use new tsubst_enum signature.
11822         (tsubst_expr): Likewise.
11823
11824 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
11825
11826         * pt.c (begin_member_template_processing): Take a function as
11827         argument, not a set of template arguments.  Use the template
11828         parameters, rather than the arguments.  Handle non-type parameters
11829         correctly.  Push a binding level for the parameters so that multiple
11830         member templates using the same parameter names can be declared.
11831         (end_member_template_processing): Pop the binding level.
11832         (push_template_decl): Mark member templates as static when
11833         appropriate.
11834
11835         * lex.c (do_pending_inlines): Pass the function, not its template
11836         arguments, to begin_member_template_processing.
11837         (process_next_inline): Likewise.
11838         (do_pending_defargs): Likewise.
11839
11840         * error.c (dump_expr): Obtain the correct declaration for a
11841         TEMPLATE_CONST_PARM.
11842
11843         * call.c (add_template_conv_candidate): New function.
11844         (build_object_call): Handle member templates, as done in the other
11845         build_ functions.
11846
11847 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
11848
11849         * decl.c (replace_defag): Undo previous change.
11850         * lex.c (do_pending_defargs): Deal with member templates.
11851
11852         * pt.c (is_member_template): Avoid crashing when passed a
11853         non-function argument.
11854
11855 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
11856
11857         * class.c (grow_method): Remove check for redeclaration.
11858
11859 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
11860
11861         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
11862         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
11863         (PRIMARY_TEMPLATE_P): Use it.
11864         * call.c (build_overload_call_real): Use it.
11865         * class.c (instantiate_type): Likewise.
11866         * decl.c (decls_match): Likewise.
11867         * method.c (build_overload_identifier): Likewise.
11868         * pt.c (push_template_decl): Likewise.
11869         (classtype_mangled_name): Likewise.
11870         (lookup_template_class): Likewise.
11871
11872         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
11873         DECL_NTPARMS to conform to usage elsewhere.
11874         * call.c (add_template_candidate): Likewise.
11875         * class.c (instantiate_type): Likewise.
11876         * pt.c (instantiate_template): Likewise.
11877         (get_bindings): Likewise.
11878
11879         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
11880         is_member_template.
11881
11882         * pt.c (unify): Undo changes to allow multiple levels of template
11883         parameters.
11884         (type_unification): Likewise.
11885         (fn_type_unification): Likewise.
11886         (get_class_bindings): Likewise.
11887         * cp-tree.h (Likewise).
11888
11889         * decl.c (replace_defarg): Check that the type of the default
11890         parameter does not invlove a template type before complaining
11891         about the initialization.
11892
11893         * error.c (dump_expr): Deal with template constant parameters in
11894         member templates correctly.
11895
11896         * pt.c (is_member_template): Deal with class specializations
11897         correctly.
11898         (tsubst): Handle "partial instantiation" of member templates
11899         correctly.
11900
11901 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
11902
11903         * pt.c (type_unification): Change calling sequence to allow for
11904         multiple levels of template parameters.
11905         (tsubst_expr): Likewise.
11906         (tsubst): Likewise.
11907         (tsubst_copy): Likewise.
11908         (instantiate_template): Likewise.
11909         (unify): Likewise.
11910         * call.c (build_overload_call_real): Use it.
11911         (add_builtin_candidate): Use it.
11912         (build_new_method_call): Use it.
11913         * class.c (instantiate_type): Use it.
11914         * decl.c (grokdeclarator): Use it.
11915         * decl2.c (finish_file): Use it.
11916         * method.c (build_overload_identifier): Use it.
11917
11918         * call.c (add_template_candidate):  Add additional parameter for
11919         the function return type.  Call fn_type_unification istead of
11920         type_unification.
11921         (build_user_type_conversion_1): Handle member templates.
11922         (build_new_function_call): Likewise.
11923         (build_new_op): Likewise.
11924         (build_new_method_call): Likewise.
11925
11926         * class.c (grow_method): Don't give an error message indicating
11927         that two member templates with the same name are ambiguous.
11928         (finish_struct): Treat member template functions just like member
11929         functions.
11930
11931         * cp-tree.h (check_member_template): Add declaration.
11932         (begin_member_template_processing): Likewise.
11933         (end_member_template_processing): Likewise.
11934         (fn_type_unification): Likewise.
11935         (is_member_template): Likewise.
11936         (tsubst): Change prototype.
11937         (tsubst_expr): Likewise.
11938         (tsubst_copy): Likewise.
11939         (instantiate_template): Likewise.
11940         (get_bindings): Likewise.
11941
11942         * decl.c (decls_match): Handle multiple levels of template
11943         parameters.
11944         (pushdecl): Handle template type params just like other type
11945         declarations.
11946         (push_class_level_binding): Return immediately if the
11947         class_binding_level is NULL.
11948         (grokfndecl): If check_classfn() returns a member_template, use
11949         the result of the template, not the template itself.
11950
11951         * decl2.c (check_member_template): New function.  Check to see
11952         that the entity declared to be a member template can be one.
11953         (check_classfn): Allow redeclaration of member template functions
11954         with different types; the new functions can be specializations or
11955         explicit instantiations.
11956
11957         * error.c (dump_decl): Handle multiple levels of template
11958         parameters.
11959         (dump_function_decl): Update to handle function templates.
11960
11961         * lex.c (do_pending_inlines): Set up template parameter context
11962         for member templates.
11963         (process_next_inline): Likewise.
11964
11965         * method.c (build_overload_identifier): Adjust for multiple levels
11966         of template parameters.
11967
11968         * parse.y (fn.def2): Add member templates.
11969         (component_decl_1): Likewise.
11970
11971         * pt.c (begin_member_template_processing): New function.
11972         (end_member_template_processing): Likewise.
11973         (is_member_template): Likewise.
11974         (fn_type_unification): Likewise.
11975         (current_template_parms): Return a vector of all the template
11976         parms, not just the innermost level of parms.
11977         (push_template_decl): Deal with the possibility of member
11978         templates.
11979         (lookup_template_class): Likewise.
11980         (uses_template_parms): Likewise.
11981         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
11982         TEMPLATE_CONST_PARM to deal with multiple levels of template
11983         arguments.   Add processing of TEMPLATE_DECL to produce new
11984         TEMPLATE_DECLs from old ones.
11985         (do_decl_instantiation): Handle member templates.
11986
11987         * search.c (lookup_fnfields_1): Handle member template conversion
11988         operators.
11989
11990         * tree.c (cp_tree_equal): Check the levels, as well as the
11991         indices, of TEMPLATE_CONST_PARMs.
11992
11993         * typeck.c (comptypes): Check the levels, as well as the indices,
11994         fo TEMPLATE_TYPE_PARMs.
11995         (build_x_function_call): Treat member templates like member
11996         functions.
11997
11998 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
11999
12000         * typeck.c (c_expand_return): Always convert_for_initialization
12001         before checking for returning a pointer to local.
12002
12003         * pt.c (type_unification): If strict and the function parm doesn't
12004         use template parms, just compare types.
12005
12006 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
12007
12008         * method.c (build_overloaded_value): Replace direct call
12009         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
12010
12011 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
12012
12013         * typeck.c (convert_arguments): Don't arbitrarily choose the first
12014         of a set of overloaded functions.
12015
12016 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12017
12018         * lex.c (real_yylex): Don't elide __FUNCTION__.
12019
12020         * method.c (build_overload_value): Add in_template parm.
12021         (build_overload_int): Likewise.
12022         (build_overload_identifier): Pass it.
12023
12024         * decl.c (duplicate_decls): Don't bash a previous template
12025         definition with a redeclaration.
12026
12027         * pt.c (unify): float doesn't match double.
12028
12029         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
12030         TYPE_DECL.  Handle getting non-template types.
12031         * parse.y (explicit_instantiation): Use typespec instead of
12032         aggr template_type.
12033
12034 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
12035
12036         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
12037
12038 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
12039
12040         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
12041         (compare_ics): Likewise.
12042
12043 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12044
12045         * call.c (joust): Warn about choosing one conversion op over
12046         another because of 'this' argument when the other return type is
12047         better.
12048         (source_type): New fn.
12049
12050         * call.c (build_new_op): Strip leading REF_BIND from first operand
12051         to builtin operator.
12052
12053         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
12054         use its RTL.
12055
12056 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
12057
12058         * call.c (null_ptr_cst_p): Remove support for (void*)0.
12059
12060 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
12061
12062         * typeck.c (expand_target_expr): Make definition match declaration.
12063
12064         * class.c (get_basefndecls): Make definition match declaration.
12065
12066 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
12067
12068         * input.c (sub_getch): Eventually give up and release the input file.
12069
12070         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
12071         right place.
12072
12073         * call.c (joust): Tweak message.
12074
12075 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
12076
12077         * error.c (type_as_string): Put const/volatile on template type
12078         parameters where appropriate.
12079
12080 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
12081
12082         * call.c (strictly_better): Make arguments unsigned ints.
12083
12084 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
12085
12086         * lex.c (real_yylex): Refer to __complex instead of complex.
12087
12088 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
12089
12090         * lex.c (real_yylex): Don't use getc directly.
12091
12092 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
12093
12094         * call.c (is_subseq): Don't try to be clever.
12095
12096 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
12097
12098         * parse.y, pt.c: Include "except.h".
12099         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
12100         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
12101         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
12102         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
12103         prototyping.
12104
12105 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
12106
12107         * decl2.c (mark_vtable_entries): Instead of replacing pure
12108         virtuals with a reference to __pure_virtual, copy the decl and
12109         change the RTL.
12110
12111 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12112
12113         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
12114
12115         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
12116
12117         * pt.c (instantiate_class_template): Call repo_template_used
12118         before finish_prevtable_vardecl.
12119
12120         * call.c (is_subseq): New fn.
12121         (compare_ics): Use it.
12122
12123         * repo.c (finish_repo): Don't crash on no args.
12124
12125         * parse.y (named_complex_class_head_sans_basetype): Handle
12126         explicit global scope.
12127         * decl2.c (handle_class_head): New fn.
12128
12129         * pt.c (unify): Add CONST_DECL case.
12130
12131 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12132
12133         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
12134
12135         * cp-tree.h (report_type_mismatch): Add prototype.
12136         * call.c (build_overload_call_real): Remove erroneous fourth
12137         argument to report_type_mismatch.
12138         (build_user_type_conversion_1): Remove erroneous second arg to
12139         tourney.
12140         (build_new_function_call): Likewise.
12141         (build_object_call): Likewise.
12142         (build_new_op): Likewise.
12143         (build_new_method_call): Likewise.
12144
12145 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
12146
12147         * error.c (dump_decl): Don't bother processing a function with no
12148         DECL_LANG_SPECIFIC.
12149
12150         * method.c (emit_thunk): Call init_function_start in the macro case.
12151
12152 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
12153
12154         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
12155         defined and used to set flag_vtable_thunks.
12156
12157 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
12158
12159         * parse.y: Don't clear the inlines from their obstack until they've
12160         all been processed.
12161
12162         * decl.c (duplicate_decls): Don't complain about exception
12163         specification mismatch if flag_exceptions is off.
12164
12165 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
12166
12167         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
12168
12169 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
12170
12171         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
12172         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
12173         Include <stdio.h> before include files that formerly used STDIO_PROTO.
12174
12175         * decl.c, g++spec.c, lex.c, method.c, repo.c:
12176         Include "config.h" first, as per autoconf manual.
12177
12178 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12179
12180         * decl.c (duplicate_decls): Tweak wording.
12181         * lex.c (do_pending_defargs): Don't die if we see a default arg
12182         that isn't a DEFAULT_ARG.
12183         * error.c (dump_expr): Handle DEFAULT_ARG.
12184
12185         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
12186         * lang-options.h: Add -fhandle-exceptions.
12187
12188         * class.c (build_vtable): Vtables are artificial.
12189         (prepare_fresh_vtable): Likewise.
12190
12191 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12192
12193         * cvt.c (ocp_convert): After converting to the target type, set
12194         LOOKUP_NO_CONVERSION.
12195
12196         * call.c (joust): Warn about potentially confusing promotion rules
12197         with -Wsign-promo.
12198         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
12199
12200 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
12201
12202         * exception.cc: Declare __terminate_func with noreturn attribute.
12203
12204 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
12205
12206         * parse.y: Break out eat_saved_input, handle errors.
12207         (function_try_block): Use compstmt instead of compstmt_or_error.
12208
12209 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12210
12211         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
12212
12213 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12214
12215         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
12216         existence of cc1plus check whether $(LANGUAGES) contains C++.
12217
12218 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12219
12220         * method.c (do_build_copy_constructor): When copying an anonymous
12221         union member loop around to handle nested anonymous unions.  Use
12222         the offset of the member relative to the outer structure, not the
12223         union.
12224
12225 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
12226
12227         * call.c (resolve_args): New fn.
12228         (build_new_function_call): Use it.
12229         (build_object_call): Likewise.
12230         (build_new_method_call): Likewise.
12231
12232 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12233
12234         * call.c (build_over_call): tsubst all default parms from templates.
12235
12236 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
12237
12238         * decl.c (struct cp_function): Add static_labelno.
12239         (push_cp_function_context): Save it.
12240         (pop_cp_function_context): Restore it.
12241
12242 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
12243
12244         * typeck.c (build_component_ref_1): Convert from reference.
12245
12246 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12247
12248         * parse.y (current_declspecs, prefix_attributes): Initialize to
12249         NULL_TREE.
12250
12251         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
12252         before we try to force it to be a TREE_LIST.
12253         (decl): Make sure $1.t is non-nil.
12254
12255 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12256
12257         * pt.c (uses_template_parms): Handle template first-parse codes.
12258
12259         * decl.c (cp_finish_decl): Only warn about user-defined statics.
12260
12261 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
12262
12263         * pt.c (unify): Handle BOOLEAN_TYPE.
12264
12265         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
12266         * pt.c (tsubst): Don't set it.
12267         * call.c (build_over_call): Use uses_template_parms.
12268
12269 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
12270
12271         * method.c (build_overload_nested_name): Use static_labelno
12272         instead of var_labelno.
12273         (build_qualified_name): New fn.
12274         (build_overload_name): Split out from here.
12275         (build_static_name): Use build_qualified_name.
12276         * decl.c (cp_finish_decl): Statics in extern inline functions
12277         have comdat linkage.
12278         (start_function): Initialize static_labelno.
12279
12280 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12281
12282         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
12283         before "all member functions in class [] are private".
12284
12285 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
12286
12287         * lex.c (do_scoped_id): convert_from_reference.
12288         * init.c (build_offset_ref): Likewise.
12289
12290 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
12291
12292         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
12293
12294 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12295
12296         * typeck.c (get_member_function_from_ptrfunc): Promote index
12297         before saving it.
12298
12299 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12300
12301         * tree.c (layout_basetypes): Move non-virtual destructor warning.
12302         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
12303
12304 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12305
12306         * decl.c (grokdeclarator): Call add_defarg_fn for the function
12307         type, too.
12308         * lex.c (add_defarg_fn): Adjust.
12309         (do_pending_defargs): Adjust.  Don't skip the first parm.
12310
12311 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
12312
12313         * decl.c (build_enumerator): Global enumerators are also readonly.
12314
12315         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
12316         (build_dynamic_cast): Call it and convert_from_reference.
12317
12318         * lex.c (add_defarg_fn): New fn.
12319         (snarf_defarg): Don't add to defarg_types.
12320         (do_pending_defargs): Lose defarg_types.  All fns we process now
12321         have defargs.
12322         * decl.c (grokfndecl): Call add_defarg_fn.
12323
12324         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
12325         * cp-tree.def: Add DEFAULT_ARG.
12326         * spew.c (yylex): Call snarf_defarg as appropriate.
12327         * parse.y: New tokens DEFARG and DEFARG_MARKER.
12328         (defarg_again, pending_defargs, defarg, defarg1): New rules.
12329         (structsp): Use pending_defargs.
12330         (parms, full_parm): Use defarg.
12331         * lex.c (init_lex): Initialize inline_text_firstobj.
12332         (do_pending_inlines): Never pass the obstack to feed_input.
12333         (process_next_inline): Call end_input instead of restore_pending_input.
12334         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
12335         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
12336         * input.c (end_input): New fn.
12337         (sub_getch): At the end of some fed input, just keep returning EOF
12338         until someone calls end_input.
12339         Remove 'obstack' field from struct input_source.
12340         * decl.c (grokparms): Handle DEFAULT_ARG.
12341         (replace_defarg): New fn.
12342         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
12343
12344 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12345
12346         * call.c (implicit_conversion): If nothing else works, try binding
12347         an rvalue to a reference.
12348
12349 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
12350
12351         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
12352         ifndef for Cygwin32 to include SIGSEGV.
12353
12354 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
12355
12356         * class.c (finish_struct_1): Only complain about pointers without
12357         copy stuff if there are any constructors.
12358
12359         * rtti.c (build_dynamic_cast): Call complete_type on the types.
12360
12361         * decl.c (grokfndecl): If the function we chose doesn't actually
12362         match, die.
12363
12364         * decl2.c (grokclassfn): Don't specify 'const int' for the
12365         artificial destructor parm.
12366
12367         * pt.c (type_unification): If we are called recursively, nothing
12368         decays.
12369
12370 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
12371
12372         * decl.c (init_decl_processing): Stop trying to catch signals
12373         other than SIGABRT since the Cygwin32 library doesn't support
12374         them correctly yet.  This fixes a situation in which g++ causes
12375         a hang on SIGSEGVs and other such signals in our Win32-hosted
12376         tools.
12377
12378 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
12379
12380         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
12381
12382 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
12383
12384         * typeck2.c (store_init_value): Always return the value if our
12385         type needs constructing.
12386
12387         * method.c (hack_identifier): Convert class statics from
12388         reference, too.
12389
12390 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12391
12392         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
12393
12394 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
12395
12396         * typeck.c (c_expand_return): Make sure we clean up temporaries at
12397         the end of return x;
12398
12399 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12400
12401         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
12402
12403 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
12404
12405         * except.c (expand_builtin_throw): Add support
12406         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
12407
12408 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12409
12410         * repo.c (extract_string): Null-terminate.
12411
12412         * cp-tree.h (TI_SPEC_INFO): New macro.
12413         (CLASSTYPE_TI_SPEC_INFO): New macro.
12414         * pt.c (push_template_decl): Correctly determine # of template parms
12415         for partial specs.
12416
12417         * call.c (compare_ics): Really fix 'this' conversions.
12418
12419         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
12420         non-template fn.
12421
12422         * pt.c (push_template_decl): Complain about mismatch in # of
12423         template parms between a class template and a member template.
12424
12425 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12426
12427         * method.c (synthesize_method): You can't call
12428         function_cannot_inline_p after finish_function.
12429         * decl.c (finish_function): Turn on flag_inline_functions and turn
12430         off DECL_INLINE before handing a synthesized method to the
12431         backend.
12432
12433 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12434
12435         * method.c (synthesize_method): Remove July 30 change to never set
12436         DECL_INLINE if at_eof.
12437
12438 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
12439
12440         * xref.c (GNU_xref_member): Ensure that the node has a
12441         decl_lang_specific part before checking DECL_FRIEND_P.
12442
12443 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
12444
12445         * pt.c (instantiate_class_template): Diagnose non-class types used
12446         as bases.
12447
12448 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
12449
12450         * typeck.c (build_conditional_expr): Use convert_for_initialization
12451         instead of convert_and_check.
12452
12453 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12454
12455         * parse.y (typespec): Don't pedwarn for typeof.
12456
12457 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
12458
12459         * repo.c (finish_repo): Only check changes if we would write a
12460         repo file.
12461
12462         * call.c (compare_ics): Fix handling of 'this' conversions.
12463
12464         * pt.c (do_decl_instantiation): Support static data too.  Rename
12465         from do_function_instantiation.
12466         * cp-tree.h: Adjust.
12467         * parse.y: Adjust.
12468
12469         * repo.c (extract_string): New fn.
12470         (get_base_filename): Use it.
12471         (init_repo): Compare old args with current args.
12472
12473 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
12474
12475         * Makefile.in, Make-lang.in: Protect C-ls with a comment
12476         character, idea from Paul Eggert <eggert@twinsun.com>.
12477
12478 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
12479
12480         * typeck.c (c_expand_return): Be more persistent in looking for
12481         returned temps.
12482
12483         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
12484         pointer to reference.
12485
12486         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
12487
12488 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
12489
12490         * init.c (build_member_call, build_offset_ref):
12491         Use do_scoped_id instead of do_identifier.
12492
12493         * cvt.c (convert): Remove bogosity.
12494
12495 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12496
12497         * cvt.c (build_up_reference): Do checks of ARGTYPE and
12498         TARGET_TYPE before trying to use get_binfo.
12499
12500 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
12501
12502         * cvt.c (build_up_reference): Call get_binfo to get access control.
12503
12504         * decl2.c (import_export_decl): If we don't support weaks, leave
12505         statics undefined.
12506
12507 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
12508
12509         * except.c (expand_builtin_throw): Add support for machines that
12510         cannot access globals after throw's epilogue when
12511         -fno-sjlj-exceptions is used.
12512
12513 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
12514
12515         * parse.y: 'std::' becomes '::'.
12516         * lex.c (real_yylex): Remove 'namespace' warning.
12517         * init.c (build_member_call): Ignore 'std::'.
12518         (build_offset_ref): Likewise.
12519         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
12520         (do_toplevel_using_decl): Ignore 'using std::whatever'.
12521         * decl.c (push_namespace): Just sorry.
12522         (pop_namespace): Nop.
12523         (init_decl_processing): Declare std namespace.
12524
12525 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
12526
12527         * search.c (push_class_decls): A name which ambiguously refers to
12528         several instantiations of the same template just refers to the
12529         template.
12530
12531 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
12532
12533         * decl.c (build_enumerator): Fix problem with unsigned long
12534         enumerated values being smashed to ints, causing overflow
12535         when computing next enumerated value (for enum values around
12536         MAX_VAL).
12537
12538 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
12539
12540         * typeck.c (build_component_ref): Only call mark_used on a decl.
12541
12542 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12543
12544         * typeck.c (build_c_cast): Make the check for a ptr to function
12545         more specific before possible default_conversion call.
12546
12547 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
12548
12549         * except.c (expand_exception_blocks): Simplify and fix and make
12550         sure we don't end a region in a sequence, as expand_end_bindings
12551         doesn't like it.
12552
12553 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
12554
12555         * except.c (init_exception_processing): Mark terminate as not
12556         returning so that the optimizer can optimize better.
12557
12558 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
12559
12560         * cvt.c (convert): Don't do any extra work, if we can avoid it
12561         easily.
12562
12563 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
12564
12565         * *.[chy]: Change cp_convert to ocp_convert, change convert to
12566         cp_convert.  convert is now reserved for the backend, and doesn't
12567         have the semantics a frontend person should ever want.
12568
12569 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
12570
12571         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
12572         Lose -traditional support.
12573
12574 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12575
12576         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
12577
12578         * parse.y (self_reference): Do it for templates, too.
12579         * class.c (pushclass): Don't overload_template_name; the alias
12580         generated by build_self_reference serves the same purpose.
12581
12582         * tree.c (list_hash): Make static, take more args.
12583         (list_hash_lookup): Likewise.
12584         (list_hash_add): Make static.
12585         (list_hash_canon): Lose.
12586         (hash_tree_cons): Only build a new node if one isn't already in the
12587         hashtable.
12588         (hash_tree_chain): Use hash_tree_cons.
12589         * cp-tree.h: Adjust.
12590         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
12591         of calling lookup_name.
12592
12593 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12594
12595         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
12596         doesn't refer to the CONST_DECLs.
12597
12598 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
12599
12600         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
12601         is bigger.
12602         (expand_class_desc): Convert the last argument to a sizetype.
12603
12604 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12605
12606         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
12607         __real__): Add reswords.
12608         * hash.h: Regenerate.
12609         * lex.h (rid): Add RID_COMPLEX.
12610         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
12611         * lex.c (init_lex): Add building of RID_COMPLEX.
12612         (real_yylex): General cleanup in line with what c-lex.c also has,
12613         sans the cruft for traditional; add handling of SPEC_IMAG, complex
12614         types, and imaginary numeric constants.
12615         * parse.y (REALPART, IMAGPART): Add tokens.
12616         (unary_expr): Add REALPART and IMAGPART rules.
12617         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
12618         * decl.c (complex_{integer,float,double,long}_type_node): Define
12619         types.
12620         (init_decl_processing): Set up the types.
12621         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
12622         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
12623         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
12624         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
12625         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
12626         COMPLEX_TYPE case.
12627         * method.c (build_overload_name): Add handling of the different
12628         COMPLEX_TYPEs, prefixing them with `J'.
12629         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
12630         as a template parm.
12631         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
12632         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
12633         (mapcar): Handle COMPLEX_CST.
12634         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
12635         (common_type): Add code for complex types.
12636         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
12637         (convert_for_assignment): Likewise.
12638         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
12639
12640 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
12641
12642         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
12643         tsubst_expr, as it might try to do overload resolution.
12644
12645 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
12646
12647         * pt.c (instantiate_class_template): Oops.
12648
12649 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
12650
12651         * cp-tree.def: Add TAG_DEFN.
12652         * pt.c (tsubst_enum): New fn.
12653         (instantiate_class_template): Use it.
12654         (tsubst_expr): Support TAG_DEFN.
12655         (tsubst): Support local enums.
12656         (tsubst_copy): Likewise.
12657         * decl.c (finish_enum): Likewise.
12658         (start_enum): If this is a local enum, switch to permanent_obstack.
12659
12660 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
12661
12662         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
12663         (finish_function): Put the base init code for constructors just
12664         after the parm cleanup insns.
12665         (struct cp_function): Add last_parm_cleanup_insn.
12666         (push_cp_function_context): Likewise.
12667         (pop_cp_function_context): Likewise.
12668
12669 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12670
12671         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
12672
12673 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12674
12675         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
12676         for THUNK_FNDECL before we switch to temporary allocation.
12677
12678 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
12679
12680         * call.c (build_new_op): Handle null arg2 for ?:.
12681
12682 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
12683
12684         * except.c (expand_exception_blocks): Ensure that we flow through
12685         the end of the exception region for the exception specification.
12686         Move exception region for the exception specification in, so that
12687         it doesn't protect the parm cleanup.  Remove some obsolete code.
12688         * decl.c (store_parm_decls): Likewise.
12689         (finish_function): Likewise.
12690
12691 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
12692
12693         * init.c (build_new): Fix nothrow handling.
12694
12695 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12696
12697         * init.c (emit_base_init): Don't warn about the initialization
12698         list for an artificial member.
12699
12700 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12701
12702         * expr.c (do_case): Handle !START case for the error msg.
12703
12704 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
12705
12706         * decl2.c, lang-options.h: New option -Weffc++.
12707         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
12708         to -Weffc++.
12709
12710         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
12711         to MULTIPLE_SYMBOL_SPACES.
12712
12713 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
12714
12715         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
12716
12717         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
12718
12719         * typeck.c (c_expand_return): Don't complain about returning void
12720         to void in an artificial function.
12721         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
12722         don't set DECL_RESULT, set DECL_ARTIFICIAL.
12723         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
12724
12725 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
12726
12727         * init.c (init_decl_processing): Add support for setjmp/longjmp based
12728         exception handling.
12729         * except.c (init_exception_processing): Likewise.
12730         (expand_end_catch_block): Likewise.
12731         (expand_exception_blocks): Likewise.
12732         (expand_throw): Likewise.
12733         * exception.cc (__default_terminate): Likewise.
12734
12735         * init.c (perform_member_init): Use new method of expr level
12736         cleanups, instead of cleanups_this_call and friends.
12737         (emit_base_init): Likewise.
12738         (expand_aggr_vbase_init_1): Likewise.
12739         (expand_vec_init): Likewise.
12740         * decl.c (cp_finish_decl): Likewise.
12741         (expand_static_init): Likewise.
12742         (store_parm_decls): Likewise.
12743         (cplus_expand_expr_stmt): Likewise.
12744         * decl2.c (finish_file): Likewise.
12745
12746         * Make-lang.in (exception.o): Ok to compile with -O now.
12747
12748         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
12749         we know it will be done later by the backend.
12750
12751         * decl2.c (lang_f_options): Remove support for short temps.
12752         * lang-options.h: Likewise.
12753
12754 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
12755
12756         * tree.c (varargs_function_p): New fn.
12757         * method.c (emit_thunk): Replace broken generic code with code to
12758         generate a heavyweight thunk function.
12759
12760 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
12761
12762         * pt.c (process_template_parm): pedwarn about floating-point parms.
12763
12764         * decl.c (grokdeclarator): inline no longer implies static.
12765
12766         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
12767
12768 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
12769
12770         * class.c (check_for_override): The signature of an overriding
12771         function is not changed.
12772
12773         * call.c (build_over_call): Move setting of conv into the loop.
12774         Note: this change, along with the related changes of the 18th thru
12775         the 20th of April, fix an infinite loop problem in conversions.
12776
12777 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
12778
12779         * call.c (build_user_type_conversion_1): Really ignore rvalue
12780         conversions when looking for a REFERENCE_TYPE.
12781
12782         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
12783         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
12784         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
12785         (build_unary_op): Likewise.
12786         * call.c (build_over_call): See through a CONVERT_EXPR around the
12787         ADDR_EXPR for on a temporary.
12788         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
12789         the ADDR_EXPR for a local variable.
12790
12791 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
12792
12793         * call.c (build_user_type_conversion_1): If we're trying to
12794         convert to a REFERENCE_TYPE, only consider lvalue conversions.
12795         (build_new_function_call): Print candidates.
12796         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
12797         (reference_binding): Binding a temporary of a reference-related type
12798         is BAD.
12799
12800 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12801
12802         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
12803         * tinfo2.cc (type_info::before): Likewise.
12804
12805 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
12806
12807         * call.c (implicit_conversion): Oops.
12808
12809 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
12810
12811         * call.c (implicit_conversion): Try to find a reference conversion
12812         before binding a const reference to a temporary.
12813
12814 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
12815
12816         * exception.cc (__default_unexpected): Call terminate by default,
12817         so that if the user overrides terminate, the correct function will
12818         be called.
12819
12820 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
12821
12822         * parse.y (left_curly): Avoid trying to use any fields of
12823         error_mark_node, as there aren't any.
12824
12825 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12826
12827         * lex.c (do_identifier): Avoid breaking on overloaded methods
12828         as default arguments.
12829
12830 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
12831
12832         * call.c (add_template_candidate): Initialize the variable "dummy".
12833
12834 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
12835
12836         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
12837         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
12838
12839 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12840
12841         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
12842         (debug_binfo): Delete decl, not needed.
12843
12844         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
12845         promotes_to_aggr_type): Delete fns.
12846         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
12847         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
12848         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
12849
12850         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
12851
12852         * friend.c (is_friend_type): Delete fn.
12853         * cp-tree.h (is_friend_type): Delete decl.
12854
12855         * decl.c (original_result_rtx, double_ftype_double,
12856         double_ftype_double_double, int_ftype_int, long_ftype_long,
12857         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
12858         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
12859
12860         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
12861         fwd decls.
12862         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
12863
12864         * decl.c (pushdecl_nonclass_level): #if 0, unused.
12865         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
12866
12867         * lex.c (reinit_lang_specific): #if 0, unused.
12868         * cp-tree.h (reinit_lang_specific): #if 0 decl.
12869
12870         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
12871         * cp-tree.h (revert_static_member_fn): Delete decl.
12872
12873         * class.c (root_lang_context_p): Delete fn.
12874         * cp-tree.h (root_lang_context_p): Delete decl.
12875
12876         * decl.c (set_current_level_tags_transparency): #if 0, unused.
12877         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
12878
12879         * lex.c (set_vardecl_interface_info): Make static.
12880         * cp-tree.h (set_vardecl_interface_info): Delete decl.
12881
12882         * call.c (find_scoped_type): Make static.
12883         * cp-tree.h (find_scoped_type): Delete decl.
12884
12885         * search.c (convert_pointer_to_vbase): Make static.
12886         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
12887
12888         * decl.c (const_ptr_type_node): Likewise.
12889         * cp-tree.h (const_ptr_type_node): Delete decl.
12890
12891         * typeck.c (common_base_type): Make static.
12892         * cp-tree.h (common_base_types): Delete erroneous decl.
12893
12894         * pt.c (classtype_mangled_name): Make static.
12895         * cp-tree.h (classtype_mangled_name): Delete decl.
12896
12897         * lex.c (check_newline): Make static.
12898         * cp-tree.h (check_newline): Delete decl.
12899
12900         * typeck.c (build_x_array_ref): Delete fn, same idea as
12901         grok_array_decl.
12902         * cp-tree.h (build_x_array_ref): Delete decl.
12903
12904         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
12905         copy_lang_decl.
12906         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
12907
12908         * class.c (build_vtable_entry): Make static.
12909         * cp-tree.h (build_vtable_entry): Delete decl.
12910
12911         * class.c (build_vbase_pointer): Make static.
12912         * cp-tree.h (build_vbase_pointer): Delete decl.
12913
12914         * sig.c (build_sptr_ref): Add forward decl and make static.
12915         * cp-tree.h (build_sptr_ref): Delete decl.
12916
12917         * call.c (build_new_method_call): Add forward decl and make static.
12918         * cp-tree.h (build_new_method_call): Delete decl.
12919
12920         * call.c (build_object_call): Make static.
12921         * class.c (check_for_override, complete_type_p, mark_overriders):
12922         Likewise.
12923         * decl.c (cp_function_chain): Likewise.
12924         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
12925         Likewise.
12926         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
12927         Likewise.
12928         * tree.c (build_cplus_array_type_1): Likewise.
12929         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
12930         (comp_target_parms): Likewise.
12931
12932         * init.c (build_builtin_call): Make static.
12933         * cp-tree.h (build_builtin_call): Delete decl.
12934
12935         * typeck.c (binary_op_error): Delete decl.
12936         * cp-tree.h (binary_op_error): Likewise.
12937
12938 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12939
12940         * call.c (build_method_call): Compare against error_mark_node
12941         directly, rather than the ERROR_MARK tree code.
12942         * cvt.c (cp_convert): Likewise.
12943         * decl.c (print_binding_level): Likewise.
12944         (duplicate_decls): Likewise.
12945         (grokdeclarator): Likewise.
12946         (grokdeclarator): Likewise.
12947         * init.c (expand_aggr_init_1): Likewise.
12948         (decl_constant_value): Likewise.
12949         * method.c (build_opfncall): Likewise.
12950         (hack_identifier): Likewise.
12951         * typeck.c (build_modify_expr): Likewise.
12952
12953         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
12954
12955 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12956
12957         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
12958
12959         * pt.c (coerce_template_parms): Add new error message.
12960
12961         * method.c (build_overload_value): Implement name mangling for
12962         floating-point template arguments.
12963
12964         * method.c (build_overload_int, icat, dicat): Fix mangling of template
12965         arguments whose absolute value doesn't fit in a signed word.
12966
12967 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12968
12969         * friend.c: New file; put all of the friend stuff in here.
12970         * init.c: Instead of here.
12971         * Makefile.in (CXX_OBJS): Add friend.o.
12972         (friend.o): Add dependencies.
12973         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
12974
12975 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
12976
12977         * call.c (build_scoped_method_call): Complain if the scope isn't a
12978         base.
12979
12980 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
12981
12982         * parse.y (left_curly): Don't crash on erroneous type.
12983
12984         * init.c (build_delete): Fix type of ref.
12985
12986 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12987
12988         * search.c (get_vbase_1): Renamed from get_vbase.
12989         (get_vbase): Wrapper, now non-static.
12990         (convert_pointer_to_vbase): Now static.
12991
12992         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
12993         * init.c (build_delete): Pass one.
12994         (build_partial_cleanup_for): Use build_scoped_method_call.
12995         * decl.c (finish_function): Pass a binfo.
12996
12997 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12998
12999         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
13000
13001         * typeck.c (build_c_cast): Lose other reference to flag.
13002
13003         * call.c (build_field_call): Don't look for [cd]tor_identifier.
13004         * decl2.c (delete_sanity): Remove meaningless use of
13005         LOOKUP_HAS_IN_CHARGE.
13006         * decl.c (finish_function): Use build_scoped_method_call instead
13007         of build_delete for running vbase dtors.
13008         * init.c (build_delete): Call overload resolution code instead of
13009         duplicating it badly.
13010
13011 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
13012
13013         * call.c (build_over_call): Call mark_used before trying to elide
13014         the call.
13015
13016         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
13017
13018 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13019
13020         * typeck.c (build_modify_expr): Always pedwarn for a cast to
13021         non-reference used as an lvalue.
13022
13023 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13024
13025         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
13026
13027 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13028
13029         * parse.y (handler): Fix template typo.
13030
13031 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13032
13033         * error.c (lang_decl_name): New fn.
13034         * tree.c (lang_printable_name): Use it.
13035
13036 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
13037
13038         * g++spec.c: Include config.h so that we can catch bzero #defines
13039         from the config file.
13040
13041 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
13042
13043         * new1.cc: Include a declaration for malloc, to avoid warning, and
13044         avoid lossing on systems that require one (ones that define malloc
13045         in xm.h).
13046
13047 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13048
13049         * decl2.c (max_tinst_depth): New variable.
13050         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
13051         option.
13052         * pt.c (max_tinst_depth): Variable moved.
13053         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
13054         as legal.
13055
13056 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
13057
13058         * decl.c (xref_basetypes): Allow a base class that depends on
13059         template parms to be incomplete.
13060
13061         * decl2.c (build_expr_from_tree): Support typeid(type).
13062         * rtti.c (get_typeid): Support templates.
13063         (expand_si_desc, expand_class_desc): Fix string length.
13064         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
13065
13066 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
13067
13068         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
13069
13070         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
13071
13072 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13073
13074         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
13075         smashes together template and non-template decls of the same
13076         signature.
13077
13078 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
13079
13080         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
13081
13082 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13083
13084         * decl.c (duplicate_decls): Next route, pedwarn about different
13085         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
13086
13087 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13088
13089         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
13090         (struct lang_type): Delete has_default_implementation member.
13091         Increase dummy to 21.
13092         * decl.c (start_method): Delete usage.
13093
13094         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
13095         store_after_parms, start_decl_1, auto_function): Add decls.
13096         (get_arglist_len_in_bytes, declare_implicit_exception,
13097         have_exceptions_p, make_type_decl, typedecl_for_tag,
13098         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
13099         build_component_type_expr, cplus_exception_name,
13100         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
13101         * call.c (build_this): Make static.
13102         (is_complete): Likewise.
13103         (implicit_conversion): Likewise.
13104         (reference_binding): Likewise.
13105         (standard_conversion): Likewise.
13106         (strip_top_quals): Likewise.
13107         (non_reference): Likewise.
13108         (build_conv): Likewise.
13109         (user_harshness): Likewise.
13110         (rank_for_ideal): Likewise.
13111         * decl.c (start_decl_1): Delete forward decl.
13112         (push_decl_level): Make static.
13113         (resume_binding_level): Make static.
13114         (namespace_bindings_p): Make static.
13115         (declare_namespace_level): Make static.
13116         (lookup_name_real): Make static.
13117         (duplicate_decls): Make static.  Take register off NEWDECL and
13118         OLDDECL parm decls.
13119         * decl2.c (get_sentry): Make static.
13120         (temp_name_p): Delete fn.
13121         * except.c (auto_function): Delete decl.
13122         * lex.c (handle_{cp,sysv}_pragma): Make static.
13123         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
13124         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
13125         * pt.c (tsubst_expr_values): Make static.
13126         * rtti.c (combine_strings): Delete decl.
13127
13128 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13129
13130         * pt.c (push_template_decl): Handle getting a typedef.
13131
13132         * call.c (build_new_function_call): Complain about void arg.
13133
13134 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13135
13136         * decl.c (duplicate_decls): Give pedwarn of different exceptions
13137         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
13138
13139 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
13140
13141         * except.c (expand_throw): Don't expand the cleanup tree here,
13142         since we are not going to write the rtl out.  Fixes problem with
13143         -g -O on SPARC.
13144
13145 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
13146
13147         * Make-lang.in: Add $(exeext) as necessary.
13148
13149 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
13150
13151         * parse.y (handler_seq): Must have at least one catch clause.
13152
13153 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13154
13155         * call.c (add_builtin_candidate): Restore ?: hack.
13156
13157         * decl.c (grok_op_properties): More warnings.
13158
13159 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13160
13161         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
13162         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
13163
13164         * decl.c (duplicate_decls): Scale back to a warning, and only do
13165         'em if -pedantic.
13166
13167 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
13168
13169         * decl.c (duplicate_decls): pedwarn mismatched exception
13170         specifications.
13171
13172 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
13173
13174         * call.c (build_new_method_call): Don't display the invisible
13175         argument for controlling virtual bases.
13176
13177 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
13178
13179         * new: Add nothrow new and delete, bad_alloc and throw specifications
13180         for delete.
13181         * decl.c (init_decl_processing): Add throw specification for delete.
13182         * new.cc (nothrow): Define.
13183         * lex.c (real_yylex): Removing warning that throw and friends are
13184         keywords.
13185         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
13186         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
13187         * Make-lang.in: Add new{1,2}.{cc,o}.
13188
13189 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
13190
13191         * lex.c (cons_up_default_function): Fix return type of synth op=.
13192
13193         * init.c (emit_base_init): Add warnings for uninitialized members
13194         and bases.
13195
13196         * decl.c (xref_basetypes): Add warning for non-polymorphic type
13197         with destructor used as base type.
13198
13199         * decl.c (grok_op_properties): Add warning for op= returning void.
13200         * typeck.c (c_expand_return): Add warning for op= returning anything
13201         other than *this.
13202
13203         * class.c (finish_struct_1): Add warning for class with pointers
13204         but not copy ctor or copy op=.
13205
13206         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
13207         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
13208         (instantiate_template): If -fexternal-templates, add this
13209         instantiation to pending_templates.
13210
13211         * decl2.c (copy_assignment_arg_p): Disable old hack to support
13212         Booch components.
13213
13214 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
13215
13216         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
13217
13218 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
13219
13220         * call.c (standard_conversion): Handle getting references.  Tack
13221         on RVALUE_CONV here.  Do it for non-class types, too.
13222         (reference_binding): Pass references to standard_conversion.
13223         (implicit_conversion): Likewise.
13224         (add_builtin_candidate): Disable one ?: kludge.
13225         (convert_like): Handle RVALUE_CONVs for non-class types.
13226         (joust): Disable the other ?: kludge.
13227
13228 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13229
13230         * decl.c (init_decl_processing): Add code to build up common
13231         function types beforehand, to avoid creation then removal of
13232         things already in the hash table.
13233
13234 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13235
13236         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
13237         the arguments.
13238
13239         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
13240         current_template_parms.
13241
13242 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
13243
13244         * search.c (lookup_field): Don't return a function, check want_type.
13245
13246 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13247
13248         * init.c (build_new): Make sure PLACEMENT has a type.
13249
13250 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13251
13252         * init.c (build_new): Support new (nothrow).
13253
13254 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13255
13256         * pt.c (instantiate_decl): Also do push_to_top_level before setting
13257         up DECL_INITIAL.
13258
13259         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
13260         * pt.c (tsubst): Defer instantiation of default args.
13261         * call.c (build_over_call): Until here.
13262
13263 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13264
13265         * search.c (lookup_field): Make sure we have an
13266         IDENTIFIER_CLASS_VALUE before we try to return it.
13267
13268 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13269
13270         * call.c (build_method_call): Delete unused var PARM.
13271         (build_overload_call_real): Likewise.
13272         (build_object_call): Delete unused var P.
13273         (build_new_op): Likewise.
13274         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
13275         var definitions, which are never used.
13276         (shadow_tag): Delete unused var FN.
13277         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
13278         * init.c (build_new): Delete unused var ALLOC_TEMP.
13279         * method.c (hack_identifier): Delete unused var CONTEXT.
13280         (do_build_copy_constructor): Delete unused var NAME.
13281         (synthesize_method): Delete unused var BASE.
13282         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
13283         * rtti.c (build_headof): Delete unused var VPTR.
13284         (get_typeid): Delete unused var T.
13285         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
13286         and ORIG_OP2.
13287         (build_ptrmemfunc): Delete unused vars U and NINDEX.
13288         * typeck2.c (build_functional_cast): Delete unused var BINFO.
13289
13290 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
13291
13292         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
13293         things in a type being defined.
13294         * decl.c (finish_enum): Reverse the values so that they are in
13295         the correct order.
13296
13297         * pt.c (instantiate_class_template): Don't initialize
13298         BINFO_BASETYPES until the vector is filled out.
13299         (unify): Don't abort on conflicting bindings, just fail.
13300         (instantiate_decl): Do push_tinst_level before any tsubsting.
13301
13302         * method.c (build_overload_value): Handle getting a
13303         TEMPLATE_CONST_PARM for a pointer.
13304
13305 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
13306
13307         * init.c (expand_member_init): Don't give 'not a base' error for
13308         templates.
13309
13310         * pt.c (instantiate_decl): Call import_export_decl later.
13311
13312         * pt.c (instantiate_class_template): Return a value.
13313
13314         * parse.y (extension): New rule for __extension__.
13315         (extdef, unary_expr, decl, component_decl): Use it.
13316
13317 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
13318
13319         * class.c (base_binfo): Remove unused base_has_virtual member.
13320         (finish_base_struct): Likewise.
13321         (finish_struct_1): Likewise.
13322
13323 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
13324
13325         * search.c (expand_upcast_fixups): Fix bogus code generation
13326         problem where the generated code uses the wrong index into the
13327         runtime built vtable on the stack.  Old code could clobber random
13328         stack values.
13329
13330 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
13331
13332         * init.c (perform_member_init): Make sure the partial EH cleanups
13333         live on the function_obstack.
13334
13335 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
13336
13337         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
13338         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
13339
13340 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
13341
13342         * decl.c (grokvardecl): Avoid ANSI style initialization.
13343
13344 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
13345
13346         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
13347
13348 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
13349
13350         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
13351
13352 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13353
13354         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
13355         arguments we compare against.  Start the count of I at 1, not 0,
13356         since argv[0] is still the command.
13357
13358 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
13359
13360         * lang-specs.h: Accept .cp as an C++ extension.
13361
13362 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13363
13364         * cp-tree.h (ptr_reasonably_similar): Add decl.
13365
13366 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13367
13368         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
13369         pointer.  New local SPECBITS with the parm's value.
13370         (grokdeclarator): Pass &specbits down.
13371
13372         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
13373         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
13374
13375         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
13376         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
13377
13378         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
13379         not an error_mark_node.
13380
13381 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
13382
13383         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
13384         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
13385
13386 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
13387
13388         * decl.c (grokdeclarator): When giving an anonymous struct a name,
13389         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
13390         not affected).
13391
13392         * typeck2.c (build_m_component_ref): If component is a pointer
13393         to data member, resolve the OFFSET_REF now.
13394
13395         * call.c (convert_like): Don't go into infinite recursion.
13396
13397         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
13398
13399         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
13400         * tree.c (layout_basetypes): And on the vbase ptr.
13401
13402 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
13403
13404         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
13405         CHAR_TYPE_SIZE so bool is always the same size as another type.
13406
13407         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
13408
13409 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
13410
13411         * decl2.c (grok_x_components): Remove synthesized methods from
13412         TYPE_METHODS of an anonymous union, complain about member
13413         functions.
13414         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
13415         anonymous unions.
13416         (finish_function): Just clear the DECL_RTL of our arguments.
13417
13418 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
13419
13420         * decl2.c (finish_file): Emit DWARF debugging info for static data
13421         members.
13422
13423         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
13424
13425 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
13426
13427         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
13428         IDENTIFIER_NODE.
13429
13430 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
13431
13432         * Make-lang.in (g++-cross$(exeext)): Fix typo.
13433
13434 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13435
13436         Make the g++ driver now be a standalone program, rather than one
13437         that tries to run the gcc driver after munging up the options.
13438         * Make-lang.in (g++.c, g++spec.o): New rules.
13439         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
13440         added.
13441         (g++$(exeext)): New rule, based on xgcc rule.
13442         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
13443         * g++spec.c: New file.
13444         * g++.c: Removed file.
13445
13446 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
13447
13448         * cvt.c (build_up_reference): Arrange for any temporary values
13449         that have been keep in registers until now to be put into memory.
13450
13451 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13452
13453         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
13454         that make -j3 bootstrap works better.
13455
13456 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
13457
13458         * decl.c (pushtag): Do pushdecl for anon tags.
13459
13460 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
13461
13462         * typeck.c (c_expand_return): Fix logic.
13463         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
13464
13465 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
13466
13467         * g++.c (main): Make sure arglist has a final NULL entry.  Add
13468         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
13469         stdin/stdout of the invoked program are redirected to
13470         nowheresville.
13471
13472 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
13473
13474         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
13475
13476 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
13477
13478         * init.c (resolve_offset_ref): Handle obj.vfn better.
13479         * typeck.c (build_component_ref): Set TREE_TYPE on result from
13480         build_vfn_ref.
13481
13482 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
13483
13484         * typeck.c (convert_for_assignment): Also handle anachronistic
13485         implicit conversions from (::*)() to cv void*.
13486         * cvt.c (cp_convert_to_pointer): Likewise.
13487
13488 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
13489
13490         * lex.c (handle_cp_pragma): Fix bogus warning.
13491
13492 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
13493
13494         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
13495         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
13496
13497 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
13498
13499         * class.c (finish_struct_1): Support DWARF2_DEBUG.
13500         * search.c (dfs_debug_mark): Likewise.
13501         * decl2.c (finish_vtable_vardecl): Likewise.
13502         * decl.c (pushtag, finish_enum): Likewise.
13503         * lex.c (check_newline): Use debug_* instead of calling *out
13504         functions directly.
13505
13506 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13507
13508         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
13509         on some picky hosts.
13510
13511 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
13512
13513         * class.c (finish_struct_1): A class has a non-trivial copy
13514         constructor if it has virtual functions.
13515
13516         * cvt.c (cp_convert): Always call a constructor.
13517
13518         * call.c (reference_binding): Still tack on a REF_BIND
13519         for bad conversions.
13520         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
13521
13522         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
13523         (c_expand_return): Likewise.
13524         * typeck2.c (digest_init): Likewise for { }.
13525         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
13526         * cvt.c (cp_convert): Handle failure better.
13527
13528 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13529
13530         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
13531         of GCC be path-relative.
13532
13533 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
13534
13535         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
13536         it does need choose-temp.o and pexecute.o.
13537
13538 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13539
13540         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
13541         that we still use it.
13542         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
13543
13544 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
13545
13546         * init.c (expand_default_init): Avoid calling constructors to
13547         initialize reference temps.
13548
13549         * cvt.c (convert_to_reference): Fix.
13550
13551 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
13552
13553         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
13554         (convert_to_reference): Likewise.
13555         * typeck.c (convert_for_initialization): Likewise.
13556         * init.c (expand_default_init): Likewise.
13557         (expand_aggr_init_1): Likewise.
13558         * cp-tree.h (CONV_NONCONVERTING): Lose.
13559         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
13560         * *.c: Adjust.
13561         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
13562
13563 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
13564
13565         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
13566
13567 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
13568
13569         * init.c (expand_aggr_init_1): Don't crash on non-constructor
13570         TARGET_EXPR.
13571
13572 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13573
13574         * g++.c: Include gansidecl.h.
13575         (VPROTO, PVPROTO, VA_START): Delete.
13576         (choose_temp_base_try, choose_temp_base, perror_exec,
13577         run_dos) [__MSDOS__]: Delete fns.
13578         (pfatal_with_name): Delete fn.
13579         (temp_filename): Declare like in gcc.c.
13580         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
13581         (error_count, signal_count): Define.
13582         (error): Delete both definitions.
13583         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
13584         (pfatal_pexecute): Add fn from gcc.c.
13585         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
13586         code to use the pexecute stuff also used by gcc.c.
13587         (MIN_FATAL_STATUS): Define.
13588         * Make-lang.in (g++): Add dependency on and linking with
13589         choose-temp.o and pexecute.o.
13590
13591         * cp-tree.h: Include gansidecl.h.
13592         (STDIO_PROTO): Delete #undef/#define.
13593         * cvt.c (NULL): Delete #undef/#define.
13594         * expr.c (NULL): Likewise.
13595         * init.c (NULL): Likewise.
13596         * rtti.c (NULL): Likewise.
13597         * xref.c (NULL): Likewise.
13598
13599         * cp-tree.h (build_user_type_conversion): Add prototype.
13600         * call.c (build_user_type_conversion): Delete prototype.  Correct
13601         decl of FLAGS arg to be an int.
13602         * cvt.c (build_user_type_conversion): Likewise.
13603
13604 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
13605
13606         * cp-tree.def: Add TRY_BLOCK and HANDLER.
13607         * except.c (expand_start_catch_block): Support templates.
13608         * parse.y (try_block, handler_seq): Likewise.
13609         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
13610
13611 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
13612
13613         * pt.c (current_template_args): New fn.
13614         (push_template_decl): Use it.
13615         * decl.c (grokdeclarator): Use it.
13616
13617         * decl2.c (build_expr_from_tree): Dereference ref vars.
13618
13619         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
13620         the decl-specifier-seq.
13621
13622         * decl.c (grok_op_properties): Don't force the type of a conversion
13623         op to be complete.  Don't warn about converting to the same type
13624         for template instantiations.
13625
13626         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
13627         methods.
13628
13629 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
13630
13631         * typeck.c (get_delta_difference): Remove previous bogusness.
13632         Don't give errors if force is set.
13633
13634 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
13635
13636         * decl2.c (finish_file): Don't emit debug info.
13637         * decl.c (pushdecl): Lose obsolete code.
13638         (grokdeclarator): Still do the long long thing after complaining.
13639         * search.c (note_debug_info_needed): Don't do anything if we're in a
13640         template.
13641         * method.c (synthesize_method): For non-local classes,
13642         push_to_top_level first.
13643
13644 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
13645
13646         * typeck.c (get_delta_difference): Add no_error parameter.
13647         (build_ptrmemfunc): Call get_delta_difference with no_error set;
13648         we don't want error messages when converting unrelated
13649         pointer-to-member functions.
13650
13651 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
13652
13653         * error.c (dump_expr): Improve the wording on error messages that
13654         involve pointer to member functions.
13655
13656 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
13657
13658         * cvt.c (cp_convert_to_pointer): Move code for conversions from
13659         (::*)() to void* or (*)() up a bit, so that we can convert from
13660         METHOD_TYPEs as well.
13661
13662 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
13663
13664         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
13665         There are no 'member' types.
13666         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
13667         (build_x_typeid): Handle errors.
13668
13669 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
13670
13671         * typeck.c (convert_for_assignment): Handle anachronistic implicit
13672         conversions from (::*)() to void* or (*)().
13673         * cvt.c (cp_convert_to_pointer): Likewise.
13674         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
13675         conversions from here.
13676         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
13677         * lang-options.h: Likewise.
13678         * decl2.c (warn_pmf2ptr): Define.
13679         * cp-tree.h: Declare it.
13680         * typeck2.c (digest_init): Allow pmfs down into
13681         convert_for_initialization.
13682
13683 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
13684
13685         * typeck.c (c_expand_return): Fix for returning overloaded fn.
13686
13687 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
13688
13689         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
13690         * decl.c (grok_reference_init): Pass DIRECT_BIND.
13691         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
13692         DIRECT_BIND.
13693         * call.c (convert_like): Don't pass INDIRECT_BIND.
13694         * typeck.c (convert_arguments): Likewise.
13695         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
13696
13697 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
13698
13699         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
13700         similar code in build_up_ref.
13701         * cvt.c (build_up_reference): Drastically simplify.
13702
13703 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
13704
13705         * typeck.c (signed_or_unsigned_type): If the given type already
13706         as the correct signedness, then just return it.
13707
13708         * typeck.c ({un,}signed_type): If can't do anything, call
13709         signed_or_unsigned_type.
13710
13711 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
13712
13713         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
13714         current_class_type is NULL.
13715
13716 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
13717
13718         * class.c (finish_struct_1): Avoid empty structs by adding a field
13719         so layout_type gets the mode right.
13720
13721         * typeck.c (c_expand_return): Drastically simplify.
13722
13723 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
13724
13725         * typeck.c (decay_conversion): Handle overloaded methods.
13726
13727 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
13728
13729         * call.c (build_over_call): A TARGET_EXPR has side-effects.
13730
13731 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
13732
13733         * cvt.c (convert_to_pointer_force): Add code to support pointer to
13734         member function to pointer to function conversions.
13735         * init.c (resolve_offset_ref): Add code to allow faked up objects,
13736         ignoring them if they are not used, and giving an error, if they
13737         are needed.
13738         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
13739         code, and so that we can give an error, if we needed an object,
13740         and one was not provided.
13741         (build_c_cast): Don't call default_conversion when we want to
13742         convert to pointer to function from a METHOD_TYPE.
13743
13744 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
13745
13746         * Make-lang.in (cplib2.ready): Fix logic.
13747
13748         * decl.c (shadow_tag): Only complain about non-artificial function
13749         members.
13750
13751         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
13752
13753 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
13754
13755         * expr.c (cplus_expand_expr): Pre-tweak call_target like
13756         expand_inline_function would.
13757
13758         * pt.c (mark_decl_instantiated): If extern_p, call
13759         mark_inline_for_output.
13760
13761 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
13762
13763         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
13764         pmd conversions.
13765
13766         * typeck.c (get_delta_difference): Fix wording, as we can be used
13767         for pointer to data members.
13768
13769 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
13770
13771         * pt.c (tsubst): If the function decl isn't a member of this
13772         template, return a copy of the decl (including copying the
13773         lang-specific part) so we don't hose ourselves later.
13774
13775 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
13776
13777         * class.c (finish_struct): Remove DWARF-specific tag handling.
13778         * decl.c (pushtag): Likewise.
13779         (finish_function): Always clear DECL_ARGUMENTS on function decls with
13780         no saved RTX.
13781         * decl2.c (finish_file): Emit DWARF debugging info for static data
13782         members.
13783
13784 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
13785
13786         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
13787         isn't the same as the new one before we whack it.
13788
13789 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
13790
13791         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
13792         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
13793         warn_traditional and warn_strict_prototypes; remove ancient
13794         'overload' code; remove references to flag_traditional.
13795
13796 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
13797
13798         * input.c (sub_getch): Handle 8-bit characters in string literals.
13799
13800 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
13801
13802         * tree.c (mapcar): Handle CONSTRUCTORs.
13803         (copy_to_permanent): Handle expression_obstack properly.
13804
13805         * Make-lang.in (cplib2.txt): Also depend on the headers.
13806
13807         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
13808         INT_TYPE_SIZE.
13809         (expand_class_desc): Use USItype for offset field.
13810         * tinfo.h (struct __class_type_info): Likewise.
13811
13812         * method.c (build_overload_int): TYPE_PRECISION should be applied
13813         to types.
13814
13815 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
13816
13817         * call.c (build_new_op): A COND_EXPR involving void must be a
13818         builtin.
13819
13820 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
13821
13822         * typeck.c (build_x_component_ref): New fn.
13823         (build_object_ref): Use it.
13824         * parse.y (primary): Use it.
13825         * decl2.c (build_expr_from_tree): Use it.
13826         * cp-tree.h: Declare it.
13827
13828         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
13829         * error.c (dump_type_suffix): Handle variable arrays.
13830
13831 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13832
13833         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
13834
13835 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
13836
13837         * decl.c (lookup_name_real): Don't try to look up anything in a
13838         TYPENAME_TYPE.
13839
13840         * tinfo2.cc (__throw_type_match_rtti): Oops.
13841
13842 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13843
13844         * Make-lang.in (exception.o): Use -fno-PIC for now.
13845
13846 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
13847
13848         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
13849         calling them.
13850         (get_tinfo_fn_dynamic): Extracted from build_typeid.
13851         * tinfo2.cc (__dynamic_cast): Adjust.
13852
13853         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
13854         (build_x_typeid): Likewise.
13855
13856         * parse.y: Call build_x_typeid instead of build_typeid.
13857         * cp-tree.def: Add TYPEID_EXPR.
13858         * pt.c (tsubst_copy): Handle typeid.
13859         * decl2.c (build_expr_from_tree): Likewise.
13860         * rtti.c (build_x_typeid): Throw bad_typeid from here.
13861         (build_typeid): Not here.
13862         * cp-tree.h: Declare build_x_typeid.
13863
13864 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
13865
13866         * call.c (convert_like): Pull out constant values.
13867
13868         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
13869
13870 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
13871
13872         * decl.c (init_decl_processing): Create short int types before
13873         creating size_t in case a machine description needs to use
13874         unsigned short for size_t.
13875
13876 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
13877
13878         * Make-lang.in (exception.o): Turn off pic.
13879
13880         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
13881         type, multi-level ptr conversions.
13882
13883         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
13884         (throw_bad_cast): Use it.
13885         (throw_bad_typeid): New fn.
13886         (build_typeid): Throw bad_typeid as needed.
13887         Use build_call.
13888         (synthesize_tinfo_fn): Handle functions and arrays before checking
13889         for cv-quals.
13890
13891         * Remove .h from standard C++ headers, add new.h, move into inc
13892         subdirectory.
13893
13894         * exception*: Remove pointer from object, constructors.  Add
13895         default exception::what that uses type_info::name.  Add
13896         __throw_bad_typeid.
13897
13898         * init.c (build_new): Don't add a cookie to new (void *) T[2].
13899
13900 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
13901
13902         * Make-lang.in: Building C++ code depends on cc1plus.
13903
13904 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13905
13906         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
13907         a HOST_WIDE_INT, not a tree.
13908
13909 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
13910
13911         * exception.cc: Don't include <stdlib.h>.
13912
13913         * Make-lang.in (c++.clean): Remove cplib2.*.
13914
13915 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
13916
13917         * parse.y (component_decl_1, component_costructor_declarator case):
13918         Pass attributes/prefix_attributes in tree list.
13919
13920 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
13921
13922         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
13923
13924 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
13925
13926         * lex.c (do_identifier): Don't do deferred lookup in a template
13927         header.
13928
13929         * typeck2.c (store_init_value): Oops.
13930
13931         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
13932         New files for C++ lang-support library.
13933         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
13934         (CXX_LIB2FUNCS): Define.
13935         And rules for building the C++ lang-support code.
13936         * config-lang.in (headers): Define.
13937         (lib2funcs): Define.
13938
13939 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
13940
13941         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
13942         digest_init.
13943         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
13944         * typeck2.c (store_init_value): Check for initializing pmf with { }
13945         here.
13946         (process_init_constructor): Not here.
13947
13948 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
13949
13950         * pt.c (begin_template_parm_list): Increment
13951         processing_template_decl here.
13952         (end_template_parm_list): Not here.
13953         (process_template_parm): No need to add 1 to it now.
13954         * *.c: Use processing_template_decl instead of current_template_parms
13955         to check for being in a template.
13956
13957         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
13958         (tsubst_copy): Handle CONSTRUCTOR.
13959         (instantiate_decl): Set up context properly for variables.
13960         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
13961         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
13962
13963 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13964
13965         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
13966
13967 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
13968
13969         * method.c (make_thunk): Call comdat_linkage before setting the
13970         TREE_CODE.
13971
13972         * decl2.c (comdat_linkage): Use make_decl_one_only.
13973         (import_export_decl): Likewise.
13974         * decl.c (init_decl_processing): Check supports_one_only instead of
13975         SUPPORTS_WEAK.
13976
13977 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
13978
13979         * decl2.c (grokfield): Tighten checking for access decls.
13980
13981         * decl.c (make_typename_type): Resolve references to
13982         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
13983         (lookup_name_real): Types that depend on a template parameter get
13984         an implicit 'typename' unless they're in the current scope.
13985         (start_decl_1): We don't care about incomplete types that depend
13986         on a template parm.
13987         (grokdeclarator): Resolve 'typename's in the type specifier that
13988         refer to members of the current scope.
13989
13990         * call.c (build_over_call): Remove 'inline called before
13991         definition' diagnostic.
13992         (build_method_call): Likewise.
13993         * decl.c (duplicate_decls): Downgrade 'used before declared
13994         inline' to a warning, only with -Winline.
13995
13996 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
13997
13998         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
13999
14000 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
14001
14002         * call.c (build_method_call): When calling a signature
14003         default implementation, as in other cases, let instance_ptr simply
14004         be instance.
14005
14006 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
14007
14008         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
14009
14010 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
14011
14012         * except.c (expand_start_catch_block): Add a pushlevel so that -g
14013         works on hppa and SPARC.
14014
14015 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14016
14017         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
14018
14019 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
14020
14021         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
14022         before testing whether it's a signature.
14023
14024 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
14025
14026         * call.c (build_new_method_call): Don't complain about signature
14027         pointers and references not being an aggr type.
14028         (build_this): If a signature pointer or reference was passed in,
14029         just return it.
14030         (build_new_method_call): If instance is a signature pointer, set
14031         basetype to the signature type of instance.
14032         * sig.c (build_signature_method_call): Deleted basetype and
14033         instance parameters, they can be found as the DECL_CONTEXT of
14034         function and as the first argument passed in.
14035         * cp-tree.h: Changed declaration of build_signature_method_call.
14036         * call.c (build_method_call): Deleted first two arguments in call
14037         of build_signature_method_call.
14038         (build_over_call): Added call to build_signature_method_call.
14039
14040 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14041
14042         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
14043         target_expr.
14044
14045 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14046
14047         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
14048
14049 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
14050
14051         * except.c (expand_start_try_stmts): Move to except.c in the backend.
14052         (expand_end_try_stmts): Remove.
14053
14054         * init.c (perform_member_init): Use add_partial_entry () instead
14055         of directly manipulating lists.
14056         (emit_base_init): Likewise.
14057
14058 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
14059
14060         * except.c (expand_exception_blocks): Always make sure USE and
14061         CLOBBER insns that came at the end still do, the backend relies
14062         upon this.
14063
14064 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
14065
14066         * call.c (build_over_call): We can only use a TARGET_EXPR of the
14067         right type.
14068
14069 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
14070
14071         * cvt.c (convert_to_reference): Revert last change, don't complain
14072         about temp without target decl.
14073
14074 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
14075
14076         * decl.c (grokdeclarator): Don't core dump when void() is given.
14077
14078 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
14079
14080         * decl.c (copy_args_p): Don't crash.
14081
14082 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
14083
14084         * pt.c (tsubst): And support template args inside the exception
14085         specification.
14086
14087         * pt.c (tsubst): Add support for exception specifications in
14088         template functions.
14089
14090 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
14091
14092         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
14093         fields now.
14094         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
14095         (start_function): Likewise.
14096         (start_method): Likewise.
14097         (grokfield): Likewise.
14098         (make_call_declarator): Add throw spec parameter.
14099         (set_quals_and_spec): Add routine.
14100         * lex.c (set_quals_and_spec): Likewise.
14101         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
14102         * decl.c (shadow_tag): Eliminate the throw spec parameter to
14103         grokdeclarator.
14104         (groktypename): Likewise.
14105         (start_decl): Eliminate the throw spec parameter.  Eliminate the
14106         throw spec parameter to grokdeclarator.  Eliminate the throw spec
14107         field in DECL_STMT.
14108         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
14109         (grokfndecl): Remove useless set of raises.
14110         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
14111         the throw spec parameter to start_decl.  Pull the throw spec out
14112         of the call declarator.
14113         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
14114         (start_function): Eliminate the throw spec parameter.  Eliminate
14115         the throw spec parameter to grokdeclarator.
14116         (start_method): Likewise.
14117         * decl2.c (grokfield): Likewise.
14118         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
14119         (grokoptypename): Likewise.
14120         (finish_file): Eliminate the throw spec parameter to
14121         start_function.  Add throw spec to make_call_declarator.
14122         * except.c (init_exception_processing): Add throw spec to
14123         make_call_declarator.  Eliminate the throw spec parameter to
14124         start_decl.
14125         (expand_start_catch_block): Eliminate the throw spec parameter to
14126         grokdeclarator.
14127         (expand_builtin_throw): Add throw spec to make_call_declarator.
14128         Eliminate the throw spec parameter to start_function.
14129         (start_anon_func): Likewise.
14130         * lex.c (make_call_declarator): Add throw spec parameter.
14131         (set_quals_and_spec): New routine.
14132         (cons_up_default_function): Add throw spec to make_call_declarator.
14133         Eliminate the throw spec parameter to grokfield.
14134         * method.c (synthesize_method): Eliminate the throw spec parameter
14135         to start_function.
14136         * pt.c (process_template_parm): Eliminate the throw spec parameter
14137         to grokdeclarator.
14138         (tsubst): Add throw spec to make_call_declarator.
14139         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
14140         (do_function_instantiation): Eliminate the throw spec parameter to
14141         grokdeclarator.  Eliminate the throw spec parameter to
14142         start_function.
14143         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
14144         to start_function.
14145         * parse.y (datadef): Remove non-winning optimization.
14146         (decl): Likewise.
14147         (fndef): Remove ambiguous error productions uncovered by grammar
14148         fixing.
14149         (constructor_declarator): Add exception_specification_opt here.
14150         (component_constructor_declarator): Likewise.
14151         (direct_after_type_declarator): Likewise.
14152         (complex_direct_notype_declarator): Likewise.
14153         (direct_abstract_declarator): Likewise.
14154         (fn.def1): Remove exception_specification_opt.
14155         (fn.def2): Likewise.
14156         (condition): Likewise.
14157         (initdcl0): Likewise.
14158         (initdcl): Likewise.
14159         (notype_initdcl0): Likewise.
14160         (nomods_initdcl0): Likewise.
14161         (component_decl_1): Likewise.
14162         (component_declarator): Likewise.
14163         (after_type_component_declarator0): Likewise.
14164         (after_type_component_declarator): Likewise.
14165         (notype_component_declarator): Likewise.
14166
14167 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
14168
14169         * call.c (build_over_call): Also use an INIT_EXPR when
14170         initializing anything from an rvalue.
14171
14172         * call.c (build_over_call): Call stabilize_reference when building
14173         an INIT_EXPR instead of calling the copy ctor.
14174
14175         * call.c (joust): Extend the previous change to all comparisons.
14176
14177         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
14178         NO_LINKAGE_HEURISTICS.
14179
14180         * decl2.c (finish_file): Emit any statics that weren't already.
14181
14182         * typeck.c (build_static_cast): Implement.
14183         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
14184         * decl.c (grokparms): Use can_convert_arg instead of
14185         implicit_conversion directly.
14186         (copy_args_p): New fn.
14187         * cvt.c (convert_to_reference): Don't complain about temp with
14188         static_cast.
14189         (build_up_reference): Handle TARGET_EXPRs.
14190         * call.c (build_over_call): Elide unnecessary temps.
14191         (can_convert*): Use new overloading code.
14192
14193 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
14194
14195         * call.c: Move TYPE_PTR*_MACROS ...
14196         * cp-tree.h: To here.
14197         * typeck.c (build_reinterpret_cast): Implement.
14198
14199         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
14200         ptr_complete_ob.
14201         (joust): If we're comparing a function to a builtin and the worst
14202         conversion for the builtin is worse than the worst conversion for the
14203         function, take the function.
14204
14205         * typeck.c (build_const_cast): Implement.
14206         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
14207         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
14208
14209 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
14210
14211         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
14212         too early.  Make sure we explode if exprtype turns out to be a
14213         NULL_TREE when it shouldn't be.
14214
14215 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
14216
14217         * cp-tree.h: New routine make_call_declarator.
14218         * lex.c (make_call_declarator): Define it.
14219         * except.c (init_exception_processing): Use it.
14220         (expand_builtin_throw): Likewise.
14221         (start_anon_func): Likewise.
14222         * decl2.c (finish_file): Likewise.
14223         * lex.c (cons_up_default_function): Likewise.
14224         * parse.y: Likewise.
14225         * pt.c (tsubst): Likewise.
14226
14227 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
14228
14229         * decl2.c (groktypefield): Remove unused code.
14230
14231 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
14232
14233         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
14234         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
14235         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
14236         nonempty_cv_qualifiers.
14237         * hash.h: Rebuild.
14238
14239         * lex.c (make_pointer_declarator): Change type_quals into
14240         cv_qualifiers.
14241         (make_reference_declarator): Likewise.
14242
14243 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14244
14245         * decl.c (start_function): Only check interface_* for templates
14246         with flag_alt_external_templates.
14247
14248         * call.c (build_new_op): Check for comparison of different enum types.
14249         (build_over_call): Fix arg # output.
14250
14251         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
14252
14253 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
14254
14255         * call.c (build_new_op): Check for erroneous args.
14256
14257         * call.c (build_new_method_call): Add missing args to cp_error.
14258
14259         * tree.c (error_type): Don't print reference-to-array.
14260
14261         * typeck.c (convert_for_assignment): Don't say contravariance for
14262         removing const.
14263
14264 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
14265
14266         * call.c (build_over_call): Diagnose bad convs for `this'.
14267
14268         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
14269         on _ctor_arg.
14270
14271         * call.c (convert_like): Handle bad convs.
14272         (build_over_call): Handle bad convs better.
14273
14274         * decl2.c: -fansi-overloading is now the default.
14275
14276         * call.c (build_new_method_call): Check for erroneous args.
14277
14278         * pt.c (instantiate_class_template): Propagate
14279         TYPE_USES_MULTIPLE_INHERITANCE.
14280
14281 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
14282
14283         * call.c (enforce_access): Add static to routine.
14284
14285 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
14286
14287         * call.c (build_user_type_conversion_1): Fix bad handling.
14288         (compare_ics): Likewise.
14289
14290 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
14291
14292         * call.c (standard_conversion): Oops.
14293
14294 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
14295
14296         * g++.c: Update test for win32 (&& ! cygwin32).
14297
14298 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
14299
14300         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
14301         (ptr_reasonably_similar): New fn.
14302         * call.c (BAD_RANK): New rank.
14303         (ICS_BAD_FLAG): New macro.
14304         (standard_conversion): Handle almost-right pointer conversions.
14305         (reference_binding): Handle bad rvalue bindings.
14306         (add_*_candidate): Stuff.
14307         (build_over_call): Pass bad conversions to convert_for_initialization.
14308         (compare_ics): Handle bad convs.
14309         (joust): Likewise.
14310
14311 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
14312
14313         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
14314         integer_type_node when computing pointer offsets.
14315
14316 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
14317
14318         * tree.c (lvalue_type): New fn.
14319         (error_type): New fn.
14320         * call.c (op_error): Use error_type.
14321         (add_conv_candidate): Use lvalue_type.
14322         (add_builtin_candidates): Likewise.
14323         * error.c (args_as_string): Use error_type.
14324
14325 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
14326
14327         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
14328         (tsubst): Not here.
14329
14330         * decl.c (init_decl_processing): With -ansi, __null's type is the
14331         signed integral type with the same number of bits as a pointer.
14332         Introduce a new variable null_node for it.
14333         * cp-tree.h: Adjust.
14334         * call.c (null_ptr_cst_p): Adjust.
14335
14336 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
14337
14338         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
14339         optimize.
14340
14341 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
14342
14343         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
14344         fns of classes without virtual functions.
14345
14346         * call.c (add_function_candidate): Handle `this' specially.
14347         (compare_ics): Likewise.
14348
14349 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
14350
14351         * typeck.c (build_conditional_expr): Fix handling of __null.
14352
14353         * decl2.c (comdat_linkage): New fn.
14354         (import_export_vtable): Use it.
14355         (import_export_decl): Use it.
14356         * method.c (make_thunk): Use it.
14357
14358 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
14359
14360         * pt.c (end_template_decl): If we don't actually have parms, return.
14361         * parse.y (template_header): Accept 'template <>'.
14362
14363         * errfn.c: Allow 5 args.
14364
14365 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
14366
14367         * tree.c (make_temp_vec): New fn.
14368         * pt.c (push_template_decl): Handle partial specs.
14369         (instantiate_class_template): Likewise.
14370         (more_specialized): Use get_bindings.
14371         (more_specialized_class): New fn.
14372         (get_class_bindings): New fn.
14373         (most_specialized_class): New fn.
14374         (do_function_instantiation): List candidates for ambiguous case.
14375         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
14376         (shadow_tag): Call push_template_decl for partial specializations.
14377         * parse.y: Likewise.
14378         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
14379         DECL_TEMPLATE_MEMBERS.
14380         * call.c (print_z_candidates): Reduce duplication.
14381
14382 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
14383
14384         * decl2.c (lang_decode_option): Allow -fansi-overloading.
14385
14386 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
14387
14388         * pt.c (get_bindings): New fn.
14389         (most_specialized): Likewise.
14390         (do_function_instantiation): Use them.
14391         (add_maybe_template): New fn.
14392         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
14393         * call.c (build_new_op): Handle guiding decls.
14394         (build_new_function_call): Likewise.
14395         * decl2.c (finish_file): Likewise.
14396
14397         * decl2.c (mark_used): Do synthesis here.
14398         * call.c (build_method_call): Not here.
14399         (build_over_call): Or here.
14400         * typeck.c (build_function_call_real): Or here.
14401         * tree.c (bot_manip): Call mark_used on functions used in default
14402         args.
14403
14404 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14405
14406         * decl2.c (import_export_vtable): Delete code that disabled vtable
14407         heuristic on systems with ASM_OUTPUT_EXTERNAL.
14408
14409 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
14410
14411         * typeck.c (build_x_function_call): Handle static call context
14412         better.
14413
14414         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
14415         the function, not its outer block.
14416
14417         * call.c (build_field_call): Pass fields on to build_opfncall
14418         regardless of TYPE_OVERLOADS_CALL_EXPR.
14419         (build_method_call): Pass on to build_new_method_call sooner.
14420
14421         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
14422         gives us.
14423         * class.c (instantiate_type): Don't put a POINTER_TYPE to
14424         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
14425         modifying it.
14426
14427 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
14428
14429         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
14430         (add_builtin_candidate): Don't take enums for ++.
14431         (build_new_method_call): Handle non-aggregates and field calls.
14432         Move new overloading code from...
14433         * cvt.c: Here.
14434
14435         * decl.c (grokparms): Don't check default args in templates.
14436
14437 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
14438
14439         * cvt.c (build_new_op): Fix args to build_unary_op.
14440         (add_builtin_candidates): Don't call type_promotes_to on float.
14441
14442         * decl.c (grokparms): Check the type of the default arg.
14443
14444         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
14445         returning NULL_TREE.
14446
14447         * typeck.c (build_x_binary_op): Avoid doing extra work.
14448         (build_x_unary_op): Likewise.
14449         (build_x_conditional_expr): Likewise.
14450         * cvt.c (build_over_call): Return.
14451         (add_builtin_candidate): Fix MEMBER_REF.
14452         (build_new_op): Likewise.
14453
14454 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
14455
14456         * method.c (build_overload_name): Put bug fix into code but leave
14457         disabled for now so we can be bug compatible with older releases
14458         that do repeats incorrectly.  In the future, we can enable it.
14459
14460 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14461
14462         * cvt.c (convert_like): Don't call build_cplus_new twice.
14463
14464         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
14465         Control new overloading code with -fansi-overloading.
14466
14467 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
14468
14469         * cvt.c (build_over_call): Call build_cplus_new.
14470         * call.c (build_method_call): Likewise.
14471         * typeck.c (build_function_call_real): Likewise.
14472         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
14473         the COND_EXPR in a TARGET_EXPR so they use the same slot.
14474
14475         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
14476         recursive calls.
14477         * typeck.c (complete_type): Propagate
14478         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
14479
14480 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
14481
14482         * cvt.c (joust): More ?: kludging.  Sigh.
14483         (build_over_call): Don't try to synthesize global fns.
14484
14485         * search.c (lookup_conversions): Use binfo marking.
14486
14487 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
14488
14489         * search.c (build_mi_matrix): Use the correct value of cid
14490         when determining the new mi_size.
14491
14492 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
14493
14494         * cvt.c (add_builtin_candidates): Do consider type conversion ops
14495         for the first parms of += et al.
14496         (strip_top_quals): New fn.
14497         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
14498         (implicit_conversion): Likewise.
14499         (add_builtin_candidates): Be careful about arrays.
14500         (build_new_method_call): Handle vtable optimization.
14501
14502 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
14503
14504         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
14505         * cvt.c (reference_binding): Use it.
14506         (implicit_conversion): Use it.
14507         (add_builtin_candidate, COND_EXPR): Use it.
14508
14509         * cvt.c (build_new_function_call): Check for error args.
14510
14511         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
14512
14513         * gxx.gperf: Add __null.
14514         * hash.h: Regenerate.
14515         * lex.h: Add RID_NULL.
14516         * lex.c (init_lex): Create null_pointer_node here, stick it in
14517         RID_NULL.
14518         * decl.c (init_decl_processing): Still set its type here.
14519         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
14520         (convert_to_pointer_force): Likewise.
14521         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
14522         if (! pedantic).
14523         * call.c (convert_harshness): Use null_ptr_cst_p.
14524         * typeck.c (convert_for_assignment): Likewise.  Don't produce
14525         null_pointer_node.
14526
14527         * error.c (args_as_string): Handle lists of actual args, too.
14528         * cvt.c (null_ptr_cst): Support (void*)0 for now.
14529         (build_user_type_conversion_1): Improve diagnostics.
14530         (build_new_function_call): Likewise.
14531         (build_object_call): Likewise.
14532         (build_new_method_call): Likewise.  Move call before def diagnostic...
14533         (build_over_call): Here.
14534
14535         * cvt.c (build_new_method_call): Don't complain about no match if
14536         LOOKUP_SPECULATIVELY.
14537         (build_over_call): Fix 'this' for virtual fn.
14538         (build_new_method_call): Add diagnostic.
14539
14540 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
14541
14542         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
14543         constructors to be passed in.
14544         (build_over_call): Likewise.
14545         (build_user_type_conversion_1): Pass them in.
14546         (convert_like): Likewise.
14547         (build_object_call): Handle overloaded conversions.
14548         (build_over_call): Pass the right args to build_vfn_ref.
14549         (standard_conversion): Fix pmf convs.
14550         (joust): Handle comparing statics and non-statics.
14551         (build_new_method_call): New fn.
14552         * call.c (build_method_call): Call it if NEW_OVER.
14553
14554 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
14555
14556         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
14557         %D instead.
14558
14559 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
14560
14561         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
14562         instead of just maybe_build_cleanup so that we deallocate the
14563         thrown object.
14564
14565 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14566
14567         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
14568         * cp-tree.h (finish_prevtable_vardecl): Add decl.
14569
14570 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
14571
14572         * pt.c (instantiate_class_template): Call complete_type.  Also, if
14573         we're at the end of the file and we just instantiated a template
14574         class with a vtable, call finish_prevtable_vardecl.
14575
14576         * error.c (dump_decl): Don't explode (or explode more gracefully
14577         as appropriate) if the object being dumped has a null type.
14578         (dump_expr): Likewise.
14579
14580         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
14581         by counting the number of nodes that we'll need before allocating
14582         the array.
14583         (lookup_fnfields): Fix comment.
14584         (breadth_first_search): Fix comment.
14585
14586 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
14587
14588         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
14589         TYPE_ALIGN.
14590         * class.c (finish_struct): Call cplus_decl_attributes here.
14591         (finish_struct_1): Not here.
14592         * cp-tree.h: Adjust.
14593
14594         * pt.c (type_unification): New parameter STRICT.
14595         (unify): If STRICT, don't allow cv addition or base deduction.
14596         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
14597
14598 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
14599
14600         * search.c (get_template_base{_recursive}): New fns.
14601         * pt.c (more_specialized): New fn.
14602         (do_function_instantiation): Use it.
14603         (unify): Handle base deduction.
14604         * cvt.c (joust): Use more_specialized.
14605         Don't arbitrarily choose between non-builtin candidates.
14606         (build_over_call): Call require_complete_type.
14607
14608         * decl.c (start_function): Statics are static even in a #pragma
14609         interface file.
14610
14611         * decl2.c (import_export_vtable): Disable vtable heuristic on
14612         systems with ASM_OUTPUT_EXTERNAL.
14613
14614         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
14615         (standard_conversion): No std conv to enum type.
14616
14617         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
14618         for ptm's.
14619
14620         * cvt.c (reference_binding): Bind directly to a base subobject of
14621         a class rvalue.
14622
14623         * cvt.c (build_new_op): Enforce access control.
14624
14625 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
14626
14627         * typeck2.c (process_init_constructor): When scanning the
14628         union for a named field, skip things that aren't FIELD_DECLs.
14629
14630         * method.c (synthesize_method): Don't scan fndecl's rtl if
14631         we're at the end of the file; just assume the function can't
14632         be inlined.
14633
14634 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
14635
14636         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
14637         it failed.
14638
14639         * cvt.c (build_user_type_conversion_1): Handle overloaded
14640         conversion ops.
14641
14642         * cvt.c (add_builtin_candidates): Don't consider type conversion
14643         operators for the first parameter of operator=.
14644
14645 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
14646
14647         * typeck.c (complete_type): Only call layout_type if we're not
14648         expanding a template.
14649
14650 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
14651
14652         * cvt.c (compare_ics): Oops.
14653
14654         * cvt.c (op_error): Oops.
14655
14656         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
14657         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
14658         (build_conv): Use them.
14659         (implicit_conversion): Use them.
14660         (convert_like): Handle them.
14661         (build_new_op): Handle builtin COND_EXPR again.
14662         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
14663         in lists of types for COND_EXPR.
14664         (add_builtin_candidate): Add enum candidates for COND_EXPR.
14665
14666 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
14667
14668         * typeck.c (build_modify_expr): Always attempt to build a call to
14669         the assignment operator, even if we're using a default one.
14670         (convert_for_initialization): Call complete_type.
14671
14672 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
14673
14674         * cvt.c (reference_binding): A REF_BIND gets the reference type.
14675         (implicit_conversion): Likewise.
14676         (convert_like): Likewise.
14677         (compare_ics): Likewise.
14678         (compare_qual): Likewise.
14679         (print_z_candidates): Handle no candidates.
14680         (build_new_op): Don't handle builtin COND_EXPR for now.
14681
14682 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
14683
14684         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
14685
14686 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14687
14688         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
14689
14690         * cvt.c (build_builtin_candidate): Oops.
14691         (build_new_op): Oops.
14692
14693         * method.c (build_opfncall): Pass COND_EXPR on.
14694         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
14695         (add_builtin_candidate{,s}): Likewise.
14696         (add_builtin_candidates): Likewise.
14697         (print_z_candidates, op_error, build_new_op): Likewise.
14698         (type_decays_to): New fn.
14699         * lex.c (init_lex): Just say ?: for COND_EXPR.
14700
14701 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
14702
14703         * typeck.c (complete_type): Call layout_type rather than building
14704         a new array type.
14705
14706         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
14707         only use ptrdiff_t.
14708
14709 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
14710
14711         * cvt.c: Always compile the new overloading code (but don't use it).
14712         (implicit_conversion): Add a BASE_CONV when converting to
14713         the same class type.
14714         (convert_like): Handle BASE_CONV.
14715
14716 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
14717
14718         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
14719         (add_builtin_candidate): Likewise.
14720
14721         NEW_OVER changes:
14722         * typeck.c (build_x_function_call): Try an operator function
14723         whenever we call an object of class type.
14724         * method.c (build_opfncall): Pass CALL_EXPRs through.
14725         * cvt.c (implicit_conversion): Do const-ref case first.
14726         (add_conv_candidate, build_object_call, op_error): New fns.
14727         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
14728         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
14729         builtin candidates.
14730         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
14731         Fall back on preincrement handling.  Use op_error.
14732         Handle warn_synth.
14733         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
14734         an error_mark_node.
14735         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
14736         properly.
14737
14738 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
14739
14740         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
14741
14742 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
14743
14744         * typeck.c (build_component_ref_1): Use build_component_ref
14745         instead of open coding it here.
14746
14747 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
14748
14749         * g++.c (main): Don't link with -lg++.
14750
14751         NEW_OVER changes:
14752         * cvt.c (convert_to_reference): Don't use convert_from_reference on
14753         result of build_type_conversion.
14754         (cp_convert): Only call build_method_call for ctors if
14755         build_type_conversion failed.
14756         (ptr_complete_ob): New function.
14757         (TYPE_PTR{,OB,MEM}_P): New macros.
14758         ({add,build}_builtin_candidate{,s}): New functions.
14759         (print_z_candidates): Handle builtins.
14760         (build_user_type_conversion_1): Don't use conversion fns for
14761         converting to a base type.
14762         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
14763         (build_user_type_conversion): Use convert_from_reference.
14764         (build_new_op): New function.
14765         (build_over_call): Fix handling of methods.
14766         (compare_ics): Handle AMBIG_CONV properly.
14767         * typeck2.c: Increment abort count.
14768         * method.c (build_opfncall): Forward most requests to build_new_op.
14769         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
14770
14771 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14772
14773         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
14774         invalid second argument to dump_expr_list.
14775
14776 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
14777
14778         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
14779
14780 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
14781
14782         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
14783         ASSEMBLE_EXTERNAL.
14784
14785 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
14786
14787         * typeck2.c (process_init_constructor): New pedwarn for using { }
14788         to initialize a pointer to member function.
14789         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
14790         we can avoid the new error.
14791
14792 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
14793
14794         * typeck.c (build_ptrmemfunc1): New function to hide details of
14795         pointer to member functions better.
14796
14797 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
14798
14799         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
14800         methods into the actual method, as we know the implied object is
14801         not used.
14802
14803 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14804
14805         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
14806         inside a system header.
14807
14808 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
14809
14810         * call.c (build_method_call): Call complete_type on the
14811         instance type.
14812
14813 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
14814
14815         * typeck.c (build_component_ref): Always build up an OFFSET_REF
14816         for obj_ptr->func so that we can know which object to use in a
14817         method call.
14818
14819 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
14820
14821         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
14822         around things.  Also improve maintainability.
14823
14824 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
14825
14826         * decl.c (grokdeclarator): Check for overflow when evaluating an
14827         array dimension.
14828
14829 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
14830
14831         * cvt.c (cp_convert): Don't check for ambiguity with constructor
14832         if NEW_OVER.
14833
14834         * typeck.c (build_x_function_call): Pass function overload
14835         questions to new overloading code if NEW_OVER.
14836         * init.c (expand_aggr_init_1): Only check for type conversion ops
14837         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
14838         Don't check for ambiguity with constructor if NEW_OVER.
14839         * cvt.c (convert_to_reference): Dereference the result of a type
14840         conversion operator.
14841         (build_conv): Propagate ICS_USER_FLAG.
14842         (implicit_conversion): Call instantiate_type.
14843         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
14844         (add_function_candidate): Fix cv-quals on argtype.
14845         (print_z_candidates): New function.
14846         (build_new_function_call): Call it.
14847         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
14848         consider non-converting constructors.
14849         Call print_z_candidates.
14850         Return an AMBIG_CONV for an ambiguous conversion.
14851         (build_user_type_conversion): Handle AMBIG_CONV.
14852         (convert_like): Fix test for building TARGET_EXPR.
14853         Call instantiate_type.
14854         Handle AMBIG_CONV and LVALUE_CONV.
14855         (build_over_call): Handle 0 args and ellipsis.
14856         * cp-tree.def: Add AMBIG_CONV.
14857
14858 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
14859
14860         * decl.c (lookup_name_real): If we find mem in obj when parsing
14861         `obj->mem', make sure we return the right value.
14862
14863 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
14864
14865         * search.c (get_base_distance): Call complete_type.
14866
14867 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
14868
14869         * decl.c (store_bindings): Make static.
14870
14871 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
14872
14873         * init.c (expand_aggr_init_1): Don't check type conversions if
14874         NEW_OVER.
14875
14876         * cvt.c (z_candidate): Put back template field.
14877         (add_function_candidate): Set it.
14878         (add_template_candidate): Likewise.
14879         (joust): Use it.
14880         (compare_qual): Handle references and pointers to members.
14881         (compare_ics): Handle reference bindings.
14882
14883         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
14884
14885 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
14886
14887         * call.c (compute_conversion_costs): Call complete_type.
14888
14889         * tree.c (vec_binfo_member): Use comptypes instead of comparing
14890         pointers, so we can handle template parameters.
14891
14892 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
14893
14894         * cvt.c (cp_convert_to_pointer): We have to call complete_type
14895         here; let's make it explicit instead of a side effect of an
14896         error check.
14897
14898 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
14899
14900         * cvt.c (z_candidate): Remove template field.
14901         (reference_binding): Handle binding to temporary.
14902         (implicit_conversion): Likewise.
14903         (add_function_candidate): Handle artificial constructor parms.
14904         Handle functions with too few parms.
14905         (add_template_candidate): New function.
14906         (build_user_type_conversion_1): Handle constructors.
14907         (convert_like): Likewise.
14908         (build_over_call): Likewise.
14909         (build_new_function_call): Support templates.
14910         (compare_ics): Fix reference, inheritance handling.
14911
14912 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
14913
14914         * decl.c: Add signed_size_zero_node.
14915         (init_decl_processing): Build it.
14916         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
14917         when we're trying to make a negative delta.
14918
14919 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14920
14921         Stop doing this damn index==strchr variable name confusion.
14922         * class.c (add_virtual_function): Change local var INDEX to be
14923         named IDX.
14924         (add_method): Likewise.
14925         * lex.c (print_parse_statistics): Likewise.
14926         * search.c (make_memoized_table_entry): Likewise.
14927         (lookup_fnfields_here): Likewise.
14928         (lookup_field): Likewise.
14929         (lookup_fnfields): Likewise.
14930         (get_baselinks): Likewise.
14931         * sig.c (build_signature_table_constructor): Likewise.
14932         (build_signature_method_call): Likewise.
14933         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
14934         (get_member_function_from_ptrfunc): Likewise.
14935         (build_ptrmemfunc): Change local var INDEX to be IDX.
14936         (c_expand_start_case): Likewise.
14937
14938 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
14939
14940         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
14941         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
14942         (convert_to_reference): Use build_type_conversion to convert to
14943         the reference type directly.
14944         (standard_conversion): Fix void* case, non-conversions.
14945         (reference_binding): Fix expr == 0 case, non-conversions.
14946         (convert_like): Support REF_BIND.
14947         (compare_qual): Split out from compare_ics.
14948         (compare_ics): Use it, handle icses with only a qual_conv.
14949
14950         * init.c (expand_vec_init): Don't crash if decl is NULL.
14951
14952 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
14953
14954         * mpw-config.in: New file, configury for Mac MPW.
14955         * mpw-make.sed: New file, makefile editing for MPW.
14956
14957 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
14958
14959         * pt.c (instantiate_class_template): Call repo_template_used.
14960
14961         * search.c (lookup_conversions): Only lookup conversions in
14962         complete types.
14963
14964 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14965
14966         * cp-tree.def: Renamed from tree.def, to avoid confusion with
14967         gcc's tree.def.
14968         * cp-tree.h, lex.c: Include cp-tree.def.
14969         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
14970
14971 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
14972
14973         * init.c (build_vec_delete_1): Call complete_type.
14974
14975 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
14976
14977         * except.c (start_anon_func): Make sure anonymous functions are
14978         never external.
14979
14980 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
14981
14982         * decl.c (finish_function): If function_depth > 1, set nested.
14983
14984         * decl2.c (grokbitfield): Revert Bob's change.
14985         * class.c (finish_struct_1): Fix handling of named bitfield widths.
14986
14987 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
14988
14989         * pt.c (add_pending_template): Handle types.
14990         (lookup_template_class): With -fexternal-templates, just add the class
14991         to pending_templates instead of instantiating it now.
14992         * decl2.c (finish_file): Handle types in pending_templates.
14993
14994 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
14995
14996         * decl2.c (grokbitfield): Handle constant decls appropriately.
14997         Give an appropriate error message now instead of spewing core
14998         later.
14999
15000 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
15001
15002         * decl2.c: Don't turn on thunks by default for now.
15003
15004 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
15005
15006         * typeck.c (complete_type): Handle error_mark_node.
15007         (common_type, OFFSET_TYPE): Handle template_type_parms.
15008
15009 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
15010
15011         * pt.c (instantiate_decl): If at_eof, call import_export_decl
15012         regardless of DECL_INLINE.
15013
15014         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
15015
15016         * class.c (finish_struct_bits): Copy TYPE_SIZE.
15017
15018         * rtti.c (build_dynamic_cast): Support templates.
15019         * tree.def: Support DYNAMIC_CAST_EXPR.
15020         * pt.c (tsubst_copy): Likewise.
15021         * decl2.c (build_expr_from_tree): Likewise.
15022
15023 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
15024
15025         * typeck.c (build_static_cast): Support templates.
15026         (build_const_cast): Likewise.
15027         * tree.def: Support CONST/STATIC_CAST_EXPR.
15028         * pt.c (tsubst_copy): Likewise.
15029         * decl2.c (build_expr_from_tree): Likewise.
15030
15031 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
15032
15033         * decl2.c (finish_vtable_vardecl): Don't trust
15034         TREE_SYMBOL_REFERENCED for vtables of local classes.
15035
15036 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
15037
15038         * pt.c (tsubst_copy): Handle operator T.
15039
15040 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15041
15042         * init.c (build_delete): Move creation of PARMS inside test of
15043         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
15044
15045 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
15046
15047         * typeck.c (build_conditional_expr): Don't assume that
15048         the arguments to ?: are always pointers or records.
15049
15050 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
15051
15052         * decl2.c (import_export_decl): Still emit static/weak/comdat
15053         copies of inline template functions with -fno-implicit-templates.
15054
15055 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
15056
15057         * init.c (build_delete): Determine the complete basetype
15058         path to the destructor we're calling.
15059
15060 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
15061
15062         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
15063         initialize the enum, because we really and truly don't know where
15064         it came from.
15065         (start_enum): Don't copy integer_zero_node because
15066         build_enumerator will do it.
15067
15068 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15069
15070         * decl.c (finish_function): Do access control on base destructors.
15071
15072         * pt.c (tsubst, case FUNCTION_DECL): Set up
15073         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
15074         hose us.
15075
15076 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
15077
15078         * cvt.c (build_up_reference): If we have already extended the
15079         lifetime of the temporary, don't try it again.
15080         * typeck.c (c_expand_return): Don't try and convert the return
15081         value twice when we want a reference, once is enough.
15082
15083 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
15084
15085         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
15086         LOOKUP_ONLYCONVERTING at all for now.
15087
15088         * search.c (add_conversions): Put the conversion function in
15089         TREE_VALUE, the basetype in TREE_PURPOSE.
15090         * cvt.c (build_type_conversion): Adjust.
15091         * cvt.c (build_expr_type_conversion): Adjust.
15092         * call.c (user_harshness): Adjust.
15093
15094 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
15095
15096         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
15097         backend's benefit.
15098
15099 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
15100
15101         * except.c (expand_start_catch_block): Add a dummy region, if we
15102         get an error, so that we can avoid core dumping later.
15103
15104 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
15105
15106         * cp-tree.h (OFFSET_REF): Remove.
15107         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
15108         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
15109         * init.c (expand_aggr_init_1): Likewise.
15110         (build_new): Likewise.
15111         * typeck.c (expand_target_expr): Likewise.
15112
15113 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15114
15115         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
15116         TARGET_EXPR.
15117
15118 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
15119
15120         * cvt.c (build_up_reference): Redo how and when temporaries are
15121         created.
15122         * decl.c (grok_reference_init): Don't try and be smart about
15123         running cleanups.
15124
15125 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
15126
15127         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
15128         (TARGET_EXPR...), now that it has 4 arguments.
15129         * tree.c (build_cplus_new): Likewise.
15130
15131 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15132
15133         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
15134
15135         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
15136         * decl.c (struct saved_scope): Remove named_labels,
15137         {base,member}_init_list.
15138         (maybe_push_to_top_level): Don't set them.  Call
15139         push_cp_function_context if appropriate.
15140         (pop_from_top_level): Likewise.
15141
15142         * method.c (do_build_assign_ref): Remove obsolete check of
15143         TYPE_HAS_ASSIGN_REF (basetype).
15144
15145         * decl.c (grokfndecl): Diagnose user definition of
15146         implicitly-declared methods.
15147
15148 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
15149
15150         * method.c (do_build_copy_constructor): Add code to give
15151         meaningful error messages instead of crashing.
15152         (do_build_assign_ref): Don't synthesize assignment operators for
15153         classes containing reference or const members.
15154
15155         * class.c (struct base_info): Remove cant_synth_copy_ctor
15156         and cant_synth_asn_ref.
15157         (finish_base_struct): Remove the code that tries to conditionalize
15158         synthesis of copy constructors & assignment operators based on
15159         access permissions.  Instead, let it fail when it tries to
15160         synthesize the copy constructor.  This will give meaningful error
15161         messages instead of silently generating code to perform a bitcopy.
15162
15163 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
15164
15165         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
15166         determining types for constant values.
15167
15168         * decl.c (struct named_label_list): Use instead of stuffing
15169         random items into a TREE_LIST node.
15170         (named_label_uses): Use the new struct.
15171         (poplevel): Likewise.
15172         (lookup_label): Likewise.
15173         (define_label): Add an error message to tell the user the line
15174         where the goto is located in addition to the destination of the
15175         goto.
15176         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
15177         named_label_uses.
15178         (finish_function): Likewise.
15179
15180         (start_decl): Complain about defining a static data member
15181         in a different type from which it was declared.
15182
15183 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
15184
15185         * cvt.c (build_expr_type_conversion): Adjust.
15186
15187 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
15188
15189         * call.c (build_method_call): Always convert 'this' to the
15190         appropriate type.
15191
15192         * search.c (add_conversions): Put the conversion function in
15193         TREE_VALUE, the type in TREE_PURPOSE.
15194         * cvt.c (build_type_conversion): Adjust.
15195         * call.c (user_harshness): Adjust.
15196
15197         * method.c (emit_thunk): Call temporary_allocation and
15198         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
15199
15200         * tree.c (build_cplus_array_type): Handle tweaking of
15201         TYPE_MAIN_VARIANT here.
15202         * typeck.c (common_type): Not here.
15203
15204         * typeck.c (complete_type): Only try to complete an array type if
15205         it has a domain.
15206
15207 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
15208
15209         * decl.c (grokvardecl): Call complete_type.
15210         (grokdeclarator): Call complete_type for PARM_DECLs.
15211
15212 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15213
15214         * pt.c (instantiate_class_template): Re-set
15215         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
15216
15217 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
15218
15219         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
15220         smart enough to do it right.
15221         * tree.c (cp_expand_decl_cleanup): Likewise.
15222         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
15223         cp_expand_decl_cleanup.
15224         (store_parm_decls): Likewise.
15225         (hack_incomplete_structures): Likewise.
15226         * except.c (push_eh_cleanup): Likewise.
15227
15228 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
15229
15230         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
15231         frontend to the backend where it belongs.
15232         * tree.c (unsave_expr): Likewise.
15233         (unsave_expr_now): Likewise.
15234         * tree.def (UNSAVE_EXPR): Likewise.
15235         * cp-tree.h (unsave_expr): Likewise.
15236         (unsave_expr_now): Likewise.
15237
15238 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
15239
15240         * init.c (emit_base_init): Make sure the partial EH cleanups live
15241         on the function_obstack.
15242
15243 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
15244
15245         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
15246         when checking for pointer types.
15247
15248 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
15249
15250         * pt.c (instantiate_class_template): Remove obsolete check for
15251         access declarations.
15252
15253 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
15254
15255         * call.c (build_overload_call): Simplify calls to
15256         build_overload_call by removing last parameter.
15257         (build_method_call): Likewise.
15258         * cp-tree.h: Likewise.
15259         * method.c (build_opfncall): Likewise.
15260         * typeck.c (build_x_function_call): Likewise.
15261
15262 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
15263
15264         * call.c (default_parm_conversions): Factor out common code.
15265         (build_method_call): Use it.
15266         (build_overload_call_real): Use it.
15267
15268 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
15269
15270         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
15271         but pedwarn as the code is bogus.
15272         * typeck.c (decay_conversion): Likewise.
15273         (build_function_call_real): Use build_addr_func instead of
15274         default_conversion.  Don't allow pointer-to-method functions down
15275         here.
15276         (build_unary_op): Use real pointer-to-member functions instead of
15277         fake ones.
15278         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
15279         (convert_for_assignment): Removed some obsolete code.
15280         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
15281         build_x_function_call instead of current_class_ptr.  Only call
15282         digest_init once on an initializer, we do this just checking
15283         TREE_TYPE.
15284         (build_expr_from_tree): Pass current_class_ref to
15285         build_x_function_call instead of current_class_ptr.
15286         * init.c (build_member_call): Likewise.
15287         * pase.y: Likewise.
15288         * error.c (dump_expr): Handle OFFSET_REFs better.
15289         * pt.c (unify): Handle pointer-to-member functions better.
15290         * decl.c (finish_function): Clear out current_class_ref just like
15291         we do for current_class_ptr.
15292
15293         * typeck.c (get_delta_difference): Handle virtual bases better.
15294
15295 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
15296
15297         * sig.c (build_signature_table_constructor): Use the delta for
15298         the original basetype for this virtual function with thunks.
15299         (build_signature_method_call): We still need to adjust 'this'
15300         with thunks.
15301
15302 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
15303
15304         * call.c (build_addr_func): New routine.  Used to get the `real'
15305         address of a function or a method.  Needed to avoid getting a
15306         pointer-to-member function.
15307         (build_call): New routine to build CALL_EXPRs.
15308         (build_method_call): Use it.
15309         * cvt.c (convert_to_aggr): Likewise.
15310         * typeck.c (build_function_call_real): Likewise.
15311         * sig.c (build_signature_table_constructor): Use build_addr_func.
15312         * cp-tree.h (build_call, build_addr_func): Declare them.
15313
15314 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
15315
15316         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
15317         * parse.y: Remove uses of LOOKUP_AGGR.
15318
15319 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
15320
15321         * *.[chy]: Rename current_class_decl to current_class_ptr, and
15322         C_C_D to current_class_ref.
15323
15324 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
15325
15326         * call.c (convert_harshness): Tighten up pointer conversions.
15327
15328 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
15329
15330         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
15331         (finish_file): Likewise.
15332
15333 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
15334
15335         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
15336
15337         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
15338         code.
15339
15340 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15341
15342         * decl2.c: Turn on thunks by default where supported.
15343
15344 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
15345
15346         * cp-tree.h (build_overload_call_maybe): Removed.
15347         * call.c (build_overload_call_real): Invert meaning of last arg to
15348         be require_complete.
15349         (build_overload_call): Likewise.
15350         * typeck.c (build_x_function_call): Use build_overload_call_real
15351         instead of build_overload_call_maybe.
15352
15353 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
15354
15355         * decl2.c (finish_file): Don't try to emit functions that haven't
15356         been compiled.
15357
15358 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15359
15360         * decl2.c (finish_vtable_vardecl): Oops.
15361
15362         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
15363         Also store the bindings from previous_class_values.
15364         (pop_from_top_level): Restore them.
15365
15366 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15367
15368         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
15369         symbol has been referenced.
15370         (finish_file): Re-join synthesis/vtable loop with inline emission
15371         loop, disable inlining when an inline is output.
15372
15373 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
15374
15375         * except.c (init_exception_processing): Setup saved_in_catch.
15376         (push_eh_cleanup): Reset __eh_in_catch.
15377         (expand_start_catch_block): Set __eh_in_catch.
15378
15379 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
15380
15381         * except.c (push_eh_cleanup): Add tracking for whether or not we
15382         have an active exception object.
15383         (expand_builtin_throw): Use it to make sure a rethrow without an
15384         exception object is caught.
15385
15386 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15387
15388         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
15389         cache.
15390
15391 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
15392
15393         * decl2.c (finish_file): Also use sentries for vars with
15394         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
15395         created).
15396
15397         * lex.c (handle_cp_pragma): Disable #pragma
15398         interface/implementation if SUPPORTS_ONE_ONLY > 1.
15399
15400 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
15401
15402         * method.c (emit_thunk): Wrap default case in
15403         temporary/permanent_allocation.
15404
15405         * method.c (make_thunk): Use DECL_ONE_ONLY.
15406         (emit_thunk): Call assemble_end_function.
15407
15408 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
15409
15410         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
15411         (import_export_decl): Likewise.
15412         (finish_prevtable_vardecl): Disable vtable hack if
15413         SUPPORTS_ONE_ONLY > 1.
15414
15415 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
15416
15417         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
15418         PREDECREMENT_EXPRs take two arguments, not one.
15419
15420 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
15421
15422         * class.c (build_vtable_entry): Don't build thunks for abstract
15423         virtuals.
15424
15425         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
15426         frontend.
15427
15428 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
15429
15430         * class.c (set_rtti_entry): Use size_zero_node.
15431         (build_vtable): Likewise.
15432
15433 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
15434
15435         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
15436         (prepare_fresh_vtable): Likewise.
15437
15438 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
15439
15440         * method.c (emit_thunk): Call mark_used on the target function.
15441
15442         * call.c (build_method_call): Don't warn about pending templates.
15443
15444 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15445
15446         * decl2.c (finish_file): Fix list walking logic.
15447
15448         * typeck2.c (check_for_new_type): Only warn if -pedantic.
15449
15450 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
15451
15452         * class.c (finish_struct_1): Remove old code for
15453         dont_allow_type_definitions.
15454         * cp-tree.h: Likewise.
15455         * spew.c: Make sure cp-tree.h is included before parse.h, so the
15456         definition of flagged_type_tree is found before it is used.
15457         * lex.c: Likewise.
15458         * parse.y: Added the ftype member to the type union, and changed a
15459         number of rules to use it instead of ttype.  Added calls to
15460         check_for_new_type() as appropriate.
15461         * typeck2.c (check_for_new_type): New function for checking
15462         if a newly defined type appears in the specified tree.
15463         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
15464         for check_for_new_type().
15465
15466 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
15467
15468         * decl2.c (finish_file): Only use a sentry if the decl is public.
15469
15470         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
15471         don't pass LOOKUP_ONLYCONVERTING.
15472
15473 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
15474
15475         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
15476         properly keeps track of const and volatile type modifiers.
15477
15478 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
15479
15480         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
15481         * pt.c (comp_template_args): Use it.
15482
15483         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
15484         assemble_external for artificial function decls.
15485
15486         * decl.c (cp_finish_decl): Oops.
15487
15488 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
15489
15490         * decl2.c (import_export_decl): Put static data member templates
15491         into common storage, or make them weak, depending on whether they
15492         are dynamically or statically initialized.
15493         (get_sentry): New function.
15494         (finish_file): Do import_export_decl for static data members before
15495         building the init/fini functions.  Don't init/fini a variable that's
15496         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
15497         push/pop_temp_slots.
15498         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
15499         expand_static_init thang.
15500         * method.c (get_id_2): New function.
15501
15502 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
15503
15504         * parse.y (empty_parms): Make sure we use C++-style prototypes
15505         when we're declaring member functions.
15506
15507 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15508
15509         * Makefile.in (CONFLICTS): 16 s/r conflicts.
15510         * parse.y (self_template_type): New nonterminal.
15511
15512 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
15513
15514         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
15515         name.
15516         * parse.y (base_class.1): Allow 'typename foo::bar'.
15517
15518         * lex.c (check_newline): Remove #pragma code that plays with the
15519         input stream, since we now deal with tokens.  Clear nextchar when
15520         we're done.
15521         (handle_cp_pragma): Use real_yylex.
15522         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
15523         in one place.
15524
15525         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
15526
15527         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
15528
15529 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
15530
15531         * parse.y: New token SELFNAME for potential constructor.
15532         * spew.c (yylex): Handle it.
15533         * lex.c (identifier_type): Produce it.
15534
15535         * parse.y (complete_type_name): In :: case, don't push class binding.
15536         (complex_type_name): Likewise.
15537
15538 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
15539
15540         * typeck.c (build_reinterpret_cast): Handle pointer to member
15541         functions.
15542
15543 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15544
15545         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
15546         pragmas.
15547         (check_newline): Put the vtable/unit/implementation/interface pragma
15548         code into handle_cp_pragma, replacing it with a call.
15549         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
15550         args.  Get the next token after handling the pragma token.
15551
15552 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
15553
15554         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
15555         (convert_to_pointer_force): Likewise.
15556
15557         * init.c (build_new): Fix array new without -fcheck-new.
15558
15559 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
15560
15561         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
15562         tree.c: Lose TYPE_NESTED_NAME.
15563
15564         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
15565         as identifiers.
15566
15567         * tree.def: Add VEC_INIT_EXPR.
15568         * expr.c (cplus_expand_expr): Handle it.
15569         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
15570         the extra file-scope symbol nastiness.
15571
15572 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
15573
15574         * method.c (make_thunk): Thunks are static.
15575         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
15576
15577         * decl2.c (mark_vtable_entries): Emit thunks as needed.
15578         (finish_file): Don't emit them here.
15579
15580 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
15581
15582         * rtti.c (build_dynamic_cast): Handle null pointers.
15583         (ifnonnull): New function.
15584
15585 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
15586
15587         * call.c (build_method_call): Remember the original basetype we
15588         were called with.  Give an error message instead of trying
15589         (incorrectly) to call a non-static member function through a
15590         non-inherited class.
15591
15592         * search.c (expand_upcast_fixups): Mark the new fixup as
15593         DECL_ARTIFICIAL.
15594
15595 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15596
15597         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
15598
15599         * class.c (set_rtti_entry): Fix for thunks.
15600
15601         * decl2.c (import_export_decl): Still emit typeinfo fns for
15602         cv-variants of builtin types.
15603
15604         * rtti.c (expand_class_desc): Set up base_info_type_node here.
15605         (init_rtti_processing): Instead of here.
15606
15607 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15608
15609         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
15610         (build_typeid): Only complain about taking dynamic typeid without
15611         -frtti.
15612
15613         * decl2.c: flag_rtti defaults to 1.
15614
15615         * rtti.c (get_tinfo_var): The general class case is now smaller.
15616         (init_rtti_processing): Pack the latter three fields of base_info
15617         into 32 bits.
15618
15619 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
15620
15621         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
15622
15623 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
15624
15625         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
15626         (push_memoized_context): Split out code to undefer pop_type_level to
15627         (clear_memoized_cache): here.
15628         (pop_memoized_context): We can only handle one layer of deferral of
15629         pop_type_level so clear the cache, if there was a previous level.
15630
15631 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15632
15633         * rtti.c (init_rtti_processing): Build up base_info_type_node.
15634         (expand_class_desc): Use one pointer to an array of base_info
15635         structs, passed using a CONSTRUCTOR.
15636
15637 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
15638
15639         * class.c (build_vbase_path): Remove block extern for
15640         flag_assume_nonnull_objects here.
15641         (build_vfn_ref): Split out functionality into build_vtbl_ref.
15642         (build_vtbl_ref): New routine.
15643         (build_vtable): Set up rtti info here.
15644         (add_virtual_function): Note in CLASSTYPE_RTTI the best
15645         place where we can get the rtti pointers from to avoid having to
15646         search around for a place.
15647         (finish_base_struct): Likewise.
15648         (finish_struct_1): Likewise.  Never create totally new vtables
15649         with totally new vtable pointers for rtti.  Disable code to layout
15650         vtable pointers better until we want to break binary
15651         compatibility.
15652         * rtti.c (build_headof_sub): New routine to convert down to a
15653         sub-object that has an rtti pointer in the vtable.
15654         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
15655         maintainable.
15656         (build_dynamic_cast): Make sure we have saved it, if we need to.
15657         * search.c (dfs_init_vbase_pointers): Disable code that deals with
15658         a more efficient vtable layout, enable later.
15659         * call.c (flag_assume_nonnull_objects): Moved declaration to
15660         * cp-tree.h: here.  Declare build_vtbl_ref.
15661         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
15662         function calls that want a tree.
15663
15664 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15665
15666         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
15667         other X subobjects in the most derived type.  Ack.
15668
15669         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
15670         get_typeid will do it for us.
15671         (get_typeid_1): Break out call-building for expand_*_desc to use.
15672         (get_typeid): Call it.
15673         (expand_*_desc): Likewise.
15674         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
15675         and void *.
15676         (init_decl_processing): Lose builtin_type_tdescs lossage.
15677         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
15678
15679 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
15680
15681         * pt.c (tsubst): When calling set_nested_typename, use
15682         TYPE_NESTED_NAME (current_class_type) instead of
15683         current_class_name.
15684
15685         * decl.c (pushdecl): Likewise.
15686         (pushdecl_class_level): Likewise.
15687         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
15688         set_nested_typename.
15689
15690 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15691
15692         * rtti.c (synthesize_tinfo_fn): Handle arrays.
15693
15694         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
15695
15696 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
15697
15698         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
15699         (init_rtti_processing): Lose bad_cast_type.
15700         (build_dynamic_cast): Use throw_bad_cast.
15701
15702         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
15703
15704         * decl2.c (finish_file): Don't synthesize artificial functions
15705         that are external and not inline.
15706
15707         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
15708
15709         * decl2.c (finish_file): Handle having new inlines added to
15710         saved_inlines by synthesis.
15711
15712         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
15713
15714 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15715
15716         RTTI rewrite to initialize nodes as needed, not require that
15717         users #include <typeinfo>, complete functionality and reduce wasted
15718         space.
15719         * rtti.c (init_rtti_processing): New fn.
15720         (build_typeid): The vtable entry is now a function.
15721         (get_tinfo_var): New fn.
15722         (get_tinfo_fn): Likewise.
15723         (get_typeid): Use it.
15724         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
15725         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
15726         points __rtti_*.
15727         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
15728         (synthesize_tinfo_fn): New fn.
15729         * method.c (build_t_desc_overload): Lose.
15730         (build_overload_with_type): More generic.
15731         * decl.c (init_decl_processing): Call init_rtti_processing.
15732         * class.c (set_rtti_entry): Use get_tinfo_fn.
15733         * decl2.c (mark_vtable_entries): Mark the rtti function.
15734         (finish_prevtable_vardecl): Don't build_t_desc.
15735         (import_export_decl): Handle tinfo functions.
15736         (finish_file): Likewise.
15737         * typeck.c (inline_conversion): New fn.
15738         (build_function_call_real): Use it.
15739         * cp-tree.h: Add decls.
15740
15741         * method.c (hack_identifier): Also convert component_refs from
15742         references.
15743
15744         * lex.c (cons_up_default_function): Use the type, not the name, in
15745         declspecs.
15746
15747         * decl2.c (import_export_vtable): Fix weak vtables.
15748
15749 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
15750
15751         * search.c (get_base_distance_recursive): Fix access checks for
15752         protected bases.
15753
15754 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15755
15756         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
15757         cp-tree.h.
15758         (convert_harshness): Add prototypes wrapped by PROTO.
15759         * decl2.c (grok_function_init): Likewise.
15760         (do_toplevel_using_decl): Change to void return type.
15761         * class.c (build_vtable_entry): Remove decl of make_thunk.
15762         (merge_overrides): Fix order of arg definitions.
15763         (finish_vtbls): Likewise.
15764         (fixup_vtable_deltas): Likewise.
15765         (modify_all_direct_vtables): Likewise.
15766         (modify_all_indirect_vtables): Likewise.
15767         * search.c (get_base_distance_recursive): Likewise.
15768         (get_abstract_virtuals_1): Likewise.
15769         (fixup_virtual_upcast_offsets): Likewise.
15770         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
15771         * init.c (perform_member_init): Fix order of arg definitions.
15772         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
15773         * cp-tree.h (make_thunk): Add decl.
15774         (overload_template_name, push_template_decl): Add decls.
15775         (do_toplevel_using_decl): Change to void return type.
15776         (vec_binfo_member): Add decl.
15777
15778 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15779
15780         * typeck.c (mark_addressable, convert_for_assignment,
15781         convert_for_initialization, pointer_int_sum, pointer_diff,
15782         unary_complex_lvalue): Add prototypes wrapped by PROTO.
15783         (convert_sequence): #if 0 fn decl, since definition also is.
15784
15785 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
15786
15787         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
15788         cast to pointer types for type searching.
15789
15790 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15791
15792         * typeck.c (get_delta_difference): Use cp_error, not error, in the
15793         case where BINFO == 0.
15794
15795 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
15796
15797         * call.c (build_method_call): Fix wording of error messages so
15798         constructors come out right.
15799
15800 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
15801
15802         * decl.c (push_overloaded_decl): Don't warn about hidden
15803         constructors when both the type and the function are declared
15804         in a system header file.
15805
15806 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
15807
15808         * class.c (finish_struct_1): Propagate the TYPE_PACKED
15809         flag for the type to the type's fields.
15810
15811 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15812
15813         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
15814
15815 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
15816
15817         * class.c (base_info, finish_base_struct): Replace
15818         needs_virtual_dtor with base_has_virtual.
15819
15820         (finish_struct_1): Remove the old code that tried to make default
15821         destructors virtual.  Use base_has_virtual when checking if we need
15822         to add a vtable entry for the rtti code.
15823
15824 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
15825
15826         * pt.c (push_template_decl): Complain about template decl with
15827         inappropriate declaration.
15828
15829 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
15830
15831         * typeck.c (build_x_unary_op): Remove bogus check for taking
15832         the address of a member function.
15833
15834 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15835
15836         * parse.y (constructor_declarator): Only push the class if
15837         we are not already in the class.
15838
15839 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
15840
15841         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
15842         Add additional argument to INIT_CUMULATIVE_ARGS.
15843
15844 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
15845
15846         * decl.c (shadow_tag): Fix error about anon union with methods.
15847
15848         * parse.y (self_reference): Only generate a self-reference if this
15849         is a non-template class.
15850         (opt.component_decl_list): Only use it if it was generated.
15851
15852         * parse.y (component_decl_1): Use constructor_declarator.
15853         (fn.def2): Likewise.
15854         (notype_component_declarator0): Likewise.
15855
15856 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
15857
15858         * typeck.c (build_x_unary_op): Add checks for taking the address
15859         of a TARGET_EXPR or of a member function, and give appropriate
15860         warnings.
15861
15862 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15863
15864         * pt.c (process_template_parm): Allow template type parms to be
15865         used as types for template const parms.
15866
15867 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
15868
15869         * init.c (expand_vec_init): Ensure the eh cleanups are on the
15870         function_obstack.
15871
15872 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15873
15874         * decl.c (lookup_name_real): Be even more picky about the
15875         ambiguous lookup warning.
15876         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
15877         * parse.y (constructor_declarator): Rather than here.
15878
15879         * parse.y (constructor_declarator): New nonterminal.
15880         (fn.def1): Use it.
15881         (explicit_instantiation): Likewise.
15882
15883 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
15884
15885         Add implicit declaration of class name at class scope.
15886         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
15887         * parse.y (self_reference): New nonterminal.
15888         (opt.component_decl_list): Use it.
15889         (fn.def1): Add nested_name_specifier type_name cases.
15890         * class.c (build_self_reference): New function.
15891         (finish_struct): Handle access_default later, move self-reference
15892         decl to the end.
15893         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
15894         * cp-tree.h: Adjust.
15895
15896         * pt.c (do_function_instantiation): Separate handling of member
15897         functions and non-member functions properly.
15898
15899 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15900
15901         * pt.c (process_template_parm): Improve error for 'volatile class K'.
15902
15903         * class.c (finish_struct_1): Check the right slot for destructors.
15904
15905         * decl.c (start_enum): Complain about enum templates.
15906
15907 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
15908
15909         * init.c (resolve_offset_ref): Offset pointers to member data by one.
15910         * typeck.c (unary_complex_lvalue): Likewise.
15911
15912 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
15913
15914         * typeck.c (c_expand_return): Check for a returned local
15915         array name, similar to the check for an ADDR_EXPR.
15916
15917 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
15918
15919         * decl.c (cp_finish_decl): Don't build cleanups for static
15920         variables here.
15921
15922 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
15923
15924         * typeck.c (build_modify_expr): Fix error messages to be more
15925         accurate.
15926         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
15927         assignment operators.
15928         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
15929         assignment operators.
15930
15931 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
15932
15933         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
15934         give an error if initialized.  pedwarn about nested type with the
15935         same name as its enclosing class.
15936
15937         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
15938
15939         * typeck.c (require_complete_type): Be sure to instantiate the
15940         MAIN_VARIANT of the type.
15941
15942         * decl2.c (finish_file): Instantiate pending templates before
15943         processing static constructors and destructors.
15944
15945         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
15946         unless at_eof.
15947
15948 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
15949
15950         * decl2.c (delete_sanity): If error_mark_node is passed
15951         in as an expression, quit while we're ahead.
15952
15953         * decl.c (grokdeclarator): Give an error message if `friend'
15954         is combined with any storage class specifiers.
15955
15956 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
15957
15958         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
15959         definition of nonexistent nested type.
15960
15961         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
15962         not to say 'typedef'.
15963
15964 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15965
15966         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
15967         * search.c (dfs_walk, dfs_init_vbase_pointers,
15968         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
15969         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
15970
15971 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
15972
15973         * except.c (build_throw): Support minimal parse.
15974         * pt.c (tsubst_copy): Support THROW_EXPR.
15975         * decl2.c (build_expr_from_tree): Likewise.
15976
15977         * pt.c (mangle_class_name_for_template): Always allocate
15978         scratch_firstobj.
15979
15980 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
15981
15982         * cvt.c (cp_convert_to_pointer): Give an appropriate error
15983         when trying to cast from an incomplete type.
15984
15985 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
15986
15987         * pt.c (instantiate_class_template): Don't bother setting up
15988         CLASSTYPE_TAGS explicitly, as the nested types will add
15989         themselves.
15990
15991 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
15992
15993         * decl.c (shadow_tag): Remove old error check for usage of
15994         an enum without a previous declaration.
15995         (xref_tag): Add error message about usage of enums without a
15996         previous declaration.
15997
15998 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
15999
16000         * lex.c (do_identifier): Only do name consistency check if we're
16001         parsing.
16002
16003         * pt.c (push_template_decl): Don't crash if we get a member defn
16004         that doesn't match.
16005
16006         * decl.c (xref_tag_from_type): New function to do an xref without
16007         always having to figure out code_type_node.
16008         * cp-tree.h: Declare it.
16009         * pt.c (instantiate_class_template): Use it for friend classes.
16010         (lookup_template_class): Use it.
16011
16012         * typeck2.c (build_functional_cast): Pull out a single parm before
16013         passing it to build_c_cast.
16014
16015 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
16016
16017         * expr.c (do_case): Give an error message if a pointer is
16018         given as a case value.
16019
16020 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16021
16022         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
16023         an overload list.
16024
16025         * lex.c (cons_up_default_function): Really, now, interface hackery
16026         does not apply to synthesized methods.
16027
16028 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
16029
16030         * call.c (build_method_call): Ctors and dtors now have special names
16031         with respect to lookups.
16032         * class.c (add_method): Likewise.
16033         (grow_method): Likewise.
16034         (finish_struct_methods): Likewise.
16035         (warn_hidden): Likewise.
16036         (finish_struct_1): Likewise.
16037         * cvt.c (convert_to_reference): Likewise.
16038         (convert_to_aggr): Likewise.
16039         (cp_convert): Likewise.
16040         * decl2.c (check_classfn): Likewise.
16041         * init.c (expand_member_init): Likewise.
16042         (expand_default_init): Likewise.
16043         (expand_aggr_init_1): Likewise.
16044         (build_offset_ref): Likewise.
16045         (build_new): Likewise.
16046         (build_delete): Likewise.
16047         * lex.c (do_inline_function_hair): Likewise.
16048         * search.c (lookup_field_1): Likewise.
16049         (lookup_fnfields_here): Likewise.
16050         (lookup_field): Likewise.
16051         (lookup_fnfields): Likewise.
16052         (get_virtual_destructor): Likewise.
16053         (dfs_debug_mark): Likewise.
16054         (dfs_pushdecls): Likewise.
16055         (dfs_compress_decls): Likewise.
16056         * tree.c (layout_basetypes): Likewise.
16057         * typeck.c (build_component_ref): Likewise.
16058         (build_x_function_call): Likewise.
16059         (build_modify_expr): Likewise.
16060         (convert_for_initialization): Likewise.
16061         (build_functional_cast): Likewise.
16062         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
16063         (CTOR_NAME): New.
16064         (DTOR_NAME): New.
16065         * decl.c (ctor_identifier): New.
16066         (dtor_identifier): New.
16067         (init_decl_processing): Set them.
16068
16069 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
16070
16071         * typeck.c (build_component_ref): Don't get confused by fields whose
16072         context has no type name, like pointer to member functions.
16073
16074 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
16075
16076         * decl.c (grokdeclarator): Handle typedef without declarator.
16077
16078         * pt.c (tsubst): Handle SCOPE_REF in declarator.
16079
16080         * parse.y (bad_parm): Catch another case of missing `typename'.
16081
16082         * lex.c (yyprint): Handle TYPE_DECLs.
16083
16084         * decl.c (start_function): Don't try to be clever.
16085
16086         * lex.c: Lose compiler_error_with_decl.
16087         * typeck2.c: Lose error_with_aggr_type.
16088         (incomplete_type_error): Use cp_* instead of old functions.
16089         (readonly_error): Likewise.
16090         * typeck.c (convert_arguments): Likewise.
16091         * search.c (lookup_nested_field): Likewise.
16092         * method.c (make_thunk): Likewise.
16093         * decl.c (grokparms): Likewise.
16094         * cp-tree.h: Update.
16095
16096         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
16097         and value.
16098
16099 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
16100
16101         * method.c (build_opfncall): When deleting a pointer to an
16102         array, build a new pointer to the tree past any ARRAY_TYPE
16103         nodes.
16104
16105 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16106
16107         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
16108
16109 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16110
16111         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
16112         and ! DECL_INLINE.
16113
16114         * decl.c (finish_function): Don't set nested based on
16115         hack_decl_function_context.
16116         * parse.y (function_try_block): Check for nested function.
16117         (pending_inlines): Likewise.
16118
16119         * decl2.c (build_expr_from_tree): If a unary op already has a
16120         type, just return it.
16121
16122         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
16123
16124         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
16125         (finish_file): Check the return value of walk_vtables.
16126         (finish_prevtable_vardecl): Return int.
16127         (finish_vtable_vardecl): Likewise.
16128         (prune_vtable_vardecl): Likewise.
16129         * lex.c (set_vardecl_interface_info): Likewise.
16130         * cp-tree.h: Adjust return types.
16131
16132         * class.c (delete_duplicate_fields_1): Don't complain about
16133         duplicate nested types if they're the same type.
16134         (finish_struct): Remove check for duplicate.
16135         * decl2.c (grokfield): Don't check for typedef of anonymous type.
16136
16137 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16138
16139         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
16140
16141         * decl.c (grokdeclarator): Lose special handling of class-level
16142         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
16143         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
16144
16145         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
16146
16147         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
16148
16149         * search.c (compute_access): Fix handling of anonymous union
16150         members.
16151         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
16152         from anonymous unions to their members.
16153
16154         * typeck.c (build_x_function_call): For static member functions,
16155         hand off to build_member_call.
16156
16157 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
16158
16159         * typeck.c (build_component_ref): Handle OFFSET_REFs.
16160
16161         * init.c (expand_vec_init): Fix init == 0 case.
16162
16163 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
16164
16165         * init.c (build_new): pedwarn about init and array new.
16166         (expand_vec_init): Handle lists, use convert_for_initialization.
16167
16168         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
16169         when converting to an aggregate type.
16170         * cvt.c (cp_convert): Pass it through.
16171
16172         * typeck.c (build_conditional_expr): Handle user-defined
16173         conversions to slightly different types.
16174
16175         * decl.c (grokdeclarator): Force an array type in a parm to be
16176         permanent.
16177
16178         * decl2.c (do_using_directive): Sorry.
16179         (do_namespace_alias): Likewise.
16180         * lex.c (real_yylex): Warn about using the `namespace' keyword.
16181
16182 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16183
16184         * parse.y (datadef): Move call to note_list_got_semicolon up.
16185
16186 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
16187
16188         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
16189
16190 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
16191
16192         * decl.c (cp_finish_decl): The exception regions have to be
16193         nested, not overlapping.  We start the exception region for a
16194         decl, after it has been fully built, and all temporaries for it
16195         have been cleaned up.
16196
16197 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
16198
16199         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
16200
16201 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16202
16203         * tree.def: Add RETURN_INIT.
16204         * pt.c (instantiate_decl): Handle RETURN_INIT.
16205         * decl.c (store_return_init): Handle minimal_parse_mode.
16206
16207         * tree.c (cp_build_type_variant): Just return an error_mark_node.
16208         * decl.c (make_typename_type): Don't try to get the file and line
16209         of an identifier.
16210         * typeck.c (comptypes): Handle TYPENAME_TYPE.
16211
16212 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
16213
16214         * decl.c (poplevel): Make sure we clear out and restore old local
16215         non-VAR_DECL values by default when they go out of scope.
16216
16217 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16218
16219         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
16220         referring to addresses of variables and functions.
16221
16222         * error.c (dump_expr): Support SIZEOF_EXPR.
16223
16224         * init.c (do_friend): Use the return value of check_classfn.
16225
16226         * typeck.c (convert_arguments): Call complete_type.
16227
16228         * method.c (hack_identifier): After giving an error, set value to
16229         error_mark_node.
16230
16231 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16232
16233         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
16234         lossage for local classes.
16235         * cp-tree.h: Declare it.
16236         * decl.c (lookup_name_real): Evil, painful hack for local classes.
16237         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
16238         Use hack_decl_function_context.
16239         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
16240         (start_function): Use hack_decl_function_context.
16241         (finish_function): Likewise.
16242         * method.c (synthesize_method): Likewise.
16243         * lex.c (process_next_inline): Likewise.
16244         (do_pending_inlines): Likewise.
16245         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
16246         done with it.
16247
16248 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
16249
16250         * sig.c (build_signature_pointer_or_reference_type): Align
16251         signature pointers/references on 8-byte boundaries so they can be
16252         grabbed 2 words at a time on a Sparc.
16253
16254 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
16255
16256         * method.c (hack_identifier): Requiring a static chain is now a
16257         hard error.
16258         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
16259         functions.
16260
16261 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16262
16263         * init.c (build_offset_ref): Call complete_type.
16264
16265         * decl.c (pop_from_top_level): Always pop previous_class_type.
16266
16267         * parse.y: Handle multiple decls in a for-init-statement.
16268         * pt.c (tsubst_expr): Likewise.
16269
16270         * pt.c (tsubst): Use tsubst_expr for the second operand of an
16271         ARRAY_REF.
16272
16273         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
16274         (poplevel_class): Set it here.
16275         (pop_from_top_level): Pop it here if we're returning to class scope.
16276         * class.c (pushclass): Don't set it here.
16277
16278         * decl.c (maybe_push_to_top_level): Save current_template_parms,
16279         and clear it if !pseudo.
16280         (pop_from_top_level): Restore it.
16281
16282         * decl2.c (finish_file): Push the dummy each time we walk the list
16283         of vtables.
16284
16285         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
16286         something for CAST_EXPR.
16287
16288 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
16289
16290         * cvt.c (cp_convert): Warn about implicit conversion of the
16291         address of a function to bool, as it is always true.
16292
16293 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
16294
16295         * typeck.c (c_expand_return): Fix warning for local externs returned.
16296
16297 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16298
16299         * tree.c (mapcar): Propagate const and volatile properly.
16300
16301         * typeck.c (complete_type): Be sure to instantiate the
16302         MAIN_VARIANT of the type.
16303
16304         * method.c (synthesize_method): Class interface hackery does not
16305         apply to synthesized methods.
16306
16307 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16308
16309         * pt.c (comp_template_args): Use comptypes rather than just
16310         checking for TEMPLATE_TYPE_PARM equivalence.
16311
16312         * typeck.c (build_x_function_call): Call complete_type before
16313         checking TYPE_OVERLOADS_CALL_EXPR.
16314
16315 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
16316
16317         * g++.c (main): Check also for new define ALT_LIBM.
16318
16319 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16320
16321         * pt.c (instantiate_class_template): If we don't have a pattern
16322         yet, that's OK.
16323         (coerce_template_parms): If we see a local class, bail.
16324
16325         * decl.c (grok_reference_init): Make sure there's a type before
16326         checking its code.
16327
16328         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
16329         (push_template_decl): Likewise.
16330
16331         * parse.y (named_class_head): Set
16332         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
16333
16334         * decl.c (xref_tag): Diagnose redeclaration of template
16335         type-parameter name.
16336
16337         * error.c (dump_type): Handle anonymous template type parms.
16338
16339         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
16340         TYPE_STUB_DECL.
16341         (coerce_template_parms): Likewise.
16342
16343 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
16344
16345         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
16346         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
16347
16348 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
16349
16350         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
16351         before trying to get its STUB_DECL.
16352         (coerce_template_parms): Likewise.
16353
16354         * parse.y (template_type_parm): If they didn't use 'class',
16355         pretend they did after giving an error.
16356
16357         * pt.c (coerce_template_parms): Diagnose use of local class.
16358
16359         * decl.c (grok_reference_init): Use instantiate_type.
16360
16361         * error.c (dump_expr): Handle TEMPLATE_DECLs.
16362
16363         * parse.y (named_class_head): Diagnose mismatching types and tags.
16364
16365         * decl.c (pushdecl): Type decls and class templates clash with
16366         artificial type decls, not hide them.
16367
16368         * decl.c (redeclaration_error_message): Diagnose redefinition of
16369         templates properly.
16370         (duplicate_decls): Diagnose disallowed overloads for template
16371         functions, too.
16372
16373         * decl.c (start_decl): Call complete_type before checking for a
16374         destructor.
16375
16376         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
16377
16378         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
16379
16380 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
16381
16382         * decl.c (grok_op_properties): Don't check for operator++(int) in
16383         a template.
16384
16385         * tree.c (perm_manip): Return a copy of variable and function
16386         decls with external linkage.
16387
16388         * tree.def: Change some of the min tree codes to type "1".
16389         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
16390         * method.c (build_overload_int): Emit something arbitrary for
16391         anything but an INTEGER_CST if we're in a template.
16392
16393         * decl.c (cp_finish_decl): Call complete_type before deciding
16394         whether or not to lay out the decl.
16395
16396         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
16397
16398 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
16399
16400         * typeck2.c (build_x_arrow): Call complete_type.
16401
16402         * pt.c (add_pending_template): Broken out.
16403         (lookup_template_class): If -fexternal-templates, call it for all
16404         the methods of implemented types.
16405         (instantiate_class_template): Instead of instantiating them here.
16406         (instantiate_decl): Handle -fexternal-templates earlier.
16407
16408 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16409
16410         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
16411         memoized lookup stuff inside GATHER_STATISTICS.
16412
16413 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16414
16415         * decl.c (start_decl): Complain about array of incomplete type
16416         here.
16417         (grokdeclarator): Not here.
16418
16419         * parse.y (template_parm): Expand full_parm inline so we can set
16420         the rule's precedence.
16421
16422         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
16423         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
16424         * decl2.c (grokbitfield): Don't check for integer constant here.
16425         * class.c (finish_struct_1): Check here.
16426
16427         * decl.c (define_label): Make the min decl go on permanent_obstack.
16428
16429         * pt.c (unify): Don't handle CONST_DECLs.
16430         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
16431         (tsubst_copy): Likewise.
16432
16433         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
16434         CONST_DECL for a template parm.
16435
16436 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
16437
16438         * decl.c (grokdeclarator): Complain about array of incomplete type
16439         here.
16440         (start_decl_1): Not here.
16441
16442         * pt.c (tsubst): Handle pointer-to-function declarators.
16443
16444         * method.c (hack_identifier): If pedantic, diagnose local class
16445         methods that require a static chain.
16446
16447         * decl.c (grok_op_properties): No longer static.
16448         * cp-tree.h: Declare it.
16449         * pt.c (tsubst): Call it for operators.
16450         Use tsubst_copy for TREE_VECs.
16451
16452         * parse.y (template_arg): The expr has precedence like '>'.
16453
16454 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16455
16456         * pt.c (coerce_template_parms): Don't coerce an expression using
16457         template parms.
16458         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
16459         (tsubst): Don't use build_index_2_type if the max_value uses template
16460         parms.
16461         * method.c (build_overload_int): Emit something arbitrary for an
16462         expression using template parms.
16463
16464         * parse.y (template_close_bracket): New non-terminal to catch use
16465         of '>>' instead of '> >' in template class names.
16466         (template_type): Use it.
16467         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
16468
16469         * tree.def: Add CAST_EXPR.
16470         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
16471         CONVERT_EXPR for minimal_parse_mode.
16472         * typeck.c (build_c_cast): Likewise.
16473         * pt.c (tsubst_copy): Likewise.
16474         * decl2.c (build_expr_from_tree): Likewise.
16475         * error.c (dump_expr): Likewise.
16476
16477 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16478
16479         * except.c (SetTerminate, SetUnexpected): Put back global vars.
16480         (init_exception_processing): Put back decl/init of
16481         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
16482         fns from libstdc++.
16483
16484         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
16485         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
16486         Delete unused fns.
16487         * cp-tree.h (declare_uninstantiated_type_level,
16488         uninstantiated_type_level_p): Delete prototypes.
16489
16490 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16491
16492         * pt.c (tsubst_expr): Add default return.
16493
16494 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16495
16496         * error.c (fndecl_as_string): Delete unused arg CNAME.
16497         * sig.c (build_signature_table_constructor,
16498         build_signature_method_call): Fix calls.
16499
16500         * class.c (the_null_vtable_entry): Delete var definition.
16501         (init_class_processing): Delete tree the_null_vtable_entry init.
16502         * decl.c (no_print_{functions, builtins}): Declare as static.
16503         (__tp_desc_type_node): #if 0 var definition.
16504         (init_type_desc): #if 0 init of __tp_desc_type_node.
16505         (vb_off_identifier): Move var decl into init_decl_processing.
16506         (current_function_assigns_this): Declare as static.
16507         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
16508         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
16509         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
16510         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
16511         * init.c (BI_header_type, BI_header_size): Declare as static.
16512         * pt.c (template_classes): Delete unused var.
16513         (add_pending_template): Delete decl for non-existent fn.
16514         (lookup_template_class): Delete vars CODE and TAG_CODE.
16515         (instantiate_template): Delete unused var TARGS.
16516         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
16517         Delete decls.
16518         (__tp_desc_type_node): #if 0 var decl.
16519         (fndecl_as_string): Fix prototype.
16520
16521 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16522
16523         * tree.def: Add GOTO_STMT.
16524         * pt.c (tsubst_expr): Support goto and labels.
16525         * decl.c (define_label): Support minimal parsing.
16526         * parse.y (simple_stmt): Likewise.
16527
16528 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16529
16530         * xref.c (GNU_xref_member): Only define/set var I if
16531         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
16532         used.
16533         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
16534         (GNU_xref_end): Fix call.
16535         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
16536         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
16537
16538         * tree.c (build_exception_variant): Delete unused vars I, A, T,
16539         T2, and CNAME.
16540         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
16541         (mapcar): Delete unused var CODE.
16542         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
16543         (break_out_cleanups): Fix call.
16544         (bot_manip): Likewise.
16545         * call.c (build_method_call): Likewise.
16546         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
16547         Likewise.
16548         * typeck.c (unary_complex_lvalue, build_modify_expr,
16549         convert_for_initialization): Likewise.
16550         * typeck2.c (build_functional_cast): Likewise.
16551         * cp-tree.h (build_cplus_new): Fix prototype.
16552
16553         * repo.c (open_repo_file): Delete unused var Q.
16554         (repo_compile_flags, repo_template_declared,
16555         repo_template_defined, repo_class_defined, repo_inline_used,
16556         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
16557         (repo_get_id, repo_vtable_used): Declare as static.
16558         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
16559         prototypes.
16560
16561 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
16562
16563         * parse.y (pending_inlines): Add function_try_block case.
16564
16565         * pt.c (unify): Fix for template const parms.
16566
16567 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16568
16569         * lex.c (extract_interface_info): Delete forward decl.
16570         (default_copy_constructor_body, default_assign_ref_body): Delete
16571         decls for non-existent functions.
16572         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
16573         (init_lex): Delete setting them.
16574         (cons_up_default_function): Delete unused vars FUNC_BUF,
16575         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
16576         #if 0'd synth code.
16577         (toplevel, expression_obstack): Delete unused extern decls.
16578         (tree_node_kind): Delete unused enum.
16579         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
16580         GATHER_STATISTICS.
16581         (tree_node_kind_names): Delete unused extern decl.
16582         (synth_obstack): Delete unused var.
16583         (init_lex): Don't set it.
16584         (init_parse): Add decl before use.
16585         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
16586         (current_unit_{name, language}): Delete unused vars.
16587         (check_newline): Don't bother setting them, just accept the #pragma.
16588         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
16589         (current_unit_{name, language}): Delete decls.
16590
16591         * search.c: Wrap all of the memoized functions, macros, and
16592         variables inside #ifdef GATHER_STATISTICS.
16593         (lookup_field, lookup_fnfields): Likewise.
16594         (init_search_processing): Likewise.
16595         (reinit_search_statistics): Wrap whole function.
16596         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
16597
16598         * decl.c (finish_function): Only call pop_memoized_context if
16599         GATHER_STATISTICS is defined.
16600         (start_function): Likewise for push_memoized_context.
16601         * class.c (pushclass, popclass): Likewise.
16602
16603         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
16604         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
16605
16606         * cvt.c (cp_convert): Delete unused local var FORM.
16607         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
16608         prototypes.
16609
16610 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
16611
16612         * pt.c (do_poplevel): Oops; really return what we get from
16613         poplevel this time.
16614
16615 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16616
16617         * cp-tree.h (is_aggr_type): Add prototype.
16618
16619         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
16620         * method.c ({push,pop}_cp_function_context): Delete decls.
16621         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
16622         (SetUnexpected, SetTerminate): Delete unused vars.
16623         (init_exception_processing): Don't set SetUnexpected or
16624         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
16625         (output_exception_table_entry): Delete unused array LABEL.
16626         (expand_internal_throw): Delete unused var PARAMS.
16627         (expand_start_catch_block): Delete unused var CLEANUP.
16628         (emit_exception_table): Delete unused var EH_NODE_DECL.
16629         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
16630         GOTO_UNWIND_AND_THROW.  Don't set them.
16631         (end_eh_unwinder): Add top decl.
16632         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
16633         (exception_section, push_rtl_perm, do_function_call,
16634         lang_interim_eh, push_eh_cleanup, eh_outer_context,
16635         expand_end_eh_spec, end_eh_unwinder): Declare as static.
16636         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
16637         throw_used): Likewise.
16638         * cp-tree.h (expand_end_eh_spec): Delete prototype.
16639
16640         * search.c (dfs_mark, dfs_mark_vtable_path,
16641         dfs_unmark_vtable_path, dfs_mark_new_vtable,
16642         dfs_unmark_new_vtable, dfs_clear_search_slot,
16643         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
16644         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
16645         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
16646         functions.
16647         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
16648         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
16649         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
16650         Only define #ifdef GATHER_STATISTICS.
16651         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
16652         is defined.
16653         (vbase_decl): Delete var definition.
16654         (init_search): Delete old decl.
16655         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
16656         never actually used.
16657         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
16658         (get_base_distance_recursive): Delete unused fourth arg
16659         BASETYPE_PATH.  Fix call .
16660         (get_base_distance): Fix call.
16661         (push_class_decls): Delete unused var ID.
16662         (make_memoized_table_entry): Declare as static.
16663         (breadth_first_search): Declare as static.
16664         (tree_has_any_destructor_p): Declare as static.
16665         (pop_class_decls): Delete unused arg pop_class_decls.
16666         * class.c (popclass): Fix call to pop_class_decls.
16667         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
16668         tree_has_any_destructor_p): Delete prototypes.
16669
16670         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
16671         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
16672         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
16673         (build_user_desc): Delete unused var T.
16674         (build_class_desc): Delete unused vars T and OFF.
16675         (build_t_desc): Delete unused var NAME_STRING.
16676         (build_headof): Make static.
16677         (get_bad_cast_node): Likewise.
16678         (get_def_to_follow): Likewise.
16679         * cp-tree.h (init_type_desc): Add prototype.
16680         (build_headof): Remove prototype.
16681
16682 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16683
16684         * pt.c (tsubst): Only look for matching decls at file scope for
16685         non-member functions.
16686
16687         * call.c (build_scoped_method_call): Handle scoped destructor
16688         calls in templates.
16689
16690         * decl.c (*_top_level): Also save previous_class_values.
16691
16692         * pt.c (tsubst_expr): Support do {} while loops.
16693         * parse.y (simple_stmt): Likewise.
16694         * tree.def: Likewise.
16695
16696         * method.c (build_overload_identifier): For a class nested in a
16697         template class, don't mangle in the template parms from our
16698         context.
16699
16700         * lex.c, cp-tree.h: Remove support for template instantiations in
16701         the pending_inlines code.
16702         * pt.c: Remove dead functions and unused arguments.
16703         (uses_template_parms): TYPENAME_TYPEs always use template parms.
16704         * parse.y: Stop passing anything to end_template_decl.
16705         * tree.c (print_lang_statistics): Only print tinst info #ifdef
16706         GATHER_STATISTICS.
16707
16708 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16709
16710         * init.c (expand_recursive_init{,_1}): Delete decls.
16711         (sort_member_init): Delete unused var INIT.
16712         (emit_base_init): Delete unused var X.
16713         (build_offset_ref): Delete unused var CNAME.
16714         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
16715         (emit_base_init): Delete unused local var BASE.  Delete extern
16716         decl of IN_CHARGE_IDENTIFIER.
16717         (build_delete): Delete unused local var VIRTUAL_SIZE.
16718
16719         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
16720         (build_delete): Fix call.
16721         * decl2.c (delete_sanity): Likewise.
16722         * cp-tree.h (build_vec_delete): Update prototype.
16723
16724         * typeck.c (common_base_type): Delete unused var TMP.
16725         (build_binary_op): Delete local var ARGS_SAVE.
16726         (build_array_ref): Delete unused var ITYPE.
16727         (c_expand_return): Delete unused var USE_TEMP.
16728
16729         * typeck.c (compexcepttypes): Delete unused arg STRICT.
16730         (comptypes): Fix calls.
16731         * decl.c (duplicate_decls): Likewise.
16732         * cp-tree.h (compexcepttypes): Delete extra arg.
16733
16734         * decl2.c (check_classfn): Delete unused second arg CNAME.
16735         * decl.c (start_decl, grokfndecl): Fix calls.
16736         * init.c (do_friend): Likewise.
16737         * cp-tree.h (check_classfn): Update prototype.
16738
16739         * cp-tree.h (signature_error, import_export_vtable,
16740         append_signature_fields, id_in_current_class, mark_used,
16741         copy_assignment_arg_p): Add decls.
16742         * decl2.c (mark_used): Delete decl.
16743
16744         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
16745
16746         * class.c (get_vtable_entry): Disable unused function.
16747         (doing_hard_virtuals): Delete unused static global var.
16748         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
16749         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
16750         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
16751         (modify_one_vtable): Delete unused var OLD_RTTI.
16752         (finish_struct_anon): Delete unused vars OFFSET and X.
16753         (finish_struct_bits): Delete unused var METHOD_VEC.
16754         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
16755         for-scope local variable METHODS.
16756
16757         * call.c (user_harshness): Delete unused/unneeded arg PARM.
16758         (ideal_candidate): Delete unused args BASETYPE and PARMS.
16759         (build_method_call): Delete unused args passed into ideal_candidate.
16760         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
16761         * cp-tree.h (synthesize_method): Add decl.
16762
16763         * decl.c (note_level_for_for): Give void return type.
16764         (pushdecl_nonclass_level): Likewise.
16765         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
16766         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
16767         (suspend_binding_level): Delete unused var LEVEL.
16768         (duplicate_decls): Delete unused var CTYPE.
16769         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
16770         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
16771         PTR_ENDLINK.
16772         (grokdeclarator): Delete unused var C.
16773         (grokdeclarator): Delete unused var SIZE_VARIES.
16774         (grokparms): Delete unused var SAW_VOID.
16775         (start_function): Delete unused var OLDDECL.
16776         (cplus_expand_expr_stmt): Delete unused var
16777         REMOVE_IMPLICIT_IMMEDIATELY.
16778
16779         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
16780
16781         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
16782
16783 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16784
16785         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
16786         (build_min_nt): Likewise.
16787         * pt.c (do_pushlevel): Emit line note.
16788         (do_poplevel): Return what we get from poplevel.
16789         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
16790         * parse.y: Use do_pushlevel and do_poplevel.
16791         * cp-tree.h: Declare do_poplevel.
16792
16793         * cp-tree.h: Declare at_eof.
16794         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
16795         * decl2.c (import_export_decl): Renamed from import_export_inline.
16796         (finish_file): Call it to do interface handling for statics.
16797         * pt.c (tsubst_copy): Call mark_used on variables and functions
16798         used here.
16799
16800         * decl2.c (finish_file): Don't emit statics we can't generate.
16801         * pt.c (instantiate_decl): Don't set interface on instantiations
16802         we can't generate.
16803
16804         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
16805         * tree.c (print_lang_statistics): Print max template depth.
16806         * pt.c (push_tinst_level): Dump entire instantiation context.
16807         (instantiate_class_template): Use it and pop_tinst_level.
16808         (instantiate_decl): Likewise.
16809
16810         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
16811         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
16812
16813 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16814
16815         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
16816         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
16817         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
16818         the new template implementation.
16819
16820 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16821
16822         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
16823
16824 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
16825
16826         * decl.c (cp_finish_decl): Delay emitting the debug information for
16827         a typedef that has been installed as the canonical typedef, if the
16828         type has not yet been defined.
16829
16830 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16831
16832         * decl2.c (grokfield): Still call pop_nested_class for access decls.
16833
16834 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16835
16836         * decl.c (lookup_label): Call label_rtx.
16837
16838         * decl.c (make_binding_level): New function.
16839         (pushlevel, pushlevel_class): Call it instead of explicit
16840         duplicate calls to xmalloc.
16841
16842         * decl.c (init_decl_processing): Delete useless build_pointer_type
16843         call.
16844
16845         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
16846         (sizet_ftype_string): Delete variable.
16847         (init_decl_processing): Add built-in functions fabsf, fabsl,
16848         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
16849         variable strlen_ftype, used for strlen.
16850
16851 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
16852
16853         * decl.c (push_to_top_level): Start from current_binding_level
16854         again for now; the stl hacks depend on g++ being broken in this
16855         way, and it'll be fixed in the template rewrite.
16856
16857         * tree.def: Add USING_DECL.
16858         * decl2.c (do_class_using_decl): Implement.
16859         (grokfield): Pass access decls off to do_class_using_decl instead of
16860         grokdeclarator.
16861         * error.c (dump_decl): Handle USING_DECLs.
16862         * decl.c (grokdeclarator): Remove code for handling access decls.
16863         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
16864         as access decls for now.
16865         (finish_struct): Don't check USING_DECLs for other uses of the name.
16866
16867         * search.c (get_matching_virtual): Use cp_error_at.
16868
16869 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16870
16871         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
16872         match c-typeck.c.
16873         (self_promoting_args_p): Move the check that TYPE is non-nil
16874         before trying to look at its main variant.
16875         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
16876
16877         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
16878         Delete macros.
16879         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
16880         (do_friend): Delete call to xref_friend.
16881         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
16882
16883         * typeck.c (convert_sequence): #if 0 unused function.
16884
16885         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
16886         be in decl_in_memory_p.
16887         (decl_in_memory_p): Delete decl.
16888         * expr.c (decl_in_memory_p): Delete fn.
16889         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
16890
16891         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
16892
16893 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
16894
16895         * class.c (finish_struct_1): Check for a pure-specifier on a
16896         non-virtual function here.
16897
16898         * decl2.c (grok_function_init): Don't check whether the function
16899         is virtual here.
16900         (grokfield): Don't call check_for_override here.
16901
16902         * decl.c (push_to_top_level): Start from inner_binding_level,
16903         check class_shadowed in class levels.
16904
16905 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
16906
16907         * decl.c (resume_level): Ignore things that don't have names, instead
16908         of core dumping.
16909
16910 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16911
16912         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
16913
16914 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
16915
16916         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
16917         synthesized dtor.
16918
16919         * parse.y (complete_type_name): Bind global_scope earlier.
16920         (complex_type_name): Likewise.
16921         (qualified_type_name): Remove.
16922
16923 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
16924
16925         * decl.c (grokfndecl): Move code that looks for virtuals in base
16926         classes...
16927         * class.c (check_for_override): ... to a new function.
16928         (finish_struct_1): Call it.
16929
16930         * cp-tree.h: Declare warn_sign_compare.
16931
16932         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
16933         rather than extra_warnings to decide whether to warn about
16934         comparison of signed and unsigned.
16935
16936         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
16937         implies -Wsign-compare.  -Wall doesn't imply -W.
16938
16939 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
16940
16941         * typeck.c (build_component_ref): Fix to handle anon unions in base
16942         classes as well.
16943
16944 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16945
16946         * class.c (resolves_to_fixed_type_p): Delete code dealing with
16947         a WITH_CLEANUP_EXPR, since we don't generate them any more.
16948         * cvt.c (build_up_reference): Likewise.
16949         * decl.c (grok_reference_init): Likewise.
16950         (cp_finish_decl): Likewise.
16951         * error.c (dump_expr): Likewise.
16952         * tree.c (real_lvalue_p): Likewise.
16953         (lvalue_p): Likewise.
16954         (build_cplus_new): Likewise.
16955         (unsave_expr_now): Likewise.
16956         * typeck.c (unary_complex_lvalue, build_modify_expr,
16957         c_expand_return): Likewise.
16958
16959 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16960
16961         Make the C++ front-end pay attention to attributes for structures.
16962         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
16963         finish_struct_1.
16964         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
16965         Take out old round_up_size use and setting the DECL_ALIGN possibly
16966         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
16967         can override what the attribute set.
16968         * cp-tree.h (finish_struct): Update prototype.
16969         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
16970         attributes to finish_struct.
16971         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
16972         value down into finish_struct.
16973         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
16974
16975 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
16976
16977         * decl.c (poplevel):  Re-word dead for local handling.
16978         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
16979         (cp_finish_decl):  If is_for_scope, check for duplicates so
16980         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
16981
16982         * lex.c (do_identifier):  Use global binding in preference of
16983         dead for local variable.
16984
16985 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
16986
16987         * init.c (initializing_context): Handle anon union changes, the
16988         context where fields of anon unions can be initialized now has to be
16989         found by walking up the TYPE_CONTEXT chain.
16990
16991 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
16992
16993         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
16994         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
16995         (obscure_complex_init): If bss is supported, always set
16996         DECL_INITIAL to error_mark_node.
16997
16998 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16999
17000         * init.c (is_friend): Make sure there's a context before we see if
17001         it's an aggr type.
17002
17003 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
17004
17005         * init.c (is_friend): Classes are not friendly with nested classes.
17006
17007 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
17008
17009         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
17010         and record its result.
17011
17012 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
17013
17014         * class.c (finish_struct_anon): Switch around code to not move anon
17015         union elements around, nor mess up their contexts, nor offsets,
17016         instead we now build up the right number of COMPONENT_REFs for all
17017         the anon unions that may be present at build_component_ref time.
17018         * typeck.c (lookup_anon_field): New routine to handle field lookup
17019         on fields without names.  We find them, based upon their unique type
17020         instead.
17021         * typeck.c (build_component_ref): Allow FIELD_DECL components.
17022         Handle finding components in anonymous unions, and ensure that a
17023         COMPONENT_REF is built for each level as necessary.
17024
17025 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
17026
17027         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
17028         code that ensures that copy ctors are used if appropriate.
17029
17030 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17031
17032         * init.c (build_vec_delete): Only give an error if base isn't an
17033         error_mark_node.
17034
17035 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
17036
17037         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
17038         (yylex): If we see `new', keep slurping.
17039
17040 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
17041
17042         * class.c (finish_struct_1): Move code for handling anon unions...
17043         (finish_struct_anon): to here.  Fixup so that we do the offset
17044         calculations right, and so that the fields are physically moved to
17045         the containers's chain.
17046
17047 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17048
17049         * decl.c (grokdeclarator): Avoid trying to get an operand off an
17050         identifier node.
17051
17052 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
17053
17054         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
17055         POINTER_SIZE to agree with expr.c.
17056
17057 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
17058
17059         * search.c (lookup_field): Don't report ambiguities if protect is 0,
17060         instead return NULL_TREE.
17061
17062 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
17063
17064         * class.c (finish_struct_1): Call warn_hidden if we want warnings
17065         about overloaded virtual functions.
17066         (warn_hidden): New routine to warn of virtual functions that are
17067         hidden by other virtual functions, that are not overridden.
17068         (get_basefndecls): New routine, used by warn_hidden.
17069         (mark_overriders): New routine, used by warn_hidden.
17070         * search.c (get_matching_virtual): Remove old warning that just
17071         isn't very useful.
17072
17073 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17074
17075         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
17076
17077         * typeck.c (null_ptr_cst_p): Delete unused fn.
17078         (build_function_call_maybe): Delete unused fn.
17079
17080         * expr.c (extract_init): #if 0 the code after unconditional return 0
17081         for now.
17082
17083         Delete old cadillac code.
17084         * edsel.c: Remove file.
17085         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
17086         * Makefile.in (CXX_OBJS): Delete edsel.o.
17087         (edsel.o): Delete rule.
17088         * cp-tree.h (flag_cadillac): Delete var decl.
17089         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
17090         * decl2.c (flag_cadillac): Delete var definition.
17091         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
17092         (grokfield): Delete code depending on flag_cadillac.
17093         (finish_anon_union): Likewise.
17094         * class.c (finish_struct_1): Likewise.
17095         (pushclass): Likewise.
17096         (popclass): Likewise.
17097         (push_lang_context): Likewise.
17098         (pop_lang_context): Likewise.
17099         * decl.c (init_decl_processing): Likewise.
17100         (start_decl): Likewise.
17101         (cp_finish_decl): Likewise.
17102         (xref_tag): Likewise.
17103         (finish_enum): Likewise.
17104         (start_function): Likewise.
17105         (finish_function): Likewise.
17106         (finish_stmt): Likewise.
17107         * lex.c (lang_init): Likewise.
17108         (check_newline): Likewise.
17109
17110         * lex.c (do_pending_inlines): Delete synthesized method kludge.
17111
17112         Delete defunct, ancient garbage collection implementation.
17113         * rtti.c: New file with the RTTI stuff from gc.c.
17114         * gc.c: Removed file (moved the remaining stuff into rtti.c).
17115         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
17116         (rtti.o): New rule, replacing gc.o.
17117         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
17118         * cp-tree.h: Delete gc-related fn decls.
17119         (DECL_GC_OFFSET): Delete macro.
17120         (flag_gc): Delete extern decl.
17121         * decl.c (current_function_obstack_index): Delete var decl.
17122         (current_function_obstack_usage): Delete var decl.
17123         (start_function): Delete clearing of current_function_obstack_index
17124         and current_function_obstack_usage.
17125         (init_decl_processing): Delete code relying on -fgc.
17126         Delete call to init_gc_processing.
17127         (cp_finish_decl): Delete calls to build_static_gc_entry and
17128         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
17129         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
17130         and to expand_expr of a __gc_main call.
17131         (maybe_gc_cleanup): Delete var decl.
17132         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
17133         * decl2.c (flag_gc): Delete var decl.
17134         (lang_f_options): Delete offering of -fgc.
17135         (lang_decode_option): Delete -fgc and -fno-gc handling.
17136         (get_temp_regvar): Delete gc code.
17137         * init.c (build_new): Delete gc code.
17138         * lex.c (init_lex): Delete checking of flag_gc.
17139
17140         * typeck.c (convert_arguments): Delete gc code.
17141         (build_component_addr): Delete -fgc warning.
17142         (build_modify_expr): Delete gc code.
17143
17144         * decl2.c (build_push_scope): Delete fn.
17145         * cp-tree.h (build_push_scope): Delete decl.
17146
17147         * search.c (clear_search_slots): Delete fn.
17148         * cp-tree.h (clear_search_slots): Delete decl.
17149
17150         * search.c (tree_needs_constructor_p): Delete fn.
17151         * cp-tree.h (tree_needs_constructor_p): Delete decl.
17152
17153         * tree.c (id_cmp): Delete fn.
17154
17155         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
17156         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
17157
17158         * tree.c (decl_value_member): Delete fn.
17159         * cp-tree.h (decl_value_member): Delete decl.
17160
17161         * tree.c (list_hash_lookup_or_cons): Delete fn.
17162         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
17163
17164         * method.c (cplus_exception_name): Delete fn.
17165         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
17166
17167         * spew.c (shift_tokens): Delete fn.
17168
17169 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17170
17171         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
17172         to cp_finish_decl.
17173         * parse.y: Likewise.
17174
17175 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17176
17177         * tree.c (build_cplus_staticfn_type): Delete function definition;
17178         never used.
17179         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
17180
17181         * tree.c (virtual_member): Delete function definition; never used.
17182         * cp-tree.h (virtual_member): Delete decl.
17183
17184 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
17185
17186         * typeck.c (build_component_ref): Handle getting vbase pointers
17187         out of complex multiple inheritance better.
17188
17189 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
17190
17191         * typeck.c (build_object_ref): Make sure we use the real type, not
17192         any reference type.
17193
17194 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
17195
17196         * tree.c (build_exception_variant): Don't create new types if we
17197         don't have to, also build new types on the right obstack.
17198
17199 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17200
17201         * decl.c (store_bindings): Split out from push_to_top_level.
17202         (push_to_top_level): Call it for b->type_shadowed on class binding
17203         levels.
17204
17205 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
17206
17207         * search.c (expand_upcast_fixups): Fix so that offsets stored in
17208         vbase_offsets are always right.  Fixes a problem where virtual base
17209         upcasting and downcasting could be wrong during conversions on this
17210         during virtual function dispatch at ctor/dtor time when dynamic
17211         vtable fixups for deltas are needed.  This only sounds easier than
17212         it is.  :-)
17213         (fixup_virtual_upcast_offsets): Change to reflect new calling
17214         convention for expand_upcast_fixups.
17215
17216 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17217
17218         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
17219         check that it's usable as the bitfield width.
17220
17221 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17222
17223         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
17224         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
17225         only ever used for functions in it.
17226
17227 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
17228
17229         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
17230         (nested_type): Likewise.
17231         (nested_name_specifier): Use lastiddecl.
17232
17233         * decl.c (grokdeclarator): Adjust accordingly.
17234         * init.c (expand_member_init): Likewise.
17235         * parse.y (base_class): Likewise.
17236         * typeck2.c (build_functional_cast): Likewise.
17237
17238         * typeck2.c (build_functional_cast): Fill in name after we've
17239         checked for non-aggr type.
17240
17241 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
17242
17243         * decl2.c (warn_pointer_arith): Default to on.
17244
17245 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
17246
17247         * lex.c (is_rid): New function.
17248         * decl.c (grokdeclarator): Diagnose reserved words used as
17249         declarator-ids.
17250
17251 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
17252
17253         * tree.c (get_decl_list): Don't lose cv-quals.
17254
17255         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
17256         typespecs used as declarator-ids.
17257
17258 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
17259
17260         * decl.c (poplevel): When poping a level, don't give a warning for
17261         any subblocks that already exist.
17262
17263 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17264
17265         * typeck.c (build_object_ref): Finish what I started.
17266
17267         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
17268
17269         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
17270
17271         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
17272         scope.
17273
17274 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17275
17276         * decl.c (xref_tag): Handle passing a type in directly.
17277
17278         * parse.y (qualified_type_name): Pull out the type.
17279         (nested_type): Likewise.
17280         Take types directly instead of as identifiers.
17281         * call.c (build_scoped_method_call): Take types directly instead of
17282         as identifiers.
17283         * decl.c (xref_basetypes): Likewise.
17284         * init.c (expand_member_init): Likewise.
17285         (build_member_call): Likewise.
17286         (build_offset_ref): Likewise.
17287         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
17288         * method.c (do_build_assign_ref): Likewise.
17289         * decl.c (grokdeclarator): Handle a type appearing as the
17290         declarator-id for constructors.
17291         * method.c (do_build_copy_constructor): current_base_init_list now
17292         uses the types directly, not their names.
17293         * init.c (sort_base_init): Likewise.
17294         (expand_member_init): Likewise.
17295         * init.c (is_aggr_type): New function, like is_aggr_typedef.
17296
17297 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
17298
17299         * tree.c (layout_basetypes): Call build_lang_field_decl instead
17300         of build_lang_decl if first arg is a FIELD_DECL.
17301
17302 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17303
17304         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
17305         non-empty.
17306         * except.c (expand_start_catch_block): Set TREE_USED to avoid
17307         warnings about the catch handler.
17308
17309 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
17310
17311         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
17312         expand_target_expr.
17313
17314 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17315
17316         Fix access control to use trees rather than integers.
17317         * class.c (access_{default, public, protected, private,
17318         default_virtual, public_virtual, private_virtual}_node): Add
17319         definitions.
17320         (init_class_processing): Do creation of those nodes.
17321         * cp-tree.h (access_type): Delete enum decl.
17322         (access_{default, public, protected, private, default_virtual,
17323         public_virtual, private_virtual}_node): Add decls.
17324         (compute_access): Change return type.
17325         * search.c (compute_access): Have tree return type, instead of enum.
17326         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
17327         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
17328         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
17329         * parse.y (VISSPEC): Make ttype rather than itype.
17330         (base_class_access_list): Likewise.
17331         * *.[cy]: Change all refs of `access_public' to `access_public_node',
17332         etc.
17333         * call.c (build_method_call): Make ACCESS be a tree.
17334         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
17335         * cvt.c (convert_to_aggr): Likewise.
17336         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
17337         Likewise.
17338         * method.c (hack_identifier): Likewise.
17339         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
17340
17341 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
17342
17343         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
17344         frontend, and make it more consistent with respect to
17345         warn_pointer_arith.
17346
17347 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17348
17349         * decl.c (pushdecl): Check for duplicate parameter names.
17350
17351 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
17352
17353         * decl.c (expand_static_init): Call assemble_external for atexit.
17354
17355 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
17356
17357         * except.c (do_unwind): Remove some generated dead code.
17358         (eh_outer_context): New routine, factor out some common code from
17359         expand_builtin_throw and end_eh_unwinder.  Add code to do return
17360         address masking for the PA.
17361         (expand_builtin_throw): Use eh_outer_context instead of open coding
17362         it here.
17363         (end_eh_unwinder): Likewise.
17364
17365 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
17366
17367         * except.c (expand_throw): Call assemble_external for __empty, if we
17368         use it.
17369
17370 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
17371
17372         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
17373         NORMAL_RETURN_ADDR_OFFSET.
17374         (end_eh_unwinder): Likewise.
17375
17376 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
17377
17378         * gc.c (build_dynamic_cast): Make sure we don't cast away const
17379         when dealing with references, and make sure we handle dynamic
17380         casting to a cv qualified reference.
17381
17382 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
17383
17384         * except.c (struct eh_context): New structure top hold eh context
17385         information.
17386         (push_eh_context): New routine.
17387         (pop_eh_context): Likewise.
17388         * decl.c (push_cp_function_context): Use them.
17389         (pop_cp_function_context): Likewise.
17390
17391 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
17392
17393         * decl2.c (finish_file): Also prune uninteresting functions in the
17394         inline emission loop.
17395
17396 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
17397
17398         * sig.c (build_signature_table_constructor): Mark functions
17399         in the signature as referenced.
17400
17401 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
17402
17403         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
17404         the inline emission stuff.
17405
17406 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
17407
17408         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
17409         weak symbols.
17410         * lang-options.h: Add -f{no-,}weak.
17411         * decl.c (init_decl_processing): If the target does not support weak
17412         symbols, don't use them.
17413         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
17414
17415 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
17416
17417         * init.c (expand_member_init): warning for base init after members.
17418
17419 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
17420
17421         * cvt.c (build_expr_type_conversion): Don't convert to a reference
17422         type.
17423
17424 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
17425
17426         * method.c (report_type_mismatch): Improve wording for volatile
17427         mismatches.
17428
17429 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
17430
17431         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
17432         expand_assignment, as the later doesn't handle things that have
17433         copy constructors well.  The compiler would do bitwise copying,
17434         instead of ctor calling in some cases.
17435
17436 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
17437
17438         * g++.c (my_strerror): Return "cannot access" if errno is 0.
17439         (pfatal_with_name, perror_exec): Don't assume that
17440         the returned value from my_strerror contains no '%'s.
17441         (concat): Remove.
17442         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
17443
17444 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
17445
17446         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
17447         TYPE_METHODS/TREE_CHAIN mean what they used to.
17448         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
17449         instead of TYPE_METHODS.
17450         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
17451         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
17452         * cp-tree.h (CLASSTYPE_METHODS): Lose.
17453         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
17454         TYPE_METHODS.
17455         (struct lang_decl): Lose next_method field.
17456         (DECL_NEXT_METHOD): Lose.
17457         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
17458         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
17459         anymore.
17460         (finish_struct_methods): Don't mess with the TREE_CHAINs in
17461         fn_fields.
17462
17463         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
17464         vector.
17465
17466         * call.c (build_method_call): Synthesize here even when not inlining.
17467         * typeck.c (build_function_call_real): Likewise.
17468
17469 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
17470
17471         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
17472         == DBX_DEBUG, call dbxout_start_new_source_file and
17473         dbxout_resume_previous_source_file when appropriate.
17474
17475 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
17476
17477         * except.c (start_anon_func): Push to the top level.
17478         (end_anon_func): Pop from the top level.
17479
17480 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
17481
17482         * cp-tree.h (build_cleanup): New routine to build cleanups.
17483         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
17484         call at ctor time and use atexit to run it later.
17485         * decl2.c (build_cleanup): New routine, taken from finish_file.
17486         (finish_file): Use build_cleanup instead, and don't put function
17487         local statics in global dtor list.
17488
17489 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
17490
17491         * except.c (expand_throw): Ensure that we have cleanups, if we try
17492         and expand cleanups.
17493
17494 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
17495
17496         * except.c (expand_throw): Add logic to manage dynamic cleanups for
17497         the EH object.
17498         (expand_end_catch_block): Use the magic of expand_goto, instead of
17499         emit_jump so that we get the cleanup for any catch clause parameter
17500         and the cleanup for the exception object.  Update to reflect label
17501         changes.
17502         (push_eh_cleanup): New routine to register a cleanup for an
17503         exception object.
17504         (empty_fndecl): Used to default cleanup actions to
17505         nothing.
17506         (init_exception_processing): Setup empty_fndecl.  Setup
17507         saved_cleanup.
17508         (expand_start_catch_block): Update to reflect label changes.  Call
17509         push_eh_object to register the cleanup for the EH object.
17510         (start_anon_func): New routine to start building lambda expressions
17511         from trees.
17512         (end_anon_func): New routine to end them.
17513         (struct labelNode): Change so that we can use tree labels, or rtx
17514         labels.
17515         (saved_cleanup): Object to check for dynamic cleanups for the
17516         exception handling object.
17517         (push_label_entry): Change so that we can use tree labels, or rtx
17518         labels.
17519         (pop_label_entry): Likewise.
17520         (top_label_entry): Likewise.
17521         (expand_start_all_catch): Use tree label instead of rtx label, so
17522         that we can get the magic of expand_goto.
17523         (expand_end_all_catch): Update to reflect label changes.
17524
17525         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
17526         use UNSAVE_EXPRs.
17527         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
17528         building_cleanup logic, as we now use UNSAVE_EXPRs.
17529         * cp-tree.h (unsave_expr): Declare it.
17530         * decl.c (building_cleanup): Remove.
17531         (maybe_build_cleanup): Remove building_cleanup logic, and use
17532         UNSAVE_EXPR instead.
17533
17534 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
17535
17536         * gc.c (build_t_desc): Update error message to say <typeinfo>.
17537
17538 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
17539
17540         * decl.c (pushdecl): Only warn about shadowing a local variable if
17541         warn_shadow is true.
17542
17543 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
17544
17545         * typeck.c (build_binary_op_nodefault): Added warning about
17546         comparisons between different enum types with -Wall, unless
17547         -fenum-int-equiv set.
17548
17549 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
17550
17551         * class.c (finish_struct_1): Skip down to the inner type in
17552         multidimensional arrays.  Ensures ctors will be made for types that
17553         need constructing.
17554
17555 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
17556
17557         * decl.c (last_dtor_insn): New to track the last compiler generated
17558         insn in a dtor.
17559         (store_parm_decls): Set it.
17560         (finish_function): Use it to see if the dtor is empty.  Avoid doing
17561         vtable setup all the time, if we can.
17562         (struct cp_function): Add last_dtor_insn.
17563         (push_cp_function_context): Save it.
17564         (pop_cp_function_context): Restore it.
17565
17566 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
17567
17568         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
17569         warnings.
17570
17571 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
17572
17573         * typeck.c (expand_target_expr): Make sure targets get put into the
17574         current temp_slot_level, so that the free_temp_slots call will reuse
17575         them.
17576
17577 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
17578
17579         * class.c (finish_struct_1): Delay delta fixups for virtual bases
17580         until after we have done the hard virtuals, to avoid a bogus `every
17581         virtual function must have a unique final overrider' for virtual
17582         functions that are only overridden by hard virtuals.
17583
17584 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
17585
17586         * pt.c (do_function_instantiation): Don't try to find a file-scope
17587         template for a member function.
17588
17589 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
17590
17591         * g++.c (main): Add handling of -nodefaultlibs.
17592
17593 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
17594
17595         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
17596         distinguish between direct bindings of reference variables, and
17597         indirect bindings of reference variables.
17598         * cvt.c (build_up_reference): Use it.
17599         * typeck.c (convert_arguments): Use it to indicate this is an
17600         indirect binding.
17601         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
17602         as they are unused.
17603         (expand_static_init): Likewise.
17604         (cplus_expand_expr_stmt): Likewise.
17605         * decl2.c (finish_file): Likewise.
17606         * init.c (perform_member_init): Likewise.
17607         (emit_base_init): Likewise.
17608         (expand_aggr_vbase_init_1): Likewise.
17609
17610 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
17611
17612         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
17613         get a DECL_LANG_SPECIFIC node.
17614         * cp-tree.h (lang_decl_flags): Add new member `level'.
17615         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
17616         decl_flags level member.
17617
17618 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
17619
17620         * call.c (build_method_call): Make sure instance has a
17621         TYPE_LANG_SPECIFIC node before we dive into it.
17622
17623 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
17624
17625         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
17626
17627 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
17628
17629         * decl.c (duplicate_decls): When smashing decls, smash staticness in
17630         the usual way.
17631
17632 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
17633
17634         * decl.c (poplevel): Handle the merging of subblocks of cleanups
17635         when finishing blocks that have already been created (usually due to
17636         the fixup goto code).  Fixes bad debugging information.
17637
17638 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
17639
17640         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
17641         that's not a list of overloaded functions.
17642
17643 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
17644
17645         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
17646         before trying to use DECL_ABSTRACT_VIRTUAL_P.
17647
17648 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
17649
17650         * decl2.c (mark_used): New function for hooking into setting of
17651         TREE_USED on decls.
17652         * call.c (build_method_call): Use it.
17653         * class.c (instantiate_type): Likewise.
17654         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
17655         for all like-named functions.
17656         * method.c (hack_identifier): Likewise.
17657         (emit_thunk): Don't call assemble_external.
17658         (make_thunk): Create thunk as a FUNCTION_DECL so that it
17659         gets the right mode and ENCODE_SECTION_INFO works.
17660
17661         * parse.y: Use mark_used.  Pass operator names to do_identifier.
17662         * lex.c (do_identifier): Handle operator names.
17663
17664         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
17665
17666 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
17667
17668         * errfn.c: Include stdio.h.
17669         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
17670
17671 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
17672
17673         * typeck2.c (digest_init): Always convert initializers to the
17674         right type.
17675
17676 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
17677
17678         * init.c (member_init_ok_or_else): Don't allow member initializers
17679         for indirect members, as it is invalid.
17680
17681 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
17682
17683         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
17684
17685 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
17686
17687         * parse.y (for.init.statement): Catch compound statements inside for
17688         initializations, if we're being pedantic.
17689
17690 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
17691
17692         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
17693         looking for.
17694
17695 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
17696
17697         * error.c (dump_expr): Don't core dump when a boolean expression is
17698         used as a default argument.
17699
17700 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
17701
17702         * class.c (finish_struct_bits): Check aggregate_value_p instead of
17703         RETURN_IN_MEMORY.
17704
17705 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
17706
17707         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
17708         BLKmode type that would otherwise be returned in registers.
17709
17710 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
17711
17712         * g++.c (WITHLIBC): New macro.
17713         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
17714         saw_libc and pass it at the end if it was set.
17715
17716 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
17717
17718         * parse.y (fn.def1): Call split_specs_attrs in
17719         declmods notype_declarator case.