OSDN Git Service

* cp-tree.h (lang_decl_flags): Add global_ctor_p and
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
2
3         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
4         global_dtor_p.  Add init_priority.
5         (DECL_ACCESS): Adjust accordingly.
6         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
7         (GLOBAL_INIT_PRIORITY): Likewise.
8         * decl.c (lang_mark_tree): Adjust accordingly.
9         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
10         and GLOBAL_INIT_PRIORITY.
11         * dump.c (dequeue_and_dump): Print them.
12         * ir.texi: Document them.
13
14         * decl2.c (struct priority_info_s): Remove initialization_sequence
15         and destruction_sequence.
16         (start_static_storage_duration_function): Return the body of the
17         function.  Convert for function-at-a-time mode.
18         (generate_inits_for_priority): Remove.
19         (finish_static_storage_duration_function): Change prototype.
20         Adjust for function-at-a-time mode.
21         (do_static_initialization): Likewise.
22         (do_static_destruction): Likewise.
23         (do_static_initialization_and_destruction): Remove.
24         (start_static_initialization_or_destruction): New function.
25         (finish_static_initialization_or_destruction): Likewise.
26         (get_priority_info): Don't manipulation initialization_sequence or
27         destruction_sequence.
28         (prune_vars_needing_no_initialization): New function.
29         (write_out_vars): Likewise.
30         (finish_file): Use the various new functions instead of the old.
31         
32 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
33
34         * cp-tree.h (warn_float_equal): Declare.
35         * decl2.c (warn_float_equal): Define.
36         (lang_decode_option): Recognize -W[no-]float-equal.
37         * typeck.c (build_binary_op_nodefault): Conditionally warn
38         about equality tests of floating point types.
39
40 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
41
42         Support normal type_info-based EH mechanisms with -fno-rtti.
43         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
44         (build_eh_type_type_ref): Likewise.
45         (build_eh_type): Remove.
46         (expand_throw): Call build_eh_type_type, not build_eh_type.
47         * decl2.c (import_export_decl): Don't associate the tinfo fn with
48         the vtable if -fno-rtti.
49         * decl.c (init_decl_processing): Always init_rtti_processing.
50
51         * rtti.c (get_typeid): Don't complain about -fno-rtti.
52
53         * class.c (class_cache_obstack, class_obstack): Remove.
54         (init_class_processing): Don't initialize class_obstack.
55         (push_cache_obstack): Remove.
56         (pushclass): Don't call it.
57         * cp-tree.h: Remove prototype for push_cache_obstack.
58         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
59         (pushlevel_class): Don't push_decl_level.
60         (poplevel_class): Don't pop_stack_level.
61         (push_class_level_binding): Don't push_cache_obstack.
62         (init_decl_processing): Don't intialize decl_obstack.
63         * search.c (push_class_decls): Don't push_cache_obstack.
64         * tree.c (list_hash_add): Put hash node on permanent_obstack.
65         (hash_tree_cons): Don't mess with obstacks.
66         (print_lang_statistics): Don't print stats for class_obstack and
67         decl_obstack.
68
69 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
70
71         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
72         * ir.texi: Document DECL_EXTERNAL.
73
74         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
75         * ir.texi: Document THUNK_DECLs.
76
77         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
78         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
79         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
80         * error.c (dump_template_bindings): Remove unused parameter.
81         Handle multiple levels of template parameters.
82         (dump_template_decl): Use `parms', not `args', for template
83         parameters.  Fix thinko.
84         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
85         flags to dump_template_bindings.
86         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
87         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
88         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
89         (tsubst_copy): Clarify variable name.
90         (most_general_template): Robustify.
91         
92 1999-09-29  Nathan Sidwell  <nathan@acm.org>
93
94         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
95         to change primary template rendering.
96
97 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
98
99         * cp-tree.h (UPT_TEMPLATE): Remove.
100         (UPT_PARMS): Likewise.
101         (DECL_NEEDED_P): New macro.
102         * decl2.c (finish_vtable_vardecl): Use it.
103         (finish_objects): Don't crash with -fsyntax-only.
104         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
105         -fsyntax-only.
106         * pt.c (tsubst_friend_function): Remove FIXME that talks about
107         obstacks.
108         (tsubst_expr): Correct handling of function try-blocks.
109         * semantics.c: Include flags.h.
110         (expand_body): Don't do RTL generation if -fsyntax-only.
111         * Makefile.in (semantics.o): Depends on flags.h.
112         
113 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
114
115         * pt.c (most_general_template): Adjust declaration.
116
117         * cp-tree.h: (most_general_template): Declare.
118
119         * error.c (dump_template_value): Rename to ...
120         (dump_template_argument): This.
121         (dump_template_argument_list): New function.
122         (dump_type): Use it.
123         (dump_template_parameter): New function.
124         (dump_template_decl): Use it.
125         (dump_template_bindings): New function.
126         (dump_function_decl): Use it. Pretty print function template
127         instantiations.
128
129 1999-09-28  Nathan Sidwell  <nathan@acm.org>
130
131         * decl.c (grokdeclarator): Distinguish parameter context for
132         diagnostics. Tidy up missing type diagnostic.
133         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
134
135 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
136
137         * ir.texi: Improve documentation for TARGET_EXPR.
138
139 1999-09-27  Nathan Sidwell  <nathan@acm.org>
140
141         Augment stringification of trees.
142         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
143         (fndecl_as_string, type_as_string_real, args_as_string,
144         code_as_string, language_as_string, parm_as_string,
145         op_as_string, assop_as_string, cv_as_string): Remove.
146         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
147         (context_as_string): Declare new function.
148         * error.c (cp_printers): Move definition.
149         (OB_UNPUT): Remove.
150         (OB_END_TEMPLATE_ID): Adjust.
151         (interesting_scope_p): Remove.
152         (dump_scope): New static function.
153         (dump_qualifiers): Adjust prototype, reimplement.
154         (dump_template_value): Use tree_string_flags.
155         (dump_type_real): Move back to dump_type.
156         (dump_type): Adjust prototype. Use tree_string_flags.
157         (dump_aggr_type): Likewise. Use dump_template_parms.
158         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
159         Return pad flag.
160         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
161         (dump_simple_decl): Likewise.
162         (dump_decl): Likewise. Use dump_template_decl.
163         (dump_template_decl): New static function broken out of dump_decl.
164         (dump_function_decl): Adjust prototype. Use tree_string_flags.
165         (dump_parameters): Likewise. Prefix space.
166         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
167         (dump_function_name): Likewise. Use dump_template_parms.
168         (dump_template_parms): New static function broken out of
169         dump_function_name.
170         (dump_expr_list): Adjust prototype. Use tree_string_flags.
171         (dump_expr): Likewise.
172         (fndecl_as_string): Removed
173         (type_as_string_real): Removed
174         (dump_binary_op): Adjust prototype. Use tree_string_flags.
175         (dump_unary_op): Likewise.
176         (type_as_string): Likewise.
177         (expr_as_string): Likewise.
178         (decl_as_string): Likewise.
179         (context_as_string): New function.
180         (lang_decl_name): Adjust.
181         (decl_to_string): New static print callback.
182         (expr_to_string): Likewise.
183         (fndecl_to_string): Likewise.
184         (code_as_string): Renamed to ...
185         (code_to_string): ... here. Adjust.
186         (language_as_string): Renamed to ...
187         (language_to_string): ... here. Adjust.
188         (parm_as_string): Renamed to ...
189         (parm_to_string): ... here.
190         (op_as_string): Renamed to ...
191         (op_to_string): ... here.
192         (assop_as_string): Renamed to ...
193         (assop_to_string): ... here.
194         (type_to_string): New static print callback.
195         (args_as_string): Renamed to ...
196         (args_to_string): ... here. Adjust.
197         (cv_as_string): Renamed to ...
198         (cv_to_string): ... here. Adjust.
199         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
200         (print_template_context): Likewise.
201
202 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
203
204         * cp-tree.h (expand_throw): Remove prototype.
205         * except.c (expand_throw): Make it static.  Use tree-generation
206         functions, rather than RTL-generation functions.
207         (build_throw): Use it.
208         * expr.c: Include except.h.
209         (cplus_expand_expr): Don't call expand_throw here.
210         * Makefile.in (expr.o): Depend on except.h.
211         * ir.texi: Update documentation for THROW_EXPR.
212         
213         * decl.c (start_function): Set x_dont_save_pending_sizes rather
214         than calling get_pending_sizes.
215         * init.c (build_new): Don't save and restore
216         immediate_size_expand; instead, assert that it has the expected
217         value already.
218
219 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
220
221         * lex.c (compiler_error): Add missing call to va_end().
222
223 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
224
225         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
226         * ir.texi: Document RESULT_DECL and DECL_RESULT.
227
228         * cp-tree.h (check_return_expr): New function.
229         * decl.c (finish_constructor_body): New function.
230         (pushdecl): Put global friend functions in namespace binding
231         level, not the class binding level.
232         (finish_destructor_body): Make sure the dtor_label is always
233         defined.  Fix typo in comment.
234         (finish_function): Move generation of constructor-termination code
235         to semantic-analysis time.  Move generation of implicit `main'
236         return value to semantic-analysis time.
237         * semantics.c (finish_return_stmt): Generate goto's to
238         ctor_label/dtor_label here.  Use check_return_expr to do semantic
239         analysis on the returned expression.
240         * typeck.c (maybe_warn_about_returning_address_of_local): New
241         function split out from c_expand_return.
242         (check_return_expr): Likewise.
243         (c_expand_return): Just generate the RTL for the return.
244         
245 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
246
247         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
248         (cleanup_type): Likewise.
249         (search_tree): Change prototype.
250         * decl.c (local_variable_p): Adjust for new interface to
251         search_tree.
252         (check_default_argument): Likewise.
253         * error.c (dump_expr): Handle INIT_EXPR.
254         * except.c (expand_throw): Don't make cleanup_type a local static.
255         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
256         * init.c (build_new): Call build_new_1 directly, rather than
257         building a NEW_EXPR.
258         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
259         processing file-scope initializers.
260         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
261         * tree.c: Include splay-tree.h
262         (no_linkage_helper): Adjust for new interface to search_tree.
263         (search_tree): Pass around pointers to tree nodes, rather than the
264         nodes themselves.  Handle VEC_INIT_EXPR.
265         (no_linkage_check): Adjust for new interface to search_tree.
266         (mapcar): Handle VEC_INIT_EXPR.
267         (target_remap): New variable.
268         (bot_manip): Use it.
269         (bot_replace): New function.
270         (break_out_target_exprs): Use it to remap all variables used in a
271         default argument expression.
272         * typeck.c (build_modify_expr): Don't crash when outside a
273         function and presented with an INIT_EXPR assignment
274         * Makefile.in (tree.o): Depend on splay-tree.h.
275
276 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
277
278         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
279         DECL_BUILT_IN.
280         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
281         callers changed.
282         Set the builtin's DECL_BUILT_IN_CLASS.
283
284 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
285
286         * decl.c (pushdecl): Don't make local declarations of extern
287         variables give the variable a DECL_CONTEXT for the function.
288         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
289         Don't accidentally make RTL for local declarations.
290         (emit_local_var): Handle declarations with asm-specifiers here.
291         
292 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
293
294         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
295         STMT_IS_FULL_EXPR_P.
296
297         * cp-tree.h (language_function): Add cannot_inline.
298         * decl.c (start_function): Restore current_function_cannot_inline
299         from the saved value.
300         (save_function_data): Save current_function_cannot_inline.
301         * decl2.c (start_objects): Change prototype.  Build the function
302         in function-at-a-time mode.
303         (finish_objects): Likewise.
304         (generate_ctor_or_dtor_function): Adjust accordingly.
305         
306         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
307         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
308         Don't call expand_anon_union_decl here
309         * semantics.c (exapnd_stmt): Call it here, instead.
310         * typeck.c (mark_addressable): Addressed variables are implicitly
311         used.
312         
313 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
314
315         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
316         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
317         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
318         * cp-tree.h: Add tree checking macros to various tree access
319         macros. 
320         * ptree.c (print_lang_decl): Test for function or variable
321         before accessing template info.
322
323 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
324
325         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
326         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
327         * decl2.c (lang_f_options): Add -fshort-wchar.
328         * cp-tree.h: Declare flag_short_wchar.
329         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
330         int' for wchar_t.
331
332 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
333
334         * ir.texi: Fix formatting errors and typos.
335
336 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
337
338         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
339
340         * decl.c (pushdecl): Do create a binding for extern "C" functions,
341         but not for their DECL_ASSEMBLER_NAMEs.
342         (lookup_name_current_level): Fix formatting.
343         (xref_tag): Likewise.
344         * decl2.c (start_objects): Mark static constructors and
345         destructors as used.
346
347 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
348
349         * decl.c (define_case_label): Don't crash if we're not in a switch.
350
351         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
352         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
353         for unsupported flags.
354
355 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
356
357         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
358         Accept and warn about -fthis-is-variable.
359
360 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
361
362         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
363         CLEANUP_STMT, and SCOPE_STMT.
364
365         * decl2.c (lang_decode_option): Adjust, in the wake of recent
366         changes to option processing.
367
368 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
369
370         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
371         function pointer from pmfs with no object given.
372         (convert_for_assignment): Do not return error when converting
373         pmfs.
374
375 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
376
377         * lex.c (internal_filename): New variable.
378         (INTERNAL_FILENAME): New macro.
379         (init_parse): Allocate internal_filename and mark as root.  Use it
380         instead of a string constant.
381
382 1999-09-21  Nathan Sidwell  <nathan@acm.org>
383
384         Reimplement dynamic cast and catch matching.
385         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
386         * search.c (dynamic_cast_base_recurse): New function.
387         (get_dynamic_cast_base_type): New function for dynamic cast.
388         * rtti.c (build_dynamic_cast_1): Determine source and target
389         class relationship. Call __dynamic_cast_2.
390         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
391         (__user_type_info::dyncast): New dynamic cast dispatcher.
392         (__user_type_info::sub_kind): New nested enumeration.
393         (__user_type_info::contained_p): sub_kind predicate.
394         (__user_type_info::contained_public_p): Likewise.
395         (__user_type_info::contained_nonpublic_p): Likewise.
396         (__user_type_info::contained_nonvirtual_p: Likewise.
397         (__user_type_info::upcast_result): New nested struct.
398         (__user_type_info::dyncast_result): New nested struct.
399         (*::do_upcast): New catch function.
400         (*::do_dyncast): New dynamic cast function.
401         (__user_type_info::find_public_subobj): New dynamic cast
402         helper dispatcher.
403         (*::do_find_public_subobj): New dynamic cast helper function.
404         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
405         (__user_type_info::dyncast): Define dynamic cast dispatcher.
406         (*::do_upcast): Define catch function.
407         (*::do_dyncast): Define dynamic cast function.
408         (*::do_find_public_subobj): Define dynamic cast helper function.
409         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
410         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
411         (__dynamic_cast_2): New dynamic cast runtime.
412
413 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
414
415         * cp-tree.h (finish_stmt_expr): Change prototype.
416         * expr.c (cplus_expand_expr): Adjust call accordingly.
417         * init.c (finish_init_stmts): Likewise.
418         * parse.y (primary): Likewise.
419         * pt.c (tsubst_copy): Likewise.
420         * semantics.c (finish_stmt_expr): Don't take two parameters.
421         Don't remove generated BLOCKs from the block-tree.
422
423         Remove support for assigning to `this'.
424         * NEWS: Note that fact.
425         * class.c (build_vbase_path): Don't check flag_this_is_variable.
426         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
427         (language_function): Remove assigns_this, just_assigned_this, and
428         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
429         (base_init_expr): Remove.
430         (current_vcalls_possible_p): New macro.
431         (vtbls_set_up_p): Likewise.
432         (emit_base_init): Change prototype.
433         * decl.c (finish_destructor_body): New function, split out from
434         finish_function.
435         (current_function_assigns_this): Remove.
436         (current_function_just_assigned_this): Likewise.
437         (start_function): Don't set them.
438         (finish_function): Don't check them.  Don't emit
439         base-initialization code here.  Generate code for destructors when
440         doing semantic analysis.
441         (finish_stmt): Don't check current_function_just_assigned_this.
442         * decl2.c (lang_f_options): Remove this-is-variable.
443         (lang_decode_option): Likewise.
444         (grokclassfn): Don't check flag_this_is_variable.
445         * init.c (emit_base_init): Return the expression generated.
446         (construct_virtual_bases): Don't push/pop obstacks.  Fix
447         typo.
448         (build_new_1): Don't check flag_this_is_variable.
449         (get_temp_regvar): Don't set DECL_REGISTER.
450         (build_vec_init): Don't call use_variable.
451         * lang-options.h: Remove "-fthis-is-variable" and
452         "-fno-this-is-variable".
453         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
454         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
455         expand_expr_stmt.
456         * semantics.c (finish_expr_stmt_real): Rename to ...
457         (finish_expr_stmt): This.  Remove assigned_this parameter.
458         (begin_if_stmt): Call do_pushlevel before starting the statement.
459         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
460         blocks.
461         (setup_vtbl_ptr): Emit initialization code for bases and members
462         at semantic-analysis time.  Emit code to initialize vtables in
463         destructors here.
464         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
465         Don't handle CTOR_INITIALIZER any more.
466         * typeck.c (build_modify_expr): Don't check for assignments to
467         this.
468         (c_expand_return): Don't suggest assigning to `this'.
469         
470         * Makefile.in (decl.o): Depend on RTL_H.
471         (decl2.o): Likewise.
472         (class.o): Likewise.
473         (call.o): Likewise.
474         (method.o): Likewise.
475         (search.o): Likewise.
476         (tree.o): Likewise.
477         (pt.o): Likewise.
478
479         * decl.c (duplicate_decls): When a builtin function is redeclared
480         as static, make sure it is mangled correctly.
481
482         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
483         detail about the statement-tree.
484         
485 1999-09-20  Nathan Sidwell  <nathan@acm.org>
486
487         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
488
489 1999-09-20  Nick Clifton  <nickc@cygnus.com>
490
491         * decl2.c (lang_decode_option): Extend comment.
492
493 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
494
495         * typeck.c: Include "tm_p.h".
496
497 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
498
499         * ir.texi: New file.
500
501 1999-09-19  Paul Burchard <burchard@pobox.com>
502
503         * semantics.c (expand_stmt): Initialize return value.
504
505 1999-09-18  Paul Burchard <burchard@pobox.com>
506
507         * gxxint.texi: G++ now implements namespaces.
508         
509 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
510
511         * decl.c (pop_label): Don't warn about unused labels more than
512         once.
513         * semantics.c (finish_goto_stmt): Always marked used labels as
514         used.
515
516         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
517         even when the declaration is external.
518         (cp_finish_decl): Adjust call to layout_var_decl.
519         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
520
521 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
522
523         * typeck.c (get_member_function_from_ptrfunc): Always consider
524         virtuality inside member pointer.
525
526 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
527
528         Turn on function-at-a-time processing.  
529         * cp-tree.h (doing_semantic_analysis_p): New macro.
530         (SF_DEFAULT): Define to zero, not SF_EXPAND.
531         (start_handler_parms): Change prototype.
532         (expand_start_catch_block): Likewise.
533         (expand_end_catch_block): Likewise.
534         (expand_start_eh_spec): Likewise.
535         (expand_end_eh_spec): Declare.
536         (finish_handler_parms): Change prototype.
537         (begin_catch_block): Declare.
538         (finish_handler): Change prototype.
539         (do_pushlevel): Declare.
540         (do_poplevel): Likewise.  
541         * decl.c (pushlevel): Don't create
542         binding levels when not doing semantic analysis.
543         (poplevel): Don't pop them.
544         (pushdecl): Assert that we are never called when not doing
545         semantic analysis.
546         (pushdecl_top_level): Use push_to_top_level.
547         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
548         label when expanding.
549         (cp_finish_decl): Only inject for-scope variables when doing
550         semantic analysis.  Add comments.
551         (start_handler_parms): Return the handler parm.
552         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
553         already set.  Reinitialize from saved function data if available.
554         Don't pushlevel when not doing semantic analysis.
555         (store_parm_decls): Only generate RTL when expanding.  Only
556         pushdecl when doing semantic analysis.  Set
557         current_eh_spec_try_block if appropriate.
558         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
559         Combine common code.  Don't poplevel when not doing semantic
560         analysis.
561         (push_cp_function_context): Don't expand functions without an
562         explicit call to expand_body.
563         (mark_lang_function): Make eh_spec_try_block and
564         x_scope_stmt_stack.  
565         * except.c (expand_end_eh_spec): Don't
566         declare.
567         (process_start_catch_block): Likewise.
568         (push_eh_cleanup): Use finish_decl_cleanup.
569         (initialize_handler_parm): New function.
570         (expand_start_catch_block): Use it.
571         (expand_end_catch_block): Use tree-generation functions, not
572         RTL-generation functions.
573         (expand_start_eh_spec): Likewise.
574         (expand_end_eh_spec): Likewise.
575         (expand_exception_blocks): Simplify.
576         (start_anon_func): Use do_pushlevel.
577         (end_anon_func): Use do_poplvel.  Call expand_body for the
578         function.  
579         * expr.c (do_case): Don't call define_case_label.  
580         * init.c (create_temporary_var): Set DECL_CONTEXT for local
581         variables.  
582         * method.c (emit_thunk): Call expand_body for the
583         thunk.
584         (sythesize_method): Likewise.  
585         * parse.y (handler_args): Give it ttype.
586         (eat_saved_input): Call expand_body.
587         (base_init): Use do_pushlevel.
588         (pending_inline): Call expand_body.
589         (handler): Adjust calls to finish_handler_parms and
590         finish_handler.
591         (handler_args): Don't call expand_start_catch_block.  Return the
592         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
593         * parse.c: Regenerated.
594         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
595         * semantics.c (do_pushlevel): Give it external linkage.  Build
596         SCOPE_STMTs.
597         (do_poplevel): Likewise.
598         (finish_case_label): Call define_case_label when doing semantic
599         analysis.
600         (finish_goto_stmt): Create RTL for labels.
601         (finish_function_try_block): Set in_function_try_handler
602         unconditionally.
603         (finish_function_handler_sequence): Unset it.
604         (finish_handler_parms): Use expand_start_catch_block even when
605         building a statement-tree.
606         (begin_catch_block): New function.
607         (finish_handler): Move a little RTL-generation logic here.
608         (finish_decl_cleanup): Allow cleanups for empty declarations.
609         (finish_named_return_value): Don't pushdecl when not doing
610         semantic analysis.
611         (expand_stmt): Don't do semantic analysis for variable
612         declarations.  Handle START_CATCH_STMT.  Call expand_label
613         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
614         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
615         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
616         RETURN_INIT and function try blocks.
617         
618         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
619         x_scope_stmt_stack.  Add x_in_charge_parm.
620         (current_eh_spec_try_block): New macro.
621         (current_scope_stmt_stack): Likewise.
622         (current_in_charge_parm): Likewise.
623         * decl.c (start_function): Initialize current_in_charge_parm.
624         (finish_function): Use current_in_charge_parm rather than looking
625         up __in_chrg.
626         * search.c (expand_indirect_vtbls_init): Likewise.
627
628         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
629         (TRY_BLOCK): Likewise.
630         (HANDLER): Likewise.
631         (START_CATCH_STMT): New tree node.
632         (SCOPE_STMT): Likewise.
633         * cp-tree.h (SCOPE_BEGIN_P): New macro.
634         (SCOPE_NULLIFIED_P): Likewise.
635         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
636         (struct lang_decl): Add saved_language_function.
637         (DECL_PENDING_INLINE_INFO): Adjust documentation.
638         (DECL_PENDING_INLINE_P): New macro.
639         (TYPE_TI_ARGS): Fix typo in comment.
640         (DECL_SAVED_TREE): Add to documentation.
641         (DECL_SAVED_FUNCTION_DATA): New macro.
642         (START_CATCH_TYPE): Likewise.
643         (SCOPE_END_P): New macro.
644         (declare_parm_level): Don't declare.
645         * decl.c (mark_lang_function): New function, split out from
646         mark_cp_function_context.
647         (save_function_data): New function.
648         (declare_parm_level): Remove.
649         (finish_function): Use save_function_data to squirrel away
650         important stuff for later use.
651         (mark_cp_function_context): Use mark_function_data.
652         (lang_mark_tree): Likewise.
653         * lex.c (begin_definition_of_inclass_inline): Set
654         DECL_PENDING_INLINE_P.
655         (store_pending_inline): Clear it.
656         * pt.c (tsubst_decl): Likewise.
657
658 1999-09-17  Nathan Sidwell  <nathan@acm.org>
659
660         * call.c (perform_implicit_conversion): Deal with error_mark_node.
661
662 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
663
664         * decl.c (warn_extern_redeclared_static): Don't get confused by
665         static member functions.
666         (duplicate_decls): Merge DECL_THIS_STATIC.
667
668         * decl.c (expand_static_init): Make sure assignments to local
669         statics actually occur.
670
671 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
672
673         * cp-tree.h (poplevel_class): Declare.
674         * class.c (popclass): Use poplevel_class, not poplevel.
675         * decl.c (poplevel_class): Don't make it static.  Don't return a
676         value.
677         (poplevel): Don't call poplevel_class; abort in a class
678         binding level is seen.
679         * semantics.c (finish_translation_unit): Use pop_everything.
680         * parse.y (member_init): Allow errors.
681         (pending_inline): Call finish_function.
682         * parse.c: Regenerated.
683         * Makefile.in (CONFLICTS): Adjust.
684
685 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
686         
687         * error.c: Reduce code duplication.
688         (dump_template_value): New function.
689         (dump_type_real): Use it.
690         (dump_decl): Likewise.
691         (dump_function_name): Likewise.
692         (dump_function_decl): Don't be too talkative about function return
693         type variety.
694
695 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
696
697         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
698
699         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
700
701 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
702
703         * decl2.c (finish_file): Also call check_global_declarations for
704         the pending_statics list.
705
706 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
707
708         * lex.c (cp_pragma_implementation): Allow #pragma implementation
709         in header files.
710
711 1999-09-15  Richard Henderson  <rth@cygnus.com>
712
713         * lex.c (mark_impl_file_chain): Follow the next chain.
714
715 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
716
717         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
718         problems with extern "C" functions redeclared as static.
719         (duplicate_decls): When a builtin is redeclared static, make the
720         new function have internal linkage.
721         
722 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
723
724         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
725         * pt.c (tsubst_copy): Likewise.
726         * tree.c (search_tree): Likewise.
727         (mapcar): Likewise.
728
729 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
730
731         * typeck2.c (ack): Don't declare progname.
732
733 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
734
735         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
736         filenames with ggc_alloc_string.
737
738 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
739
740         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
741         TARGET_EXPR.
742         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
743         the TARGET_EXPR.
744         * cvt.c (build_up_reference): Likewise.
745         * tree.c (build_cplus_new): Likewise.
746         (get_target_expr): Likewise.
747         
748 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
749
750         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
751
752 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
753
754         * cp-tree.h (build_target_expr): New function.
755         * call.c (build_conditional_expr): Use build_target_expr.
756         (convert_like): Likewise.
757         (build_over_call): Likewise.
758         * cvt.c (build_up_reference): Likewise.
759         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
760         (destroy_local_var): Here.
761         (build_target_expr): New function.
762         * tree.c (build_cplus_new): Use it.
763         (get_target_expr): Likewise.
764
765 1999-09-13  Nathan Sidwell  <nathan@acm.org>
766
767         * typeck.c (expr_sizeof): Don't decay arrays and functions.
768         Remove misleading comment.
769         (build_compound_expr): Don't decay arrays.
770
771 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
772
773         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
774         class rvalues again.
775
776 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
777
778         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
779
780         * g++spec.c: Include gcc.h.
781         (lang_specific_driver): Constify a char*.  Call xcalloc, not
782         xmalloc/bzero.  All calls to the function pointer parameter now
783         explicitly call `fatal'.
784
785 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
786
787         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
788         * cvt.c (ocp_convert): Complete the from and destination types.
789         Adjust warning about functions always being `true' in conditionals.
790         * decl.c (duplicate_decls): Don't play funny games with abort.
791         * error.c (dump_expr): Handle OVERLOADs.
792         * spew.c (probe_obstack): Remove.
793         * typeck.c (condition_conversion): Use perform_implicit_conversion.
794         
795 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
796
797         * cp-tree.h (auto_function, define_function): Adjust prototypes.
798         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
799         changed.
800         (auto_function): Likewise, for CODE arg.
801         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
802         (builtin_function): ... here.
803
804 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
805
806         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
807         (init_decl_processing): Don't set TREE_PERMANENT for the
808         error_mark_node.
809         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
810         (grokdeclarator): Likewise.
811         (grokparms): Don't check TREE_PERMANENT when building up lists.
812         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
813         (mark_inline_for_output): Likewise.
814         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
815         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
816         * lex.c (check_newline): Don't check ggc_p; it is always one.
817         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
818         * spew.c (yylex): Don't copy_node or probe_obstacks for
819         non-permanent CONSTANTs and STRINGs.
820         * tree.c (build_cplus_array_type_1): Don't fuss with
821         TREE_PERMANENT on ARRAY_TYPEs.
822         
823         * cp-tree.def (CLEANUP_STMT): New node.
824         * cp-tree.h (language_function): Add name_declared.
825         (current_function_name_declared): New macro.
826         (CLEANUP_DECL): New macro.
827         (CLEANUP_EXPR): Likewise.
828         (emit_local_var): Likewise.
829         (finish_decl_cleanup): New function.
830         * cvt.c (build_up_reference): Simplify.
831         (ocp_convert): Remove dead code.
832         * decl.c (start_decl): Remove call to add_decl_stmt.
833         (grok_reference_init): Adjust, to handle bindings temporaries to
834         references.  Remove dead code.
835         (initialize_local_var): Don't generate RTL for
836         declarations here, or build cleanups here.  Don't fuss with
837         obstacks.  Replace expand_start_target_temps calls with explicit
838         setting of stms_are_full_exprs_p.
839         (destroy_local_var): New function.
840         (emit_local_var): Likewise.
841         (cp_finish_decl): Use them, as appropriate.
842         (start_function): Announce template functions.
843         (store_parm_decls): Don't call declare_function_name here.
844         (finish_stmt): Don't start emit base-initialization code when just
845         building the statement-tree.
846         * init.c (create_temporary_var): Move add_decl_stmt call ...
847         (get_temp_regvar): Here.
848         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
849         cp_finish_decl would expect.  Don't call add_decl_stmt.
850         * semantics.c (begin_compound_stmt): Call declare_function_name,
851         if appropriate.
852         (finish_decl_cleanup): New function.
853         (expand_stmt): Use emit_local_var to output variables.          
854         (expand_body): Set current_funtion_name_declared.
855         
856 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
857
858         * cp-tree.h (finish_cleanup_try_block): New function.
859         * semantics.c (finish_cleanup_try_block): Add comment.
860
861 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
862
863         * cp-tree.h: Delete declarations for all tree nodes now moved to
864         global_trees.
865         * decl.c: Delete their definitions.
866         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
867         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
868         provide defaults.
869         (init_decl_processing): Call build_common_tree_nodes and
870         build_common_tree_nodes_2 instead of building their nodes here.
871         Don't add gc roots for them.
872
873 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
874
875         * cp-tree.h (language_function): Rename expanding_p to
876         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
877         (expanding_p): Adjust accordingly.
878         (TREE_VIA_PRIVATE): Fix typo in comment.
879         (DECL_REFERENCE_SLOT): Remove.
880         (SET_DECL_REFERENCE_SLOT): Likewise.
881         * decl.c (named_label_uses): Adjust. Remove chicken comment.
882         (push_overloaded_decl): Don't truncate the chain of bindings when
883         adding an overloaded function.
884         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
885         (initialize_local_var): Fix typo in comment.
886         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
887         * decl2.c (start_objects): Make the fact that we are expanding
888         the generated function right away explicit.
889         (start_static_storage_duration_function): Likewise.
890         (finish_file): Fix typo in comment.
891         * init.c (build_vec_init): Correct bugs in handling cleanups.
892         * semantics.c (maybe_convert_cond): New function.
893         (FINISH_COND): Always store the condition, even if there's
894         a declaration.
895         (finish_if_stmt_cond): Use maybe_convert_cond.
896         (finish_while_stmt_cond): Likewise.
897         (finish_do_stmt): Likewise.
898         (finish_for_cond): Likewise.
899         (expand_cond): Adjust.
900         
901         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
902         * init.c (perform_member_init): Remove obstack machinations.
903         (expand_cleanup_for_base): Likewise.
904         (finish_init_stmts): Mark the statement-expression as used.
905         * method.c (emit_thunk): Use tree-generating functions, not
906         RTL.
907         (do_build_copy_constructor): Likewise.
908         (do_build_assign_ref): Likewise.
909         (synthesize_method): Likewise.  Keep track of line numbers.
910         * pt.c (tsubst_expr): Handle various kinds of try blocks.
911         * semantics.c (expand_stmts): Remove.
912         (begin_function_try_block): Set FN_TRY_BLOCK_P.
913         (finish_function_try_block): Be careful rechaining 
914         function try blocks.
915         (expand_stmt): Loop through all the statements at a given level.
916         (exapnd_body): Be careful with line-numbers here too.  Prepare for
917         being called directly from the parser.
918
919         * cp-tree.h (finish_function): Adjust prototype.
920         * decl.c (finish_function): Return the function compiled.
921         * pt.c (instantiate_decl): Don't play games with obstacks.
922         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
923         (search_tree): Likewise.
924         * typeck.c: Fix typo in comment.
925         * typeck2.c (store_init_value): Add comment.
926
927         * cp-tree.h (CPTI_ATEXIT): New macro.
928         (atexit_node): Likewise.
929         * decl.c (destroy_local_static): New function, broken out from ...
930         (expand_static_init): Here.
931
932         * rtti.c (get_tinfo_var): These should always be global
933         (expand_si_desc): Use tree, not RTL, functions to generate code.
934         (expand_class_desc): Likewise.
935         (expand_ptr_desc): Likewise.
936         (expand_attr_desc): Likewise.
937         (expand_generic_desc): Likewise.
938         (synthesize_tinfo_fn): Likewise.
939
940 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
941
942         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
943         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
944         RECHAIN_STMTS. 
945         (RECHAIN_STMST_FROM_CHAIN): Likewise.
946
947         * parse.y (simple_stmt): Fix typo in last change.
948
949         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
950         (STMT_IS_FULL_EXPR_P): Likewise.
951         (STMT_LINENO_FOR_FN_P): Likewise.
952         (prep_stmt): New function.
953         (building_stmt_tree): Tweak for safety.
954         * pt.c (tsubst_expr): Use prep_stmt throughout.
955         (add_tree): Move it to semantics.c
956         * semantics.c (add_tree): Move it here.
957         (finish_expr_stmt_real): New function.
958         (finish_expr_stmt): Use it.
959         (finish_if_stmt_cond): Use FINISH_COND.
960         (finish_while_stmt_cond): Likewise.
961         (finish_for_cond): Likewise.
962         (finish_stmt_tree): Tweak line-number handling.
963         (prep_stmt): New function.
964         (expand_stmt): Use it.
965         
966         * cp-tree.h (begin_switch_stmt): Adjust prototype.
967         (finish_switch_cond): Likewise.
968         * parse.y (simple_stmt): Adjust accordingly.
969         * parse.c: Regenerated.
970         * pt.c (tsubst_expr): Adjust accordingly.
971         * semantics.c (expand_cond): New function.
972         (FINISH_COND): New macro.
973         (begin_switch_stmt): Build the SWITCH_STMT here.
974         (finish_switch_stmt_cond): Not here.
975         (expand_stmt): Adjust calls to begin_switch_stmt and
976         finish_switch_cond.  Use expand_cond throughout.
977
978         * dump.c (dequeue_and_dump): Dump types for constants.
979         Describe DECL_ARG_TYPE more intuitively.
980         Handle ARRAY_REF.
981
982         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
983         (lang_cleanup_tree): Remove.
984         * lex.c (make_lang_type): Use ggc_alloc to allocate
985         TYPE_LANG_SPECIFIC.
986
987         Reorganize per-function data.
988         * cp-tree.h (saved_scope): Add function_decl, bindings.
989         (language_function): Rename binding_level to bindings.
990         (cp_function_chain): Use the current_function, not the
991         outer_function_chain.
992         (current_class_ptr): Make it work, even when there's no 
993         current function.
994         (current_class_ref): Likewise.
995         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
996         macros.
997         (clear_temp_name): Remove.
998         * decl.c (check_function_type): New function, broken out from
999         start_function.
1000         (current_binding_level): Adjust definition.
1001         (pushlevel): Simplify.
1002         (poplevel): Don't use named_label_uses when we're outside
1003         a function scope.
1004         (mark_saved_scope): Mark function_decl and bindings.
1005         (maybe_push_to_top_level): Don't unconditionally push a new
1006         function context.  Save bindings and the current_function_decl.
1007         Don't clear named_labels.
1008         (pop_from_top_level): Pop function context if appropriate.
1009         (init_decl_processing): Set init_lang_status and free_lang_status,
1010         rather than save_lang_status and restore_lang_status.
1011         (start_function): Take SF_* flags.  Don't clear per-function data.
1012         Reorder and simplify to use new per-function data code.  Add
1013         asserts.
1014         (store_parm_decls): Don't call init_function_start here.
1015         (finish_function): Adjust for new handling of per-function data.
1016         (push_cp_function_context): Simplify.
1017         (mark_cp_function_context): Change binding_level to bindings.
1018         * decl2.c (clear_temp_name): Remove.
1019         (start_objects): Use SF flags to start_function.
1020         (start_static_storage_duration_function): Likewise.
1021         * except.c (start_anon_func): Remove redundant calls to 
1022         push_function_context_to.  Use SF flags to start function.
1023         (end_anon_func): Remove redundant call to pop_function_context
1024         from.
1025         * lex.c (reinit_parse_for_function): Don't initialize per-function 
1026         data.
1027         * method.c (emit_thunk): Clear current_function after calling
1028         assemble_end_function.  Use SF flags for start_function.
1029         (synthesize_method): Use SF flags for start_function.
1030         * parse.c: Regenerated.
1031         * parse.y (fn.defpen): Likewise.
1032         (pending_inline): Clear current_function, even if something goes
1033         wrong.
1034         * pt.c (instantiate_decl): Use SF flags to start_function.
1035         Don't save and restore expanding_p.
1036         (add_tree): Handle the case where we are outside any function.
1037         (end_tree): Likewise.
1038         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
1039         * semantics.c (begin_function_definition): Likewise.
1040         (expand_body): Likewise.
1041         
1042 1999-09-09  Nathan Sidwell  <nathan@acm.org>
1043
1044         * cp-tree.h (convert_to_void): Prototype new function.
1045         (require_complete_type_in_void): Remove prototype.
1046         * cvt.c (convert_to_void): New function.
1047         (ocp_convert): Use convert_to_void.
1048         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
1049         expressions.
1050         * typeck.c (require_complete_type_in_void): Remove function.
1051         (build_compound_expr): Use convert_to_void.
1052         (build_static_cast): Likewise.
1053         (build_c_cast): Likewise.
1054         * semantics.c (finish_expr_stmt): Do not decay full expressions.
1055         
1056         * typeck.c (build_x_compound_expr): Add FIXME.
1057
1058 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1059
1060         * cp-tree.h (scratch_tree_cons): Remove.
1061         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
1062         and perm_tree_cons with plain tree_cons.
1063         * class.c: Likewise.
1064         * decl.c: Likewise.
1065         * decl2.c: Likewise.
1066         * except.c: Likewise.
1067         * expr.c: Likewise.
1068         * init.c: Likewise.
1069         * lex.c: Likewise.
1070         * method.c: Likewise.
1071         * parse.y: Likewise.
1072         * pt.c: Likewise.
1073         * repo.c: Likewise.
1074         * rtti.c: Likewise.
1075         * search.c: Likewise.
1076         * typeck.c: Likewise.
1077         * parse.c: Regenerated.
1078         * tree.c (build_srcloc): Simplify.
1079         
1080 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1081
1082         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1083         Remove next.
1084         (LANG_DECL_PERMANENT): Remove.
1085         * decl.c (duplicate_decls): Don't mess about with obstacks trying
1086         to free memory.
1087         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1088         * lex.c (free_lang_decl_chain): Remove.
1089         (build_lang_decl): Don't use obstacks.
1090         (retrofit_lang_decl): Likewise.
1091         (copy_lang_decl): Likewise.
1092
1093         * cp-tree.h (saved_scope): Remove old_binding_level and 
1094         function_decl.  Tidy up.
1095         * decl.c (mark_saved_scope): Don't set them.
1096         (maybe_push_to_top_level): Clear memory.
1097
1098         * decl.c (layout_var_decl): Change prototype.  Don't complete
1099         types for external objects.
1100         (check_initializer): Likewise.  Tidy.
1101         (initialize_local_var): Complete types here.
1102         (cp_finish_decl): Not here.  Reorganize a little.
1103         (grokvardecl): Don't complete types here.
1104
1105         * decl.c (start_function): Clear last_dtor_insn and
1106         last_parm_cleanup_insn. 
1107         (push_cp_function_context): Just copy over a little of
1108         the old context, not all of it.
1109
1110         * cp-tree.h (copy_to_permanent): Remove.
1111         (permanent_p): Likewise.
1112         * decl.c (building_typename_type): Don't use copy_to_permanent.
1113         (start_decl): Likewise.
1114         (grok_reference_init): Likewise.
1115         (cp_finish_decl): Likewise.
1116         * init.c (build_new_1): Don't use mapcar.
1117         (build_vec_delete_1): Don't use copy_to_permanent.
1118         (build_vec_init): Likewise.
1119         * parse.y (primary): Likewise.
1120         * parse.c: Regenerated.
1121         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1122         (lookup_template_class): Likewise.
1123         (tsubst_friend_function): Likewise.
1124         (instantiate_class_template): Likewise.
1125         (tsubst_decl): Likewise.
1126         (tsubst): Likewise.
1127         (instantiate_template): Likewise.
1128         (unify): Likewise.
1129         * rtti.c (get_tinfo_fn): Likewise.
1130         (build_dynamic_cast): Likewise.
1131         * semantics.c (finish_if_stmt_cond): Likewise.
1132         (finish_while_stmt_cond): Likewise.
1133         (finish_do_stmt): Likewise.
1134         (finish_for_cond): Likewise.
1135         (finish_for_expr): Likewise.
1136         (finish_cleanup): Likewise.
1137         (add_decl_stmt): Likewise.
1138         (finish_named_return_value): Likewise.
1139         (finish_qualified_call_expr): Likewise.
1140         * tree.c (perm_manip): Remove.
1141         (build_exception_variant): Don't use copy_to_permanent.
1142         (permanent_p): Remove.
1143         (copy_to_permament): Remove.
1144         (build_min_nt): Don't use copy_to_permanent.
1145         (build_min): Likewise.
1146         (min_tree_cons): Likewise.
1147         * typeckc.c (build_static_cast): Likewise.
1148         (build_reinterpret_cast): Likewise.
1149         (build_const_cast): Likewise.
1150         
1151 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1152
1153         * decl.c (ggc_p): Set it to 1.
1154         (mark_saved_scope): Add prototype.
1155
1156 1999-09-07  Richard Henderson  <rth@cygnus.com>
1157
1158         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1159         * typeck.c (self_promoting_args_p): Delete.
1160
1161 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
1162
1163         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1164         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1165
1166 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1167
1168         * Makefile.in (tree.o): Depend on ggc.h.
1169         * class.c (make_method_vec): Remove.
1170         (free_method_vec): Likewise.
1171         (free_method_vecs): Remove.
1172         (add_method): Don't use them.
1173         * cp-tree.def (PTRMEM_CST): Make it longer.
1174         (TEMPLATE_PARM_INDEX): Make it shorter.
1175         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1176         (template_parm_index): Remove RTL field.
1177         (ptrmem_cst): Add RTL field.
1178         (finish_function): Removed parameter.
1179         (process_next_inline): Change prototype.
1180         (init_cplus_unsave): Rename to init_tree.
1181         (binding_init): Remove.
1182         * decl.c (free_binding_nodes): Remove.
1183         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
1184         (pop_binding): Don't use free_binding_nodes.
1185         (free_binding_vecs): Remove.
1186         (store_bindings): Don't use them.
1187         (pop_from_top_level): Likewise.
1188         (lookup_namespace_name): Simplify.
1189         (build_typename_type): Don't use obstack_free.
1190         (unqualified_namespace_lookup): Simplify.
1191         (lookup_name_real): Simplify.
1192         (start_function): Remove comment about leaks.
1193         (finish_function): Removed nested parameter.  Call
1194         expand_end_bindings even when building_stmt_tree.
1195         Call ggc_push_context and ggc_pop_context around
1196         rest_of_compilation, if necessary.
1197         (mark_cp_function_context): Handle a NULL language-context.
1198         (lang_mark_false_label_stack): Fix typo.
1199         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
1200         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
1201         pointer to method types.
1202         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
1203         * decl2.c (finish_objects): Adjust call to finish_function.
1204         (finish_static_store_duration_function): Likewise.
1205         (do_nonmember_using_decl): Remove call to binding_init.
1206         * except.c (end_anon_func): Adjust call to finish_function.
1207         * lex.c (mark_impl_file_chain): New function.
1208         (init_parse): Call init_tree, not init_cplus_unsave.
1209         Add GC roots.
1210         (cp_pramga_interface): Use xmalloc, not permalloc.
1211         (cp_pragma_implementation): Likewise.
1212         (begin_definition_of_inclass_inline): Simplify.
1213         (process_next_inline): Adjust prototype.
1214         (do_scoped_id): Don't call binding_init.
1215         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
1216         * method.c (emit_thunk): Adjust call to finish_function.
1217         (synthesize_method): Likewise.
1218         * parse.y (%union): Add a new `pi' variant.
1219         (PRE_PARSED_FUNCTION_DECL): Use it.
1220         (fn.defpen): Likewise.
1221         (fndef): Adjust call to finish_function.
1222         * pt.c (instantiate_decl): Likewise.
1223         * rtti.c (syntheisze_tinfo_fn): Likewise.
1224         * semantics.c (expand_body): Likewise.
1225         * tree.c: Include ggc.h.
1226         (mark_list_hash): New function.
1227         (binding_init): Remove.
1228         (init_cplus_unsave): Rename to ...
1229         (init_tree): This.  Add GC roots.
1230         
1231 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
1232
1233         Get ready for garbage collection.
1234         * Makefile.in (CXX_TREE_H): Add varray.h
1235         (lex.o): Depend on ggc.h.
1236         (decl.o): Likewise.
1237         (decl2.o): Likewise.
1238         (method.o): Likewise.
1239         (search.o): Likewise.
1240         (pt.o): Likewise.
1241         (repo.o): Likewise.
1242         * class.c: Include ggc.h.
1243         (current_class_name): Remove.
1244         (current_class_type): Likewise.
1245         (current_access_specifier): Likewise.
1246         (previous_class_type): Likewise.
1247         (previous_class_values): Likewise.
1248         (class_cache_firstobj): Likewise.
1249         (current_lang_base): Likewise.
1250         (current_lang_stack): Likewise.
1251         (current_lang_stacksize): Likewise.
1252         (lang_name_c): Likewise.
1253         (lang_name_cplusplus): Likewise.
1254         (lang_name_java): Likewise.
1255         (current_lang_name): Likewise.
1256         (base_layout_decl): Likewise.
1257         (access_default_node): Likewise.
1258         (access_public_node): Likewise.
1259         (access_protected_node): Likewise.
1260         (access_private_node): Likewise.
1261         (access_default_virtual_node): Likewise.
1262         (access_public_virtual_node): Likewise.
1263         (access_protected_virtual_node): Likewise.
1264         (access_private_virtual_node): Likewise.
1265         (signed_zero_node): Likewise.
1266         (init_class_processing): Don't build base_layout_decl.
1267         (push_lang_context): Adjust now that current_lang_base is a varray.
1268         (pop_lang_context): Likewise.
1269         * cp-tree.h: Include varray.h.
1270         (cp_global_trees): Add access_default, access_public,
1271         access_protected, access_private, access_default_virtual,
1272         access_public_virtual, access_protected_virtual,
1273         access_private_virtual, ctor_identifier, delta2_identifier, 
1274         delta_identifier, dtor_identifier, in_charge_identifier,
1275         index_identifier, nelts_identifier, this_identifier,
1276         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
1277         lang_name_c, lang_name_cplusplus, lang_name_java,
1278         empty_except_spec, null, jclass, minus_one, terminate.
1279         (saved_scope): Move here from decl.c.  Define globals in terms of
1280         saved_scope: current_namespace, current_class_name,
1281         current_class_type, current_access_specifier, current_lang_stack,
1282         current_lang_base, current_lang_name, current_function_parms,
1283         current_template_parms, processing_template_decl,
1284         processing_specialization, processing_explicit_instantiation,
1285         previous_class_type, previous_class_values, class_cache_firstobj.
1286         (scope_chain): New variable.
1287         (init_pt): New function.
1288         * decl.c (current_namespace): Remove.
1289         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1290         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1291         (delta_identifier, delta2_identifier): Likewise.
1292         (pfn_or_delta2_identifier, tag_identifier): Likewise
1293         (vt_off_identifier, empty_except_spec, null_node): Likewise.
1294         (current_function_parms, current_lang_base): Remove.
1295         (current_lang_stack, previous_class_values): Remove.
1296         (class_binding_level): Macroize.
1297         (saved_scope): Remove.
1298         (current_saved_scope): Rename to scope_chain.
1299         (mark_saved_scope): Adjust for new scope structure.
1300         (maybe_push_to_top_level): Likewise.
1301         (pop_from_top_level): Likewise.
1302         (duplicate_decls): Adjust now that current_lang_base is a varray.
1303         (build_typename_type): Call ggc_add_tree_hash_table_root.
1304         (init_decl_processing): Call init_pt.  Call push_to_top_level to
1305         set up globals.  Add GC roots.
1306         (xref_basetypes): Adjust now that current_lang_base is a varray.
1307         * decl.h (this_identifier): Remove.
1308         (in_charge_identifier): Likewise.
1309         * decl2.c: Don't include varray.h.
1310         (current_namespace): Remove.
1311         (init_decl2): Add GC roots.
1312         * except.c (Terminate): Remove. 
1313         (init_exception_processing): Use terminate_node instead.
1314         (build_terminate_handler): Likewise.
1315         * init.c (nc_nelts_field_id): Remove.
1316         (minus_one): Likewise.
1317         (init_init_processing): Use minus_one_node and nelts_identifier
1318         instead.  Add GC roots.
1319         (jclass_node): Remove.
1320         (build_new_1): Use nelts_identifier.
1321         (build_vec_init): Likewise.
1322         (build_vec_delete): Likewise.
1323         * lex.c: Include ggc.h.
1324         (defarg_fn): Move declaration early.
1325         (defarg_parms): Likewise.
1326         (init_parse): Add GC roots.
1327         (handle_cp_pragma): Remove redundant declaration of
1328         pending_vtables.
1329         * method.c: Include ggc.h.
1330         (btypelist): Make it a varray.  All uses changed.
1331         (ktypelist): Likewise.
1332         (init_method): Add GC roots.
1333         * pt.c: Don't include varray.h.  Include ggc.h.
1334         (current_template_parms): Remove.
1335         (processing_template_decl): Likewise.
1336         (processing_specialization): Likewise.
1337         (processing_explicit_instantiation): Likewise.
1338         (init_pt): New function.
1339         * repo.c: Include ggc.h.
1340         (init_repo): Add GC roots.
1341         * search.c: Don't include varray.h.
1342         (_vptr_name): Remove.
1343         (lookup_field_1): Use vtpr_identifier instead.
1344         (expand_indirect_vtbls_init): Remove redundant declaration of
1345         in_charge_identifier.
1346         (init_search_processing): Use vptr_identifier.
1347         
1348 1999-09-05  Richard Henderson  <rth@cygnus.com>
1349             Bernd Schmidt <bernds@cygnus.co.uk>
1350             Mark Mitchell  <mark@codesourcery.com>
1351
1352         * Makefile.in (parse.o): Depend on ggc.h.
1353         (decl2.o): Depend on ggc.h.
1354         (init.o): Depend on ggc.h.
1355         * cp-tree.h (init_decl2): Declare.
1356         (cp_parse_init): Likewise.
1357         * decl.c (ggc_p): Define to zero.
1358         (mark_saved_scope): New function.
1359         (init_decl_processing): Call cp_parse_init, and cp_decl2.
1360         Register GC roots.
1361         (expand_static_init): Add GC roots.
1362         * decl2.c: Include ggc.h.
1363         (init_decl2): New function.
1364         * init.c: Include ggc.h.
1365         (init_init_processing): Add GC roots.
1366         * parse.y: Include ggc.h.
1367         (cp_parse_init): New function.
1368         
1369 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
1370
1371         * decl.c (init_decl_processing): Set mark_lang_status.
1372         (lang_mark_false_label_stack): Adjust prototype.
1373         * decl2.c (grok_function_init): Remove extraneous declaration of
1374         abort_fndecl.
1375
1376         * Make-lang.in (cc1plus): Remove dependency on GGC.
1377         * Makefile.in (OBJS): Don't mention ggc-simple.o.
1378         (OBJDEPS): Don't mention ggc-simple.o.
1379
1380         * Make-lang.in (cc1plus): Depend on $(GGC).
1381         * Makefile.in (OBJS): Add ggc-simple.o.
1382         (OBJDEPS): Likewise.
1383         * cp-tree.h (language_function): Rename members to `x_' versions;
1384         we now have x_named_labels, x_ctor_label, x_dtor_label,
1385         x_base_init_list, x_member_init_list, x_base_init_expr,
1386         x_current_class_ptr, x_current_class_ref, x_last_tree,
1387         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1388         x_result_rtx. 
1389         (dtor_label, ctor_label, current_base_init_list,
1390         current_member_init_list, base_init_expr, current_class_ptr,
1391         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1392         * decl.c: Include ggc.h.
1393         (last_dtor_insn): Adjust to use x_ names.
1394         (last_parm_cleanup_insn): Likewise.
1395         (original_result_rtx): Likewise.
1396         (named_labels): Likewise.
1397         (mark_binding_level): New function.
1398         (mark_cp_function_context): Likewise.
1399         (mark_false_label_stack): Likewise.
1400         (lang_mark_tree): Likewise.
1401         (lang_cleanup_tree): Likewise.
1402         
1403 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
1404
1405         * Makefile.in (CXX_TREE_H): Include function.h.
1406         (decl.o): Don't depend on function.h.
1407         (decl2.o): Likewise.
1408         (typeck.o): Likewise.
1409         (init.o): Likewise.
1410         (method.o): Likewise.
1411         * cp-tree.h: Include function.h.
1412         (cp_function): Rename to language_function.  Remove next.
1413         (cp_function_chain): Make it a macro, not a variable.
1414         (push_cp_function_context): Don't declare.
1415         (pop_cp_function_context): Likewise.
1416         * decl.c: Don't include function.h.
1417         (push_cp_function_context): Make it static.  Make it suitable for
1418         a save_lang_status callback.
1419         (pop_cp_function_context): Likewise.
1420         (maybe_push_to_top_level): Call push_function_context_to, not
1421         push_cp_function_context.
1422         (pop_from_top_level): Call pop_function_context_from, not
1423         pop_cp_function_context.
1424         (init_decl_processing):  Set save_lang_status and
1425         restore_lang_status.  Call push_function_context_to, not
1426         push_cp_function_context.
1427         (cp_function_chain): Remove.
1428         * decl2.c: Don't include function.h.
1429         * except.c: Don't include function.h.
1430         (start_anon_func): Call push_function_context_to, not
1431         push_cp_function_context.
1432         (end_anon_func):  Call pop_function_context_from, not
1433         pop_cp_function_context.
1434         * init.c: Don't include function.h.
1435         * lex.c (begin_definition_of_inclass_inline): Call
1436         push_function_context_to, not push_cp_function_context. 
1437         (process_next_inline):  Call pop_function_context_from, not
1438         pop_cp_function_context.
1439         * method.c: Don't include function.h.
1440         (synthesize_method): Call push_function_context_to, not
1441         push_cp_function_context.  Call pop_function_context_from, not
1442         pop_cp_function_context.
1443         * typeck.c: Don't include function.h.
1444         
1445         * decl.c (expand_static_init): Tweak handling of static
1446         initializations for objects without constructors.
1447
1448 1999-09-03  Nathan Sidwell  <nathan@acm.org>
1449
1450         * typeck.c (build_indirect_ref): Reject dereference of pointer to
1451         void.
1452
1453 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
1454
1455         * cp-tree.h (cp_function): Move here, from decl.c.
1456         (cp_function_chain): Declare.
1457         (dtor_label): New macro, instead of variable.
1458         (ctor_label): Likewise.
1459         (current_base_init_list): Likewise.
1460         (current_member_init_list): Likewise.
1461         (base_init_expr): Likewise.
1462         (current_class_ptr): Likewise.
1463         (current_class_ref): Likewise.
1464         (last_tree): Likewise.
1465         (last_expr_type): Likewise.
1466         (current_function_returns_value): Likewise.
1467         (current_function_returns_null): Likewise.
1468         (current_function_just_assigned_this): Likewise.
1469         (current_function_parms_stored): Likewise.
1470         (temp_name_counter): Likewise.
1471         (static_labelno): Likewise.
1472         (expanding_p): Likewise.
1473         (stmts_are_full_exprs_p): Likewise.
1474         (in_function_try_handler): Likewise.
1475         (lang_type): Remove nested type_flags.  All uses changed.
1476         * call.c (ctor_label): Remove.
1477         (dtor_label): Likewise.
1478         * class.c (current_class_ptr): Remove.
1479         (current_class_ref): Likewise.
1480         * decl.c (static_labelno): Remove.
1481         (dtor_label): Likewise.
1482         (last_dtor_insn): New macro, instead of variable.
1483         (last_parm_cleanup_insn): Likewise.
1484         (original_result_rtx): Likewise.
1485         (in_function_try_handler): Remove.
1486         (named_label_uses): New macro, instead of variable.
1487         (named_labels): Likewise.
1488         (current_function_returns_value): Remove.
1489         (current_function_returns_null): Likewise.
1490         (current_function_assigns_this): New macro, instead of variable.
1491         (current_function_just_assigned_this): Likewise.
1492         (current_binding_level): Likewise.
1493         (init_decl_processing): Call push_cp_function_context.
1494         (cp_function): Move to cp-tree.h
1495         (cp_function_chain): Make it global.
1496         (temp_name_counter): Remove.
1497         (push_cp_function_context): Simplify.
1498         (pop_cp_function_context): Likewise.
1499         * decl2.c (temp_name_counter): Remove.
1500         * init_c (current_base_init_list): Likewise.
1501         (current_member_init_list): Likewise.
1502         (base_init_expr): Likewise.
1503         * method.c (static_labelno): Likewise.
1504         * pt.c (last_tree): Likewise.
1505         * semantics.c (expanding_p): Likewise.
1506         (stmts_are_full_exprs_p): Likewise.
1507         (last_expr_type): Likewise.
1508         * typeck.c (dtor_label): Likewise.
1509         (ctor_label): Likewise.
1510         
1511 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
1512
1513         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
1514         (arg_assoc_class): Use arg_assoc_template_arg for template
1515         arguments. 
1516         (arg_assoc): Likewise.
1517         * pt.c (mangle_class_name_for_template): Allow member template
1518         template arguments.
1519
1520 1999-09-02  Nathan Sidwell  <nathan@acm.org>
1521
1522         * call.c (build_conditional_expr): Warn on enum mismatches.
1523         (convert_arg_to_ellipsis): Move non-pod check to after
1524         conversion.
1525
1526 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1527
1528         * gxx.gperf (hash, is_reserved_word): Add prototypes.
1529
1530         * init.c (build_vec_init): Initialize variable `try_block'.
1531
1532         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1533         Likewise for bzero/memset.
1534         (token_getch, token_put_back): Add static prototypes.  Remove
1535         `inline' from the definitions.
1536         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1537
1538 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
1539
1540         * cp-tree.h (lang_type): Move align into type_flags.
1541         (CLASSTYPE_ALIGN): Adjust accordingly.
1542         * call.c (direct_reference_binding): Remove misleading comment.
1543
1544 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1545
1546         * parse.y (language_string): Constify.
1547
1548 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1549
1550         * repo.c (getpwd): Don't prototype.
1551         * xref.c (getpwd): Likewise
1552
1553 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1554
1555         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1556         Remove hacks for stuff which now comes from libiberty.
1557
1558 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
1559
1560         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1561
1562 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
1563
1564         * cp-tree.h (begin_init_stmts): Declare.
1565         (finish_init_stmts): Likewise.
1566         * cvt.c (build_up_reference): Wrap the declaration of a temporary
1567         in a statement-expression so that we will see it when expanding
1568         tree structure later.
1569         * init.c (begin_init_stmts): Don't make it static.
1570         (finish_init_stmts): Likewise.
1571
1572         * cp-tree.h (start_handler_parms): New function.
1573         (expand_start_catch_block): Take only one parameter.
1574         (start_handler_parms): New function.
1575         * decl.c (start_handler_parms): Define it.
1576         * except.c (process_start_catch_block): Take only one parameter.
1577         Don't call grokdeclarator here.
1578         (expand_start_catch_block): Don't call grokdeclarator here,
1579         either.
1580         * parse.y (handler_args): Adjust call to
1581         expand_start_catch_block.  Use start_handler_parms.
1582         * pt.c (push_template_decl_real): Make permanent lists have
1583         permanent elements.
1584         (tsubst_expr): Adjust calls to expand_start_catch_block
1585         appropriately.
1586         * semantics.c (expand_stmt): Likewise.
1587         
1588 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
1589
1590         * pt.c (push_template_decl_real): Use template declaration from
1591         class type if it exists.
1592
1593 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
1594
1595         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1596         (maybe_inject_for_scope_var): Declare it.
1597         (initialize_local_var): Likewise.
1598         * decl.c (maybe_inject_for_scope_var): Make it global.
1599         (initialize_local_var): Likewise.  Move cleanup handling here,
1600         from cp_finish_decl.
1601         (make_rtl_for_nonlocal_decl): Use
1602         push_obstacks_nochange/pop_obstacks, rather than
1603         end_temporary_allocation/resume_temporary_allocation.
1604         (cp_finish_decl): Try to complete the type of a variable when it
1605         is declared.  Move cleanup-handling to initialize_local_var.
1606         (expand_static_init): Use tree-building code, rather than
1607         RTL-building code.
1608         * decl2.c (get_temp_name): Assert non-initializedness of
1609         temporaries.
1610         * init.c (create_temporary_var): Move RTL-assigning code to ...
1611         (get_temp_regvar): Here.
1612         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
1613         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
1614         call initialize_local_var to generate initialization code.
1615         
1616 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1617
1618         * cp-tree.h (fndecl_as_string, type_as_string,
1619         type_as_string_real, args_as_string, decl_as_string,
1620         expr_as_string, code_as_string, language_as_string,
1621         parm_as_string, op_as_string, assop_as_string, cv_as_string,
1622         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1623
1624         * errfn.c (cp_printer): Likewise.
1625
1626         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1627         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1628         cp_file_of, code_as_string, language_as_string, parm_as_string,
1629         op_as_string, assop_as_string, args_as_string, cv_as_string):
1630         Likewise.
1631
1632         * tree.c (lang_printable_name): Likewise.
1633
1634 1999-08-28  Richard Henderson  <rth@cygnus.com>
1635
1636         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1637
1638 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
1639
1640         * cp-tree.h (strip_array_types): New function.
1641         * decl.c (maybe_deduce_size_from_array_init): New function, split
1642         out from cp_finish_decl.
1643         (layout_var_decl): Likewise.
1644         (maybe_commonize_var): Likewise.
1645         (maybe_inject_for_scope_var): Likewise.
1646         (initialize_local_var): Likewise.
1647         (build_cleanup_on_safe_obstack): Likewise.
1648         (check_initializer): Likewise.
1649         (make_rtl_for_nonlocal_decl): Likewise.
1650         (cp_finish_decl): Use them.
1651         * typeck.c (strip_array_types): New function.
1652         
1653         * cp-tree.def (LABEL_STMT): New tree node.
1654         * cp-tree.h (LABEL_STMT_LABEL): New macro.
1655         (shadow_label): Remove.
1656         (declare_local_label): New function.
1657         (finish_label_decl): Likewise.
1658         * decl.c (make_label_decl): New function, split out from
1659         lookup_label.
1660         (shadowed_labels): Remove.
1661         (binding_level): Add shadowed_labels.
1662         (clear_binding_level): Remove.
1663         (push_binding_level): Just bzero the new binding level.
1664         (pushlevel): Fix indentation.
1665         (pop_label): New function.
1666         (pop_labels): Likewise, split out from poplevel.
1667         (poplevel): Pop local labels.  Use pop_labels.
1668         (maybe_push_to_top_level): Don't clear shadowed_labels.
1669         (lookup_label): Use make_label_decl.
1670         (shadow_label): Remove.
1671         (declare_local_label): New function.
1672         (define_label): Simplify.
1673         (start_function): Don't clear shadowed_labels.
1674         (cp_function): Remove shadowed_labels.
1675         (push_cp_function_context): Don't save shadowed_labels.
1676         (pop_cp_function_context): Don't restore it.
1677         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1678         * parse.y (label_decl): Use finish_label_decl.
1679         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1680         declarations.
1681         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1682         building_stmt_tree.
1683         (finish_label_decl): New function.
1684         (expand_stmt): Handle LABEL_STMTs and local label declarations.
1685         
1686 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
1687
1688         * decl.c (lookup_label): Build labels on the permanent obstack
1689         when building statement trees.  Don't build RTL for labels when
1690         building statement trees.
1691         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1692         building statement trees.
1693         (finish_label_stmt): Likewise.
1694         (expand_stmt): Adjust accordingly.
1695         * pt.c (tsubst_expr); Likewise.
1696         (do_decl_instantiation): Robustify.
1697         
1698         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1699         * tree.c (build_cplus_new): Set it.
1700         * expr.c (cplus_expand_expr): Use it.
1701         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1702         
1703         * decl.c (store_parm_decls): Reset immediate_size_expand.
1704         (finish_function): Likewise.
1705         
1706         * tree.c (cplus_unsave_expr_now): Don't return a value.
1707
1708         * semantics.c (do_poplevel): Always initialize the return value.
1709
1710 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
1711
1712         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1713         * tree.h (cplus_unsave_expr_now) : Same.
1714
1715 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1716
1717         * decl.c (grokdeclarator): Amend comment.
1718         * except.c (expand_start_catch_block): Call push_template_decl for
1719         catch-block parameters.
1720         * method.c (synthesize_method): Build an empty compound statement
1721         for the body of a constructor.
1722
1723 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
1724
1725         * tree.c (cp_build_qualified_type_real): If we're asking for the
1726         same quals we already have, just return.
1727
1728 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1729
1730         * cp-tree.def (SUBOBJECT): New tree node.
1731         * cp-tree.h (CLEANUP_P): New macro.
1732         (SUBOBJECT_CLEANUP): Likewise.
1733         (keep_next_level): Add parameter.
1734         (get_temp_regvar): Don't declare.
1735         (emit_base_init): Remove parameter.
1736         (expand_aggr_init): Rename to build_aggr_init.
1737         (expand_vec_init): Rename to build_vec_init.
1738         (do_pushlevel): Remove.
1739         (do_poplevel): Likewise.
1740         (finish_cleanup): New function.
1741         (finish_subobject): Likewise.
1742         (stmts_are_full_exprs_p): New variable.
1743         * decl.c (keep_next_level): Add parameter.
1744         (cp_finish_decl): Use build_aggr_init, not
1745         expand_aggr_init.  Use finish_expr_stmt to expand the code.
1746         (expand_static_init): Use tree-generating, not RTL-generating,
1747         functions to handle the initialization.
1748         (start_function): Remove dead code.  Always have a momentary
1749         obstack inside the function, even before hitting the first curly
1750         brace.
1751         (cplus_expand_expr_stmt): Move calls to
1752         expand_{start,end}_target_temps into semantics.c.
1753         (cp_function): Add stmts_are_full_exprs_p.
1754         (push_cp_function_context): Save it.
1755         (pop_cp_function_context): Restore it.
1756         * decl2.c (get_temp_regvar): Move to init.c.
1757         (do_static_initialization): Use build_{aggr,vec}_init.
1758         (do_static_destruction): Fix typo in comment.
1759         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1760         * except.c (expand_throw): Use create_temporary_var.
1761         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1762         * init.c (expand_vec_init_try_block): Remove.
1763         (expand_vec_init_catch_clause): Likewise.
1764         (get_temp_regvar): New function.
1765         (begin_init_stmts): Likewise.
1766         (finish_init_stmts): Likewise.
1767         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
1768         structure here.
1769         (emit_base_init): Likewise.  Remove unused parameter.
1770         (expand_virtual_init): Likewise.
1771         (expand_cleanup_for_base): Use finish_subobject.
1772         (expand_aggr_vbase_init_1): Simplify.
1773         (construct_virtual_bases): Use tree-generating functions to build
1774         up initialization.
1775         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
1776         (expand_default_init): Likewise.
1777         (expand_aggr_init_1): Likewise.
1778         (expand_vec_init): Rename to build_vec_init.
1779         * method.c (do_build_copy_constructor): Use tree-generating
1780         functions.  Don't call clear_last_expr.
1781         (do_build_assign_ref): Likewise.
1782         (synthesize_method): Call clear_last_expr here.
1783         * parse.y (base_init): Don't call clear_last_expr here.
1784         (nodecls): Likewise.
1785         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1786         * semantics.c (do_pushlevel): Move to here.
1787         (do_poplevel): Likewise.
1788         (stmts_are_full_exprs_p): New variable.
1789         (finish_expr_stmt): Handle logic for temoprary cleanup here.
1790         (finish_for_stmt): Use finish_expr_stmt.
1791         (finish_cleanup): New function.
1792         (finish_function_try_block): Fix indentation.
1793         (finish_subobject): New function.
1794         (setup_vtbl_ptr): Call keep_next_level here.
1795         (finish_stmt_expr): Handle a block with no scope inside the
1796         statement-expression.
1797         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
1798         SUBOBJECT.
1799         * tree.c (search_tree): Handle INIT_EXPR.
1800         (mapcar): Likewise.
1801         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1802         * typeck2.c (store_init_value): Change expand_aggr_init to
1803         build_aggr_init in comment.
1804         
1805 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1806
1807         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1808
1809 1999-08-25  Nathan Sidwell  <nathan@acm.org>
1810
1811         * decl2.c (handle_class_head): Be graceful about additional
1812         scope qualifiers. Adjust comments to reflect reality.
1813
1814 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
1815
1816         * call.c (build_conditional_expr): Fix typo.
1817         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1818         lvalue before trying to mess with the sides.
1819
1820         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1821
1822 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
1823
1824         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1825
1826 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
1827
1828         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1829         Return arbitrary pointer or NULL.
1830         (check_eh_spec): Call __throw_type_match_rtti_2.
1831         * tinfo.h (*::dcast): Return int.  Add valp parm.
1832         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
1833         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1834         (__throw_type_match_rtti): Now just a wrapper.
1835
1836         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1837         (init_exception_processing): Don't initialize them.
1838
1839 1999-08-23  Paul Burchard <burchard@pobox.com>
1840
1841         * decl.c (check_default_argument): Fix typo.
1842
1843 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
1844
1845         * cp-tree.def (STMT_EXPR): Fix typo in node name.
1846
1847         * dump.c (dump_next_stmt): New function.
1848         (dequeue_and_dump): Use it.
1849         
1850         * pt.c (tsubst_copy): Make sure to initialize return value for a
1851         STMT_EXPR, even when processing_template_decl.
1852         * semantics.c (finish_stmt_expr): A statement-expression whose
1853         last statement is not an expression-statement has type `void'.  
1854         
1855 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
1856
1857         * semantics.c (finish_stmt_expr): Fix typo in comment.
1858         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1859         (mapcar): Likewise.
1860         * init.c (build_vec_delete_1): Make the children of a permanent
1861         BIND_EXPR permanent.
1862         * pt.c (register_specialization): Don't register a specialization
1863         more than once.
1864         
1865 1999-08-18  Andrew Haley  <aph@cygnus.com>
1866
1867         * method.c (process_overload_item): Call build_mangled_C9x_name ()
1868         for all integer parameter types larger than long long.
1869
1870 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1871
1872         * pt.c (redeclare_class_template): Merge default template
1873         arguments in both directions.
1874
1875         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
1876         compiler_error message.
1877
1878 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
1879
1880         * cp-tree.h: Declare flag_use_repository.
1881         * pt.c (do_decl_instantiation): Don't complain about duplicate
1882         instantiation with -frepo.
1883         (do_type_instantiation): Likewise.
1884
1885         * pt.c (push_template_decl_real): Complain about everything
1886         that isn't a valid template.
1887
1888         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1889         affect inlines.
1890
1891 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1892
1893         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1894         * decl2.c (build_expr_from_tree): Handle it.
1895         * error.c (dump_expr): Likewise.
1896         * pt.c (for_each_template_parm): Likewise.
1897         (tsubst_copy): Likewise.
1898         * tree.c (search_tree): Likewise.
1899         * semantics.c (finish_pseudo_destructor_call): Create it.
1900         
1901 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
1902
1903         * search.c (setup_class_bindings): Robustify.
1904         * typeck.c (common_type): Use same_type_p, not pointer equality,
1905         to compare types.
1906
1907         * cp-tree.h (build_lang_field_decl): Remove.
1908         * class.c (build_vtable): Replace calls to build_lang_field_decl
1909         with build_lang_decl.
1910         (prepare_fresh_vtable): Likewise.
1911         (finish_struct_1): Likewise.
1912         (init_class_processing): Likewise.
1913         * decl.c (push_using_decl): Likewise.
1914         (init_decl_processsing): Likewise.
1915         (grokvardecl): Likewise.
1916         (build_ptrmemfunc_type): Likewise.
1917         (grokdeclarator): Likewise.
1918         (build_enumerator): Likewise.
1919         * decl2.c (grok_x_components): Likewise.
1920         (do_class_using_decl): Likewise.
1921         * except.c (call_eh_info): Likewise.
1922         * init.c (init_init_processing): Likewise.
1923         * rtti.c (expand_class_decl): Likewise.
1924         * tree.c (build_base_fields): Likewise.
1925         (build_vbase_pointer_fields): Likewise.
1926         * lex.c (build_lang_decl): Build declarations on the permanent
1927         obstack if we're building statmeent trees.
1928         (retrofit_lang_decl): Handle both the full lang_decl and also the
1929         smaller lang_decl_flags here.
1930         (build_lang_field_decl): Remove.
1931         * pt.c (push_template_decl_real): Issue errors for variable
1932         declarations that are not static members.
1933
1934 1999-08-18  Richard Henderson  <rth@cygnus.com>
1935
1936         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1937         (mapcar): Likewise.
1938
1939 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1940
1941         * cp-tree.h (back_end_hook): New variable.
1942         * decl2.c (back_end_hook): Define it.
1943         (finish_file): If it's non-NULL, call it.
1944
1945         * decl.c (add_decl_to_level): New function.
1946         (push_local_binding): Use it.
1947         (find_binding): Fix typo in comment.
1948         (pushdecl): Use add_decl_to_level.  Put templates on the
1949         corresponding namespace-scope binding levels.
1950         * dump.c (dequeue_and_dump): Print the specializations of a
1951         template.
1952         * pt.c (push_template_decl_real): Don't push a template multiple
1953         times.
1954
1955 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1956
1957         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1958         (CALL_DECLARATOR_QUALS): Likewise.
1959         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1960         * decl.c (grokdeclarator): Adjust to use them.
1961         * decl2.c (grokfield): Likewise.
1962         (reparse_absdcl_as_casts): Likewise.
1963         * lex.c (make_call_declarator): Likewise.
1964         (set_quals_and_spec): Likewise.
1965         * pt.c (tsubst): Likewise.
1966         * tree.c (mapcar): Remove special hack to handle third operand of
1967         a CALL_EXPR.
1968
1969 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
1970
1971         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1972         * class.c (build_vtable): Use build_lang_field_decl to build the
1973         VAR_DECLs for vtables.
1974         (prepare_fresh_vtable): Likewise.
1975         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1976         CAN_HAVE_FULL_LANG_DECL_P.
1977         (push_using_decl): Use build_lang_decl to build USING_DECLs.
1978         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1979         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1980         (build_lang_field_decl): Likewise.
1981         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1982         to copy.
1983         
1984         * cp-tree.def (STMT_EXPR): New tree node.
1985         * cp-tree.h (STMT_EXPR_STMT): New macro.
1986         (store_return_init): Change prototype.
1987         (finish_named_return_value): New function.
1988         (expand_stmt): Likewise.
1989         (expand_body): Likewise.
1990         (begin_stmt_tree): Likewise.
1991         (finish_stmt_tree): Likewise.
1992         (expanding_p): New variable.
1993         (last_expr_type): Likewise.
1994         (building_stmt_tree): New macro.
1995         * decl.c (start_function): Use building_stmt_tree, not
1996         processing_template_decl, where appropriate.
1997         (store_parm_decls): Likewise.
1998         (store_return_init): Move most of the body to semantics.c.
1999         (finish_function): Use building_stmt_tree.
2000         (finish_stmt): Clear last_expr_type here.
2001         (cp_function): Add expanding_p, last_tree, last_expr_type.
2002         (push_cp_function_context): Save them.
2003         (pop_cp_function_context): Restore them.
2004         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
2005         * error.c (dump_expr): Handle STMT_EXPR.
2006         * except.c (expand_start_catch_block): Use building_stmt_tree.
2007         Use add_decl_stmt.
2008         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
2009         (do_case): Move add_tree call to semantics.c.
2010         * parse.y (return_init): Use finish_named_return_value.
2011         (for.init.statement): Use finish_expr_stmt.
2012         * parse.c: Regenerated.
2013         * pt.c (do_pushlevel): Move to semantics.c.
2014         (do_poplevel): Likewise.
2015         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
2016         (tsubst_expr): Don't expand all the way to RTL here.  Handle
2017         RETURN_INIT and CTOR_INITIALIZER.
2018         (instantiate_decl): Call expand_body after tsubst'ing into
2019         DECL_SAVED_TREE.
2020         * semantics.c (expand_stmts): New function.
2021         (expanding_p): New variable.
2022         (last_expr_type): Likewise.
2023         (finish_expr_stmt): Use building_stmt_tree.
2024         (begin_if_stmt): Likewise.
2025         (finish_if_stmt_cond): Likewise.
2026         (finish_then_clause): Likewise.
2027         (begin_else_clause): Likewise.
2028         (finish_else_clause): Likewise.
2029         (begin_while_stmt): Likewise.
2030         (finish_while_stmt_cond): Likewise.
2031         (finish_while_stmt): Likewise.
2032         (finish_do_body): Likewise.
2033         (finish_do_stmt): Likewise.
2034         (finish_return_stmt): Likewise.
2035         (begin_for_stmt): Likewise.
2036         (fnish_for_init_stmt): Likewise.
2037         (finish_for_cond): Likewise.
2038         (finish_for_expr): Likewise.
2039         (finish_for_stmt): Likewise.
2040         (finish_break_stmt): Likewise.
2041         (finish_continue_stmt): Likewise.
2042         (finish_switch_cond): Likewise.
2043         (finish_switch_stmt): Likewise.
2044         (finish_case_label): Call add_tree here if necessary.
2045         (finish_goto_statement): Use building_stmt_tree.
2046         (begin_try_block): Likewise.
2047         (begin_function_try_block): Likewise.
2048         (finish_try_block): Likewise.
2049         (finish_function_try_block): Likewise.
2050         (finish_handler_sequence): Likewise.
2051         (finish_function_handler_sequence): Likewise.
2052         (begin_handler): Likewise.
2053         (finish_handler_parms): Likewise.
2054         (finish_handler): Likewise.
2055         (begin_compound_stmt): Likewise.
2056         (finish_compound_stmt): Likewise.
2057         (finish_asm_stmt): Likewise.
2058         (finish_label_stmt): Likewise.
2059         (finish_named_return_value): New function.
2060         (setup_vtbl_ptr): Moved here from decl2.c.
2061         (do_pushlevel): Moved here from pt.c.
2062         (do_poplevel): Likewise.
2063         (begin_stmt_expr): Use building_stmt_tree.
2064         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
2065         when building_stmt_tree.
2066         (begin_stmt_tree): New function.
2067         (finish_stmt_tree): Likewise.
2068         (expand_stmt): Likewise.
2069         (expand_body): Likewise.
2070         * tree.c (build_cplus_method_type): Make sure the argument types
2071         end up on the same obstack as the METHOD_TYPE.
2072         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2073         THROW_EXPR, STMT_EXPR.
2074         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
2075         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
2076         sorry, if an unsupported node is encountered.
2077         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2078         (c_expand_return): Don't call add_tree here.
2079         
2080 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
2081
2082         * pt.c (check_default_tmpl_args): Don't check in local scopes.
2083         (tsubst_decl): Make sure the declaration is on a saveable
2084         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2085         variable.
2086         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2087         
2088 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
2089
2090         Speed up Koenig lookup.
2091         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
2092         to return namespaces we've looked at.
2093         * decl2.c (lookup_using_namespace): Likewise.
2094         (add_function): Don't call ovl_member.
2095         (lookup_arg_dependent): Initialize k.namespaces to the list of 
2096         namespaces seen in unqualified lookup.
2097         * call.c (equal_functions): Move here from tree.c.
2098         (joust): Use it to handle duplicate candidates.
2099         * tree.c (ovl_member): Use ==.
2100
2101 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2102
2103         * cp-tree.def (DECL_STMT): Make it smaller.
2104         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2105         (lang_decl): ... here.  Add next.
2106         (DECL_SAVED_TREE): Adjust accordingly.
2107         (DECL_IMPLICIT_TYPEDEF_P): New macro.
2108         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2109         (DECL_STMT_DECL): Likewise.
2110         (create_implicit_typedef): New function.
2111         (maybe_push_decl): Likewise.
2112         (tsubst_default_argument): New function.
2113         (at_function_scope_p): Likewise.
2114         (add_decl_stmt): Likewise.
2115         (push_permanent_obstack): Likewise.
2116         * call.c (convert_default_arg): Use tsubst_default_argument.
2117         * class.c (add_method): Use push_permanent_obstack.
2118         (build_self_reference): Create a TEMPLATE_DECL for the
2119         self-reference, if necessary.
2120         * decl.c (pseudo_global_level_p): Only look at the current binding
2121         level.
2122         (push_binding): Use push_permanent_obstack.
2123         (create_implicit_typedef): New function.
2124         (pushtag): Use it.
2125         (duplicate_decls): Use push_permanent_obstack.
2126         (maybe_push_decl): New function.
2127         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
2128         (start_decl_1): Remove dead code.
2129         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
2130         pseudo_global_level_p.
2131         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2132         template.
2133         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
2134         pseudo_global_level_p.
2135         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2136         a template.
2137         (get_sentry): Use push_permanent_obstack.
2138         * dump.c (dequeue_and_dump): Enable DECL_STMT.
2139         * except.c (call_eh_info): Use push_permanent_obstack.
2140         (build_eh_type_ref): Likewise.
2141         (do_pop_exception): Likewise.
2142         (expand_eh_spec): Likewise.
2143         (alloc_eh_object): Likewise.
2144         (expand_throw): Likewise.
2145         * init.c (build_java_class_ref): Likewise.
2146         * lex.c (get_time_identifier): Likewise.
2147         (free_lang_decl_chain): Correct type.
2148         (retrofit_lang_decl): Adjust accordingly.
2149         (build_lang_field_decl): Likewise.
2150         * lex.h (free_lang_decl_chain): Likewise.
2151         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2152         * parse.c: Regenerated.
2153         * pt.c (tsubst_default_arguments): New function.
2154         (retrieve_local_specialization): Likewise.
2155         (register_local_specialization): Likewise.
2156         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
2157         pseudo_global_level_p to determine whether or not a template is
2158         primary.
2159         (lookup_template_class): Likewise.  Use create_implicit_typedef.
2160         (instantiate_class_template): Call tsubst_default_arguments for
2161         member functions, if appropriate.
2162         (tsubst_default_argument): New function.
2163         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
2164         * search.c (at_function_scope_p): New function.
2165         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2166         (finish_label_stmt): Likewise.
2167         (add_decl_stmt): New function.
2168         (begin_class_definition): Likewise.
2169         (finish_typeof): Likewise.
2170         * tree.c (copy_template_template_parm): Likewise.
2171         (copy_to_permanent): Likewise.
2172         (push_permanent_obstack): Define.
2173         (mark_addressable): Use it.
2174         * typeck.c (mark_addressable): Likewise.
2175         
2176 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
2177
2178         * cp-tree.h (init_cplus_unsave): New.
2179         (cplus_unsave_expr_now): New.
2180         * lex.c (init_parse): Call init_cplus_unsave.
2181         * tree.c (init_cplus_unsave): New.
2182         (cplus_unsave_expr_now): New.
2183
2184 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2185
2186         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
2187         decl_constant_value to simplify array bounds.
2188
2189 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
2190
2191         * lang-options.h: Add -fms-extensions.
2192         * cp-tree.h: Declare flag_ms_extensions.
2193         * decl2.c: Define it.
2194         * class.c (instantiate_type): Don't complain about taking the address
2195         of a bound member function if -fms-extensions.
2196         * typeck.c (build_unary_op): Likewise.
2197         * decl.c (grokdeclarator): Or about implicit int.
2198         * init.c (resolve_offset_ref): Or about implicit '&'.
2199
2200 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
2201
2202         * cp-tree.h (minimal_parse_mode): Remove.
2203         (finish_label_stmt): New function.
2204         * decl.c (saved_scope): Remove minimal parse mode.
2205         (maybe_push_to_top_level): Don't save it.
2206         (pop_from_top_level): Don't restore it.
2207         (define_label): Split out template-handling code to semantics.c.
2208         (start_decl): Don't use minimal_parse_mode.
2209         (cp_finish_decl): Likewise.
2210         (start_function): Don't increment it.
2211         (store_return_init): Don't use it.
2212         (finish_function): Don't decrement it.
2213         * parse.y (label_colon): Use finish_label_stmt throughout.
2214         * parse.c: Regenerated.
2215         * pt.c (minimal_parse_mode): Don't define it.
2216         (tsubst_expr): Use finish_label_stmt.
2217         * semantics.c (finish_label_stmt): New function.
2218
2219         * dump.c (queue): Be careful when computing bitmasks.
2220         (dequeue_and_dump): Describe binfos as binfos, not as
2221         vectors.
2222         
2223         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
2224         throughout.     
2225         * parse.c: Regenerated.
2226         
2227         * Make-lang.in (CXX_SRCS): Remove sig.c.
2228         * Makefile.in (CXX_OBJS): Remove sig.o.
2229         (sig.o): Remove.
2230         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
2231         (CPTI_SIGNATURE_TYPE): Likewise.
2232         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
2233         (opaque_type_node): Likewise.
2234         (signature_type_node): Likewise.
2235         (sigtable_entry_type): Likewise.
2236         (flag_handle_signatures): Likewise.
2237         (lang_type): Remove is_signature, is_signature_pointer,
2238         is_signature_reference, has_opaque_typedecls,
2239         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
2240         signature_pointer_to, signature_reference_to.
2241         (IS_SIGNATURE): Remove.
2242         (SET_SIGNATURE): Remove.
2243         (CLEAR_SIGNATURE): Remove.
2244         (IS_SIGNATURE_POINTER): Remove.
2245         (IS_SIGNATURE_REFERENCE): Remove.
2246         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
2247         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
2248         (CLASSTYPE_SIGNATURE): Remove.
2249         (SIGNATURE_TYPE): Remove.
2250         (SIGNATURE_METHOD_VEC): Remove.
2251         (SIGNATURE_POINTER_TO): Remove.
2252         (SIGNATURE_REFERENCE_TO): Remove.
2253         (lang_decl_flags): Remove is_default_implementation.  Rename
2254         memfunc_pointer_to to saved_tree.
2255         (IS_DEFAULT_IMPLEMENTATION): Remove.
2256         (DECL_MEMFUNC_POINTER_TO): Remove.
2257         (DECL_MEMFUNC_POINTING_TO): Remove.
2258         (DECL_SAVED_TREE): Adjust definition.
2259         (tag_types): Remove signature_type_node.
2260         (SIGNATURE_FIELD_NAME): Remove.
2261         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
2262         (SIGNATURE_OPTR_NAME): Likewise.
2263         (SIGNATURE_SPTR_NAME): Likewise.
2264         (SIGNATURE_POINTER_NAME): Likewise.
2265         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
2266         (SIGNATURE_REFERENCE_NAME): Likewise.
2267         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
2268         (SIGTABLE_PTR_TYPE): Likewise.
2269         (SIGTABLE_NAME_FORMAT): Likewise.
2270         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
2271         (SIGTABLE_TAG_NAME): Likewise.
2272         (SIGTABLE_VB_OFF_NAME): Likewise.
2273         (SIGTABLE_VT_OFF_NAME): Likewise.
2274         (finish_base_specifiers): Change prototype.
2275         (build_signature_pointer_type): Remove.
2276         (build_signature_reference_type): Remove.
2277         (build_signature_pointer_constructor): Remove.
2278         (build_signature_method_call): Remove.
2279         (build_optr_ref): Likewise.
2280         (append_signature_fields): Likewise.
2281         (signature_error): Likewise.
2282         * call.c (build_this): Remove signature support.
2283         (build_over_call): Likewise.
2284         (build_new_method_call): Likewise.
2285         * class.c (add_implicitly_declared_members): Likewise.
2286         (finish_struct_1): Likewise.
2287         (finish_struct): Likewise.
2288         * cvt.c (cp_convert_to_pointer): Likewise.
2289         (convert_to_pointer_force): Likewise.
2290         (ocp_convert): Likewise.
2291         * decl.c (sigtable_decl_p): Remove.
2292         (init_decl_processing): Remove support for signatures.
2293         (cp_finish_decl): Likewise.
2294         (grokdeclarator): Likewise.
2295         (grokparms): Likewise.
2296         (xref_tag): Likewise.
2297         (start_function): Likewise.
2298         (start_method): Likewise.
2299         * decl2.c (finish_sigtable_vardecl): Remove.
2300         (flag_handle_signatures): Remove.
2301         (lang_f_options): Remove handle-signatures.
2302         (grokfield): Remove support for signatures.
2303         (grokbitfield): Likewise.
2304         (finish_file): Likewise.
2305         (reparse_absdcl_as_casts): Likewise.
2306         * error.c (dump_type_real): Likewise.
2307         (dump_function_decl): Likewise.
2308         * friend.c (make_friend_class): Likewise.
2309         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2310         * hash.h: Regenerated.
2311         * init.c (build_new_1): Remove support for signatures.
2312         * lang-options.h: Remove -fhandle-signatures,
2313         -fno-handle-signatures. 
2314         * lex.c (init_parse): Remove support for signatures.
2315         (yyprint): Likewise.
2316         * lex.h (rid): Remove RID_SIGNATURE.
2317         * method.c (build_decl_overload_real): Remove support for
2318         signatures. 
2319         (hack_identifier): Likewise.
2320         * parse.y (base_class): Likewise.
2321         (base_class.1): Likewise.
2322         (access_specifier): Likewise.
2323         * search.c (lookup_member): Likewise.
2324         * semantics.c (finish_qualified_object_call_expr): Likewise.
2325         (finish_template_type_parm): Likewise.
2326         (begin_class_definition): Likewise.
2327         (finish_base_specifier): Likewise.
2328         * sig.c: Remove.
2329         * tree.c (build_cplus_method_type): Remove support for signatures.
2330         * typeck.c (require_complete_type): Likewise.
2331         (c_sizeof): Likewise.
2332         (c_alignof): Likewise.
2333         (build_object_ref): Likewise.
2334         (build_component_ref): Likewise.
2335         (build_indirect_ref): Likewise.
2336         (build_c_cast): Likewise.
2337         (build_modify_expr): Likewise.
2338         (convert_for_initialization): Likewise.
2339         * typeck2.c (signature_error): Remove.
2340         (store_init_value): Remove support for signatures.
2341         (digest_init): Likewise.
2342         (build_x_arrow): Likewise.
2343         (build_functional_cast): Likewise.
2344         * xref.c (GNU_xref_decl): Likewise.
2345         
2346 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2347
2348         * lex.c (do_identifier): Remove unnecessary lookup of class field.
2349
2350 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2351
2352         * decl2.c (set_decl_namespace): Do not complain about non-matching
2353         decls if processing a template.
2354
2355 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
2356
2357         * decl.c (build_ptrmemfunc_type): Handle qualified
2358         pointer-to-member types here.
2359         * tree.c (cp_build_qualified_type_real): Simplify handling here.
2360
2361 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2362
2363         * lex.c (lang_identify): Likewise.
2364
2365 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
2366
2367         * Makefile.in: Update dependencies.
2368         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2369         NULL_RTX.
2370         * decl.c: Include "function.h"
2371         (cleanup_label, return_label): Delete declarations.
2372         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2373         (finish_function): Rename last_parm_insn variable to
2374         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
2375         * decl2.c: Include "function.h".
2376         (rtl_expr_chain): Delete declaration.
2377         * method.c: Include "function.h"
2378         * tree.c (build_vbase_pointer_fields): Don't initialize
2379         DECL_SAVED_INSNS with NULL_RTX.
2380         * typeck.c: Include "function.h"
2381
2382 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
2383
2384         * semantics.c (begin_function_try_block, finish_function_try_block,
2385         finish_function_handler_sequence): New fns.
2386         * parse.y (function_try_block): Use them.
2387         * pt.c (instantiate_decl): Likewise.
2388
2389         * cp-tree.h: Declare in_function_try_handler.
2390         * decl.c: Define it.
2391         (start_function): Clear it.
2392         (struct cp_function, push_cp_function_context): Save it.
2393         (pop_cp_function_context): Restore it.
2394         * parse.y (function_try_block): Set and clear it.
2395         * except.c (expand_end_catch_block): Rethrow if we reach the end
2396         of a function-try-block handler in a ctor or dtor.
2397         * typeck.c (c_expand_return): Complain about returning from a
2398         function-try-block handler of a ctor.
2399
2400         * parse.y (function_try_block): Call end_protect_partials
2401         before expand_start_all_catch.
2402
2403 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
2404
2405         * decl.c (struct binding_level): Add eh_region field.
2406         (push_binding_level): Set it.
2407         (define_label): Complain about jumping into an EH block.
2408
2409         * ptree.c (print_lang_type): Print the real type of a PMF.
2410         Print what exceptions a fn type throws.
2411
2412 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2413
2414         * class.c (count_fields, add_fields_to_vec): Add static prototype.
2415
2416         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2417         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2418         char*.
2419
2420         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2421         Constify a char*.
2422
2423         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2424         char*.
2425
2426         * dump.c (queue_and_dump_index, dump_int, dump_string,
2427         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2428         a char*.
2429         (dump_stmt): Add static prototype.
2430
2431         * errfn.c (cp_thing): Constify a char*.
2432
2433         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2434         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2435         dump_expr): Constify a char*.
2436
2437         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2438         read_line_number): Add static prototype.
2439         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2440         (real_yylex): Move label `letter' into the scope where it is used.
2441
2442         * method.c (build_mangled_template_parm_index, build_overload_int,
2443         build_decl_overload_real, get_id_2): Constify a char*.
2444
2445         * search.c (check_final_overrider): Make static.
2446
2447         * typeck.c (composite_pointer_type): Constify a char*.
2448
2449 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2450
2451         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2452         we're looking at a class.
2453
2454         * decl.c (lookup_name_real): Set the complain flag if we're
2455         looking for a namespace member.
2456
2457         * lex.c (real_yylex): We can have a number with no digits.
2458
2459         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2460
2461         * search.c (binfo_from_vbase): New fn.
2462         * cp-tree.h: Declare it.
2463         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2464         from pointer to member of virtual base.  
2465         * typeck.c (get_delta_difference): Likewise.
2466
2467 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
2468
2469         * pt.c (tsubst): Use build_index_type to build in-template array
2470         index type.  Fixes g++.oliva/dwarf1.C.
2471         * decl.c (grokdeclarator): Likewise, just for consistency, as it
2472         doesn't seem to trigger the bug without it.
2473
2474 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2475
2476         * typeck2.c (add_exception_specifier): Use complete_type.
2477
2478 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
2479
2480         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2481         (dump_binary_op): Bulletproof.
2482         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2483         * tree.c (search_tree): Don't enumerate all the nodes of classes
2484         `1', `2', and `<'; handle them generically.  Don't be sorry about
2485         "unrecognized tree codes"; just abort.
2486         (no_linkage_check): Don't do linkage checks for templates.
2487         
2488         * tree.c (cp_build_qualified_type_real): Handle
2489         pointer-to-member-function types correctly.
2490
2491 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
2492
2493         * decl.c (pushdecl): Only give an error for shadowing a parm 
2494         from *this* function.
2495
2496 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
2497
2498         * typeck2.c: Update URLs and mail addresses.
2499
2500 1999-08-04  Nathan Sidwell  <nathan@acm.org>
2501
2502         * cp-tree.h (empty_except_spec): New global var.
2503         (compexcepttypes): Remove prototype.
2504         (comp_except_specs): Prototype new global function.
2505         (add_exception_specifier): Prototype new global function.
2506         * decl.c (empty_except_spec): Define new global var.
2507         (duplicate_decls): Use comp_except_specs, reword error message.
2508         (init_decl_processing): Initialize empty_except_spec.
2509         Adjust build_exception_variant calls.
2510         * parse.y (exception_specification_opt): Use empty_except_spec.
2511         (ansi_raise_identifier): Call check_for_new_type.
2512         (ansi_raise_identifiers): Use add_exception_specifier.
2513         * pt.c (tsubst): Use add_exception_specifier to build exception
2514         specifier.
2515         * search.c (check_final_overrider): New static function, broken
2516         out of get_matching_virtual. Check throw specifiers, reword
2517         diagnostics.
2518         (get_matching_virtual): Use check_final_overrider.
2519         * tree.c (build_exception_variant): Use comp_except_specs.
2520         * typeck.c (compexcepttypes): Remove.
2521         (comp_except_types): New static function, helper for
2522         comp_except_specs. Compare two types as exception specifiers.
2523         (comp_except_specs): New global function, compare two exception
2524         specifiers.
2525         (comptypes): Adjust for comp_except_specs.
2526         * typeck2.c (add_exception_specifier): New global function.
2527         
2528         * class.c (check_for_override): Reword error message.
2529
2530 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2531
2532         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2533         * cp-tree.h (struct lang_type): Added non_pod_class flag.
2534         (CLASSTYPE_NON_POD_P): New macro to access it.
2535         * class.c (finish_struct_1): Determine non-PODness.
2536         Check for arrays of pointers (-Weffc++).
2537         Remove array inspection duplicated code.
2538         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2539         Use CLASSTYPE_NON_POD_P.
2540
2541 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2542
2543         * class.c (duplicate_tag_error): Preserve template information.
2544
2545 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2546
2547         * decl.c (start_enum): Show location of previous definition.
2548         * parse.y (enumlist_opt): New reduction.
2549         (structsp): Simplify enum rules to use enumlist_opt.
2550
2551 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2552
2553         * lex.c (yyprint): Handle PFUNCNAME.
2554
2555         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2556         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2557
2558 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
2559
2560         * decl.c (start_decl): Set attributes before duplicate_decls call.
2561
2562 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2563
2564         * Make-lang.in (CXX_SRCS): Add dump.c.
2565         * Makefile.in (CXX_OBJS): Add dump.o.
2566         (dump.o): New target.
2567         * cp-tree.h (DECL_CONV_FN_P): Document.
2568         (DECL_OVERLOADED_OPERATOR_P): New function.
2569         (TYPE_PTRMEM_CLASS_TYPE): New macro.
2570         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2571         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2572         (ASM_VOLATILE_P): New macro.
2573         (STMT_LINENO): Likewise.
2574         (cp_namespace_decls): New function.
2575         (dump_node_to_file): New function.
2576         * decl.c (cp_namespace_decls): New function.
2577         (walk_namespaces_r): Use it.
2578         (wrapup_globals_for_namespace): Likewise.
2579         * decl2.c (flag_dump_translation_unit): New variable.
2580         (lang_decode_option): Handle -fdump-translation-unit.
2581         (finish_file): If flag_dump_translation_unit is set, dump the
2582         translation unit.
2583         * dump.c: New file.
2584         * lang-options.h: Add -fdump-translation-unit.
2585         * pt.c (tsubst_template_parms): Robustify.
2586         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2587         (tsubst_expr): Use STMT_LINENO.
2588         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
2589         for invalid cv-qualifiers even while building templates.
2590         
2591 1999-08-02  Richard Henderson  <rth@cygnus.com>
2592
2593         * call.c: Include defaults.h instead of expr.h.
2594         * decl.c: Likewise.
2595         * pt.c: Likewise.
2596         * typeck.c: Include defaults.h.
2597
2598 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2599
2600         * lex.c (errorcount, sorrycount): Don't declare.
2601         * repo.c (errorcount, sorrycount): Likewise.
2602         * typeck2.c (errorcount, sorrycount): Likewise.
2603
2604 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
2605
2606         * call.c (convert_default_arg, build_over_call): Change all uses of
2607         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2608         Ensure expr.h is included.
2609         * decl.c (grokparams): Ditto.
2610         * pt.c (tsubst_decl): Ditto.
2611         * typeck.c (convert_arguments): Ditto.
2612
2613 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
2614
2615         * class.c (mark_overriders): Fix order of args to overrides.
2616         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
2617         functions with the same name.
2618
2619 1999-08-02  Richard Henderson  <rth@cygnus.com>
2620
2621         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2622
2623 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
2624
2625         * call.c (build_conditional_expr): Fix typo in comment.
2626
2627 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
2628
2629         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2630         case_stack; use in_control_zone_p.
2631         * typeck.c (c_expand_return): Likewise.
2632
2633 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
2634
2635         * except.c (catch_clauses): Delete declaration.
2636
2637 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
2638
2639         * call.c (build_conditional_expr): Call convert_from_reference to
2640         avoid reference/non-reference type confusion.  Fix typo.
2641
2642 1999-07-30  Richard Henderson  <rth@cygnus.com>
2643
2644         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2645         * cp-tree.h (initializer_constant_valid_p): Remove.
2646
2647 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
2648
2649         * call.c (conditional_conversion): Don't build BASE_CONVs for
2650         conversions between things that have the same type.
2651         (build_conditional_expr): Tweak.
2652         (convert_like): Some BASE_CONVs really do require the generation
2653         of code.
2654         
2655         * init.c (perform_member_init): Don't go through build_modify_expr
2656         for simple initializations.
2657
2658 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
2659
2660         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2661         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2662         virtual functions and MI.  Simplify.
2663
2664         * method.c: Remove prototype for largest_union_member.
2665         * pt.c (determine_specialization): Fix uninitialized warning.
2666         * lex.c (real_yylex): Likewise.
2667
2668 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
2669
2670         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2671         here too.
2672
2673         * cp-tree.h (BINFO_VIRTUALS): Document new format.
2674         * class.c (modify_one_vtable): Change prototype accordingly.
2675         (modify_all_vtables): Likewise.
2676         (modify_all_direct_vtables): Likewise.
2677         (modify_all_indirect_vtables): Likewise.
2678         (build_vtable_entry_for_fn): New function.
2679         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2680         (modify_vtable_entry): Likewise.
2681         (add_virtual_function): Likewise.
2682         (build_vtbl_initializer): New function.
2683         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2684         (fixup_vtable_deltas1): Likewise.
2685         (fixup_vtable_deltas): Likewise.
2686         (override_one_vtable): Likewise.
2687         (finish_struct_1): Likewise.
2688
2689         * error.c (dump_expr): Likewise.
2690         * search.c (get_abstract_virtuals_1): Likewise.
2691         (get_abstract_virtuals): Likewise.
2692         (expand_upcast_fixups): Likewise.
2693         * tree.c (debug_binfo): Likewise.
2694         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2695         __pure_virtual here.
2696         
2697 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2698
2699         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2700         as per 1999-07-26 change.
2701
2702         * typeck.c (c_sizeof): Don't allow non-static data members.
2703         (expr_sizeof): Likewise.
2704
2705 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
2706
2707         * input.c (feed_input): Only touch lineno and input_filename
2708         if !USE_CPPLIB.  Save the old values before setting the new ones.
2709
2710         * input.c (feed_input): Add file, line parms.
2711         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2712         (real_yylex): Check linemode before input_redirected().
2713
2714         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2715         from op new to warning.
2716
2717 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2718
2719         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2720         * call.c: All uses changed.
2721         * typeck.c: Likewise.
2722
2723 1999-07-26  Nathan Sidwell  <nathan@acm.org>
2724
2725         * exception.cc (__cplus_type_matcher): Match __eh_matcher
2726         prototype.
2727
2728 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2729
2730         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2731         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2732         (strip_top_quals): Declare.
2733         (ncp_convert): Likewise.
2734         (type_after_usual_arithmetic_converions): Likewise.
2735         (composite_pointer_type): Likewise.
2736         * call.c (strip_top_quals): Don't make it static.
2737         (promoted_arithmetic_type_p): New function.
2738         (conditional_conversion): Likewise.
2739         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2740         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
2741         for converting a type to itself.
2742         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2743         (implicit_conversion): Make sure the from and to types are
2744         complete.
2745         (add_builtin_candidate): Correct handling of ?: operator.
2746         (add_builtin_candidates): Improve documentation.
2747         (build_conditional_expr): New function.
2748         (can_convert): Implement in terms of can_convert_arg.
2749         (ncp_convert): New function.
2750         * typeck.c (type_after_usual_arithmetic_conversions): New
2751         function, split out from common_type.
2752         (composite_pointer_type): New function, split out from
2753         build_conditional_expr.
2754         (common_type): Use type_after_usual_arithmetic_conversions.
2755         Remove redundant attribute merging.
2756         (comptypes): Tidy.  Handle COMPLEX_TYPE.
2757         (build_binary_op_nodefault): Use null_ptr_cst_p.
2758         (build_conditional_expr): Remove.
2759         (convert_for_assignment): Use new conversion functions.
2760         
2761         * cp-tree.h (abstract_virtuals_error): Change declaration.
2762         * typeck2.c (abstract_virtuals_error): Check to see if an error
2763         ocurred, and return a boolean value accordingly.
2764         (build_functional_cast): Adjust accordingly.
2765         * class.c (finish_struct_1): Likewise.
2766         * cvt.c (ocp_convert): Likewise.
2767         * decl.c (cp_finish_decl): Likewise.
2768         (grokparams): Likewise.
2769         (grok_op_properties): Likewise.
2770         (start_function): Likewise.
2771         * init.c (build_new_1): Likewise.
2772
2773         * pt.c (unify): Don't get confused by pointers-to-member functions.
2774
2775         * search.c (build_cplus_new): Robustify.
2776         
2777 1999-07-24  Richard Henderson  <rth@cygnus.com>
2778
2779         * gxx.gperf (__builtin_va_arg): New.
2780         * parse.y (VA_ARG): New token.
2781         (unary_expr): Recognize it.
2782
2783 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
2784
2785         * g++FAQ.texi: Deleted per Joe Buck's request.
2786         * Makefile.in: Corresponding changes.
2787
2788 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
2789
2790         * lex.c: Sync with C frontend.
2791         (whitespace_cr): New fn.
2792         (skip_white_space): Use it.
2793         (init_parse): Reorder.
2794         (yyprint): Support CONSTANT.
2795         (pragma_getc, pragma_ungetc): Bring back.
2796         (read_line_number): Change in_system_header directly.
2797         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2798         (parse_float): Update to C version.
2799         (yylex): Handle '$' under the letter case.
2800         Remove looking_for_typename handling.
2801         Support hex floating point constants.
2802         Follow C's lead for choosing type of integer constants.
2803         Rearrange stuff to match C frontend.
2804         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2805         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2806
2807 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
2808
2809         * call.c (reference_binding): Tweak.
2810         (mayble_handle_implicit_object): Use direct_reference_binding to
2811         create the right implicit conversion sequence.
2812
2813 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
2814
2815         * pt.c (convert_nontype_argument): Don't call decl_constant_value
2816         if we're converting to a reference type.
2817
2818         * call.c (NEED_TEMPORARY_P): New macro.
2819         (standard_conversion): Set it, for derived-to-base conversions.
2820         (reference_related_p): New function.
2821         (reference_compatible_p): Likewise.
2822         (convert_class_to_reference): Likewise.
2823         (direct_reference_binding): Likewise.
2824         (reference_binding): Rework for standards-compliance.
2825         (convert_like): Adjust accordingly.
2826         (maybe_handle_ref_bind): Simplify; the right conversion sequences
2827         are now built up in reference_binding.
2828         (initialize_reference): New function.
2829         * cp-tree.h (ICS_USER_FLAG): Document.
2830         (ICS_THIS_FLAG): Likewise.
2831         (ICS_BAD_FLAG): Likewise.
2832         (NEED_TEMPORARY_P): Likewise.
2833         (cp_lvalue_kind): New type.
2834         (real_lvalue_p): Return it.
2835         * error.c (dump_expr): Provide more accurate representation for
2836         AGGR_INIT_EXPRs.
2837         * init.c (expand_default_init): Do not try to perform implicit
2838         conversions for a brace-enclosed initializer.
2839         * search.c (lookup_conversions): Document.
2840         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
2841         appropriately.
2842         (real_lvalue_p): Adjust accordingly.
2843         (lvalue_p): Likewise.
2844         (build_cplus_new): Don't allow the creation of an abstract class.
2845         * typeck.c (convert_for_initialization): Use initialize_reference.
2846         
2847 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
2848
2849         * lex.c (real_yylex) : Correct the test for overflow when lexing
2850         integer literals.
2851
2852 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
2853
2854         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2855         not DECL_BUILT_IN, to determine if a function is internally declared.
2856         (duplicate_decls): Likewise.  Improve handling of builtins.
2857         (push_overloaded_decl): Remove special handling of builtins.
2858
2859         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2860
2861         * decl.c (grokdeclarator): Pull out decl_constant_value in
2862         templates, too.
2863
2864         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2865         * cp-tree.h, pt.c, semantics.c: Adjust.
2866         * method.c (largest_union_member): Remove.
2867
2868         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2869
2870         * lex.c (token_getch, token_put_back): New fns.
2871         (real_yylex): Use them.
2872
2873         * lex.c (lang_init): Generalize.
2874         (lang_init_options): Tell cpplib this is C++.
2875         (nextchar): Remove.  Replace uses with put_back.
2876         (skip_white_space): Handle linemode here.  Optimize for cpplib.
2877         (extend_token_buffer_to): New fn.
2878         (extend_token_buffer): Use it.
2879         (read_line_number, check_newline): Just deal with tokens.
2880         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
2881         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2882         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2883         * parse.y (PAREN_STAR_PAREN): Remove.
2884         * input.c: Don't use the putback machinery with cpplib.
2885         (sub_getch): Fold back into getch.
2886         (getch): Don't handle linemode here.
2887         (feed_input): Unget any text in the token buffer.
2888
2889         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2890         nextyychar, nextyylval): Remove.
2891
2892 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
2893             Jason Merrill  <jason@yorick.cygnus.com>
2894
2895         * lex.c (indent_level): New variable.
2896         (init_parse): Set cpp_token to CPP_DIRECTIVE.
2897         (consume_string): Make this smart about USE_CPPLIB.
2898         (yyungetc): Use put_back function.
2899         (pragma_getc, pragma_ungetc): Functions deleted.
2900         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2901         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2902         pragma_ungetc.
2903         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2904         Also, clean up cases where we redundantly set token_buffer[0].
2905         (read_line_number): New fn.
2906         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2907         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2908         (sub_getch): Conditionalize out code that's not appropriate if
2909         USE_CPPLIB.
2910         (put_back): Rewrite in case USE_CPPLIB is defined.
2911         (input_redirected): Ditto.
2912
2913 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2914
2915         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2916         c_global_trees and accessor macros defined in c-common.h.
2917         (cp_tree_index): New enumeration.
2918         (cp_global_trees): Declare new array.  Add accessor macros for it, and
2919         delete declarations of tree nodes replaced by it.
2920         (builtin_function): Delete macro, add declaration for new function.
2921         Include c-common.h.
2922         * decl.c: Delete definitions for tree nodes that were replaced by
2923         cp_global_trees and c_global_trees.
2924         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2925         to generate the common builtins here.
2926         (builtin_function): New function.
2927         * decl2.c (abort_fndecl): Delete declaration.
2928         * except.c (expand_builtin_return_address): Delete declaration.
2929         (builtin_return_address_fndecl): Delete variable.
2930         (const_ptr_type_node): Delete declaration.
2931         * lex.c (cons_up_default_function): Delete declaration of
2932         void_list_node.
2933         * parse.y (void_list_node): Delete declaration.
2934         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2935         Delete variables.
2936         (const_string_type_node): Delete declaration.
2937         * search.c (abort_fndecl): Delete declaration.
2938         * Makefile.in: Update dependencies.
2939
2940 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
2941
2942         * pt.c (check_default_tmpl_args): Move test for missing default
2943         arguments here, from ...
2944         (end_template_parm_list): Here.
2945
2946 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
2947
2948         * decl.c (lookup_nested_type): Remove.
2949         (pushtag): Don't call it.
2950
2951 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
2952
2953         * Makefile.in (INTERFACE): Bump to 2.
2954
2955 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
2956         
2957         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2958         instructions to gcc.gnu.org.  Removed e-mail address.
2959
2960 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
2961
2962         * pt.c (determine_specialization): Tighten error-checking.
2963         (end_template_parm_list): Likewise.
2964
2965 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
2966
2967         * pt.c (check_default_tmpl_args): Handle friends defined in the
2968         class just like member functions defined in the class.
2969
2970 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2971             Jason Merrill  <jason@yorick.cygnus.com>
2972
2973         * cp-tree.h (struct lang_decl): Added field for storing sorted
2974         FIELD_DECLs (used in TYPE_DECLs).
2975         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2976         (DECL_SORTED_FIELDS): New macro.
2977         * class.c (method_name_cmp): New function.
2978         (finish_struct_methods): Modified to support sorting and searching
2979         methods.
2980         (finish_struct_anon): Changed code in inner loop to use ELT rather 
2981         than UELT (which required an extra indirection for every reference).
2982         (field_decl_cmp): New function to support sorting FIELD_DECLs.
2983         (finish_struct_1): Sort fields.
2984         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2985         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2986         Also, switch to using array indexing rather than a changing pointer.
2987         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2988         DECL_SORTED_FIELDS.
2989
2990 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
2991
2992         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2993         casts in system headers or extern "C" blocks.
2994
2995         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
2996         errors to pedwarn.
2997
2998 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2999
3000         * decl2.c (write_virtuals): Deleted declaration.
3001         * cp-tree.h (write_virtuals): Deleted extern declaration.
3002         * class.c (finish_struct_1): Removed #if 0'd code that mentions
3003         write_virtuals.
3004         * semantics.c (begin_class_definition): Rewrite code to not depend
3005         on write_virtuals.
3006
3007         * lex.c (cp_pragma_interface): New function.
3008         (cp_pragma_implementation): Likewise.
3009         (handle_cp_pragma): Call them.
3010
3011         * typeck.c (comptypes): Simplify C code in look_hard.
3012
3013         * xref.c (PALLOC): Use xcalloc, not calloc.
3014         (SALLOC): Use xmalloc, not malloc.
3015
3016         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
3017
3018         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
3019         is NO_DEBUG.
3020
3021         * decl.c (duplicate_decls): If a redeclaration doesn't match the
3022         initial declaration, then don't save the inline info and by all
3023         means don't mark the function as a builtin function.
3024
3025         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
3026         CURRENT_CLASS_TYPE is 0.
3027
3028         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
3029         NULL_TREE.
3030
3031         * ptree.c (print_lang_type): Added vtable-needs-writing.
3032
3033 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
3034
3035         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
3036
3037 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
3038
3039         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3040         Merged into c-common.
3041
3042 1999-07-05  Dave Brolley  <brolley@cygnus.com>
3043
3044         * lex.c (errorcount): Declare it.
3045         (finish_parse): Update errorcount for when using CPPLIB.
3046
3047 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
3048
3049         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
3050         parameters.
3051         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
3052         * decl.c (push_class_binding): Use it.
3053         (lookup_name_real): Likewise.
3054
3055 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
3056
3057         * cp-tree.h (widest_integer_literal_type_node,
3058         widest_unsigned_literal_type) : New.
3059         * decl.c (widest_integer_literal_type_node,
3060         widest_unsigned_literal_type) : New.
3061         (init_decl_processing): Handle/use the two new types.
3062         * lex.c (real_yylex): Same.
3063         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3064         Same. 
3065
3066 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
3067
3068         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3069         to anonymous cv-qualified types.
3070
3071 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
3072
3073         * lex.c (real_yylex) : Change integer literal overflow handling to
3074         be like c-lex.c.
3075
3076         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3077
3078 1999-06-28  Richard Henderson  <rth@cygnus.com>
3079
3080         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3081
3082 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
3083
3084         * error.c (dump_type_real): Handle TREE_LIST again.
3085
3086         * typeck.c (comp_target_parms): Don't complain about 
3087         converting from () to (...) if !flag_strict_prototype.
3088
3089         * decl.c (grokdeclarator): Update the names of all variants when
3090         de-anonymizing.
3091
3092 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
3093
3094         * init.c (expand_aggr_vbase_init): Rename to
3095         construct_virtual_bases.  Conditionalize construction here, 
3096         rather than ...
3097         (emit_base_init): Here.
3098
3099 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
3100
3101         * semantics.c (finish_asm_statement): Apply decay conversions to
3102         input operands.
3103
3104         * decl.c (expand_static_init): When building an anonymous function
3105         for use with atexit, compute its body before and after entering
3106         the function.
3107
3108         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3109         EXIT_EXPR.
3110         
3111 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
3112
3113         * init.c (expand_aggr_vbase_init): Add flag parameter.
3114         (build_partial_cleanup_for): Remove, inlining into ..
3115         (expand_cleanup_for_base): ... here.  Take flag parameter.
3116         (emit_base_init): Pass the in_chrg parameter to
3117         emit_aggr_vbase_init. 
3118         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3119         
3120 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
3121
3122         * decl2.c (import_export_decl): Use same_type_p, rather than
3123         relying on pointer-equality for types.
3124
3125         * method.c (do_build_copy_constructor): Simplify.
3126
3127         * call.c (build_method_call): Remove bogus code for two-argument
3128         delete.
3129         * init.c (build_new_1): Expand on comment, and remove dead code.
3130
3131         * init.c (expand_cleanup_for_base): New function, split out
3132         from ...
3133         (emit_base_init): Here.
3134         (expand_aggr_vbase_init): Use it.
3135
3136 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
3137
3138         * cp-tree.h (class_cache_firstobj): Declare.
3139         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3140         * class.c (permanent_obstack): Remove declaration.
3141         (class_cache_firstobj): Make it global.
3142         (add_method): Don't use permanent_obstack directly.
3143         (pushclass): Only free the class_cache_obstack if we know how far
3144         back to free it.
3145         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3146         * decl.c: Remove dead comment.
3147         (saved_scope): Add class_cache_firstobj.
3148         (push_to_top_level): Save it.
3149         (pop_from_top_level): Restore it.
3150         (push_class_level_binding): Use push_cache_obstack, not
3151         maybe_push_cache_obstack.
3152         * search.c (push_class_decls): Likewise.
3153         
3154 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3155
3156         * pt.c (tsubst_friend_function): Push into namespace of friend
3157         function before pushdecl'ing it.
3158
3159 1999-06-14  Nathan Sidwell  <nathan@acm.org>
3160
3161         * call.c (build_new_op): Remove REF_BIND from all operands.
3162
3163 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
3164
3165         * init.c (build_new_1): Look up operator delete even if there was
3166         no explicit new placement.
3167
3168 1999-06-08  Nathan Sidwell  <nathan@acm.org>
3169
3170         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3171         of ...
3172         (build_throw): ... here. Call it.
3173         (process_start_catch_block): Call it.
3174
3175 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
3176
3177         * search.c (convert_pointer_to_single_level): Reimplement without
3178         using get_binfo.
3179
3180 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
3181
3182         * method.c (is_back_referenceable_type): Back-reference bools when
3183         not squangling.
3184
3185 1999-06-07  Dave Brolley  <brolley@cygnus.com>
3186
3187         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
3188         * input.c (putback_buffer): New structure type.
3189         (putback): Replaces putback_char member.
3190         (putback): Replaces putback_char static variable.
3191         (feed_input): Use putback.
3192         (end_input): Use putback.
3193         (sub_getch): Use putback.
3194         (put_back): Use putback.
3195
3196 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
3197
3198         * decl.c (grokdeclarator): Fix typo in last change.
3199
3200 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
3201
3202         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
3203         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
3204
3205 1999-06-04  Nathan Sidwell  <nathan@acm.org>
3206
3207         * except.c (build_throw): Check throw expression validity.
3208
3209 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
3210
3211         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
3212         just because flag_signed_bitfields is false.
3213
3214 1999-06-03  Nathan Sidwell  <nathan@acm.org>
3215
3216         * semantics.c (begin_class_definition): Update the struct's
3217         location here ...
3218         * class.c (finish_struct): ... rather than here.
3219
3220         * decl.c (make_typename_type): Don't rely on uninitialized
3221         variable.
3222
3223 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3224
3225         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
3226
3227 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
3228
3229         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
3230         and friends rather than messing with current_obstack directly.
3231         (cp_build_qualified_type_real): Rework ARRAY_TYPE
3232         allocation to match practice throughout the rest of the 
3233         compiler.
3234
3235 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
3236
3237         * lex.c (make_lang_type): Create TYPE_BINFO for
3238         TEMPLATE_TYPE_PARMs just like for non-template types.
3239
3240         * decl.c (start_decl): Move checks on initialization to ...
3241         (cp_finish_decl): Here.  Tidy formatting slightly.
3242
3243 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3244
3245         * decl.c (add_binding): Don't complain about a redeclaration of a
3246         semantically identical typedef in a local scope.
3247
3248 1999-05-28  Nathan Sidwell  <nathan@acm.org>
3249
3250         * decl.c (complete_array_type): Allocate off same obstack. Fix
3251         DO_DEFAULT comment to match reality.
3252
3253         * friend.c (make_friend_class): Fix diagnostic typo.
3254
3255 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3256
3257         * decl.c (lookup_namespace_name): Handle getting a
3258         TEMPLATE_ID_EXPR.
3259         (expand_static_init): Don't call pushdecl for implicitly declared
3260         `atexit' used to register destructors.
3261
3262 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
3263
3264         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
3265         intialize a vtable.
3266
3267         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
3268         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
3269         by combining TEMPLATE_INFO and LEVEL into a single union.
3270         (DECL_TEMPLATE_INFO): Reformat.
3271         (DECL_SAVED_TREE): Document.
3272         (DECL_TEMPLATE_INJECT): Remove.
3273         * class.c (finish_struct): Remove code to deal with
3274         DECL_TEMPLATE_INJECT. 
3275
3276         * decl.c (maybe_process_template_type_declaration): Handle all new
3277         types in templates uniformly.
3278         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
3279         DECL_CONTEXT.
3280         * pt.c (lookup_template_class): Inject template instantiations of
3281         forward-declarations.
3282         (instantiate_class_template): Remove code processing
3283         DECL_TEMPLATE_INJECT.
3284         
3285         * pt.c (lookup_template_class): Tweak lookup to find member
3286         templates.
3287
3288         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3289         ASM_CV_QUAL.
3290         * semantics.c (finish_asm_stmt): Make strings permanent if they're
3291         used in a template.
3292         
3293 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
3294
3295         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3296         parts of pointer to data member types.
3297
3298 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
3299
3300         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3301         and then make it look like `abort'.  Just use `abort' instead.
3302         
3303         * typeck.c (build_static_cast): Don't allow static_casts that cast
3304         away constness.
3305         (casts_away_constness_r): New function.
3306         (casts_away_constness): Likewise.
3307
3308         * decl.c (lookup_tag): Remove code no longer needed after
3309         name-lookup improvements.
3310         * decl2.c (handle_class_head): Make error-recovery more robust.
3311         * friend.c (make_friend_class): Reject templated typename types.
3312         * lex.c (is_global): A template parameter isn't global.
3313         * parse.y (class_head): Robustify.
3314         * parse.c: Regenerated.
3315         
3316 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
3317
3318         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3319         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
3320         
3321         * cp-tree.h (push_nested_namespace): Declare.
3322         (pop_nested_namespace): Likewise.
3323         * decl.c (push_nested_namespace): New function.
3324         (pop_nested_namespace): Likewise.
3325         * pt.c (instantiate_class_template): Use them.
3326
3327         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3328
3329         * cp-tree.h (cplus_expand_constant): Declare.
3330         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3331         converted from one pointer-to-object type to another.
3332         * expr.c (cplus_expand_constant): Don't make it static.
3333         * typeck.c (build_component_ref): Don't crash when presented with
3334         a component which is a TEMPLATE_DECL.
3335         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
3336         cast from a pointer-to-member constant to its own type does not
3337         result in a valid non-type template argument.
3338
3339 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
3340             Nathan Sidwell  <nathan@acm.org>
3341         
3342         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3343         * cp-tree.h: Fix typo in documentation on pointers-to-members.
3344         (cp_build_qualified_type): Make it a macro.
3345         (cp_build_qualified_type_real): Declare.
3346         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
3347         problem with template parameters and restrict-qualification.
3348         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3349         * hash.h: Regenerated.
3350         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3351         the enumeration.
3352         (NORID): Remove definition.
3353         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3354         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
3355         (fn_type_unification): Check that the function type resulting from
3356         the deduction is legal.
3357         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3358         (unify): Use cp_build_qualified_type_real.
3359         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3360         (cp_build_qualified_type): Rename to ...
3361         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3362         and modify appropriately.
3363         
3364         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3365         reveal optimization opportunities.
3366
3367         * pt.c (tsubst): Don't issue error messages when we're not
3368         complaining, even if we see a qualified function type.
3369         (check_cv_quals_for_unify): Don't allow a qualified function
3370         type.
3371
3372 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3373
3374         * class.c (instantiate_type): Downgrade errors for object-dependent
3375         memfn refs to pedwarn.
3376
3377 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3378
3379         * decl.c (grokdeclarator): Don't treat [] as indicating a
3380         zero-sized array in a typedef.
3381
3382         * call.c (build_object_call): Don't look at DECL_NAME for a type.
3383         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3384         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3385
3386         * pt.c (for_each_template_parm): Rework to match documentation.
3387         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3388
3389 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3390
3391         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3392
3393         * class.c (finish_base_struct): Allow non-COM bases for COM classes
3394         except at the leftmost position.
3395         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3396         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3397         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3398
3399         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3400         (build_cplus_new): Make sure that what we return is of the right type.
3401
3402 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3403
3404         * cp-tree.h (make_ptrmem_cst): New function.
3405         * expr.c (cplus_expand_constant): Split out from ...
3406         (cplus_expand_expr): Here.  Use cplus_expand_constant.
3407         (init_cplus_expand): Set lang_expand_constant.
3408         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3409
3410         * tree.c (make_ptrmem_cst): Define.
3411         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3412         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3413
3414 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3415
3416         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3417
3418         * decl2.c (start_static_storage_duration_function): Fix comment.
3419         (finish_file): Create static storage duration functions lazily.
3420
3421 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3422
3423         Implement anonymous structs.
3424         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3425         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3426         * class.c (finish_struct_1): Remove redundant check for anon struct.
3427         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3428         (check_tag_decl): Check for anonymous struct here.
3429         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3430         * init.c (sort_member_init, emit_base_init): Handle getting fields
3431         as well as names in current_member_init_list.
3432         (perform_member_init): Handle getting an anon aggr.
3433         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3434         (do_build_copy_constructor): Likewise.
3435
3436 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3437
3438         * tree.c (cp_build_qualified_type): Don't allow qualified function
3439         types.
3440
3441 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
3442
3443         * gxxint.texi: Fix typo.
3444
3445 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3446
3447         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3448         * class.c (finish_struct_1): Use CLASS_TYPE_P.
3449         * ptree.c (print_lang_type): Likewise.
3450         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3451         IS_AGGR_TYPE_CODE.
3452         * typeck2.c (digest_init): Likewise.
3453
3454 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
3455
3456         * call.c (joust): Compare the types of the conv ops, not the
3457         target types of the conversions.
3458
3459 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3460
3461         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3462         was not given.
3463
3464 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
3465
3466         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3467         * decl.c (grokfndecl): Don't allow inline declarations of friend
3468         template specializations, or friend template specializations with
3469         default arguments.
3470         * pt.c (tsubst): Handle substitution into array types that does
3471         not yield a fixed upper bound, even when not processing a
3472         template.
3473         (tsubst_copy): Deal with the fact that the second operand to a
3474         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3475         * search.c (marked_pushdecls_p): Don't descend into
3476         TEMPLATE_TYPE_PARMs and the like.
3477         (unmarked_pushdecls_p): Likewise.
3478         
3479         * call.c (build_over_call): Don't throw away
3480         initializations/copies of empty classes; use MODIFY_EXPR and
3481         INIT_EXPR as for non-empty classes.
3482         * class.c (finish_struct_1): Put the padding byte for an empty
3483         class on the TYPE_NONCOPIED_PARTS list for the class.
3484
3485 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3486
3487         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3488         indicate a reference to a field that is a qualified name.
3489
3490 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
3491
3492         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3493         ASM_OUTPUT_CONSTRUCTOR.
3494
3495         * friend.c (do_friend): Add attrlist arg.  Remove support for
3496         getting a non-decl as 'decl'.
3497         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
3498         rtl.
3499         (grokdeclarator): Adjust.
3500         * cp-tree.h: Adjust.
3501
3502 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3503
3504         * cp-tree.h (permanent_p): New function.
3505         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3506         possibly complex tree node.
3507         * tree.c (mapcar): Adjust comments, and follow coding standards in
3508         conditional.
3509         (permanent_p): New function.
3510
3511 1999-05-13  Per Bothner  <bothner@cygnus.com>
3512
3513         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
3514         primitive Java types, if we actually see `extern "Java"'.
3515
3516 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3517
3518         * lang-specs.h: Pass -$ to the preprocessor.
3519
3520 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
3521
3522         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3523         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3524         (resolve_offset_ref): Don't handle a raw baselink.
3525         * cvt.c (build_expr_type_conversion): Likewise.
3526         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3527         convert_for_initialization): Likewise.
3528         * class.c (instantiate_type): Handle seeing a baselink under an
3529         OFFSET_REF.
3530         * error.c (dump_expr): Likewise.        
3531         * pt.c (for_each_template_parm): Likewise.
3532         (resolve_overloaded_unification): Likewise.
3533         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3534         * typeck.c (expr_sizeof): Also complain about other permutations
3535         of overloaded functions.
3536
3537 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
3538
3539         * init.c (resolve_offset_ref): Don't return a raw method.
3540         Use BASELINK_P.
3541         * typeck.c (decay_conversion): Don't handle a raw method.
3542         Resolve all OFFSET_REFs.
3543         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3544         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
3545         same_type_p for pmf bits.  Don't use build_binary_op to compare
3546         raw pointers to methods.
3547         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3548         to decide when to call resolve_offset_ref.
3549         (build_c_cast, convert_for_initialization): Likewise.
3550         * cvt.c (build_expr_type_conversion): Likewise.
3551
3552 1999-05-06  Nathan Sidwell  <nathan@acm.org>
3553
3554         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3555
3556 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
3557
3558         * decl2.c (start_objects): Don't let static constructors and
3559         destructors get inlined.
3560
3561         * parse.y (nested_name_specifier): Make sure ordinary types are
3562         complete, just like template types.
3563         * parse.c: Regenerated.
3564
3565         * pt.c (check_explicit_specialization): Improve error messages.
3566
3567 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3568
3569         * typeck.c (string_conv_p): Use same_type_p to check whether we
3570         try to convert between char and wchar_t.
3571
3572 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
3573
3574         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3575         lookup to error_mark_node here.
3576         (lookup_member): Revise documentation.  Add comments.  Don't set
3577         the TREE_TYPE to error_mark_node here, and don't build up an extra
3578         TREE_LIST for ambiguous lookups.
3579         (setup_class_bindings): Adjust accordingly.
3580         (push_class_decls): Revise out-of-date comments.
3581         
3582         * typeck.c (build_const_cast): Tighten checks for legality.
3583
3584 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3585
3586         * init.c (build_member_call): Lookup names coming from
3587         namespace-scoped LOOKUP_EXPR.
3588
3589 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
3590
3591         * gxxint.texi: Add documentation for 'I'.
3592
3593 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3594
3595         * tinfo.cc (operator==): Qualify type_info with std::.
3596
3597 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
3598
3599         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
3600         (DECL_COMDAT): Remove definition.
3601
3602 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
3603
3604         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3605         change.
3606
3607 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
3608
3609         * class.c (build_vtable): Use build_lang_decl when building
3610         vtables, not just build_decl.
3611         (prepare_fresh_vtable): Likewise.
3612         * decl.c (wrapup_globals_for_namespace): Mark vtables as
3613         DECL_EXTERNAL when calling wrapup_global_declarations.
3614         * decl2.c (priority_info_s): Add initializations_p and
3615         destructions_p members.
3616         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3617         when deciding what vtables to write out.
3618         (ssdf_decls): New variable.
3619         (ssdf_decls_used): Likewise.
3620         (start_static_storage_duration_function): Deal with being called
3621         multiple times.  Avoid inlining this function.
3622         (generate_inits_for_priority): Deal with reuse of priority map.
3623         (get_priority_info): Clear initializations_p and destructions_p.
3624         (do_static_initialization): Tweak comment.
3625         (do_static_destruction): Likewise.  Fix condition on sentries for
3626         destruction.
3627         (generate_ctor_or_dtor_function): Call all of the static storage
3628         duration functions.
3629         (generate_ctor_or_dtor_function_for_priority): Check
3630         initializations_p and destructions_p to see what priorities need
3631         initialization functions.
3632         (finish_file): Rework to generate multiple static storage duration
3633         functions, rather than just one.
3634
3635         * typeck.c (build_const_cast): Tweak last change to handle
3636         templates correctly.
3637
3638         * typeck.c (build_const_cast): Disallow use of const_cast to
3639         anything but a pointer or reference type.
3640
3641 1999-04-30  Nathan Sidwell  <nathan@acm.org>
3642
3643         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3644         signature type.
3645
3646 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
3647
3648         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3649         (finish_file): Indent comments properly.
3650
3651 1999-04-29  Richard Henderson  <rth@cygnus.com>
3652
3653         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3654         (do_static_destruction): Likewise.
3655
3656 1999-04-29  Nathan Sidwell  <nathan@acm.org>
3657
3658         * cp-tree.h (TYPE_NOTHROW_P): New macro.
3659         * decl2.c (delete_sanity): Warn on deleting void *.
3660         * init.c (build_new_1): Use TYPE_NOTHROW_P.
3661         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3662         throwing operator new.
3663
3664 1999-04-28  Nathan Sidwell  <nathan@acm.org>
3665
3666         * cp-tree.h (build_component_addr): Remove prototype.
3667         * typeck.c (build_component_addr): Make static. Remove MSG
3668         argument.
3669         (build_component_addr): Remove MSG parameter, clean up
3670         comment.
3671         (build_x_function_call): Use cp_error.
3672         (build_unary_op): Adjust call of build_component_addr.
3673
3674 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
3675
3676         * pt.c (tsubst_friend_class): Check for NULL.
3677
3678 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
3679
3680         * search.c (binfo_for_vtable): Initialize bfvi.var.
3681
3682 1999-04-27  Nathan Sidwell  <nathan@acm.org>
3683
3684         * rtti.c (build_x_typeid): Check rtti is enabled.
3685
3686 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
3687
3688         * search.c (is_subobject_of_p): Make sure we're looking at the
3689         right baseclasses.
3690
3691 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
3692
3693         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3694
3695 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
3696
3697         * decl2.c (finish_file): Tweak handling of extern inlines so that
3698         they are not unnecessarily put out.
3699
3700         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3701         such as base classes.
3702
3703 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
3704
3705         * tree.c (build_exception_variant): Fix typo: use the chain of U,
3706         not trying V, while cycling through U.
3707
3708 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
3709
3710         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3711         preserves_first_arg.  Enlarge dummy accordingly.
3712         (DECL_TINFO_FN_P): New macro.
3713         (SET_DECL_TINFO_FN_P): Likeiwse.
3714         (DECL_RETURNS_FIRST_ARG): Remove.
3715         (DECL_PRESERVES_THIS): Likewise.
3716         (DECL_INIT_PRIORITY): New macro.
3717         (finish_struct_1): Change prototype.
3718         (cat_namespace_levels): Remove prototype.
3719         (vtable_decl_p): New prototype.
3720         (vtype_decl_p): Likewise.
3721         (sigtable_decl_p): Likewise.
3722         (walk_globals_pred): New typedef.
3723         (walk_globals_fn): Likewise.
3724         (walk_globals): New prototype.
3725         (walk_namespaces_fn): New typedef.
3726         (walk_namespaces): New prototype.
3727         (wrapup_globals_for_namespace): Likewise.
3728         (walk_vtables): Remove prototype.
3729         (walk_sigtables): Likewise.
3730         (instantiate_pending_templates): New prototype.
3731         * class.c (finish_struct_1): Don't return a value.
3732         * decl.h (pending_statics): Remove declaration.
3733         * decl.c (walk_namespaces_r): New function.
3734         (walk_globals_r): Likewise.
3735         (vtable_decl_p): Likewise.
3736         (vtype_decl_p): Likewise.
3737         (sigtable_decl_p): Likewise.
3738         (walk_namespaces): Likewise.
3739         (walk_globals_data): New type.
3740         (walk_globals): New function.
3741         (wrapup_globals_for_namespace): Likewise.
3742         (expand_static_init): Remove assertion.  Remove redundancy in
3743         conditional.  Don't put static data members in static_aggregates
3744         Tidy.
3745         (finish_function): Remove redundancy in conditional.  Don't set
3746         DECL_RETURNS_FIRST_ARG.
3747         (cat_namespace_levels): Remove.
3748         * decl2.c: Include splay-tree.h and varray.h.
3749         (priority_info_s): New structure.
3750         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
3751         conventions.
3752         (prune_vtable_vardecl): Likewise.
3753         (finish_sigtable_vardecl): Likewise.
3754         (setup_initp): Remove.
3755         (do_dtors): Remove.
3756         (do_ctors): Remove.
3757         (start_static_storage_duration_function): New function.
3758         (generate_inits_for_priority): Likewise.
3759         (finish_static_storage_duration_function): Likewise.
3760         (get_priority_info): Likewise.
3761         (do_static_initialization): Likewise.
3762         (do_static_destruction): Likewise.
3763         (do_static_initialization_and_destruction): Likewise.
3764         (generate_ctor_or_dtor_function): Likewise.
3765         (generate_ctor_and_dtor_functions_for_priority): Likewise.
3766         (pending_statics): Make it a varray.
3767         (pending_statics_used): New variable.
3768         (saved_inlines): Make it a varray.
3769         (saved_inlines_used): New variable.
3770         (finish_static_data_member): Change method of updating
3771         pending_statics.
3772         (mark_inline_for_output): Remove #if 0'd code.  Change method of
3773         updating saved_inlines.
3774         (walk_vtables): Remove.
3775         (walk_sigtables): Likewise.
3776         (import_export_decl): Use DECL_TINFO_FN_P.
3777         (pending_templates): Remove declaration.
3778         (maybe_templates): Likewise.
3779         (static_aggregates_initp): Likewise.
3780         (setup_initp): Likewise.
3781         (finish_objects): Simplify.
3782         (INITIALIZE_P_IDENTIFIER): New macro.
3783         (PRIORITY_IDENTIFIER): New macro.
3784         (SSDF_IDENTIFIER): New macro.
3785         (initialize_p_decl): New variable.
3786         (priority_decl): Likewise.
3787         (ssdf_decl): Likewise.
3788         (priority_info_map): Likewise.
3789         (finish_file): Recode output of static intializers and other
3790         file-scope finalization tasks.
3791         * error.c (OB_END_TEMPLATE_ID): New macro.
3792         (dump_type_real): Use it.
3793         (dump_decl): Likewise.
3794         (dump_function_name): Likewise.
3795         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3796         interface.
3797         (check_newline): Use walk_globals, not walk_vtables.
3798         * pt.c (pending_tempalte_expansions): Remove.
3799         (set_vardecl_interface_info): Likewise.
3800         (pending_templates): Make static.
3801         (maybe_templates): Likewise.
3802         (instantiate_class_template): Adjust call to finish_struct_1.
3803         (instantiate_pending_templates): New function.
3804         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3805         * tree.c (static_aggregates_initp): Remove.
3806         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3807         instead.
3808         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3809
3810         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3811         with the RTL code RETURN.
3812         * hash.h: Regenerated.
3813         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3814         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3815         * parse.c: Regenerated.
3816         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
3817         it.
3818         (inline_parm_levels): New variable.
3819         (inline_parm_levels_used): Likewise.
3820         (maybe_begin_member_template_processing): Update them.
3821         (maybe_end_member_template_processing): Use them, rather than
3822         guessing how many levels to pop.
3823
3824         * decl.c (make_typename_type): Tighten error-checking.
3825
3826 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
3827
3828         * cp-tree.h (build_binary_op): Remove unneeded parameter.
3829         * class.c (build_vrable_entry_ref): Adjust call to
3830         build_binary_op.
3831         * decl.c (expand_static_init): Likewise.
3832         (grokdeclarator): Likewise.
3833         (finish_function): Likewise.
3834         * decl2.c (delete_sanity): Likewise.
3835         (do_dtors): Likewise.
3836         (do_ctors): Likewise.
3837         * error.c (dump_type_suffix): Likewise.
3838         * expr.c (cplus_expand_expr): Likewise.
3839         * init.c (resolve_offset_ref): Likewise.
3840         (build_new): Likewise.
3841         (build_new_1): Likewise.
3842         (build_vec_delete_1): Likewise.
3843         (expand_vec_init_catch_clause): Likewise.
3844         (build_delete): Likewise.
3845         * pt.c (tsubst): Likewise.
3846         * rtti.c (synthesize_tinfo_fn): Likewise.
3847         * search.c (expand_upcast_fixups): Likewise.
3848         (expand_direct_vtbls_init): Likewise.
3849         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3850         (build_binary_op_nodefault): Likewise.
3851         (point_int_sum): Likewise.
3852         (pointer_diff): Likewise.
3853         (build_unary_op): Likewise.
3854         (build_modify_expr): Likewise.
3855         (get_delta_difference): Likewise.
3856         (build_ptrmemfunc): Likewise.
3857         (expand_ptrmemfunc_cst): Likewise.
3858
3859 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
3860
3861         * decl.c (grokfndecl): Always call cplus_decl_attributes.
3862         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3863
3864 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
3865
3866         * cp-tree.h (finish_static_data_member_decl): New function.
3867         * decl2.c (finish_static_data_member_decl): Split out from ...
3868         (grokfield): Here.
3869         * pt.c (instantiate_class_template): Use it here instead of
3870         trying to fake it.
3871         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3872         finish_static_data_member_decl will do that.  Explicit set
3873         DECL_EXTERNAL to match non-template processing.
3874
3875 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
3876
3877         * cp-tree.h (finish_class_definition): Add parameter.
3878         * parse.y (structsp): Use it.  Don't call pop_scope here.
3879         * parse.c: Regenerated.
3880         * semantics.c (finish_class_definition): Pop it here.
3881
3882 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
3883
3884         * decl.c (xref_tag): Revise handling of nested template
3885         declarations.
3886         * pt.c (check_explicit_specialization): Tweak handling of friend
3887         templates in template classes.
3888         (tsubst_friend_class): Handle friend declarations for nested
3889         member template classes.
3890
3891 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
3892
3893         * class.c (finish_struct): Remove unused variable.
3894         (pushclass): Likewise.
3895         (invalidate_class_lookup_cache): Likewise.
3896         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3897         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3898         doesn't get obliterated.
3899         (make_typename_type): Handle template classes correctly.
3900
3901         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3902         (storetags): Declare.
3903         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3904         (pushclass): Likewise.  Use storetags to install tag declarations,
3905         not pushtag.
3906         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3907         * decl.c (storetags): Make it global.
3908         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3909         implicit typename declaration.
3910         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
3911         * method.c (hack_identifier): Likewise.
3912         * search.c (lookup_member): Likewise.
3913
3914         * decl.c (warn_about_implicit_typename_lookup): New function.
3915         (lookup_name_real): Use it.  Rework handling of implicit typename
3916         extension.
3917
3918 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
3919
3920         * cp-tree.h (lookup_nested_field): Remove.
3921         * class.c (push_nested_class): Handle UNION_TYPEs.
3922         (pop_nested_class): Likewise.
3923         * decl.c (lookup_name_real): Don't call lookup_nested_field.
3924         (start_decl): Use push_nested_class, not just pushclass.
3925         (cp_finish_decl): Use pop_nested_class, not just popclass.
3926         * search.c (lookup_nested_field): Remove.
3927
3928         * cp-tree.h (lang_type): Add documentation.
3929         * decl2.c (handle_class_head): Create template declarations here,
3930         as appropriate.
3931         * parse.y (class_head): Return whether or not we entered a new
3932         scope, as well as the type named.
3933         (named_class_head): Likewise.
3934         (named_complex_class_head_sans_basetype): Likewise.
3935         (structsp): Adjust accordingly.  Pop scope when required.
3936         * parse.c: Regenerated.
3937         * pt.c (check_default_tmpl_args): Robustify.
3938         (redeclare_class_template): Likewise.
3939         (instantiate_class_template): An instantiation of an
3940         anonymous union is itself an anonymous union.
3941         * semantics.c (begin_class_definition): Don't create template
3942         declarations here.
3943
3944 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
3945
3946         * parse.y (after_type_declarator_intern): New nonterminal.
3947         (after_type_declarator): Use it.
3948         (direct_after_type_declarator): Likewise.  Move above
3949         nonnested_type to fix reduce/reduce conflict resolution.
3950         (declmods): Reducing from just 'attributes' has EMPTY precedence.
3951         * Makefile.in (CONFLICTS): Update.
3952
3953         * decl.c (define_label): Downgrade error for jumping over a
3954         non-POD decl to pedwarn.
3955
3956 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
3957
3958         * cp-tree.h (popclass): Change declaration.
3959         (pop_nested_class): Likewise.
3960         (poplevel_class): Remove declaration.
3961         * call.c (convert_default_argument): Pass no arguments to
3962         popclass.
3963         * class.c (finish_struct_1): Likewise.
3964         (finish_struct): Likewise.
3965         (popclass): Remove argument.  Simplify code accordingly.
3966         (pop_nested_class): Likewise.
3967         * decl.c (poplevel_class): Declare it here, and make it static.
3968         (poplevel): Handle class scopes.
3969         (poplevel_class): Don't take an rgument.  Simplify.
3970         (pop_everything): Pass no arguments to pop_nested_class.
3971         (cp_finish_decl): Pass no arguments to popclass.
3972         (grokdeclarator): Pass no arguments to pop_nested_class.
3973         (finish_function): Likewise.
3974         * decl2.c (grokfield): Likewise.
3975         (pop_scope): Pass no arguments to popclass.
3976         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3977         * pt.c (instantiate_class_template): Move call to pushclass, and
3978         document.  Pass no arguments to popclass.
3979         (regenerate_decl_from_template): Likewise.
3980
3981 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
3982
3983         * typeck.c (build_unary_op): Handle taking the address of a unique
3984         bound non-static member function.
3985
3986 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3987
3988         * lang-options.h (-Wdeprecated): New flag.
3989         * decl2.c (warn_deprecated): New flag.
3990         (lang_decode_option): Deprecated this-is-variable,
3991         external-templates, alt-external-templates.
3992         Support -Wdeprecated.
3993         * errfn.c (cp_deprecated): New function.
3994
3995 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
3996
3997         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
3998         of the decls themselves.
3999
4000         * pt.c (tsubst_function_type): Copy attributes over.
4001
4002         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
4003         and com_interface.
4004         * cp-tree.h: Add prototype.
4005         * decl.c (init_decl_processing): Set valid_lang_attribute.
4006
4007 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
4008
4009         * class.c (finish_struct_1): Look at the const-ness of the field's
4010         type, not the TREE_READONLY-ness of the declaration.
4011         * method.c (synthesize_method): Likewise.
4012         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
4013         creating new declarations.
4014
4015 1999-04-13  Mike Stump  <mrs@wrs.com>
4016
4017         * decl2.c (import_export_decl): Because vtables always reference
4018         virtual functions, even if they are inlined, don't allow
4019         -fno-implement-inlines to not emit them, instead, emit them with
4020         the vtable.
4021         * decl.c (start_function): Likewise.
4022
4023 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
4024
4025         * cp-tree.h (struct lang_type): Add com_interface.
4026         (CLASSTYPE_COM_INTERFACE): New macro.
4027         * class.c (set_rtti_entry): COM interface classes have no RTTI
4028         entries in their vtables; adjust.
4029         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
4030         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
4031         finish_struct_1): Likewise.
4032         * decl2.c (mark_vtable_entries): Likewise.
4033         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
4034         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
4035         expand_upcast_fixups): Likewise.
4036         * tree.c (debug_binfo): Likewise.
4037
4038         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
4039         * typeck.c (comptypes): If we get it, ignore attributes.
4040         * class.c (instantiate_type): Use BASELINK_P.  Change complain
4041         parameter to flags; 2 means ignore attributes.
4042         * call.c (build_op_delete_call): Pass it.
4043
4044         * decl.c (xref_tag): Only complain once about using a typedef-name
4045         with 'struct'.  Downgrade to pedwarn.
4046
4047         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
4048
4049         * parse.y (absdcl_intern): New nonterminal.
4050         (absdcl, direct_abstract_declarator): Use it.
4051
4052         * pt.c (lookup_template_class): Look through implict typename.
4053
4054 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
4055
4056         * friend.c (add_friend): Deal gracefully with error_mark_node.
4057         * method.c (build_overload_value): Handle pointers-to-members as
4058         template parameters.
4059
4060         * decl.c (push_binding): Fix typo in comment.
4061
4062 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
4063
4064         * error.c (dump_type_real): If a typename is a template-id, put
4065         out the template arguments.
4066         (dump_expr): Handle TEMPLATE_ID_EXPR.
4067         * pt.c (lookup_template_class): Now that full arguments are
4068         available everywhere, remove code that tried to guess them.
4069
4070 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
4071
4072         * decl.c (make_typename_type): Complain if we don't find a type
4073         when trying to make a typename type for a non-template type.
4074
4075 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
4076
4077         * decl.c (start_decl): Pass attributes to grokdeclarator.
4078         (grokdeclarator): Handle attributes on constructor-syntax
4079         initializers.
4080
4081 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
4082
4083         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
4084         don't have types.
4085
4086         * search.c (template_self_reference_p): Tweak.
4087
4088 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
4089
4090         * init.c (build_offset_ref): Don't build yet another weird data
4091         structure to describe overloaded functions.
4092
4093 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
4094
4095         * cp-tree.h (BASELINK_P): New macro.
4096         (SET_BASELINK_P): Likewise.
4097         * init.c (build_member_call): Remove needless assignment in if
4098         statement.
4099         * search.c (lookup_field_r): Fix handling when we are looking
4100         specifically for a type; these are not hidden by functions and
4101         variables.
4102         (lookup_member): Use SET_BASELINK_P.
4103         * tree.c (is_overloaded_fn): Use BASELINK_P.
4104         (really_overloaed_fn): Likewise.
4105         (get_first_fn): Likewise.
4106
4107 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
4108
4109         * decl.c (lookup_name_current_level): Tweak, and improve
4110         documentation.
4111
4112         * class.c (maybe_fixup_vptrs): Remove declaration.
4113         (build_class_init_list): Likewise.
4114         * decl.c (pushdecl_class_level): Call check_template_shadow here
4115         ...
4116         (push_class_level_binding): ... not here.
4117         * search.c (dfs_push_type_decls): Only avoid
4118         template-self-reference TYPE_DECLs if they are from base classes.
4119
4120 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
4121
4122         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
4123         nodes.  Tidy.
4124
4125 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
4126
4127         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
4128         (finish_struct_1): Don't call build_class_init_list.
4129
4130 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
4131
4132         * tinfo.h (__class_type_info): Fix illegal declaration.
4133
4134         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
4135         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
4136         (IDENTIFIER_CLASS_VALUE): Improve documentation.
4137         (is_properly_derived_from): Declare.
4138         (invalidate_class_lookup_cache): Likewise.
4139         (maybe_maybe_note_name_used_in_class): Likewise.
4140         (note_name_declared_in_class): Likewise.
4141         (push_using_decl): Remove duplicate declaration.
4142         (id_in_current_class): Remove declaration.
4143         (push_class_binding): Change prototype.
4144         (clear_identitifer_class_values): Declare.
4145         * call.c (is_properly_derived_from): Make it global.
4146         (build_new_function_call): Be careful about updating candidates.
4147         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
4148         asked to make illegal calls.
4149         * class.c: Include splay-tree.h.
4150         (class_stack_node): Add names_used slot.
4151         (check_member_decl_is_same_in_complete_scope): Remove.
4152         (add_method): Fix comment.  Push the declaration into class
4153         scope.
4154         (finish_struct_1): When popping the class, pop the bindings too.
4155         Remove check for data member/function member conflict.
4156         (finish_struct): Remove calls to
4157         check_member_decl_is_same_in_complete_scope.  Change calls to
4158         popclass.
4159         (pushclass): Clear names_used in the class stack entry.
4160         Use invalidate_class_lookup_cache to remove cached entries, rather
4161         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
4162         before entering a new class.  Remove dead code.  Don't mess with
4163         current_function_decl when pushing declarations.
4164         (invalidate_class_lookup_cache): New function, split out from ...
4165         (popclass): Here.  Clean up names_used on our way out.
4166         (instantiate_type): Adjust.
4167         (build_self_reference): Don't push the declaration here.
4168         (maybe_note_name_used_in_class): New function.
4169         (note_name_declared_in_class): Likewise.
4170         * decl.c (add_binding): Change prototype.
4171         (find_class_binding_level): New function.
4172         (innermost_nonclass_level): Likewise.
4173         (current_binding_level): Update documentation.
4174         (inner_binding_level): Remove.  Replace with current_binding_level
4175         throughout.
4176         (push_binding_level): Remove special handling of
4177         class_binding_level.
4178         (pop_binding_level): Likewise.  Use find_class_binding_level.
4179         (suspend_binding_level): Likewise.
4180         (global_bindings_p): Use innermost_nonclass_level.
4181         (toplevel_bindings_p): Likewise.
4182         (namespace_bindings_p): Likewise.
4183         (pseudo_global_level_p): Likewise.
4184         (push_binding): Clear INHERITED_VALUE_BINDING_P.
4185         (add_binding): Check for illegal multiple declarations.  Return a
4186         value indicating whether or not the new binding was legal.
4187         (push_local_binding): Skip over class binding levels.  Check
4188         return value from add_binding.
4189         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
4190         note_name_declared_in_class.
4191         (pushlevel_class): Remove "fake out the rest of the compiler"
4192         code.
4193         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
4194         (clear_identifier_class_values): New function.
4195         (pop_from_top_level): Use it.
4196         (pop_everything): Tweak.
4197         (maybe_process_template_type_declaration): Don't push the
4198         declaration for the template here.
4199         (pushtag): Don't push tag declarations into class scope here.
4200         (pushdecl): Apply DeMorgan's law for readability.
4201         (pushdecl_class_level): Remove special-case code for
4202         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
4203         (push_class_level_bindng): Deal with inherited bindings.
4204         (lookup_name_real): Remove special-case code for
4205         TYPE_BEING_DEFINED, and some implicit typename magic.
4206         (grokdeclarator): Handle COMPONENT_REF for a template function.
4207         (build_enumerator): Don't call pushdecl_class_level here.
4208         (id_in_current_class): Remove.
4209         * decl2.c (grokfield): Don't call pushdecl_class_level or
4210         check_template_shadow.
4211         * errfn.c (cp_file_of): Don't declare.
4212         (cp_line_of): Likewise.
4213         * error.c (dump_decl): Handle an OVERLOAD.
4214         (cp_file_of): Likewise.
4215         (cp_line_of): Likewise.
4216         * init.c (build_member_call): Handle a COMPONENT_REF.
4217         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
4218         pushdecl_class_level.
4219         * method.c (hack_identifier): Build COMPONENT_REFs for references
4220         to member templates as well as member functions.  Remove dead
4221         code.
4222         * parse.y (left_curly): Remove.
4223         (nonnested_type): Call maybe_note_name_used_in_class, not
4224         pushdecl_class_level.
4225         * parse.c: Regenerated.
4226         (nested_name_specifier_1): Likewise.
4227         * pt.c (check_explicit_specialization): Adjust, for robustness.
4228         (check_template_shadow): Handle OVERLOADs.
4229         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
4230         TEMPLATE_DECL, if appropriate.
4231         * search.c (envelope_add_decl): Remove.
4232         (dfs_pushdecls): Likewise.
4233         (dfs_compress_decls): Likewise.
4234         (dfs_push_decls): New function.
4235         (dfs_push_type_decls): Likewise.
4236         (setup_class_bindings): Likewise.
4237         (template_self_reference_p): Likewise.
4238         (lookup_field_r): Use it.
4239         (looup_member): Remove old comment.  Deal with ambiguity.
4240         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
4241         and remove envelope processing.
4242         * semantics.c (begin_class_definition): Let pushclass push
4243         declarations for base classes.
4244         (finish_member_declaration): Push declarations into class scope.
4245         * typeck.c (build_component_ref): Just put an OVERLOAD into the
4246         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
4247         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
4248         * Makefile.in (class.o): Depend on splay-tree.h.
4249
4250 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
4251
4252         * cvt.c (convert_pointer_to_real): Use same_type_p.
4253         * typeck.c (comp_target_types): Use same_type_p.
4254
4255 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
4256
4257         * semantics.c (begin_inline_definitions,
4258         finish_inline_definitions): Rename from finish_default_args and
4259         begin_inline_definitions, respectively, to something that isn't a
4260         total lie.  :)
4261         * parse.y (structsp): Adjust.
4262
4263         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
4264         (list_hash_lookup): Likewise.
4265         (hash_tree_chain): Adjust.
4266         * pt.c (tsubst): Adjust.
4267         (tsubst_arg_types): Use plain hash_tree_cons.
4268         * cp-tree.h (hash_tree_cons_simple): Lose.
4269         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
4270
4271 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4272
4273         * Makefile.in (hash.h): Generate using gperf language 'C', not
4274         'KR-C', so gperf uses the `const' keyword on strings.
4275
4276         * gxx.gperf (resword): Const-ify a char*.
4277
4278 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
4279
4280         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
4281         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
4282         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
4283         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
4284         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
4285         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
4286         tree.c: Adjust.
4287
4288 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
4289
4290         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
4291
4292 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
4293
4294         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
4295
4296 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
4297
4298         * cp-tree.h (add_friend): Declare.
4299         (add_friends): Likewise.
4300         * friend.c (add_friend): Make it global.  Don't add to
4301         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
4302         (add_friends): Make it global.
4303         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
4304         befriending class is a template.
4305         * parse.y (component_decl_1): Fix typo in comment.
4306         * parse.c: Regenerated.
4307         * pt.c (instantiate_class_template): Use add_friend and
4308         add_friends rather that duplicating some of their functionality
4309         here.
4310
4311 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
4312
4313         * call.c (build_field_call): Unify 'this' and non-'this' cases.
4314
4315         * typeck.c (build_indirect_ref): Check for 'this' sooner.
4316
4317 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4318
4319         * call.c (op_error): Const-ify a char*.
4320         (add_candidate, source_type, add_warning): Add static prototype.
4321         (print_z_candidates): Const-ify a char*.
4322
4323         * class.c (resolve_address_of_overloaded_function,
4324         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
4325         (get_vtable_name, finish_struct_1): Const-ify a char*.
4326
4327         * cvt.c (convert_to_reference): Likewise.
4328
4329         * decl.c (redeclaration_error_message, record_builtin_type,
4330         record_unknown_type, member_function_or_else, bad_specifiers):
4331         Likewise.
4332         (find_binding, select_decl, unqualified_namespace_lookup,
4333         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
4334         Add static prototype.
4335         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
4336         implicitly_declare, record_builtin_java_type, define_function,
4337         grok_op_properties, tag_name): Const-ify a char*.
4338
4339         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
4340         (define_function, finish_builtin_type): Const-ify a char*.
4341         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
4342         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
4343         (file_name_nondirectory): Const-ify a char*.
4344         (init_filename_times): Don't prototype.
4345         (compiler_error): Prototype.
4346         (yyerror, init_repo): Const-ify a char*.
4347         (build_srcloc): Don't prototype.
4348         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
4349         Const-ify a char*.
4350         (warn_for_assignment): Don't prototype.
4351         (convert_for_initialization, readonly_error, check_for_new_type,
4352         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
4353         Const-ify a char*.
4354
4355         * decl2.c (acceptable_java_type, output_vtable_inherit,
4356         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
4357         merge_functions, decl_namespace, validate_nonmember_using_decl,
4358         do_nonmember_using_decl): Add static prototype.
4359         (lang_f_options): Const-ify a char*.
4360         (finish_builtin_type): Likewise.
4361         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4362         prototype.
4363
4364         * errfn.c: Include cp-tree.h.
4365         (cp_thing): Add static prototype.
4366         (compiler_error): Don't protoptype.
4367         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4368         passing it to `cp_thing'.
4369
4370         * error.c (interesting_scope_p): Add static prototype.
4371
4372         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4373         a char*.
4374
4375         * init.c (compiler_error): Don't prototype.
4376         (member_init_ok_or_else): Const-ify a char*.
4377         (build_java_class_ref): Add static prototype.
4378
4379         * lex.c (compiler_error): Don't prototype.
4380         (get_time_identifier, interface_strcmp, extend_token_buffer,
4381         handle_cp_pragma): Const-ify a char*.
4382         (is_global, init_filename_times): Add static prototype.
4383         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4384         (compiler_error): Change from fixed args to variable args.
4385         (yyerror): Const-ify a char*.
4386
4387         * parse.y (cond_stmt_keyword): Const-ify a char*.
4388         (parse_decl): Add static prototype.
4389
4390         * pt.c (template_args_equal, print_template_context): Likewise.
4391         (print_candidates, check_default_tmpl_args): Const-ify a char*.
4392         (instantiate_class_template): Likewise.
4393
4394         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4395
4396         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4397         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4398
4399         * search.c (lookup_field_info, lookup_member): Likewise.
4400         (lookup_member): Cast the first argument of `bzero' to a PTR.
4401
4402         * sig.c (compiler_error): Don't prototype.
4403         (build_signature_pointer_or_reference_nam): Const-ify a char*.
4404         (get_sigtable_name, build_member_function_pointer): Likewise.
4405
4406         * tree.c (compiler_error): Don't prototype.
4407         (no_linkage_helper, build_srcloc): Add static prototype.
4408         (build_vbase_pointer_fields): Const-ify a char*.
4409         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4410
4411         * typeck.c (compiler_error): Don't prototype.
4412         (convert_for_assignment): Const-ify a char*.
4413         (comp_cv_target_types): Add static prototype.
4414         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4415         build_component_addr, build_unary_op, convert_for_initialization):
4416         Const-ify a char*.
4417
4418         * typeck2.c (ack): Add static prototype and change from fixed args
4419         to variable args.
4420         (readonly_error, check_for_new_type): Const-ify a char*.
4421
4422         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4423         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4424         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
4425         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4426         gen_assign, GNU_xref_member): Const-ify a char*.
4427
4428 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4429
4430         * gxxint.texi: Remove old discussion on copying virtual bases.
4431
4432 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
4433
4434         * Make-lang.in: Remove all references to g++.o/g++.c.
4435         Link g++ from gcc.o.
4436
4437 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4438
4439         * decl2.c (comdat_linkage): Treat vtables like functions.
4440
4441 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
4442
4443         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4444
4445 1999-03-25  Nathan Sidwell  <nathan@acm.org>
4446
4447         * decl.c (init_decl_processing): Add `signed' type as a synonym
4448         for `int'.
4449
4450 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4451
4452         * typeck.c (common_type): Handle cv-qual unification for pointers
4453         to members.
4454
4455         * decl.c (unqualified_namespace_lookup): Return error_mark_node
4456         on error.
4457         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4458         * lex.c (do_identifier): If we got error_mark_node, call
4459         lookup_name again.
4460
4461 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4462
4463         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4464         classes.
4465
4466 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
4467
4468         * decl.c (lookup_name_real): Do nested field lookup regardless of
4469         TYPE_BEING_DEFINED.
4470
4471 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
4472
4473         * cp-tree.h (lang_type): Remove has_assignment and
4474         has_real_assignment.  Add befriending_classes.
4475         (TYPE_HAS_ASSIGNMENT): Remove.
4476         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4477         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4478         (lang_decl): Document.
4479         (DECL_BEFRIENDING_CLASSES): New macro.
4480         (FRIEND_NAME): Move declaration to more obvious location.
4481         (FRIEND_DECLS): Likewise.
4482         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4483         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4484         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4485         (grok_op_properties): Likewise.
4486         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4487         (add_friend): Likewise.  Don't do weird things with assignment
4488         operators.  Update DECL_BEFRIENDING_CLASSES.
4489         (add_friends): Don't do weird things with assignment operators.
4490         (make_friend_class): Likewise.  Update
4491         CLASSTYPE_BEFRIENDING_CLASSES.
4492         * pt.c (instantiate_class_template): Don't set
4493         TYPE_HAS_ASSIGNMENT.
4494         (tsubst_copy): Substitute the TREE_TYPE for more unary
4495         expressions.
4496         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4497         * search.c (protected_accessible_p): New function.
4498         (friend_accessible_p): Likewise.
4499         (accessible_p): Use them.
4500
4501 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4502
4503         * pt.c (convert_nontype_argument): Don't create things that aren't
4504         PTRMEM_CSTs when applying a qualification conversion to a
4505         PTRMEM_CST.
4506
4507 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4508
4509         * Makefile.in (OBJS): Don't mention hash.o.
4510         (OBJDEPS): Likewise.
4511
4512 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
4513
4514         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4515         * decl.c (expand_static_init): Make sure we don't add any after
4516         then.
4517
4518         * decl.c (cp_finish_decl): Move intelligence about handling
4519         DECL_COMDAT for variables from here...
4520         * decl2.c (comdat_linkage): ...to here.
4521         (maybe_make_one_only): Tweak.
4522         (import_export_decl): Call comdat_linkage for variables, too.
4523         (finish_file): Handle template statics properly.
4524
4525 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
4526
4527         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4528         Document internals of pointer-to-member-functions.
4529         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4530         (PFN_FROM_PTRMEMFUNC): Likewise.
4531         (build_type_conversion): Remove unused parameter.
4532         (build_ptrmemfunc1): Declare.
4533         (expand_ptrmemfunc_cst): New function.
4534         (delta2_from_ptrmemfunc): Likewise.
4535         (pfn_from_ptrmemfunc): Likewise.
4536         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4537         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
4538         (convert_to_reference): Remove unused parameter to
4539         build_type_conversion.
4540         (ocp_convert): Likewise.
4541         (build_user_type_conversion): Likewise.
4542         * error.c (dump_expr): Handle NULL pointer-to-member functions.
4543         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4544         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4545         open when handling pointer-to-member functions.
4546         * pt.c (convert_nontype_argument): Clean up error messages.  Be
4547         more stringent with pointers-to-members.
4548         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
4549         (build_unary_op): Tidy ever-so-slightly.
4550         (build_conditional_expr): Remove extra parameter to
4551         build_type_conversion.
4552         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4553         we're using.
4554         (expand_ptrmemfunc_cst): Define.
4555         (delta2_from_ptrmemfunc): Likewise.
4556         (pfn_from_ptrmemfunc): Likewise.
4557
4558 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
4559
4560         * init.c (build_member_call): Handle template-id expressions
4561         correctly.
4562         * typeck.c (build_x_function_call): Likewise.
4563
4564 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
4565
4566         * friend.c (make_friend_class): Avoid core dump when
4567         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4568
4569 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
4570
4571         * decl.c (start_function): Suppress normal linkage heuristics
4572         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4573
4574 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
4575
4576         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4577         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4578
4579 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4580
4581         * parse.y (named_complex_class_head_sans_basetype):
4582         Do not push a scope for error_mark_node.
4583         (maybe_base_class_list): Likewise.
4584
4585         * decl.c (start_decl): Check for error_mark_node as a type.
4586         Detected by g++.brendan/array-refs.C.
4587         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
4588         (maybe_build_cleanup_1): Likewise.  Detected by
4589         g++.jason/incomplete1.C.
4590
4591         * tree.c (build_dummy_object): Use void_zero_node instead of the
4592         error_mark_node.
4593         (is_dummy_object): Check for such a node.
4594         Detected by g++.bob/inherit1.C
4595
4596 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
4597
4598         * method.c (old_backref_index): Split out...
4599         (flush_repeats): From here.  Rename back from try_old_backref.
4600         (build_mangled_name): Put back some old-style repeat handling.
4601
4602 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4603
4604         * lex.c: Don't include setjmp.h.
4605         (parse_float): New static function.
4606         (pf_args): New struct.
4607         (real_yylex): Use them in call to `do_float_handler'.
4608
4609 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
4610
4611         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
4612         * tree.c (layout_basetypes): Not here.
4613         * search.c (dfs_search): Remove; no longer used.
4614
4615 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4616
4617         * decl2.c (validate_nonmember_using_decl): Issue sensible
4618         error-messages on bogus qualifiers.
4619
4620 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
4621
4622         * call.c (add_function_candidate): Fix uninitialized variable.
4623
4624         * Makefile.in (search.o): Add dependency on varray.h.
4625
4626 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
4627
4628         * decl.c (duplicate_decls): Use same_type_p.
4629         * method.c (try_old_backref): Renamed from flush_repeats.  Use
4630         same_type_p.  Don't try to handle repeats.  Return success.
4631         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
4632         calls from old-style code, too.
4633         (check_ktype): Use same_type_p.
4634         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
4635         (build_qualified_name): Simplify logic.
4636         (process_overload_item): Strip typedefs and quals at the top.
4637         (build_mangled_name_for_type_with_Gcode): Remove call to
4638         type_canonical_variant.
4639         (build_mangled_name): Likewise.  Remove support for old-style
4640         repeats, which have been disabled since 2.7.2.  Don't mess with
4641         TREE_USED.
4642         (build_decl_overload_real): Don't mess with TREE_USED.
4643
4644 1999-03-13  Nathan Sidwell  <nathan@acm.org>
4645
4646         * error.c (cp_printers): Add 'F' escape character.
4647         (dump_type_real): Remove TREE_LIST (fnargs) printing.
4648         Functionality moved to dump_parameters.
4649         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
4650         (dump_function_decl): Extend meaning of V parameter.  Use
4651         dump_parameters and dump_exception_spec.
4652         (dump_parameters): New static function.
4653         (dump_exception_spec): New static function.
4654         (fndecl_as_string): Change argument semantics.  Use
4655         dump_function_decl directly.
4656
4657         * sig.c (build_signature_table_constructor): Use cp_error.
4658
4659 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4660
4661         * semantics.c (finish_switch_cond): Handle error cases gracefully.
4662         Detected by g++.law/enum5.C.
4663
4664         * typeck.c (build_modify_expr): Check for errors after resolving
4665         offsets.  Detected by g++.brendan/static1.C.
4666
4667         * decl.c (complete_array_type): Ignore initial_value if it is an
4668         error.  Detected by g++.benjamin/17930.C.
4669
4670         * typeck2.c (process_init_constructor): Return error if one argument
4671         is in error.  Detected by g++.benjamin/13478.C.
4672
4673 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4674
4675         * decl.c (select_decl): Allow class templates when we need types.
4676         * decl2.c (ambiguous_decl): Likewise.
4677
4678 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4679
4680         * lex.c (do_identifier): Correct call to enforce_access.
4681         * search.c (accessible_p): Tweak comment.
4682
4683 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
4684
4685         * semantics.c (begin_class_definition): Call build_self_reference.
4686         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
4687
4688         * search.c (assert_canonical_unmarked): Fix typo in prototype.
4689
4690         * search.c (dfs_canonical_queue): New function.
4691         (dfs_assert_unmarked_p): Likewise.
4692         (assert_canonical_unmarked): Likewise.
4693         (access_in_type): Use it.
4694         (accessible_p): Likewise.  Walk the whole tree when umarking.
4695
4696         * sig.c (build_signature_table_constructor): Use accessible_p
4697         instead of compute_access.
4698
4699 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4700
4701         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
4702
4703 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
4704
4705         * cp-tree.h (flag_access_control): Declare.
4706         (TREE_VIA_PPUBLIC): Document.
4707         (DECL_NONSTATIC_MEMBER_P): New macro.
4708         (enforce_access): Return an indication of whether or not access
4709         was permitted.
4710         (build_self_reference): Change prototype.
4711         (compute_access): Replace with ...
4712         (accessible_p): New function.
4713         (dfs_walk): Change prototype.
4714         (dfs_unmark): Likewise.
4715         (markedp): Likewise.
4716         * call.c (enforce_access): Use accessible_p.
4717         * class.c (build_self_reference): Insert the declaration into the
4718         list of members for this type, and make it public.
4719         * decl.c (xref_basetypes): Avoid ill-timed recursion.
4720         * init.c (build_offset_ref): Use lookup_member, not three separate
4721         name-lookups.  Call enforce_access rather than checking for
4722         illegal accesses here.
4723         (resolve_offset_ref): Likewise.
4724         * lex.c (do_identifier): Likewise.
4725         * method.c (hack_identifier): Likewise.
4726         * parse.y (self_reference): Remove.
4727         (opt_component_decl_list): Don't use it.
4728         * parse.c: Regenerated.
4729         * pt.c (print_candidates): Generalize to handle lists of
4730         overloaded functions.
4731         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
4732         not set.
4733         (get_template_base): Use new calling convention for dfs_walk.
4734         * search.c: Include varray.h.  Add prototypes.
4735         (dfs_walk): Accept a data pointer to pass to the work functions.
4736         All callers changed.  All work functions changed.
4737         (breadth_first_search): Rename to bfs_walk, and make consistent
4738         with dfs_walk.
4739         (dfs_walk_real): New function.
4740         (canonical_binfo): New function.
4741         (context_for_name_lookup): Likewise.
4742         (shared_marked_p): Likewise.
4743         (shared_unmarked_p): Likewise.
4744         (lokup_field_queue_p): Likewise.
4745         (lookup_field_r): Generalize to handle both functions and fields.
4746         (lookup_field): Just call lookup_member.
4747         (lookup_fnfields): Likewise.
4748         (lookup_member): Move body of lookup_field here and generalize.
4749         (dfs_accessible_queue_p): Likewise.
4750         (dfs_accessible_p): Likewise.
4751         (dfs_access_in_type): Likewise.
4752         (access_in_type): Likewise.
4753         (compute_access): Remove, and replace with ...
4754         (accessible_p): New function.
4755         (vbase_types): Remove.
4756         (vbase_decl_ptr_intermediate): Likewise.
4757         (vbase_decl_ptr): Likewise.
4758         (vbase_init_result): Likewise.
4759         (closed_envelopes): Likewise.
4760         (bvtable): Likewise.
4761
4762 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4763
4764         * call.c (add_function_candidate): Check for proper number of args
4765         before checking the validity of those args.
4766
4767 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
4768
4769         * cp-tree.h (struct lang_type): Add anon_union field.
4770         (ANON_UNION_TYPE_P): Use it instead of examining type.
4771         (SET_ANON_UNION_TYPE_P): New macro.
4772         * decl.c (check_tag_decl): Use it.
4773
4774         * search.c (compute_access): Handle non-type contexts earlier, and
4775         handle NULL_TREE.
4776
4777         * tree.c (build_exception_variant): Use copy_to_permanent.
4778
4779         * decl2.c (setup_initp): Give statics with no priority the default
4780         priority here.
4781         (do_dtors, do_ctors, finish_file): Remove special handling of
4782         non-prioritized statics.
4783
4784 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
4785
4786         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
4787         * decl.c (make_typename_type): Don't issue an error if an
4788         immediate lookup fails; it migt be resolved later.
4789         * friend.c (is_friend): Add comment.
4790         * search.c (breadth_first_search): Add POSTFN and DATA
4791         parameters.  Tidy.  All callers changed.
4792         (lookup_field_queue_p): New function.
4793         (lookup_field_r): Likewise.
4794         (lookup_field_post): Likewise.
4795         (lookup_field): Use them, via breadth_first_search, instead of
4796         duplicating logic.
4797         (compute_access): Robustify.
4798         (lookup_fnfield_info): New structure.
4799
4800 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
4801
4802         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4803
4804 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
4805
4806         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
4807         cc happy.
4808
4809         * decl2.c (import_export_class): Also return if
4810         CLASSTYPE_INTERFACE_ONLY is set.
4811
4812 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4813
4814         * decl.c (push_overloaded_decl): Only overwrite the old binding if
4815         there was one.
4816         * decl2.c (do_local_using_decl): Fix loop termination.
4817
4818 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
4819
4820         * cp-tree.h (determine_specialization): Don't declare.
4821         * pt.c (determine_specialization): Make it static.  Eliminate
4822         complain parameter.  Note that decl is always non-NULL now, and
4823         simplify accordingly.
4824
4825         * decl.c (maybe_push_to_top_level): Always call
4826         push_cp_function_context.
4827         (pop_from_top_level): Always call pop_cp_function_context.
4828
4829 1999-02-26  Nathan Sidwell  <nathan@acm.org>
4830
4831         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
4832         diagnostics.
4833         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
4834         * init.c (build_new_1): Extra arg to complete_type_or_else.
4835         (build_delete): Likewise.
4836         * typeck.c (require_complete_type): Likewise.
4837         (pointer_int_sum): Likewise.
4838         (pointer_diff): Likewise.
4839         (build_component_ref): Likewise.
4840
4841         * typeck2.c (incomplete_type_error): Always use cp_error.
4842         Show declaration of undefined type, if appropriate.
4843         Deal with UNKNOWN_TYPE nodes.
4844
4845         * typeck.c (require_complete_type): Use TYPE_SIZE as
4846         size_zero_node to mean incomplete type.
4847         (require_complete_type_in_void): New function.
4848         (build_compound_expr): Call complete_type_in_void for LHS.
4849         (build_c_cast): Call complete_type_in_void for void cast.
4850         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
4851         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
4852         require_complete_type_in_void.  Call it.
4853         * cp-tree.h (require_complete_type_in_void): Prototype new function.
4854
4855         * typeck.c (convert_arguments): Use alternative format for
4856         function decls.  Don't require_complete_type here.  Simplify
4857         diagnostic printing.
4858         (convert_for_initialization): Don't require_complete_type on RHS yet.
4859         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
4860
4861         * call.c (build_over_call): Cope with qualified void return type.
4862         * semantics.c (finish_call_expr): Likewise.
4863         * typeck.c (build_function_call_real): Likewise.
4864         (c_expand_return): Likewise.
4865         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
4866
4867         * call.c (print_z_candidates): Use alternate print format, to be
4868         consistent with (pt.c) print_candidates.
4869         * method.c (hack_identifier): List candidate members.
4870         * search.c (lookup_field): Build ambiguous list, and show it, if
4871         ambiguous.
4872
4873 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
4874
4875         * typeck.c (decay_conversion): Don't confuse constant array
4876         variables with their initializers.
4877
4878         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
4879         merging decls.
4880         * pt.c (regenerate_decl_from_template): Tweak for clarity.
4881         (instantiate_decl): Mark a decl instantiated before regenerating
4882         it to avoid recursion.
4883         * tree.c (mapcar): Don't call decl_constant_value unless we know
4884         something is TREE_READONLY_DECL_P.
4885
4886         * class.c (check_for_override): Don't stop checking when we find
4887         the first overridden function.  Delete #if 0'd code.
4888         * search.c (get_matching_virtual): Likewise.
4889
4890 1999-02-25  Richard Henderson  <rth@cygnus.com>
4891
4892         * lang-specs.h: Define __FAST_MATH__ when appropriate.
4893
4894 1999-02-24  Mike Stump  <mrs@wrs.com>
4895
4896         * typeck.c (convert_for_assignment): Allow boolean integral constant
4897         expressions to convert to null pointer.
4898
4899 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4900
4901         * decl.c (lookup_namespace_name): Resolve namespace aliases.
4902
4903         * class.c (push_nested_class): Allow namespaces.
4904
4905         * decl2.c (set_decl_namespace): Add friendp parameter.
4906         * decl.c (grokfndecl): Pass it.
4907         (grokvardecl): Likewise.
4908         * cp-tree.h: Change declaration.
4909
4910 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
4911
4912         * pt.c (tsubst): Allow an array of explicit size zero.
4913
4914 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
4915
4916         * errfn.c: Change varargs code to look like toplev.c.
4917
4918         * method.c (process_modifiers): Don't prepend 'U' for char or
4919         wchar_t.
4920
4921 1999-02-20  Craig Burley  <craig@jcb-sc.com>
4922
4923         * Make-lang.in (cplib2.ready): Don't consider updating
4924         cplib2 stuff if the current directory isn't writable, as
4925         it won't work (such as during a `make install').
4926
4927 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
4928
4929         * decl2.c (start_objects): Make file scope constructors and
4930         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4931         ASM_OUTPUT_DESTRUCTOR are defined.
4932
4933 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
4934
4935         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4936         (fn_type_unification): Adjust prototype.
4937         (lookup_fnfields_1): Declare.
4938         * call.c (add_template_candidate_real): Adjust call to
4939         fn_type_unification.
4940         * class.c (add_method): Don't allow duplicate declarations of
4941         constructors or destructors.
4942         (resolve_address_of_overloaded_function): Remove unused variable.
4943         Adjust call to fn_type_unification.
4944         * decl.c (grokfndecl): Be more robust in the face of illegal
4945         specializations.
4946         * decl2.c (check_classfn): Remove hokey handling of member
4947         templates.
4948         * pt.c (determine_specialization): Improve comments.  Adjust to
4949         handle template argument deduction as per the standard.
4950         (check_explicit_specialization): Fix comment spacing.  Handle
4951         type-conversion operators correctly.  Improve error-recovery.
4952         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4953         (get_bindings_real): Simplify handling of static members.
4954         * search.c (lookup_fnfields_1): Make it have external linkage.
4955         * typeck.c (compparms): Fix comment.
4956         (build_unary_op): Don't try to figure out which template
4957         specialization is being referred to when when the address-of
4958         operator is used with a template function.
4959
4960 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4961
4962         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4963         keyword to match an analogous change at the top level.
4964
4965         * tree.c (lvalue_or_else): Likewise.
4966
4967 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
4968
4969         * decl.c (xref_basetypes): Comment.
4970         * pt.c (instantiate_class_template): Use xref_basetypes.
4971
4972 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
4973
4974         * cp-tree.h (tsubst): Change prototype.
4975         (tsubst_expr): Likewise.
4976         (tsubst_copy): Likewise.
4977         (type_unification): Remove prototype.
4978         * call.c (convert_default_arg): Adjust call to tsubst_expr.
4979         * class.c (resolve_address_of_overloaded_function): Just use
4980         fn_type_unification.
4981         * decl.c (grokdeclarator): Adjust call to tsubst.
4982         * method.c (build_template_parm_names): Likewise.
4983         * pt.c (GTB_VIA_VIRTUAL): New macro.
4984         (GTB_IGNORE_TYPE): Likewise.
4985         (resolve_overloaded_unification): Add `complain' parameter.
4986         (try_one_overload): Likewise.
4987         (tsubst_template_arg_vector): Likewise.
4988         (tsubst_template_parms): Likewise.
4989         (tsubst_aggr_type): Likewise.
4990         (tsubst_arg_types): Likewise.
4991         (tsubst_call_declarator_parms): Likewise.
4992         (unify): Remove explicit_mask.
4993         (type_unification_real): Likewise.
4994         (get_template_base_recursive): Likewise.
4995         (coerce_template_template_parms): Provide prototype.
4996         (tsubst_function_type): Likewise.
4997         (try_class_unification): New function.
4998         All callers changed to use new complain parameter.
4999         (get_template_base): Use try_class_unification.
5000         (unify): Adjust handling of classes derived from template types.
5001         (fn_type_unification): Substitute explicit arguments before
5002         unification.
5003
5004 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5005
5006         * decl.c (pushdecl): Remove dead code.
5007
5008 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
5009
5010         * decl2.c (finish_objects): Fix code I missed in previous change.
5011
5012 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
5013
5014         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
5015         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
5016
5017         * pt.c (maybe_process_partial_specialization): Complain about
5018         'template <>' on non-specialization.
5019
5020 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
5021
5022         * decl.c (grokdeclarator): Catch wierd declarators.
5023         * decl2.c (finish_file): Don't abort because of namespace parsing
5024         failure.
5025         (check_decl_namespace): Remove.
5026
5027 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
5028
5029         * cp-tree.h (get_template_base): Don't declare.
5030         (dfs_walk): Declare.
5031         (dfs_unmark): Likewise.
5032         (markedp): Likewise.
5033         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
5034         targs to get_template_base.
5035         (get_template_base_recursive): Move here from search.c.  Check to
5036         see that the base found can be instantiated to form the desired
5037         type.
5038         (get_template_base): Likewise.
5039         (get_class_bindings): Simplify.
5040         * search.c (get_template_base_recursive): Move to pt.c.
5041         (get_template_base): Likewise.
5042         (markedp): Make it global.
5043         (dfs_walk): Likewise.
5044         (dfs_unmark): Likewise.
5045
5046 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
5047
5048         * pt.c (maybe_process_partial_specialization): Complain about
5049         specialization in wrong namespace.
5050         * tree.c (decl_namespace_context): New fn.
5051
5052 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5053
5054         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
5055         * pt.c (coerce_template_template_parms): Handle nested
5056         template template parameters.
5057
5058 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
5059
5060         * typeck2.c: Update email addresses.
5061
5062 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5063
5064         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
5065         turned off.
5066
5067 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
5068
5069         * lex.c (retrofit_lang_decl): Split out...
5070         (build_lang_decl): From here.
5071         * decl.c (pushdecl): Call it for functions generated by the middle
5072         end that don't have DECL_LANG_SPECIFIC.
5073         * cp-tree.h: Declare it.
5074
5075         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
5076         (start_objects, finish_objects): Only use special
5077         init_priority code if the user specified a priority.
5078         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
5079         objects.
5080
5081 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
5082
5083         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
5084         mkstemp.o.  Get them from libiberty now.
5085         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
5086
5087 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5088
5089         * decl2.c (lang_decode_option): Use read_integral_parameter.
5090
5091 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
5092
5093         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
5094         before calling complete_type_or_else.
5095
5096 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5097
5098         * input.c (inline): Don't define, its handled by system.h.
5099
5100 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
5101
5102         * decl2.c: Don't define flag_no_ident here.  Don't process
5103         -f(no-)ident here.
5104         * cp-tree.h: Don't declare flag_no_ident here.
5105         * lang-specs.h: Map -Qn to -fno-ident.
5106
5107 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
5108
5109         * cp-tree.h (struct tree_binding): Replace scope field with a union.
5110         (BINDING_SCOPE): Adjust.
5111         * decl.c (BINDING_LEVEL): Adjust.
5112
5113 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
5114
5115         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
5116         member constants.
5117
5118         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
5119         a ctor initializer.
5120
5121         * tree.c (equal_functions): Fix name in prototype.
5122
5123         * decl.c (push_local_binding): Add FLAGS argument.
5124         (pushdecl, push_overloaded_decl): Pass it.
5125         * decl2.c (do_local_using_decl): Likewise.
5126         * cp-tree.h: Adjust prototype.
5127         * decl.c (poplevel): Fix logic.
5128
5129         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
5130         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
5131         (cat_namespace_levels): Don't loop forever.
5132
5133 1999-01-25  Richard Henderson  <rth@cygnus.com>
5134
5135         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
5136
5137 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
5138
5139         * class.c (resolve_address_of_overloaded_function): Mark the
5140         chosen function used.
5141
5142         * call.c (build_call): Make sure that a function coming in has
5143         been marked used already.
5144         * decl.c (expand_static_init): Call mark_used instead of
5145         assemble_external.
5146         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
5147         alloc_eh_object, expand_throw): Likewise.
5148         * init.c (build_builtin_delete_call): Likewise.
5149         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
5150         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5151         expand_generic_desc): Likewise.
5152
5153 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5154
5155         * tree.c (equal_functions): New function.
5156         (ovl_member): Call it.
5157
5158 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5159
5160         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
5161
5162 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5163
5164         * decl.c (decls_match): Return 1 if old and new are identical.
5165         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
5166
5167 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5168
5169         * decl.c (start_function): Make member functions one_only on windows.
5170         * decl2.c (import_export_decl): Likewise.
5171
5172         * decl.c (grokdeclarator): Don't complain about implicit int in
5173         a system header.  Change same-name field check to not complain in
5174         a system header instead of within extern "C".
5175
5176 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5177
5178         * cp-tree.h (PUSH_GLOBAL): New macro.
5179         (PUSH_LOCAL): Likewise.
5180         (PUSH_USING): Likewise.
5181         (namespace_bindings_p): Declare.
5182         (push_overloaded_decl): Likewise.
5183         * decl.c (push_overloaded_decl): Don't make it static.  Check for
5184         illegal declarations after using declarations here.
5185         (namespace_bindings_p): Likewise.
5186         (duplicate_decls): Don't consider declarations from different
5187         namespaces to be the same.
5188         (pushdecl): Use symbolic PUSH_ constants in calls to
5189         push_overloaded_decl.
5190         (push_overloaded_decl_1): Likewise.
5191         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
5192         (do_nonmember_using_decl): Check for illegal using declarations
5193         after ordinary declarations here.
5194         (do_local_using_decl): Call pushdecl to insert declarations.
5195
5196 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
5197
5198         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
5199
5200 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5201
5202         * tree.c (build_cplus_array_type_1): Don't call build_array_type
5203         for types involving template parameters.
5204
5205         * cp-tree.h (PARM_DECL_EXPR): Delete.
5206         (convert_default_arg): Change prototype.
5207         (check_default_argument): Declare.
5208         (search_tree): Likewise.
5209         * call.c (convert_default_arg): Take the function to which the
5210         default argument belongs as a parameter, and do any necessary
5211         instantiation here, instead of ...
5212         (build_over_call): Here.
5213         * decl.c (local_variable_p): New function.
5214         (check_default_argument): Likewise, split out and tidied from ...
5215         (grokparms): Here.
5216         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
5217         * pt.c (tsubst_call_declarator_parms): New function.
5218         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
5219         with CALL_EXPRs, rather than trying to be clever.
5220         (tsubst): Use tsubst_call_declarator_parms.
5221         * tree.c (search_tree): Don't make it static.
5222         * typeck.c (convert_arguments): Use new interface to
5223         convert_default_arg.
5224
5225 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
5226
5227         * error.c (dump_function_decl): Don't print the argument types for
5228         a function when the verbosity level is negative.
5229
5230         * call.c (build_over_call): Check format attributes at call-time.
5231
5232         * pt.c (tsubst_copy): Fix comment.
5233         (unify): Don't allow unification with variable-sized arrays.
5234
5235         * semantics.c (finish_stmt_expr): When processing a template make
5236         the BIND_EXPR long-lived.
5237
5238 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
5239
5240         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
5241         (import_export_vtable): Not here.
5242
5243 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5244
5245         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
5246         non-static member function.
5247
5248 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5249
5250         * class.c (instantiate_type): Only diagnose illegal address of member
5251         function if complaining.
5252
5253         * decl.c (lookup_name_real): Remove duplicate code.
5254
5255 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5256
5257         * tree.c (copy_template_template_parm): Use permanent_obstack.
5258
5259 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5260
5261         * pt.c (unify): Remove restrictions on deduction of argument
5262         of template template parameters.
5263
5264 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5265
5266         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
5267
5268         * class.c (resolve_address_of_overloaded_function): Show list of
5269         all candidates, when none of them match.
5270
5271 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
5272
5273         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
5274         definition of 'casting away const' in reinterpret_cast<>.
5275
5276 1999-01-18  Graham  <grahams@rcp.co.uk>
5277
5278         * cvt.c: Add include for decl.h, remove extern for
5279         static_aggregates which is now provided by decl.h.
5280
5281         * Makefile.in (cvt.o): Add dependency for decl.h and missing
5282         dependencies for convert.h and flags.h.
5283
5284 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5285
5286         * decl2.c (do_dtors): Set current location to that of the
5287         decl, for sensible diagnostics and debugging.
5288         (check_classfn): Issue `incomplete type' error, if
5289         class is not defined.
5290
5291 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5292
5293         * cp-tree.h: Add prototype for bound_pmf_p.
5294
5295 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5296             Manfred Hollstein <manfred@s-direktnet.de>
5297
5298         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
5299         -Wreturn-type.
5300
5301 1999-01-16  Nathan Sidwell  <nathan@acm.org>
5302
5303         * cp-tree.h (struct lang_type): Added has_mutable flag.
5304         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
5305         (TYPE_HAS_MUTABLE_P): New macro to read it.
5306         (cp_has_mutable_p): Prototype for new function.
5307         * class.c (finish_struct_1): Set has_mutable from members.
5308         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
5309         it contains a mutable.
5310         * typeck.c (cp_has_mutable_p): New function.
5311
5312 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
5313
5314         * pt.c (process_template_parm): Ignore top-level qualifiers on
5315         non-type parameters.
5316
5317         * decl.c (start_function): Use current_function_parms in the call
5318         to require_complete_type_for_parms, not the probably empty
5319         DECL_ARGUMENTS.
5320
5321 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
5322
5323         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
5324
5325         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
5326         that we don't suppress the other copies.
5327         * lex.c (handle_cp_pragma): Likewise.
5328
5329 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
5330
5331         * decl.c (grokdeclarator): Undo 1998-12-14 change.
5332         * tree.c (build_cplus_array_type_1): Likewise.
5333         * pt.c (instantiate_class_template): Remove misleading comment.
5334         (tsubst_aggr_type): Substitute if there are template parameters,
5335         regardless of whether or not they use template arguments.
5336         (unify): Likewise, but for unification.
5337
5338 1999-01-12  Richard Henderson  <rth@cygnus.com>
5339
5340         * cp-tree.h (flag_permissive): Declare extern.
5341
5342 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
5343
5344         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
5345         here.
5346         (lang_type): Add is_partial_instantiation.  Decrease width of
5347         dummy.
5348         (PARTIAL_INSTANTIATION_P): New macro.
5349         (OPERATOR_TYPENAME_P): Remove.
5350         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
5351         OPERATOR_TYPENAME_P.
5352         (grok_op_properties): Likewise.
5353         * friend.c (do_friend): Handle friends that are member functions
5354         correctly.
5355         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
5356         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
5357         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
5358         any more partial instantiation than is absolutely necessary for
5359         implicit typename.  Set PARTIAL_INSTANTIATION_P.
5360         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5361         * semantics.c (begin_class_definition): Handle partial
5362         specializations of a type that was previously partially
5363         instantiated.
5364
5365 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
5366
5367         * g++spec.c (LIBSTDCXX): Provide default definition.
5368         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5369
5370 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5371
5372         * Make-lang.in (g++.o): Depend on prefix.h.
5373
5374 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
5375
5376         * tree.c (bound_pmf_p): New fn.
5377         * typeck.c (build_c_cast): Use it.
5378
5379         * decl.c (grok_op_properties): Use same_type_p.
5380
5381 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5382
5383         * Makefile.in (cvt.o): Depend on toplev.h.
5384
5385         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5386
5387         * cvt.c: Include toplev.h.
5388
5389         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5390         definitions.
5391
5392         * init.c (expand_vec_init): Initialize variable `itype'.
5393
5394         * lex.c (yyerror): Cast the argument passed to a ctype function to
5395         an unsigned char.
5396
5397         * method.c (build_mangled_C9x_name): Wrap prototype and definition
5398         in "HOST_BITS_PER_WIDE_INT >= 64".
5399
5400         * typeck.c (build_binary_op): Mark parameter `convert_p' with
5401         ATTRIBUTE_UNUSED.
5402
5403 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
5404
5405         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5406         * tree.c (build_exception_variant): Don't crash on empty throw
5407         specs.
5408
5409 1998-12-18  DJ Delorie  <dj@cygnus.com>
5410
5411         * cvt.c (convert_to_reference): Check for both error_mark_node
5412         and NULL_NODE after call to convert_for_initialization.
5413
5414 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
5415
5416         * error.c (interesting_scope_p): New fn.
5417         (dump_simple_decl): Use it.
5418         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5419         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5420
5421 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
5422
5423         * class.c (resolve_address_of_overloaded_function): Do conversion
5424         to correct type here, rather than ...
5425         (instantiate_type): Here.
5426
5427         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5428         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5429         (decl_template_parm_p): Remove.
5430         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5431         parameter.
5432         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5433         * pt.c (push_inline_template_parms_recursive): Set it.
5434         (decl_template_parm_p): Remove.
5435         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5436         (process_template_parm): Set it.
5437
5438 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
5439
5440         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5441         if configured with cpplib.
5442
5443 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
5444
5445         * decl.c (poplevel): Make sure ns_binding is initialized.
5446
5447         * decl.c (finish_function): Undo inadvertent change in previous
5448         patch.
5449
5450 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
5451
5452         * class.c (pushclass): Tweak handling of class-level bindings.
5453         (resolve_address_of_overloaded_function): Update pointer-to-member
5454         handling.
5455         (instantiate_type): Likewise.
5456         * cvt.c (cp_convert_to_pointer): Likewise.
5457         * decl.c (pop_binding): Take the DECL to pop, not just the name.
5458         Deal with `struct stat' hack.
5459         (binding_level): Add to documentation.
5460         (push_binding): Clear BINDING_TYPE.
5461         (add_binding): New function.
5462         (push_local_binding): Use it.
5463         (push_class_binding): Likewise.
5464         (poplevel): Adjust calls to pop_binding.
5465         (poplevel_class): Likewise.
5466         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5467         declarations to current binding level.
5468         (push_class_level_binding): Likewise.
5469         (push_overloaded_decl): Adjust handling of OVERLOADs in local
5470         bindings.
5471         (lookup_namespace_name): Don't crash when confronted with a
5472         TEMPLATE_DECL.
5473         (lookup_name_real): Do `struct stat' hack in local binding
5474         contexts.
5475         (build_ptrmemfunc_type): Adjust documentation.
5476         (grokdeclarator): Don't avoid building real array types when
5477         processing templates unless really necessary.
5478         (finish_method): Adjust calls to pop_binding.
5479         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5480         not reparse_decl_as_expr.
5481         (build_expr_from_tree): Deal with a template-id as the function to
5482         call in a METHOD_CALL_EXPR.
5483         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5484         (maybe_adjust_types_For_deduction): Don't do peculiar things with
5485         METHOD_TYPEs here.
5486         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
5487         pointer-to-member types where necessary.
5488         * tree.c (build_cplus_array_type_1): Don't avoid building real
5489         array types when processing templates unless really necessary.
5490         (build_exception_variant): Compare the exception lists correctly.
5491
5492 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
5493
5494         * cp-tree.def (CPLUS_BINDING): Update documentation.
5495         * cp-tree.h (LOCAL_BINDING_P): New macro.
5496         (lang_identifier): Rename local_value to bindings.
5497         (tree_binding): Make `scope' of type `void*', not `tree'.
5498         (BINDING_SCOPE): Update documentation.
5499         (IDENTIFIER_LOCAL_VALUE): Remove.
5500         (IDENTIFIER_CLASS_VALUE): Document.
5501         (IDENTIFIER_BINDING): New macro.
5502         (IDENTIFIER_VALUE): Likewise.
5503         (TIME_IDENTIFIER_TIME): Likewise.
5504         (TIME_IDENTIFIER_FILEINFO): Likewise.
5505         (IMPLICIT_TYPENAME_P): Likewise.
5506         (set_identifier_local_value): Remove.
5507         (push_local_binding): New function.
5508         (push_class_binding): Likewise.
5509         * class.c (pushclass): Update comments; use push_class_binding.
5510         * decl.c (set_identifier_local_value_with_scope): Remove.
5511         (set_identifier_local_value): Likewise.
5512         (push_binding): New function.
5513         (pop_binding): Likewise.
5514         (binding_level): Update documentation.  Remove shadowed.
5515         (BINDING_LEVEL): New macro.
5516         (free_binding_nodes): New variable.
5517         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
5518         BLOCK_VARs when doing for-scope extension.  Remove effectively
5519         dead code.
5520         (pushlevel_class): Tweak formatting.
5521         (poplevel_class): Adjust for new name-lookup scheme.
5522         (print_binding_level): Likewise.
5523         (store_bindings): Likewise.
5524         (pushdecl): Likewise.
5525         (pushdecl_class_level): Likewise.
5526         (push_class_level_binding): Likewise.
5527         (push_overloaded_decl): Update comments.  Adjust for new
5528         name-lookup scheme.
5529         (lookup_name_real): Likewise.
5530         (lookup_name_current_level): Likewise.
5531         (cp_finish_decl): Likewise.
5532         (require_complete_types_for_parms): Likewise.  Remove misleading
5533         #if 0'd code.
5534         (grok_parms): Likewise.  Don't call
5535         require_complete_types_for_parms here.
5536         (grok_ctor_properties): Don't treat templates as copy
5537         constructors.
5538         (grop_op_properties): Or as assignment operators.
5539         (start_function): Document.  Adjust for new name-lookup scheme.
5540         (finish_function): Likewise.
5541         * decl2.c (do_local_using_decl): Use push_local_binding.
5542         * lex.c (begin_definition_of_inclass_inline): New function, split
5543         out from ...
5544         (do_pending_inlines): Here, and ...
5545         (process_next_inline): Here.
5546         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5547         (init_filename_times): Likewise.
5548         (extract_interface_info): Likewise.
5549         (ste_typedecl_interface_info): Likewise.
5550         (check_newline): Likewise.
5551         (dump_time_statistics): Likewise.
5552         (handle_cp_pragma): Likewise.
5553         (do_identifier): Adjust for new name-lookup scheme.
5554         * parse.y (function_try_block): Return ctor_initializer_opt value.
5555         (fndef): Use it.
5556         (fn.defpen): Pass appropriate values to start_function.
5557         (pending_inline): Use functor_try_block value, and pass
5558         appropriate values to finish_function.
5559         * pt.c (is_member_template): Update documentation; remove handling
5560         of FUNCTION_DECLs.  As per name, this function should deal only in
5561         TEMPLATE_DECLs.
5562         (decl_template_parm_p): Change name of olddecl parameter to decl.
5563         (check_template_shadow): Adjust for new name-lookup scheme.
5564         (lookup_template_class): Likewise.
5565         (tsubst_decl): Tweak so as not to confuse member templates with
5566         copy constructors and assignment operators.
5567         (unify): Handle UNION_TYPEs.
5568         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5569         (lang_print_xnode): Adjust for new name-lookup scheme.
5570         * typeck.c (mark_addressable): Likewise.
5571         (c_expand_return): Likewise.
5572
5573 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
5574
5575         * decl.c (grokdeclarator): Allow field with same name as class
5576         in extern "C".
5577
5578         * decl.c (lookup_name_real): Don't limit field lookup to types.
5579         * class.c (check_member_decl_is_same_in_complete_scope): No error
5580         if icv and x are the same.
5581         * lex.c (do_identifier): Tweak error message.
5582
5583 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5584
5585         * decl.c (start_enum): Use push_obstacks, not
5586         end_temporary_allocation.
5587         (finish_enum): Call pop_obstacks.
5588
5589 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5590
5591         * class.c (instantiate_type): Return error_mark_node rather than
5592         junk.
5593
5594 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5595
5596         * cp-tree.h (most_specialized_instantiation): New function.
5597         (print_candidates): Likewise.
5598         * class.c (validate_lhs): Remove.
5599         (resolve_address_of_overloaded_function): New function, split out
5600         and then substantially reworked, from ...
5601         (instantiate_type): Use it.  Simplify.
5602         * cvt.c (convert_to_reference): Complain when caller has indicated
5603         that's the right thing to do.  Don't crash if instantiate_type
5604         fails.
5605         * pt.c: Substitute `parameters' for `paramters' throughout.
5606         (print_candidates): Don't make it static.
5607         (most_specialized_instantiation): Split out from ...
5608         (most_specialized): Here.
5609
5610 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
5611
5612         * lex.c (lang_init_options): Initialize cpplib.
5613         * decl2.c (parse_options,cpp_initialized): Removed.
5614         (lang_decode_option): Move initialization of cpplib to
5615         lang_init_options.
5616
5617 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5618
5619         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
5620         well as the TYPE_DECL, when a typedef name is assigned to a
5621         previously anonymous type.
5622
5623 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
5624
5625         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
5626         __cp_eh_info for getting the eh info pointer.  Add table_index to
5627         field list.
5628         (push_eh_cleanup): Don't increment 'handlers' data field.
5629         (process_start_catch_block): Don't set the 'caught' field.
5630
5631         * cp/exception.cc (CP_EH_INFO): New macro for getting the
5632         exception info pointer within library routines.
5633         (__cp_eh_info): Use CP_EH_INFO.
5634         (__start_cp_handler): Get exception info pointer, set caught field,
5635         and increment the handlers field.  Avoids this being done by handlers.
5636         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
5637         (uncaught_exception): Use CP_EH_INFO macro.
5638
5639 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
5640
5641         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
5642
5643 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
5644
5645         * lex.c (check_newline): Add support for \ as `natural'
5646         characters in file names in #line to be consistent with #include
5647         handling.  We support escape processing in the # 1 "..." version of
5648         the command.  See also support in cp/lex.c.
5649
5650 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5651
5652         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
5653         structure.
5654
5655 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
5656
5657         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
5658
5659         * error.c (dump_simple_decl): Also print namespace context.
5660         (dump_function_decl): Likewise.
5661
5662         * decl2.c (ambiguous_decl): Don't print old value if it's
5663         error_mark_node.
5664
5665         * decl.c (lookup_name_real): Fix handling of local types shadowed
5666         by a non-type decl.  Remove obsolete code.
5667         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
5668
5669         * lang-options.h: Add -fpermissive.
5670         * decl2.c: Likewise.
5671         * cp-tree.h: Add flag_permissive.
5672         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
5673         were specified, set flag_pedantic_errors.
5674         * call.c (build_over_call): Turn dropped qualifier messages
5675         back into pedwarns.
5676         * cvt.c (convert_to_reference): Likewise.
5677         * typeck.c (convert_for_assignment): Likewise.
5678
5679 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
5680
5681         * decl2.c (coerce_new_type): Use same_type_p.
5682         (coerce_delete_type): Likewise.
5683
5684         * call.c (check_dtor_name): Return 1, not error_mark_node.
5685
5686 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
5687
5688         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
5689         if MULTIPLE_SYMBOL_SPACES.
5690
5691         * pt.c (check_template_shadow): New fn.
5692         * decl2.c (grokfield): Use it.
5693         * decl.c (pushdecl): Likewise.
5694         (pushdecl_class_level): Likewise.
5695         (start_method): Likewise.
5696         (xref_tag): Don't try to use 't' if we're defining.
5697
5698         * call.c (check_dtor_name): Just return an error_mark_node.
5699         * pt.c (lookup_template_class): Complain about using non-template here.
5700         * parse.y (apparent_template_type): Not here.
5701
5702         * pt.c (check_explicit_specialization): Complain about specialization
5703         with C linkage.
5704
5705         * lang-options.h: Add -f{no-,}implicit-inline-templates.
5706
5707         * pt.c (convert_nontype_argument): Don't assume that any integer
5708         argument is intended to be a constant-expression.
5709
5710 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
5711
5712         * class.c (handle_using_decl): Fix comment.  Don't lookup
5713         constructors in base classes.
5714         (validate_lhs): Fix typo in comment.
5715         * search.c (lookup_field_1): Don't return a USING_DECL.
5716
5717         * cp-tree.h (DECL_ACCESS): Improve documentation.
5718
5719         * decl.c (expand_static_init): Don't set the initialization-done
5720         flag until the initialization is done.
5721
5722 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
5723
5724         * decl2.c (validate_nonmember_using_decl): Complain about using
5725         declarations for class members.
5726
5727 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
5728
5729         * typeck2.c (process_init_constructor): Use same_type_p.
5730
5731         * decl.c (check_tag_decl): Don't warn about null decl inside a
5732         class.
5733
5734         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
5735         UNIFY_ALLOW_NONE.
5736         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
5737         (resolve_overloaded_unification): Strip baselinks.
5738
5739 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5740
5741         * g++spec.c: Don't prototype xmalloc.
5742
5743 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
5744
5745         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
5746
5747         * decl.c (check_tag_decl): Do complain about null friend decl at
5748         file scope.
5749
5750 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5751
5752         * lex.c (make_lang_type): Clear the whole struct lang_type, not
5753         only the first multiple of sizeof (int).
5754
5755 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5756
5757         * decl.c (start_decl): An explicit specialization of a static data
5758         member is only a definition if it has an initializer.
5759
5760         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
5761         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
5762         cp_finish_decl.
5763         * init.c (expand_default_init): Check for DIRECT_BIND instead of
5764         DECL_ARTIFICIAL.
5765
5766         * call.c (build_over_call): Use build_decl.
5767
5768         * except.c (expand_throw): Just use convert, not
5769         build_reinterpret_cast.
5770
5771         * lex.c (handle_generic_pragma): Use token_buffer.
5772
5773         * decl.c (check_tag_decl): Don't complain about null friend decl.
5774
5775 1998-11-24  Dave Pitts  <dpitts@cozx.com>
5776
5777         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
5778         first position.
5779         * lex.c (check_newline): Use ISALPHA.
5780         (readescape): Use ISGRAPH.
5781         (yyerror): Use ISGRAPH.
5782
5783 1998-11-24  Nathan Sidwell  <nathan@acm.org>
5784
5785         * search.c (get_abstract_virtuals): Do not use initial
5786         CLASSTYPE_ABSTRACT_VIRTUALS.
5787         * typeck2.c (abstract_virtuals_error): Show location of abstract
5788         declaration.
5789         * call.c (build_new_method_call): Use
5790         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
5791         * class.c (finish_struct_bits): Don't bother working out whether
5792         get_abstract_virtuals will do anything, just do it.
5793
5794 1998-11-24  Graham  <grahams@rcp.co.uk>
5795
5796         * typeck.c (build_component_ref): Remove unused statement.
5797
5798 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5799
5800         * class.c (add_method): Catch invalid overloads.
5801
5802         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
5803         * search.c (lookup_conversions): Handle getting real OVERLOADs.
5804         (add_conversions): Likewise.  Revert last change.
5805         * call.c (add_conv_candidate): Pass totype to add_candidate instead
5806         of fn.  Don't add a new candidate if the last one was for the same
5807         type.
5808         (print_z_candidates): Handle getting a type as a function.
5809         (joust): If we got two conversion candidates to the same type,
5810         just pick one.
5811         (build_object_call): Lose 'templates'.
5812         (build_user_type_conversion_1): Handle getting real OVERLOADs.
5813
5814 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5815
5816         * typeck2.c (process_init_constructor): If there are elements
5817         that don't have initializers and they need to have constructors
5818         run, supply them with initializers.
5819
5820         * class.c (finish_struct_1): A class with a 0-width bitfield is
5821         still empty.
5822
5823 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
5824
5825         * pt.c (instantiate_class_template): Don't try to figure out what
5826         specialization to use for a partial instantiation.  Correct
5827         typos in a couple of comments.  Avoid calling uses_template_parms
5828         multiple times.
5829
5830 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
5831
5832         * method.c (process_overload_item): Add call to
5833         build_mangled_C9x_name for intTI_type_nodes.
5834         (build_mangled_C9x_name): Add prototype, define.
5835         * decl.c (init_decl_processing): Add names for
5836         TImode_type_node.
5837
5838 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5839
5840         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
5841
5842         * class.c (finish_struct_1): Set things up for 0-width bitfields
5843         like we do for others.
5844
5845         * decl.c (check_tag_decl): New fn.
5846         (shadow_tag): Split out from here.
5847         * decl2.c (grok_x_components): Call it.
5848
5849 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
5850
5851         * decl.c: Lose warn_about_return_type.
5852         (grokdeclarator): Always complain about implicit int, except for
5853         `main () { ... }'.
5854
5855         * decl.c (tag_name): New fn.
5856         (xref_tag): Complain about using typedef-name after class-key.
5857
5858         * init.c (expand_vec_init): Also keep going if from_array.
5859
5860         * tree.c (is_overloaded_fn): Also handle the output of
5861         build_offset_ref.
5862
5863         * decl.c (grokdeclarator): Use constructor_name when comparing
5864         field name against enclosing class.
5865         * class.c (finish_struct_anon): Likewise.
5866
5867 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
5868
5869         * decl.c (poplevel): Remove code to handle KEEP == 2.
5870         (finish_function): Don't confuse BLOCK-order when
5871         processing a destructor.
5872
5873 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5874
5875         * decl.c (require_complete_types_for_parms): Call layout_decl
5876         after we've completed the type.
5877
5878 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5879
5880         * decl2.c (validate_nonmember_using_decl): Allow using templates
5881         from the global namespace.
5882
5883 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5884
5885         Handle specifying template args to member function templates.
5886         * tree.c (build_overload): Always create an OVERLOAD for a template.
5887         * search.c (add_conversions): Handle finding an OVERLOAD.
5888         * decl2.c (check_classfn): Likewise.
5889         * lex.c (identifier_type): See through a baselink.
5890         * parse.y (do_id): Don't call do_identifier if we got a baselink.
5891         * class.c (instantiate_type, case TREE_LIST): Recurse.
5892
5893         * decl.c (grokdeclarator): Allow a boolean constant for array
5894         bounds, odd as that sounds.
5895
5896         * pt.c (unify): Be more strict about non-type parms, except for
5897         array bounds.
5898         (UNIFY_ALLOW_INTEGER): New macro.
5899
5900 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
5901
5902         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
5903
5904 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
5905
5906         * semantics.c (begin_class_definition): Call
5907         maybe_process_partial_specialization before push_template_decl.
5908         Don't call push_template_decl for a specialization.
5909         * search.c (lookup_field): Do return a member template class.
5910         * decl2.c (handle_class_head): Handle member template classes.
5911
5912         * decl.c (grokdeclarator): A parm type need not be complete.
5913
5914         * pt.c (convert_nontype_argument): Fix thinko.
5915
5916 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5917
5918         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5919         (global_delete_fndecl): New variable.
5920         * decl.c (global_delete_fndecl): Define it.
5921         (init_decl_processing): Set it.
5922         * init.c (build_builtin_delete_call): Use it.
5923         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5924         nodes.
5925
5926 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5927
5928         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5929         type.
5930
5931         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5932         * call.c (build_object_call): Also support references to functions.
5933         * typeck.c (convert_for_initialization): Don't decay a function
5934         if the target is a reference to function.
5935
5936         * search.c (add_conversions): Get all the overloads from a class.
5937
5938         * decl.c (grok_ctor_properties): Complain about any constructor
5939         that will take a single arg of the class type by value.
5940
5941         * typeck2.c (build_functional_cast): Can't create objects of
5942         abstract classes this way.
5943         * cvt.c (ocp_convert): Likewise.
5944
5945         * decl.c (grokfndecl): Member functions of local classes are not
5946         public.
5947
5948 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5949
5950         * Make-lang.in (cc1plus): Add dependency on hash.o.
5951
5952 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5953
5954         * search.c (get_abstract_virtuals): Complain about virtuals with
5955         no final overrider.
5956         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5957         with no final overrider.
5958         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5959         on virtuals with no final overrider.
5960
5961         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5962
5963         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5964         after layout_type.
5965
5966         * friend.c (do_friend): Don't set_mangled_name_for_decl.
5967
5968         * class.c (finish_struct_anon): Complain about non-fields.
5969         * decl2.c (build_anon_union_vars): Likewise.
5970
5971         * decl.c (grokdeclarator): Normal data members can't have the same
5972         name as the class, either.
5973         * class.c (finish_struct_anon): Neither can members of an
5974         anonymous union.
5975
5976 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
5977
5978         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5979         (TYPE_BINFO): Likewise.
5980         (IS_AGGR_TYPE): Tweak.
5981         (SET_IS_AGGR_TYPE): New macro.
5982         (CLASS_TYPE_P): Tweak.
5983         (lang_type): Group mark bitfields together.  Remove linenum.
5984         (CLASSTYPE_SOURCE_LINE): Remove macro.
5985         (CLASSTYPE_MARKED_N): New macro.
5986         (SET_CLASSTYPE_MARKED_N): Likewise.
5987         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5988         (CLASS_TYPE_MARKED_*): Use them.
5989         (SET_CLASSTYPE_MARKED_*): Likewise.
5990         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5991         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5992         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
5993         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
5994         * class.c (class_cache_obstack): New variable.
5995         (class_cache_firstobj): Likewise.
5996         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
5997         (pushclass): Free the cache, when appropriate.
5998         (popclass): Tidy.
5999         (maybe_push_cache_obstack): Use class_cache_obstack.
6000         * decl.c (include hash.h).
6001         (typename_hash): New function.
6002         (typename_compare): Likewise.
6003         (build_typename_type): Check the hash table to avoid creating
6004         duplicates.
6005         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
6006         (grokdeclarator): Use CLASS_TYPE_P.
6007         (xref_basetypes): Likewise.
6008         (start_function): Likewise.  Don't put current_class_ref on the
6009         permanent obstack.
6010         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
6011         and TYPE_TI_ARGS.
6012         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
6013         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
6014         fields for types other than class types.  Do clear TYPE_ALIAS_SET
6015         for types other than class types, though.
6016         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
6017         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6018         * pt.c (process_template_parm): Don't set
6019         CLASSTYPE_GOT_SEMICOLON.
6020         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6021         Coerce arguments on the momentary obstack.
6022         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6023         (instantiate_class_template): Calculate template arguments on the
6024         momentary obstack.  Tidy.
6025         (tsubst_template_arg_vector): Use make_temp_vec.
6026         (tsubst_aggr_type): Put template arguments on the momentary
6027         obstack.
6028         (tsubst_decl): Likewise.
6029         (tsubst): Copy the array bounds index to the permanent obstack
6030         before building index types.  Use new macros.
6031         (unify): Use new macros.
6032         (do_type_instantiation): Likewise.
6033         * search.c (lookup_fnfields_1): Use new macros.
6034         (dfs_pushdecls): Build envelopes on the cache obstack.
6035         (dfs_compress_decls): Use new macros.
6036         (push_class_decls): Build on the cache obstack.
6037         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
6038         * sign.c (build_signature_pointer_or_reference_type): Use
6039         SET_IS_AGGR_TYPE.
6040         * tree.c (make_binfo): Check CLASS_TYPE_P.
6041         (copy_template_template_parm): Adjust.
6042         (make_temp_vec): Use push_expression_obstack.
6043         * typeck.c (complete_type): Use new macros.
6044         (comptypes): Likewise.
6045
6046 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
6047
6048         * pt.c (tsubst): Add diagnostics for invalid array, reference
6049         and pointer to member types.
6050
6051 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6052
6053         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
6054
6055         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
6056         Simplify.
6057
6058         * parse.y (structsp): Fix cut-and-paste error.
6059
6060         * init.c (build_new): Complain about non-integral size.
6061
6062         * parse.y (unary_expr): Complain about defining types in sizeof.
6063
6064         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
6065
6066         * rtti.c (build_x_typeid): Complain about typeid without
6067         including <typeinfo>.
6068         (get_typeid): Likewise.  Complain about typeid of incomplete type.
6069         (get_tinfo_fn_dynamic): Likewise.
6070         (get_typeid_1): Not static anymore.
6071         * except.c (build_eh_type_type): Use get_typeid_1.
6072
6073         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
6074         ambiguous or private bases.  Fix warning for reference cast.
6075
6076 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
6077
6078         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
6079         * decl.c (duplicate_decls): Remove special-case code to deal with
6080         template friends, and just do the obvious thing.
6081         * pt.c (register_specialization): Tweak for clarity, and also to
6082         clear DECL_INITIAL for an instantiation before it is merged with a
6083         specialization.
6084         (check_explicit_specialization): Fix indentation.
6085         (tsubst_friend_function): Handle both definitions in friend
6086         declaration and outside friend declarations.
6087         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
6088         (regenerate_decl_from_template): Tweak accordingly.
6089         (instantiate_decl): Likewise.
6090
6091 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6092
6093         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
6094         member function reference to error.
6095         * cvt.c (ocp_convert): Complain about converting an overloaded
6096         function to void.
6097
6098         * init.c (build_offset_ref): Just return a lone static member
6099         function.
6100
6101         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
6102         not internal ones.
6103
6104         * typeck.c (build_binary_op_nodefault): Improve error handling.
6105
6106         * decl.c (grokfndecl): Complain about making 'main' a template.
6107
6108         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
6109
6110         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
6111         TYPE_DECL in a template.
6112
6113 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
6114
6115         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
6116
6117         * decl.c (struct cp_function): Add named_label_uses.
6118         (push_cp_function_context): Save it.
6119         (pop_cp_function_context): Restore it.
6120         (define_label): Also complain about jumping into the scope of
6121         non-POD objects that don't have constructors.
6122         * tree.c (pod_type_p): New fn.
6123
6124         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
6125         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
6126         (get_tinfo_fn): Not here.
6127         * repo.c (repo_get_id): Abort if we get called for an incomplete
6128         type.
6129
6130 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
6131
6132         * except.c (expand_throw): Make sure first argument to
6133         __cp_push_exception is of type `void*' to avoid spurious error
6134         messages.
6135
6136 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
6137
6138         * pt.c (try_one_overload): Take orig_targs again.  Only check for
6139         mismatches against them; we don't care what a previous call found.
6140         (resolve_overloaded_unification): Adjust.
6141
6142         * search.c (lookup_field): Don't return anything for a non-type
6143         field from a dependent type.
6144         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
6145         in an array declarator.
6146         (start_decl): Push into the class before looking for the field.
6147
6148 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
6149
6150         * method.c (build_overload_value): Handle REFERENCE_TYPE.
6151
6152 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6153
6154         * decl.c (grokdeclarator): Allow namespace-scoped members if they
6155         are friends.
6156
6157 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
6158
6159         * pt.c (tsubst_decl): Don't mess with the global value of an
6160         un-mangled DECL_ASSEMBLER_NAME.
6161
6162 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
6163
6164         * decl.c (init_decl_processing): Remove CYGWIN conditional
6165         since CYGWIN is now able to deal with trapping signals.
6166
6167 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6168
6169         * cp-tree.h: Don't include gansidecl.h.
6170         * exception.cc: Include gansidecl.h (since we don't include config.h)
6171         * g++spec.c: Don't include gansidecl.h.
6172
6173 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
6174
6175         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
6176         size of dummy.
6177         (DECL_DEFINED_IN_CLASS_P): New macro.
6178         (TEMPLATE_PARMS_FOR_INLINE): Document.
6179         (check_static_variable_definition): New function.
6180         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
6181         appropriate.
6182         (check_static_variable_definition): Split out from ...
6183         (grokdeclarator): Here.
6184         * pt.c (check_default_tmpl_args): New function, split out from ...
6185         (push_template_decl_real): Here.
6186         (instantiate_template): Fix comment.
6187
6188 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
6189
6190         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
6191         (CP_TYPE_VOLATILE_P): Likewise.
6192         (CP_TYPE_RESTRICT_P): Likewise.
6193
6194 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
6195
6196         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
6197
6198 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
6199
6200         * class.c (instantiate_type): Be more helpful.
6201
6202         * decl2.c (import_export_decl): Call import_export_class.
6203
6204         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
6205         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
6206         * pt.c (tsubst_copy): Likewise.
6207
6208 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
6209
6210         * init.c (expand_vec_init): Fix off-by-one error.
6211
6212 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
6213
6214         * parse.y (apparent_template_type): New type.
6215         (named_complex_class_head_sans_basetype): Use it.
6216         * Makefile.in (CONFLICTS): One new conflict.
6217         * parse.c: Regenerated.
6218
6219 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
6220
6221         * cp-tree.h (COMPARE_STRICT): New macro.
6222         (COMPARE_BASE): Likewise.
6223         (COMPARE_RELAXED): Likewise.
6224         (COMPARE_REDECLARATION): Likewise.
6225         (same_type_p): Likewise.
6226         (same_or_base_type_p): Likewise.
6227         * call.c (standard_conversion): Use them, in place of comptypes
6228         with numeric arguments.
6229         (reference_binding): Likewise.
6230         (convert_like): Likewise.
6231         (build_over_call): Likewise.
6232         (is_subseq): Likewise.
6233         (is_properly_derived_from): Likewise.
6234         (compare_ics): Likewise.
6235         (joust): Likewise.
6236         * class.c (delete_duplicate_fields_1): Likewise.
6237         (resolves_to_fixed_type_p): Likewise.
6238         (instantiate_type): Likewise.  Remove #if 0'd code.
6239         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
6240         (pushdecl): Likewise.
6241         (lookup_name_real): Likewise.
6242         (grokdeclarator): Likewise.  Check for illegal array declarations.
6243         (grokparms): Likewise.
6244         (grok_op_properties): Likewise.
6245         * decl2.c (check_classfn): Likewise.
6246         * friend.c (is_friend): Likewise.
6247         (make_friend_class): Likewise.
6248         * init.c (expand_aggr_init): Likewise.
6249         (expand_vec_init): Likewise.
6250         * pt.c (is_member_template_class): Remove declaration.
6251         (is_specialization_of): Use COMPARE_* and new macros.
6252         (comp_template_parms): Likewise.
6253         (convert_nontype_argument): Likewise.
6254         (coerce_template_template_parms): Likewise.
6255         (template_args_equal): Likewise.
6256         (lookup_template_class): Likewise.
6257         (type_unification_real): Likewise.
6258         (unify): Likewise.
6259         (get_bindings_real): Likewise.
6260         * search.c (covariant_return_p): Likewise.
6261         (get_matching_virtual): Likewise.
6262         * sig.c (match_method_types): Likewise.
6263         * tree.c (vec_binfo_member): Likewise.
6264         (cp_tree_equal): Likewise.
6265         * typeck.c (common_type): Likewise.
6266         (comp_array_types): Likewise.  Get issues involving unknown array
6267         bounds right.
6268         (comptypes): Update comments.  Use new flags.
6269         (comp_target_types): Use new macros.
6270         (compparms): Likewise.
6271         (comp_target_parms): Likewise.
6272         (string_conv_p): Likewise.
6273         (build_component_ref): Likewise.
6274         (build_indirect_ref): Likewise.
6275         (build_conditional_expr): Likewise.
6276         (build_static_cast): Likewise.
6277         (build_reinterpret_cast): Likewise.
6278         (build_const_cast): Likewise.
6279         (build_modify_expr): Likewise.
6280         (convert_for_assignment): Likewise.
6281         (comp_ptr_ttypes_real): Likewise.
6282         (ptr_reasonably_similar): Likewise.
6283         (comp_ptr_ttypes_const): Likewise.
6284
6285 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
6286
6287         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
6288
6289 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
6290
6291         * decl2.c (delete_sanity): Pass integer_zero_node, not
6292         integer_two_node, to build_vec_delete.
6293         * init.c (build_array_eh_cleanup): Remove.
6294         (expand_vec_init_try_block): New function.
6295         (expand_vec_init_catch_clause): Likewise.
6296         (build_vec_delete_1): Don't deal with case that auto_delete_vec
6297         might be integer_two_node anymore.
6298         (expand_vec_init): Rework for initialization-correctness and
6299         exception-correctness.
6300         * typeck2.c (process_init_constructor): Make mutual exclusivity
6301         of cases more obvious.
6302
6303 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
6304
6305         * decl.c (lookup_name_real): OK, only warn if not lexing.
6306         Simplify suggested fix.
6307
6308         * cp-tree.h (IDENTIFIER_MARKED): New macro.
6309         * search.c (lookup_conversions): Use breadth_first_search.
6310         (add_conversions): Avoid adding two conversions to the same type.
6311         (breadth_first_search): Work with base binfos, rather
6312         than binfos and base indices.
6313         (get_virtual_destructor): Adjust.
6314         (tree_has_any_destructor_p): Adjust.
6315         (get_matching_virtual): Adjust.
6316
6317         * pt.c (push_template_decl_real): Generalize check for incorrect
6318         number of template parms.
6319         (is_member_template_class): #if 0.
6320
6321 1998-10-29  Richard Henderson  <rth@cygnus.com>
6322
6323         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
6324         last.
6325
6326 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6327
6328         * lex.c: Call check_newline from lang_init always.  After
6329         calling cpp_start_read, set yy_cur and yy_lim to read from the
6330         cpplib token buffer.
6331
6332 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
6333
6334         * class.c (instantiate_type): Don't consider templates for a normal
6335         match.
6336
6337         * class.c (finish_struct_1): Don't complain about non-copy
6338         assignment ops in union members.
6339
6340         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
6341         (prepare_fresh_vtable): Likewise.
6342         (finish_struct_1): Don't call import_export_class.
6343         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
6344         (finish_prevtable_vardecl): Lose.
6345         (finish_file): Don't call it.
6346         * pt.c (instantiate_class_template): Likewise.
6347         * cp-tree.h: Remove it.
6348
6349         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
6350         * decl.c (finish_function): Not here.
6351         (start_function): Do set DECL_INITIAL.
6352
6353         * pt.c (push_template_decl_real): Complain about default template
6354         args for enclosing classes.
6355
6356         * call.c (add_function_candidate): Treat conversion functions
6357         as coming from the argument's class.
6358         * cp-tree.h (DECL_CONV_FN_P): New fn.
6359         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6360         * class.c (add_method): Use DECL_CONV_FN_P.
6361         * decl2.c (check_classfn): Likewise.
6362         * error.c (dump_function_name): Likewise.
6363         (dump_function_decl): Likewise.
6364         * pt.c (fn_type_unification): Likewise.
6365         * search.c (add_conversions): Likewise.
6366
6367 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6368
6369         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6370         * method.c (hack_identifier): Also check for using RESULT_DECL
6371         from outer context.
6372
6373 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
6374
6375         * decl.c (grokdeclarator): Use type_quals, rather than constp,
6376         consistently.
6377
6378 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6379
6380         * call.c (standard_conversion): instantiate_type here.
6381         (reference_binding): And here.
6382         (implicit_conversion): Not here.
6383         (build_op_delete_call): No need to cons up an OVERLOAD.
6384         * cvt.c (cp_convert_to_pointer): instantiate_type here.
6385         (convert_to_reference): And here.
6386         * decl.c (grok_reference_init): Not here.
6387         (grokparms): Or here.
6388         * typeck2.c (digest_init): Or here.
6389         * typeck.c (decay_conversion): Take the address of overloaded
6390         functions, too.
6391         (require_instantiated_type): Lose.
6392         (convert_arguments): Don't handle unknown types here.
6393         (build_c_cast): Likewise.
6394         (build_binary_op): Gut.
6395         (build_conditional_expr): Don't require_instantiated_type.
6396         (build_modify_expr): Likewise.
6397         (build_static_cast): Don't instantiate_type.
6398         (build_reinterpret_cast): Likewise.
6399         (build_const_cast): Likewise.
6400         (convert_for_initialization): Likewise.
6401         (build_ptrmemfunc): Use type_unknown_p.
6402         (convert_for_assignment): Also do default_conversion on overloaded
6403         functions.  Hand them off to ocp_convert.
6404
6405 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
6406
6407         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6408         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
6409
6410         * class.c (finish_struct_1): Use build_cplus_array_type to build
6411         array types.
6412         * decl.c (init_decl_processing): Likewise.
6413         * except.c (expand_end_eh_spec): Likewise.
6414         * search.c (expand_upcast_fixups): Simplify very slightly.
6415
6416 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6417
6418         * decl.c (grokdeclarator): Complain about a variable using
6419         constructor syntax coming back null from start_decl.
6420
6421         * friend.c (make_friend_class): Complain about trying to make
6422         a non-class type a friend.
6423
6424         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6425         (start_function): Not here.
6426
6427 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
6428
6429         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6430
6431 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6432
6433         * typeck2.c (process_init_constructor): Only skip anonymous fields
6434         if they are bitfields.
6435
6436         * cp-tree.def (TYPEOF_TYPE): New code.
6437         * error.c (dump_type_real): Handle it.
6438         * pt.c (tsubst): Likewise.
6439         * tree.c (search_tree): Likewise.
6440         * semantics.c (finish_typeof): New fn.
6441         * parse.y (typespec): Use it.
6442         * cp-tree.h: Declare it.
6443
6444 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
6445
6446         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6447
6448 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6449
6450         * typeck.c (convert_arguments): Don't handle pmf references
6451         specially.
6452
6453         * init.c (build_member_call): Don't try to convert to the base type
6454         if it's ambiguous or pedantic.
6455
6456         * typeck2.c (check_for_new_type): Only depend on pedantic for
6457         C-style casts.
6458
6459 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
6460
6461         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6462         non-converting constructors.
6463
6464 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6465
6466         * gxxint.texi: Correct documentation for n, N, Q, and B.
6467
6468 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6469
6470         * parse.y (condition): Convert VAR_DECL from reference to indirect
6471         reference.
6472
6473 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
6474
6475         * exception.cc (__cp_pop_exception): Free the original exception
6476         value, not the potentially coerced one.
6477
6478 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
6479
6480         * Makefile.in (hash.h): Run gperf when necessary.
6481
6482         * cp-tree.h (CP_TYPE_READONLY): Remove.
6483         (CP_TYPE_VOLATILE): Likewise.
6484         (CP_TYPE_QUALS): New macro.
6485         (CP_TYPE_CONST_P): Likewise.
6486         (CP_TYPE_VOLATILE_P): Likewise.
6487         (CP_TYPE_RESTRICT_P): Likewise.
6488         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6489         (cp_build_type_variant): Rename to ...
6490         (cp_build_qualified_type): New function.
6491         (c_apply_type_quals_to_decl): Declare.
6492         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6493         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6494         (cp_type_qual_from_rid): New function.
6495         (compparms): Remove unused parameter.  All callers changed.
6496         (cp_type_quals): New function.
6497         (at_least_as_qualified_p): Likewise.
6498         (more_qualified_p): Likewise.
6499
6500         * call.c (standard_conversion): Replace calls to
6501         cp_build_type_variant with cp_build_qualified_type.  Use
6502         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6503         compare them.  Use CP_TYPE_* macros to check qualifiers.
6504         (reference_binding): Likewise.
6505         (implicit_conversion): Likewise.
6506         (add_builtin_candidates): Likewise.
6507         (build_over_call): Likewise.
6508         * class.c (overrides): Compare all qualifiers, not just `const',
6509         on method declarations.
6510         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6511         (convert_pointer_to_real): Likewise.
6512         (type_promotes_to): Likewise.
6513         * decl.c (check_for_uninitialized_const_var): New function.
6514         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6515         (cp_finish_decl): Use check_for_uninitialized_const_var.
6516         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
6517         handle `restrict'.
6518         (grok_ctor_properties): Likewise.
6519         (grok_op_properties): Likewise.
6520         (start_function): Likewise.
6521         (rever_static_member_fn): Likewise.
6522         * decl2.c (grok_method_quals): Likewise.
6523         (grokfield): Likewise.
6524         * error.c (dump_readonly_or_volatile): Rename to ...
6525         (dump_qualifiers): New function.  Handle `restrict'.
6526         (dump_type_real): Use it.
6527         (dump_aggr_type): Likewise.
6528         (dump_type_prefix): Likewise.
6529         (dump_type_suffix): Likewise.
6530         (dump_function_decl): Likewise.
6531         (cv_as_string): Likewise.
6532         * gxx.gperf: Add __restrict and __restrict__.
6533         * gxxint.texi: Document `u' as used for `__restrict', and a few
6534         other previously undocumented codes.
6535         * hash.h: Regenerated.
6536         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6537         (build_member_call): Likewise.
6538         (build_new_1): Likewise.
6539         * lex.c (init_parse): Add entry for RID_RESTRICT.
6540         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6541         (cp_type_qual_from_rid): Define.
6542         * lex.h (enum rid): Add RID_RESTRICT.
6543         * method.c (process_modifiers): Deal with `restrict'.
6544         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6545         * parse.c: Regenerated.
6546         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6547         (tsubst_aggr_type): Likewise.
6548         (tsubst): Likewise.
6549         (check_cv_quals_for_unify): Likewise.
6550         (unify): Likewise.
6551         * rtti.c (init_rtti_processing): Likewise.
6552         (build_headof): Likewise.
6553         (get_tinfo_var): Likewise.
6554         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
6555         (expand_class_desc): Likewise.
6556         (expand_attr_desc): Likewise.
6557         (synthesize_tinfo_fn): Likewise.
6558         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
6559         (get_matching_virtual): Likewise.
6560         (expand_upcast_fixups): Likewise.
6561         * sig.c (build_signature_pointer_or_reference_name): Take
6562         type_quals, not constp and volatilep.
6563         (build_signature_pointer_or_reference_type): Likewise.
6564         (match_method_types): More CP_TYPE_QUALS conversion, etc.
6565         (build_signature_pointer_constructor): Likewise.
6566         (build_signature_method_call): Likewise.
6567         * tree.c (build_cplus_array_type): Likewise.
6568         (cp_build_type_variant): Rename to ...
6569         (cp_build_qualified_type): New function.  Deal with `__restrict'.
6570         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6571         (build_exception_variant): Likewise.
6572         (mapcar): Likewise.
6573         * typeck.c (qualif_type): Likewise.
6574         (common_type): Likewise.
6575         (comptypes): Likewise.
6576         (comp_cv_target_types): Likewise.
6577         (at_least_as_qualified_p): Define.
6578         (more_qualified_p): Likewise.
6579         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6580         (compparms): Likewise.
6581         (inline_conversion): Likewise.
6582         (string_conv_p): Likewise.
6583         (build_component_ref): Likewise.
6584         (build_indirect_ref): Likewise.
6585         (build_array_ref): Likewise.
6586         (build_unary_op): Likewise.
6587         (build_conditional_expr): Likewise.
6588         (build_static_cast): Likewise.
6589         (build_c_cast): Likewise.
6590         (build_modify_expr): Likewise.
6591         (convert_For_assignment): Likewise.
6592         (comp_ptr_ttypes_real): Likewise.
6593         (cp_type_quals): New function.
6594
6595 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
6596
6597         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6598         (CP_TYPE_VOLATILE): Likewise.
6599         * decl.c (grokdeclarator): Use them.
6600         * tree.c (canonical_type_variant): Likewise.
6601
6602 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6603
6604         * parse.y (named_class_head): Push into class while parsing the
6605         base class list.
6606         * decl2.c (push_scope, pop_scope): New functions.
6607         * cp-tree.h: Declare them.
6608         * init.c (build_new_1): Delay cleanup until end of full expression.
6609
6610 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
6611
6612         * typeck.c (build_component_ref): Use of a type here is an error.
6613
6614 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
6615
6616         Revamp references to member functions.
6617         * method.c (hack_identifier): Call build_component_ref for a
6618         reference to a member function.
6619         * typeck.c (build_component_ref): Only return a single function
6620         if it's static.  Otherwise, return a COMPONENT_REF.
6621         (build_x_function_call): Handle a COMPONENT_REF.
6622         (build_unary_op): Handle all unknown-type things.
6623         * decl2.c (arg_assoc): Handle COMPONENT_REF.
6624         * class.c (instantiate_type): Complain if the function we get is a
6625         nonstatic member function.  Remove code for finding "compatible"
6626         functions.
6627         * pt.c (tsubst_copy): Handle NOP_EXPR.
6628         * tree.c (build_dummy_object): New fn.
6629         (maybe_dummy_object): New fn.
6630         (is_dummy_object): New fn.
6631         * cp-tree.h: Declare them.
6632         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
6633         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
6634         * init.c (build_member_call): Use maybe_dummy_object and
6635         is_dummy_object.
6636         (build_offset_ref): Use maybe_dummy_object.
6637         (resolve_offset_ref): Use is_dummy_object.
6638         * typeck.c (build_x_function_call): Call build_dummy_object.
6639         (unary_complex_lvalue): Call is_dummy_object.
6640
6641         * typeck.c (build_component_addr): Make sure field is a field.
6642
6643         * call.c (build_new_op): Delete obsolete code.
6644
6645         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
6646
6647 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6648
6649         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
6650         std if std is ignored.
6651
6652 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6653
6654         * decl.c (grokvardecl): Fix thinko.
6655
6656         * decl.c (grokdeclarator): Embedded attrs bind to the right,
6657         not the left.
6658
6659         * parse.y (fn.def2): Fix 'attrs' format.
6660
6661 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6662
6663         * Makefile.in (CONFLICTS): Update.
6664         * parse.y (expr_or_declarator_intern): New rule.
6665         (expr_or_declarator, direct_notype_declarator, primary,
6666         functional_cast): Use it.
6667         (notype_declarator_intern): New rule.
6668         (notype_declarator, complex_notype_declarator): Use it.
6669
6670 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
6671
6672         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
6673         (grokvardecl): Likewise.
6674
6675 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6676
6677         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
6678         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
6679
6680         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
6681
6682         * pt.c (process_partial_specialization): Cast 1st argument of
6683         `bzero' to (PTR).
6684
6685         * tree.c (build_base_fields): Cast `base_align' to (int) when
6686         comparing against one.
6687
6688 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6689
6690         * decl.c (lookup_name_real): Handle template parameters for member
6691         templates where said parameters have the same name as the
6692         surrounding class.
6693
6694         * decl.c (expand_static_init): Build cleanups before entering the
6695         anonymous function used to do them to avoid access-checking
6696         confusion.
6697
6698         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
6699         accidentally removed by previous change, and make DECL_RTL here.
6700         * class.c (add_method): Don't make DECL_RTL here.
6701
6702         * pt.c (for_each_template_parm): Don't examine uninstantiated
6703         default arguments.
6704
6705 1998-10-16  Dave Brolley  <brolley@cygnus.com>
6706
6707         * lex.c (real_yylex): Fix unaligned access of wchar_t.
6708
6709 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6710
6711         * class.c (add_method): Fix documentation to reflect previous
6712         changes.  Check for duplicate method declarations here.
6713         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
6714         correctly; such things never match.
6715         (grokfndecl): Don't look for duplicate methods here.
6716         * decl2.c (check_classfn): Don't assume names are mangled.
6717         Don't add bogus member function declarations to a class before the
6718         class type is complete.
6719         (grokfield): Reformat error message.
6720         * method.c (set_mangled_name_for_decl): Don't mangle names while
6721         processing_template_decl.
6722
6723 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
6724
6725         * typeck.c (build_indirect_ref): Complain about a pointer to data
6726         member, too.
6727         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
6728         data member.
6729         * init.c (resolve_offset_ref): Don't undo the above.
6730
6731         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
6732         (struct lang_decl_flags): Add `bitfield'.
6733         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
6734         DECL_BIT_FIELD.
6735         * decl2.c (grokbitfield, grok_alignof): Likewise.
6736         * init.c (build_offset_ref): Likewise.
6737         * typeck.c (build_component_addr, expr_sizeof): Likewise.
6738         * cvt.c (build_up_reference): Don't crash if taking the address
6739         returns error_mark_node.
6740
6741         * decl.c (grokfndecl): Also check ctype when checking for ::main().
6742
6743 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
6744
6745         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
6746         Do mangling here.
6747         (grokdeclarator): Instead of here.
6748         * friend.c (do_friend): Lose special handling of ::main and
6749         __builtin_*.
6750         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
6751
6752         * spew.c (yylex): Clear looking_for_typename if we got
6753         'enum { ... };'.
6754
6755 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
6756
6757         * class.c (maybe_warn_about_overly_private_class): Improve error
6758         messages for class with only private constructors.
6759
6760         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
6761         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
6762         (build_typename_type): New function.
6763         * decl.c (build_typename_type): Broken out from ...
6764         (make_typename_type): Use it.
6765         * search.c (lookup_field): Likewise.
6766
6767 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6768
6769         * pt.c (convert_nontype_argument): Check against type_referred_to.
6770         * decl.c (grokvardecl): Check for declarator name before building
6771         DECL_ASSEMBLER_NAME.
6772
6773 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
6774
6775         * pt.c (lookup_template_class): Add comment.
6776         (instantiate_class_template): Don't mark the _TYPE node for
6777         member class templates as an instantiation.
6778
6779 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
6780
6781         * decl.c (grokfndecl): Fix my thinko.
6782
6783 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
6784
6785         * tinfo2.cc (fast_compare): Remove.
6786         (before): Just use strcmp.
6787         * tinfo.cc (operator==): Just use strcmp.
6788
6789 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
6790
6791         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
6792         declarations.
6793
6794 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
6795
6796         * cp-tree.h (specializations_of_same_template_p): Remove.
6797         * search.c (get_template_base): Don't use it.
6798         (get_template_base_recursive): Likewise.
6799         * pt.c (specializations_of_same_template_p): Remove.
6800         (unify): Don't use it.
6801         (lookup_template_class): Find the correct parent when setting
6802         CLASSTYPE_TI_TEMPLATE.
6803
6804 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6805
6806         * tinfo.cc (operator==): Always compare names.
6807
6808 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
6809
6810         * decl.c (start_function): Fix cut-and-paste error.
6811
6812 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6813
6814         * inc/typeinfo: Add #pragma interface.
6815         (operator!=): Just call operator==.
6816         * tinfo.cc: Add #pragma implementation.
6817         (operator==): Move from inc/typeinfo and tinfo2.cc.
6818         Check __COMMON_UNRELIABLE instead of _WIN32.
6819
6820         * typeck2.c (my_friendly_abort): Add URL.
6821
6822 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6823
6824         * decl.c (start_method): Added extra parameter for attributes.
6825         * cp-tree.h (start_method): Update prototype.
6826         * parse.y (fn.def2): Update start_method parameter list.
6827
6828 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
6829
6830         * cp-tree.h (specializations_of_same_template_p): Declare.
6831         * pt.c (specializations_of_same_template_p): New function.
6832         (unify): Use it.
6833         * search.c (get_template_base): Use it.
6834         (get_template_base_recursive): Likewise.
6835
6836 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
6837
6838         * decl2.c (start_objects): Add new variable `joiner' and
6839         initialize it properly.
6840
6841 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
6842
6843         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
6844         change to vtable types.
6845
6846         * cvt.c (ocp_convert): Avoid infinite recursion caused by
6847         1998-10-03 change.
6848
6849 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
6850
6851         * pt.c (resolve_overloaded_unification): New fn.
6852         (try_one_overload): Likewise.
6853         (unify): Don't fail on unknown type.
6854         (type_unification_real): Likewise.  Use resolve_overloaded_unification
6855         to handle an overloaded argument.
6856         (template_args_equal): Split out...
6857         (comp_template_args): From here.
6858         (determine_specialization): Also allow a template with more
6859         parms than were explicitly specified.
6860         * cp-tree.h: Add template_args_equal.
6861         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
6862
6863 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
6864
6865         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
6866         change.
6867
6868 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
6869
6870         * typeck.c (unsigned_type): Only return TItype nodes when
6871         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6872         (signed_type): Likewise.
6873         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
6874         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6875         (init_decl_processing): Only create TItype nodes when
6876         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6877         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
6878         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6879
6880 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6881
6882         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
6883         (gxx.gperf): Update comments describing invocation flags.
6884         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
6885
6886 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
6887
6888         * class.c (finish_struct_1): Add commentary on previous change.
6889
6890         * cp-tree.h (vtbl_ptr_type_node): New variable.
6891         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
6892         already of the right type.
6893         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
6894         Simplify code to grow vtable.
6895         * decl.c (vtbl_ptr_type_node): Define.
6896         (init_decl_processing): Initialize it.
6897
6898 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
6899
6900         * cp-tree.def (PTRMEM_CST): New tree node.
6901         * cp-tree.h (ptrmem_cst): New type.
6902         (lang_type): Remove local_typedecls.
6903         (dummy): Increase to 12 bits from 11.
6904         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
6905         (PTRMEM_CST_CLASS): New macro.
6906         (PTRMEM_CST_MEMBER): Likewise.
6907         (current_access_specifier): New variable.
6908         (current_class_type): Remove duplicate declaration.
6909         (finish_struct): Change prototype.
6910         (unreverse_member_declarations): New function.
6911         (pushdecl_class_level): Change prototype.
6912         (grok_enum_decls): Remove.
6913         (fixup_anonymous_union): New function.
6914         (grok_x_components): Change prototype.
6915         (tsubst_chain): Remove.
6916         (finish_member_template_decl): Likewise.
6917         (check_explicit_specialization): Fix indentation.
6918         (finish_class_definition): Change prototype.
6919         (finish_member_class_template): Likewise.
6920         (finish_member_declaration): New function.
6921         (check_multiple_declarators): Likewise.
6922         * class.c (class_stack_node_t): New type.
6923         (current_class_base): Remove.
6924         (current_class_stack): Change type.
6925         (current_access_specifier): New variable.
6926         (grow_method): Remove.
6927         (check_member_decl_is_same_in_complete_scope): Break out from
6928         finish_struct.
6929         (make_method_vec): New function.
6930         (free_method_vec): Likewise.
6931         (add_implicitly_declared_members): Break out from finish_struct_1.
6932         (free_method_vecs): New variable.
6933         (add_method): Rework for direct use from parser.
6934         (handle_using_decl): Watch for NULL_TREE while iterating through
6935         CLASSTYPE_METHOD_VEC.
6936         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6937         just do some error-checking.
6938         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6939         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
6940         (finish_struct): Change prototype.  Simplify; fields and methods
6941         are already set up at this point.
6942         (init_class_processing): Set up current_class_stack.
6943         (pushclass): Save current_access_specifier.
6944         (popclass): Restore it.
6945         (currently_open_class): Simplify.
6946         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6947         * decl.c (saved_scope): Add access_specifier.
6948         (maybe_push_to_top_level): Save it.
6949         (pop_from_top_level): Restore it.
6950         (maybe_process_template_type_declaration): Use
6951         finish_member_declaration.
6952         (pushtag): Likewise.
6953         (pushdecl_class_level): Don't return a value.
6954         (fixup_anonymous_union): Break out from grok_x_components.
6955         (shadow_tag): Use it.
6956         (xref_tag): Complain about using an elaborated type specifier to
6957         reference a template type parameter or typedef name.
6958         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6959         (current_local_enum): Remove.
6960         (build_enumerator): Call finish_member_declaration.
6961         (grok_enum_decls): Remove.
6962         * decl2.c (grok_x_components): Simplify.
6963         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6964         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6965         (merge_functions): Add to comment.
6966         (arg_assoc_type): Prototype.
6967         (arg_assoc): Pass as many arguments as there are parameters.
6968         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
6969         OFFSET_REF.
6970         * expr.c (cpls_expand_expr): Remove dead code.  Handle
6971         PTRMEM_CST.
6972         * friend.c (do_friend): Lookup friends when in nested classes.
6973         Change comments.
6974         * init.c (build_offset_ref): Do lookup even for classes that are
6975         only partially defined.
6976         (decl_constant_value): Remove dead code.
6977         * method.c (build_overload_value): Remove hack where by TYPE was
6978         not a TYPE.  Handle PTRMEM_CST.
6979         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6980         should go.
6981         * parse.y (components, notype_components, component_decl,
6982         component_decl_1, component_declarator, component_declarator0):
6983         Now all are itype rather than ttype.  Rework to add members to
6984         classes on the fly.
6985         (typesqpecqual_reserved): Use check_multiple_declarators.
6986         (structsp): Update class to finish_class_definition.
6987         (do_xref_defn): Unsplit into named_class_head.
6988         (access_specifier): Set current_access_specifier.
6989         * pt.c (set_current_access_from_decl): New function.
6990         (finish_member_template_decl): Don't take the parameters.
6991         (comp_template_args): Make more robust.
6992         (lookup_template_class): Don't use current_local_enum.
6993         (for_each_template_parm): Handle PTRMEM_CST.
6994         (instantiate_class_template): Use set_current_access_from_decl,
6995         finish_member_declaration and unreverse_member_declarations.  Set
6996         lineno/input_filename before generating implicit member functions.
6997         (type_unification_real): Don't assume back-unification happens
6998         only for the last argument.
6999         (regenerate_decl_from_template): Call pushclass a bit earlier.
7000         (tsubst_chain): Remove.
7001         (tsubst_enum): Use set_current_access_from_decl.
7002         (set_mangled_name_for_template_decl): Fix indentation.
7003         * search.c (lookup_fnfields_1): Change iteration through
7004         CLASSTYPE_METHOD_VEC.
7005         (dfs_pushdecls): Likewise.
7006         (dfs_compress_decls): Likewise.
7007         (add_conversions): Likewise.
7008         * semantics.c (finish_class_definition): Don't take components.
7009         Change call to finish_struct.
7010         (finish_member_declaration): New function.
7011         (finish_member_class_template): Don't take template parameters.
7012         Change call to grok_x_components.  Call finish_member_template_decl.
7013         (check_multiple_declarators): New function.
7014         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
7015         a passed in fieldlist.
7016         * tree.c (search_tree): Handle PTRMEM_CST.
7017         (mapcar): Likewise.
7018         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
7019         INTEGER_CSTs, for pointer-to-data members.
7020
7021         * call.c (resolve_args): Resolve template specializations, if
7022         possible.
7023
7024 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7025
7026         * Makefile.in (spew.o): Depend on toplev.h.
7027
7028         * call.c (compare_ics): Initialize variables `deref_from_type2',
7029         `deref_to_type1' and `deref_to_type2'.
7030
7031         * except.c (get_eh_type): Hide prototype and definition.
7032         (process_start_catch_block_old): Remove unused static prototype.
7033
7034         * pt.c (tsubst_decl): Initialize variable `argvec'.
7035
7036         * spew.c: Include toplev.h.
7037
7038 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
7039
7040         * pt.c (instantiate_decl): Do save and restore file position.
7041
7042 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7043
7044         * method.c (build_decl_overload_real): Clear
7045         numeric_output_need_bar after __.
7046
7047 1998-10-05  Nathan Sidwell  <nathan@acm.org>
7048
7049         * call.c (build_new_method_call): Issue 'incomplete type' error,
7050         if class is not defined.
7051
7052 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7053
7054         * call.c (build_object_call): Move declaration of variable
7055         `fn' into the scope where it is used.  Don't access variable
7056         `fn' when it is uninitialized, instead use `fns'.
7057
7058 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7059
7060         * errfn.c (cp_thing): Print buf as a string not as a printf format
7061         to avoid problems with the operator%.  Consequently, `%%' sequences
7062         in format are copied as `%' in buf.
7063
7064 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
7065
7066         * pt.c (pop_tinst_level): Call extract_interface_info.
7067         (instantiate_decl): Don't save and restore file position.
7068
7069         * decl.c (cp_finish_decl): Make statics in extern inlines and
7070         templates common, if possible and the target doesn't support weak
7071         symbols.
7072
7073         * decl.c (grokdeclarator): Remove redundant calls to
7074         build_type_variant and some duplicated code.
7075         * sig.c (build_signature_reference_type): Only take the type parm.
7076         (build_signature_pointer_type): Likewise.
7077         * tree.c (build_cplus_method_type): Adjust.
7078         * cp-tree.h: Update.
7079
7080 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
7081
7082         * call.c (build_over_call): Make pedwarns about dropped qualifiers
7083         into full-fledged errors.
7084         * cvt.c (convert_to_reference): Likewise.
7085         * typeck.c (convert_for_assignment): Likewise.
7086
7087         * search.c (expand_upcast_vtables): In addition to unsetting
7088         TREE_READONLY, remove top-level const type qualifier.
7089
7090 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
7091
7092         * class.c (current_class_ptr, current_class_ref): Clarify
7093         documentation.
7094         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
7095         NOP type conversions.
7096         * decl.c (decls_match): Use comptypes directly; ignore
7097         qualifiers on the DECL.
7098         (duplicate_decls): Remove qualifier checks on DECL.
7099         (grokdeclarator): Make the type built up include top-level
7100         qualifiers.
7101         * decl2.c (do_dtors): Fix spelling error.
7102         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
7103         when printing type information.
7104         * init.c (build_new_1): Add documentation.  Deal with the fact
7105         that type of allocated memory now contains qualifiers.
7106         * lex.c (is_global): Improve error-recovery.
7107         * sig.c (build_member_function_pointer): Don't cast away const
7108         on fields of sigtable_entry_type.
7109         * tree.c (lvalue_type): Don't look at top-level qualifiers on
7110         expressions.
7111         * typeck.c (decay_conversion): Likewise.
7112         (build_component_ref): Make sure the type of the COMPONENT_REF
7113         contains top-level qualifiers, as appropriate.  Improve
7114         error-handling.
7115         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
7116         (build_array_ref): Likewise.
7117         (build_unary_op): Improve error-recovery.
7118         (unary_complex_lvalue): Make taking the address a bound member
7119         function an error, not a sorry.
7120         (build_conditional_expr): Look at the type qualifiers, not the
7121         qualifiers on the expression itself.
7122
7123 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
7124
7125         * decl2.c (merge_functions): Remove duplicates.
7126
7127         * decl2.c: Add -f{no-,}implicit-inline-templates.
7128         (import_export_decl): Check it.
7129
7130         * decl.c (lookup_name_real): Template parms also take precedence
7131         over implicit typename.  Only warn if yylex.
7132
7133         * typeck.c (build_conditional_expr): Only fold if ifexp is an
7134         INTEGER_CST.
7135
7136         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
7137         instead of linkage.
7138
7139 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
7140
7141         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
7142         * class.c (build_vbase_pointer): Use it.
7143         * rtti.c (expand_class_desc): Likewise.
7144         * tree.c (build_vbase_pointer_fields): Likewise.
7145
7146 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
7147
7148         * decl.c (start_decl): Add invocation of
7149         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7150         (start_function): Add invocation of
7151         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7152
7153         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
7154         HANDLE_GENERIC_PRAGMAS.
7155
7156 1998-09-28  Anthony Green  <green@cygnus.com>
7157
7158         * semantics.c (finish_asm_stmt): Always permit volatile asms.
7159
7160 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
7161
7162         * decl.c (grokdeclarator): Tighten checks for invalid
7163         destructors.  Improve error-messages and error-recovery.
7164         * decl2.c (check_classfn): Don't assume that mangled destructor
7165         names contain type information.
7166
7167 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
7168
7169         * search.c (get_base_distance): Remove assert.
7170
7171         * decl2.c (build_anon_union_vars): Don't process a field with no
7172         name.
7173         (finish_anon_union): Also complain about local anon unions with no
7174         members.
7175
7176 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7177
7178         * decl.c (lookup_namespace_name): If the name is a namespace,
7179         return it immediately.
7180
7181 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7182
7183         * cp-tree.h (define_case_label): Remove unused parameter.
7184         (check_java_method): Likewise.
7185         (grokclassfn): Likewise.
7186         (expand_aggr_init): Likewise.
7187         (build_x_delete): Likewise.
7188         (maybe_end_member_template_processing): Likewise.
7189         (unshare_base_binfos): Add prototype.
7190         (string_conv_p): Likewise.
7191         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
7192
7193         * cvt.c (build_up_reference): Remove unused parameter
7194         `checkconst', all callers changed.
7195         (build_type_conversion): Mark parameter `code' with
7196         ATTRIBUTE_UNUSED.
7197         (build_expr_type_conversion): Initialize variable `conv'.
7198
7199         * decl.c (push_namespace): Initialize variable `d'.
7200         (define_case_label): Remove unused parameter `decl', all callers
7201         changed.
7202
7203         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
7204         `argc' with ATTRIBUTE_UNUSED.
7205         (grokclassfn): Remove unused parameter `cname', all callers
7206         changed.
7207         (check_java_method): Likewise for parameter `ctype'.
7208         (copy_assignment_arg_p): Mark parameter `virtualp' with
7209         ATTRIBUTE_UNUSED.
7210         (finish_prevtable_vardecl): Likewise for parameter `prev'.
7211
7212         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
7213
7214         * init.c (expand_aggr_init_1): Remove unused parameter
7215         `alias_this', all callers changed.
7216         (expand_aggr_init): Likewise.
7217         (expand_default_init): Likewise.
7218         (build_new_1): Initialize variable `susp'.
7219         (build_x_delete): Remove unused parameter `type', all callers
7220         changed.
7221
7222         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
7223         ATTRIBUTE_UNUSED.
7224         (readescape): Use (unsigned) value in shift.
7225         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
7226         comparing to a signed quantity.
7227
7228         * pt.c (maybe_end_member_template_processing): Remove unused
7229         parameter `decl', all callers changed.
7230         (check_explicit_specialization): Add braces around empty body in
7231         an else-statement.
7232         (current_template_args): Initialize variable `args'.
7233         (lookup_template_class): Likewise for variable `prev_local_enum'.
7234         (tsubst_decl): Likewise for variable `r'.
7235         (set_mangled_name_for_template_decl): Initialize variable
7236         `context'.
7237
7238         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
7239         Likewise for variable `i'.
7240         (yylex): Initialize variable `trrr'.
7241
7242         * typeck.c (compparms): Mark variable `strict' with
7243         ATTRIBUTE_UNUSED.
7244
7245         * xref.c (simplify_type): Cast argument of ctype function to
7246         `unsigned char'.
7247
7248 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
7249
7250         * cp-tree.h (language_lvalue_valid): Remove.
7251         * decl.c (grokdeclarator): Don't disallow references to functions.
7252         * tree.c (lvalue_p_1): New function, combining duplicated
7253         code from ...
7254         (lvalue_p): Use it.
7255         (real_lvalue_p): Likewise.
7256         * typeck.c (language_lvalue_valid): Remove.
7257         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
7258         they don't have TREE_READONLY set.
7259         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
7260
7261 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7262
7263         * spew.c (yylex): Give diagnostic.
7264         * hash.h (is_reserved_word): Add export.
7265         * gxx.gperf: Likewise.
7266         * lex.h (rid): Add RID_EXPORT.
7267         * lex.c (init_parse): Likewise.
7268
7269 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7270
7271         * friend.c (do_friend): Make warning a full sentence.
7272
7273 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7274
7275         * parse.y (component_decl_list): Improve error-recovery.
7276
7277 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7278
7279         * decl.c (make_typename_type): Move error to point where name
7280         variable can be used by dump_type.
7281
7282 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7283
7284         * decl.c (grokfndecl): Improve error-recovery.
7285         * decl2.c (grokfield): Likewise.
7286         * pt.c (finish_member_template_decl): Likewise.
7287
7288 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7289
7290         * method.c (hack_identifier): Finding multiple members is always
7291         an error.
7292
7293 1998-09-21  Per Bothner  <bothner@cygnus.com>
7294
7295         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
7296
7297 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
7298
7299         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
7300
7301 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
7302
7303         * class.c (maybe_warn_about_overly_private_class): Reformat.
7304
7305 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
7306
7307         * exception.cc (__cplus_type_matcher): Realign some code.
7308
7309 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
7310
7311         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
7312         (tinfo2.o): Likewise.
7313         (exception.o): Likewise.
7314         (new.o): Likewise.
7315         (opnew.o): Likewise.
7316         (opnewnt.o): Likewise.
7317         (opvnew.o): Likewise.
7318         (opvnewnt.o): Likewise.
7319         (opdel.o): Likewise.
7320         (opdelnt.o): Likewise.
7321         (opvdel.o): Likewise.
7322         (opvdelnt.o): Likewise.
7323
7324 1998-09-16  Richard Henderson  <rth@cygnus.com>
7325
7326         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
7327
7328 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
7329
7330         * call.c (build_field_call): Handle static data members too.
7331
7332         * typeck.c (comptypes): When comparing pointer types, check
7333         whether referred types match even in strictest modes.
7334
7335 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
7336
7337         * cp-tree.h: Revert previous change.
7338         (finish_struct_methods): Remove declaration.
7339         * class.c: Revert previous change.
7340         (maybe_warn_about_overly_private_class): New function.
7341         (finish_struct_methods): Declare here, and make static.  Remove
7342         unnecessary parameters.  Tidy slightly.  Use
7343         maybe_warn_about_overly_private_class.
7344         (finish_struct_1): Adjust.  Remove check for private constructors,
7345         now done elsewhere.
7346         (finish_struct): Adjust.
7347
7348 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7349
7350         * except.c (expand_start_catch_block): No need to check for new
7351         exception model.
7352         (process_start_catch_block_old): Deleted.
7353         (process_start_catch_block): Add call to start_decl_1().
7354         (expand_end_catch_block): Add call to end_catch_handler().
7355         * exception.cc (__cplus_type_matcher): Only check the exception
7356         language if there is an exception table.
7357
7358 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7359
7360         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7361         as used to prevent conflicts with virtual function tables.
7362
7363 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
7364
7365         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7366         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7367         * class.c (maybe_class_too_private_p): New function.
7368         (finish_struct_methods): Use it.
7369         (finish_struct_1): Likewise.
7370         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7371         appropriate.
7372
7373         * pt.c (check_specialization_scope): Fix spelling error.
7374         (check_explicit_specialization): Remove code to handle explicit
7375         specializations in class scope; they are now correctly diagnosed
7376         as errors.
7377
7378 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
7379
7380         * decl.c (pushdecl): Don't copy types if the
7381         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7382         type.
7383
7384 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7385
7386         * class.c (get_enclosing_class): New function.
7387         (is_base_of_enclosing_class): Likewise.
7388         * cp-tree.h (get_enclosing_class): Declare.
7389         (is_base_of_enclosing_class): Likewise.
7390         * pt.c (coerce_template_parms): Use them.
7391
7392 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
7393
7394         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7395         null to decide whether to use it.
7396
7397         * error.c (dump_type_real): Handle NAMESPACE_DECL.
7398         * parse.y (base_class.1): Avoid crash on error.
7399
7400 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7401
7402         * decl.c (make_typename_type): If context is a namespace, the code
7403         is in error.
7404
7405 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
7406
7407         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7408
7409 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
7410
7411         * cp-tree.h (anonymous_namespace_name): Declare.
7412         * decl.c: Define it.
7413         (push_namespace): Use anonymous_namespace_name, rather than local
7414         static anon_name.
7415         * error.c (dump_decl): If a namespace is named
7416         anonymous_namespace_name, call it {anonymous}.
7417
7418         * decl.c (grokparms): Distinguish between references and pointers
7419         in error message.
7420
7421 1998-09-08  Richard Henderson  <rth@cygnus.com>
7422             Mark Mitchell  <mark@markmitchell.com>
7423
7424         * pt.c (process_partial_specialization): Consistently allocate
7425         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
7426         tpd.parms, where appropriate.
7427
7428 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
7429
7430         * Makefile.in (INCLUDES): Update after recent toplevel gcc
7431         reorganizations.
7432
7433 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
7434
7435         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7436         * class.c (finish_struct): Remove hackery to deal with explicit
7437         specializations in class scope.
7438         * decl.c (grokfndecl): Improve error-recovery.
7439         * decl2.c (grokfield): Likewise.
7440         * pt.c (check_specialization_scope): New function.
7441         (begin_specialization): Call it.
7442         (process_partial_specialization): New function, split out from
7443         push_template_decl.  Check partial specializations more
7444         stringently.
7445         (push_template_decl): Call it.
7446         (check_explicit_specialization): Don't attempt to handle explicit
7447         specializations in class scope.
7448         (template_parm_data): Document.  Add current_arg and
7449         arg_uses_template_parms.
7450         (mark_template_parm): Set it.
7451         (tsubst_arg_types): Remove unused variable.
7452         * semantics.c (begin_class_definition): Tweak.
7453
7454 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
7455
7456         * inc/typeinfo (type_info::type_info(const char*)): Make
7457         `explicit'.
7458
7459         * cp-tree.h (hash_tree_cons_simple): New macro.
7460         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
7461         (coerce_template_parms): Use make_temp_vec, instead of
7462         make_tree_vec.  Document this behavior.
7463         (lookup_template_class): Likewise.
7464         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7465         Remove dead code (and add assertion to check its deadness).  Fix
7466         bug w.r.t. exception specifications.
7467
7468 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
7469
7470         * decl2.c (import_export_vtable): Always make artificials comdat.
7471         (import_export_decl): Likewise.
7472         * pt.c (mark_decl_instantiated): Likewise.
7473
7474 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7475
7476         * cp-tree.h (finish_globally_qualified_member_call_expr):
7477         Rename to ...
7478         (finish_qualified_call_expr).
7479         * semantics.c: Likewise.
7480         * parse.y (primary): Use it.
7481         * method.c (hack_identifier): Remove redundant code.
7482
7483         * init.c (resolve_offset_ref): Call convert_from_reference to
7484         handle members of reference type.  Improve error recovery.
7485
7486 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
7487
7488         * cp-tree.h: Declare warn_nontemplate_friend.
7489         * decl2.c (lang_decode_option): Set.
7490         * lang-options.h: Add -Wnon-template-friend.
7491         * friend.c (do_friend): Use to toggle non-template function warning.
7492
7493 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7494
7495         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7496         corresponding INTEGER_CSTs when processing_template_decl.
7497         * pt.c (tsubst_enum): Tweak accordingly.
7498
7499 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7500
7501         * decl.c (pushdecl_class_level): Add warning here.
7502         (pushdecl): Tweak.
7503
7504 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
7505
7506         * cvt.c (convert_pointer_to_real): Tidy.
7507         * search.c (get_base_distance_recursive): Simplify.
7508         (get_base_distance): Likewise.
7509
7510         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7511         parms.
7512
7513 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
7514
7515         * lex.c (check_newline):  Call HANDLE_PRAGMA before
7516         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
7517         if unknown pragmas are encountered.
7518         (handle_sysv_pragma): Interpret return code from
7519         handle_pragma_token ().  Return success/failure indication rather
7520         than next unprocessed character.
7521         (pragma_getc): New function: retrieves characters from the
7522         input stream.  Defined when HANDLE_PRAGMA is defined.
7523         (pragma_ungetc): New function: replaces characters back into the
7524         input stream.  Defined when HANDLE_PRAGMA is defined.
7525
7526 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7527
7528         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7529         * class.c (build_vtable_entry_ref): Likewise.
7530
7531 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7532
7533         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7534         * decl2.c (import_export_decl): Likewise.
7535         * pt.c (instantiate_decl): Use it.
7536
7537 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7538
7539         * decl.c (lookup_name_real): Also do implicit typename thing for
7540         artificial TYPE_DECLs.
7541         * search.c (lookup_field): Likewise.
7542         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7543         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7544         (enter_scope_of): Extract type from implicit typename.
7545         (begin_class_definition): Likewise.
7546         * lex.c (identifier_type): Handle implicit typename when checking
7547         for SELFNAME.
7548
7549         * cp-tree.h: Declare flag_strict_prototype.
7550         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7551         -fstrict-prototype.
7552         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7553         specified, set it to the value of pedantic.
7554
7555 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7556
7557         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7558
7559 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
7560
7561         * decl.c (finish_enum): Handle member enums of classes declared in
7562         template functions.
7563
7564         * decl2.c (grok_x_components): Strip attributes before calling
7565         groktypename.
7566
7567 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
7568
7569         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7570         -fenum-int-equivalence and -fno-nonnull-objects.
7571         * class.c (check_for_override): Remove support for -fall-virtual.
7572         (finish_struct_1): Likewise.
7573         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7574         * typeck.c (build_binary_op_nodefault): Likewise.
7575         * cvt.c (ocp_convert): Likewise.
7576         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7577         * class.c (build_vbase_path): Likewise.
7578
7579 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
7580
7581         * Makefile.in (INTERFACE): New, set to 1.
7582
7583 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
7584
7585         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7586         comparing with global_namespace.
7587         (dump_aggr_type): Likewise.
7588
7589         * decl.c (grokfndecl): Issue error on declaration of friend
7590         templates with explicit template arguments.
7591
7592         * pt.c (convert_template_argument): New function, split out
7593         from...
7594         (coerce_template_parms): Here.
7595         (tsubst): Attempt better error-recovery.
7596
7597 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7598
7599         * pt.c (decl_template_parm_p): Add checks for
7600         TEMPLATE_TEMPLATE_PARM.
7601
7602 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7603
7604         * lex.c (do_identifier): Fix thinko in previous change.
7605
7606 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
7607
7608         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
7609         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
7610
7611 1998-08-28  Richard Henderson  <rth@cygnus.com>
7612
7613         Add support for discarding unused virtual functions.
7614         * lang-options.h: Add -fvtable-gc.
7615         * cp-tree.h: Add flag_vtable_gc.
7616         * decl2.c (output_vtable_inherit): New fn.
7617         (finish_vtable_vardecl): Call it.
7618         * class.c (build_vtable_entry_ref): New fn.
7619         (build_vtbl_ref): Call it.
7620
7621 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7622
7623         * cp-tree.h (build_enumerator): Take the enumeration type as a
7624         parameter.
7625         * decl.c (finish_enum): Don't set the TREE_TYPE for the
7626         enumeration constant values if we're processing_template_decls.
7627         Don't set the type for the CONST_DECLs either; that's done in
7628         build_enumerator.
7629         (build_enumerator): Take the enumeration type as a
7630         parameter.
7631         * lex.c (do_identifier): Don't resolve enumeration constants while
7632         processing template declarations, even if they happen to be
7633         TEMPLATE_PARM_INDEXs.
7634
7635         * parse.y (current_enum_type): New variable.
7636         (primary): Don't allow statement-expression in local classes just
7637         as we don't in global classes.
7638         (structsp): Use current_enum_type.
7639         (enum_list): Likewise.
7640         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
7641         finish_enum; they no longer occur.
7642
7643         * cp-tree.h (finish_base_specifier): New function.
7644         * parse.y (base_class): Use it.
7645         * semantics.c (finish_base_specifier): Define it.
7646
7647         * parse.y (structsp): Warn on use of typename outside of template
7648         declarations.
7649
7650 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7651
7652         * lex.c (handle_cp_pragma): Remove #pragma vtable.
7653         * lang-options.h: Remove +e options.
7654         * decl2.c (lang_decode_option): Likewise.
7655         (import_export_vtable): Don't check write_virtuals.
7656         (finish_vtable_vardecl, finish_file): Likewise.
7657         * search.c (dfs_debug_mark): Likewise.
7658         * semantics.c (begin_class_definition): Likewise.
7659         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
7660
7661         * call.c (build_over_call): Check flag_elide_constructors.
7662         * decl2.c: flag_elide_constructors defaults to 1.
7663         * typeck.c (convert_arguments): Remove return_loc parm.
7664         (build_function_call_real): Adjust.
7665
7666         * search.c: Tear out all mi_matrix and memoize code.
7667         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
7668         * lang-options.h: Remove documentation for -fhandle-exceptions,
7669         -fmemoize-lookups and -fsave-memoized.
7670         * cp-tree.h: Lose mi_matrix and memoize support.
7671         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
7672         * class.c: Lose struct class_level.
7673         (pushclass, popclass): Lose memoize support.
7674         * init.c (build_offset_ref): Likewise.
7675
7676         Never change BINFO_INHERITANCE_CHAIN.
7677         * init.c (emit_base_init): Change modification of
7678         BINFO_INHERITANCE_CHAIN to an assert.
7679         * search.c (get_base_distance_recursive): Likewise.
7680         (get_base_distance): Likewise.
7681         (lookup_member): Likewise.
7682         (convert_pointer_to_single_level): Likewise.
7683         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
7684         (lookup_fnfields): Likewise.
7685         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
7686         (unshare_base_binfos): Don't call propagate_binfo_offsets.
7687         (layout_basetypes): Call propagate_binfo_offsets instead of
7688         unshare_base_binfos.
7689         * decl.c (xref_basetypes): Call unshare_base_binfos.
7690         * pt.c (instantiate_class_template): Likewise.
7691         * tree.c (reverse_path): Remove 'copy' parm; always make a
7692         temporary copy.
7693         * class.c (build_vbase_path): Just call it.
7694         * search.c (compute_access): Likewise.  Don't re-reverse.
7695
7696 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7697
7698         * class.c (build_vbase_path): Use reverse_path.
7699         (finish_base_struct): Move warnings for inaccessible bases to
7700         layout_basetypes.
7701         (modify_one_vtable): Remove check of TREE_USED (binfo).
7702         (fixup_vtable_deltas1): Likewise.
7703         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
7704         (xref_tag): Remove binfos parameter.
7705         (make_binfo): Remove chain parameter.
7706         (reverse_path): Add copy parameter.
7707         * decl.c (init_decl_processing): Change calls to xref_tag.
7708         (xref_tag): Remove binfos parameter.
7709         (xref_basetypes): Change calls to make_binfo.
7710         * decl2.c (grok_x_components): Change calls to xref_tag.
7711         (handle_class_head): Likewise.
7712         * friend.c (do_friend): Likewise.
7713         * lex.c (make_lang_type): Change calls to make_binfo.
7714         * parse.y (structsp): Change calls to xref_tag.
7715         (named_complex_class_head_sans_basetype): Likewise.
7716         (named_class_head): Likewise.
7717         * rtti.c (init_rtti_processing): Likewise.
7718         * search.c (compute_access): Change calls to reverse_path.
7719         (dfs_get_vbase_types): Change calls to make_binfo.
7720         (get_vbase_types): Remove dead code.
7721         * tree.c (unshare_base_binfos): Change calls to make_binfo.
7722         (layout_basetypes): Warn here about inaccessible bases.
7723         (make_binfo): Remove chain parameter.
7724         (reverse_path): Add copy parameter.
7725
7726 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7727
7728         * class.c: #if 0 complete_type_p.
7729         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
7730         * method.c (process_overload_item): Likewise.
7731         * typeck.c (comp_target_types): Likewise.
7732
7733         Stop sharing binfos for indirect virtual bases.
7734         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
7735         (layout_basetypes): Likewise.
7736         (unshare_base_binfos): Copy vbases, too.
7737         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
7738         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
7739         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
7740         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
7741         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
7742         reference to BINFO_VIA_PUBLIC.
7743         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
7744         (push_class_decls): Use them.
7745         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
7746         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
7747
7748 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7749
7750         * decl.c (build_enumerator): Set DECL_CONTEXT for the
7751         CONST_DECLs.
7752
7753 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
7754
7755         * cp-tree.h (finish_enum): Change prototype.
7756         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
7757         VALUES parameter.  Don't try to compute mins/maxs if
7758         processing_template_decl.
7759         * parse.y (structsp): Use new calling sequence for finish_enum.
7760         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
7761         (lookup_template_class): Remove unused variables.  Tweak.
7762         Register enums on instantiation list before substituting
7763         enumeration constants.
7764         (tsubst_decl): Remove unused variables.
7765         (regenerate_decl_from_template): Likewise.
7766
7767         * decl.c (duplicate_decls): Don't obliterate the
7768         DECL_TEMPLATE_INFO for a template if we're not replacing it with
7769         anything.
7770
7771         * lex.c (do_identifier): Fix typo in comment.
7772
7773 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7774
7775         * errfn.c: Remove stdarg.h/varargs.h.
7776         * tree.c: Likewise.
7777
7778 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
7779
7780         * pt.c (tsubst_copy): Only do typename overloading on an
7781         IDENTIFIER_NODE that happens to look like a typename if it actually
7782         has a type for us to use.
7783
7784 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7785
7786         * typeck.c (comp_cv_target_types): Split out...
7787         (comp_target_types): From here.  Don't allow cv-qual changes under
7788         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
7789         (build_ptrmemfunc): Pass 1 to nptrs.
7790         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7791
7792 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
7793
7794         * search.c (dependent_base_p): Don't compare a binfo to
7795         current_class_type; use the TREE_TYPE of the binfo instead.
7796
7797         * cp-tree.h (CLASS_TYPE_P): Revise definition.
7798
7799 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7800
7801         * decl.c (duplicate_decls): Don't complain about different
7802         exceptions from an internal decl even if pedantic.
7803
7804         * typeck.c (convert_for_assignment): Converting from pm of vbase
7805         to derived is an error, not a sorry.
7806
7807         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
7808         * class.c (fixed_type_or_null): Rename from
7809         resolves_to_fixed_type_p.  Return the dynamic type of the
7810         expression, if fixed, or null.
7811         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
7812         does not match the static type.
7813         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
7814         resolves_to_fixed_type_p again.
7815
7816 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7817
7818         * pt.c (tsubst_decl): Move special case code for dealing with
7819         tricky friend templates here from ...
7820         (regenerate_decl_from_template): Here.
7821
7822 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7823
7824         * decl.c (start_decl): Remove redundant linkage check.
7825
7826 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
7827
7828         * typeck.c (c_expand_return): Handle the case that valtype
7829         is wider than the functions return type.
7830
7831 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7832
7833         * cp-tree.h (CLASS_TYPE_P): New macro.
7834         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
7835         * pt.c (process_template_parm): Undo previous change.
7836
7837 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
7838
7839         * cp-tree.h: Declare.
7840         * pt.c (decl_template_parm_p): New function.
7841         * decl.c (pushdecl): Check decls for redeclaring template parms.
7842         (xref_tag): Make redeclaration an error, print decl.
7843         * decl2.c (grokfield): Check field_decls for redeclaration as well.
7844
7845 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7846
7847         * parse.y (primary): Fix up the type of string constants.
7848
7849 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7850
7851         * typeck.c (convert_for_initialization): Move check for odd uses
7852         of NULL to avoid duplicate warnings.
7853
7854 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7855
7856         * tree.c (lvalue_type): Fix for arrays.
7857         * typeck.c (string_conv_p): New fn.
7858         (convert_for_assignment): Use it.
7859         (build_unary_op): Use lvalue_type.
7860         * call.c (standard_conversion, convert_like): Use string_conv_p.
7861         (add_function_candidate): Use lvalue_type.
7862         * cvt.c (convert_to_reference): Likewise.
7863         * decl2.c (lang_decode_option): Ignore -traditional.
7864         * decl.c (init_decl_processing): flag_writable_strings inhibits
7865         flag_const_strings.
7866
7867 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
7868
7869         * lang-options.h (lang_options): Add fconst-strings to the list
7870         of valid options.
7871         * decl2.c (lang_f_options, lang_decode_option): Likewise.
7872
7873 1998-08-24  Nathan Sidwell  <nathan@acm.org>
7874
7875         * lex.c (real_yylex): Don't warn about long long constants if
7876         we're allowing long long.
7877
7878 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7879
7880         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
7881         accessing bindings directly.
7882
7883         * search.c (my_tree_cons): Reimplement.
7884
7885         * lang-specs.h: Remove __HONOR_STD.
7886         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
7887
7888 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
7889
7890         * decl.c (grokdeclarator): Complain about in-class initialization
7891         of aggregates and/or references.
7892         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
7893         TEMPLATE_TYPE_PARMs.
7894
7895         * decl2.c (grok_array_decl): Add comment.
7896         (mark_used): Don't instantiate an explicit instantiation.
7897         * friend.c (make_friend_class): Remove bogus comment.  Fix check
7898         for partial specializations.
7899         * pt.c (check_explicit_specialization): Don't
7900         SET_DECL_EXPLICIT_INSTANTIATION here.
7901         (mark_decl_instantiated): Or here.
7902         (do_decl_instantiation): Do it here, instead.  Add checks for
7903         duplicate explicit instantiations, etc.  Tidy.
7904         (do_type_instantiation): Likewise.
7905         (instantiate_decl): Improve comments.  Complain about explicit
7906         instantiations where no definition is available.
7907
7908         * cp-tree.h (ansi_null_node): Remove.
7909         * call.c (build_over_call): Warn about converting NULL to an
7910         arithmetic type.
7911         * cvt.c (build_expr_type_conversion): Likewise.  Use
7912         null_ptr_cst_p instead of expanding it inline.
7913         * decl.c (ansi_null_node): Remove.
7914         (init_decl_processing): Make null_node always have integral type.
7915         * except.c (build_throw): Warn about converting NULL to an
7916         arithmetic type.
7917         * lex.c (init_parse): Remove handling of ansi_null_node.
7918         * pt.c (type_unification_real): Don't convert NULL to void* type.
7919         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7920         (convert_for_assignment): Warn about converting NULL to an
7921         arithmetic type.
7922         (convert_for_initialization): Likewise.
7923
7924 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7925
7926         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7927         * pt.c (coerce_template_parms): Use no_linkage_check.
7928         * decl.c (grokvardecl): Likewise.
7929         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
7930
7931         * method.c (process_overload_item): Remove useless code.
7932
7933 1998-08-20  Per Bothner  <bothner@cygnus.com>
7934
7935         Handle new'ing of Java classes.
7936         * init.c (build_class_classref):  New function.
7937         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
7938         constructor does not return this;  don't need to exception-protect.
7939
7940         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
7941         * decl2.c (acceptable_java_type):  Handle template-derived types.
7942
7943 1998-08-20  Per Bothner  <bothner@cygnus.com>
7944
7945         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
7946
7947 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
7948
7949         * decl.c (duplicate_decls): Always merge the old and new patterns
7950         for templates, regardless of whether or not the new one has
7951         DECL_INITIAL.  Don't throw away specializations.  Merge
7952         DECL_SAVED_TREE.
7953         * pt.c (tsubst_decl): Use the right pattern when calculating the
7954         complete args for a new template instance.
7955         (do_decl_instantiation): Fix typo in comment.
7956         (regenerate_decl_from_template): Deal with tricky friend template
7957         case.
7958         (instantiate_decl): Likewise.
7959
7960 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
7961
7962         * init.c (build_builtin_delete_call): Add missing assemble_external
7963         call.
7964
7965 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7966
7967         * parse.y (notype_unqualified_id): Also accept ~A<int>.
7968
7969 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
7970
7971         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7972         arithmetic.
7973         * except.c (build_throw): Warn when NULL is thrown, even with
7974         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
7975         thrown expression.
7976
7977         * cp-tree.h (ansi_null_node): New variable.
7978         * decl.c (ansi_null_node): New variable.
7979         (init_decl_processing): Initialize its type.
7980         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
7981         for null_node in non-ANSI mode.
7982         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7983         place of null_node to avoid spurious errors.
7984
7985 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
7986
7987         * cp-tree.h (enter_scope_of): New function.
7988         * parse.y (complex_direct_notype_declarator): Use it.
7989         * semantics.c (enter_scope_of): New function.
7990
7991 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
7992
7993         * decl.c (grokparms): No, here.
7994
7995         * decl.c (grokdeclarator): Catch parm with pointer to array of
7996         unknown bound here...
7997         * method.c (process_overload_item): ...not here.
7998
7999         * gxxint.texi: Remove obsolete documentation of overloading code.
8000
8001         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
8002         * class.c (finish_struct_bits): Likewise.
8003
8004         * tree.c (lvalue_type): Fix for arrays.
8005         * typeck.c (build_unary_op): Use lvalue_type.
8006         * call.c (add_function_candidate): Likewise.
8007         * cvt.c (convert_to_reference): Likewise.
8008
8009         * decl2.c (lang_decode_option): Ignore -traditional.
8010
8011         * init.c (build_offset_ref): Don't mess with error_mark_node.
8012         * lex.c (do_scoped_id): Use cp_error.
8013
8014         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
8015
8016 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8017
8018         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
8019
8020 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
8021
8022         * cp-tree.h (set_identifier_local_value): Provide prototype.
8023
8024         * decl2.c (do_namespace_alias): Remove unused variables `binding'
8025         and `old'.
8026
8027 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
8028
8029         * Makefile.in: Rename BBISON to BISON so that it can be properly
8030         inherited from the parent makefile.
8031
8032 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8033
8034         * lang-options.h: Add -finit-priority.
8035         * decl2.c: Likewise.  Check flag_init_priority instead of
8036         USE_INIT_PRIORITY.
8037
8038         * decl2.c (setup_initp): New fn.
8039         (start_objects, finish_objects, do_ctors): Handle init_priority.
8040         (do_dtors, finish_file): Likewise.
8041
8042 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8043
8044         * pt.c (tsubst_copy): Hush warning.
8045
8046         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
8047
8048 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
8049
8050         * pt.c (print_template_context): Don't abort when instantiating a
8051         synthesized method.
8052
8053         * decl.c (grokdeclarator): Issue errors on namespace qualified
8054         declarators in parameter lists or in class scope.
8055
8056 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
8057
8058         * pt.c (check_explicit_specialization): Don't abort on bogus
8059         explicit instantiations.
8060
8061 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
8062
8063         * typeck.c (require_complete_type): Use complete_type_or_else.
8064         (complete_type_or_else): Always return NULL_TREE on failure, as
8065         documented.
8066
8067         * pt.c (tsubst_aggr_type): Prototype.
8068         (tsubst_decl): New function, split out from tsubst.  Set
8069         input_filename and lineno as appropriate.
8070         (pop_tinst_level): Restore the file and line number saved in
8071         push_tinst_level.
8072         (instantiate_class_template): Set input_filename and lineno as
8073         appropriate.
8074         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
8075         context for a TYPENAME_TYPE is complete.
8076
8077         * decl2.c (grokbitfield): Issue errors on bitfields declared with
8078         function type.
8079         (do_dtors): As in do_ctors, pretend to be a member of the same
8080         class as a static data member while generating a call to its
8081         destructor.
8082
8083         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
8084         conversions, even in complex virtual base class hierarchies.
8085
8086 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
8087
8088         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
8089         (TYPE_TEMPLATE_INFO): Likewise.
8090         (SET_TYPE_TEMPLATE_INFO): Likewise.
8091         (ENUM_TI_TEMPLATE): Likewise.
8092         (ENUM_TI_ARGS): Likewise.
8093         (lookup_nested_type_by_name): Remove.
8094         * decl.c (maybe_process_template_type_declaration): Handle enums.
8095         (start_enum): Don't check for primary-template enum declarations
8096         here.
8097         (finish_enum): Clean up, document.  Make sure template enum
8098         constants get the correct type.
8099         (build_enumerator): Copy initializers for template enumerations,
8100         too.
8101         (grok_enum_decls): Document.
8102         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
8103         better.  Build LOOKUP_EXPRs for local variables, even if they are
8104         TREE_PERMANENT.
8105         * pt.c (tsubst_enum): Remove field_chain parameter.
8106         (template_class_depth): Include the depth of surrounding function
8107         contexts.
8108         (push_template_decl): Check for primary-template enum declarations
8109         here.  Deal with enumeration templates.
8110         (lookup_template_class): Likewise.
8111         (for_each_template_parm): Likewise.
8112         (instantiate_class_template): Don't call tsubst_enum directly,
8113         call tsubst instead, to instantiate enums.  Deal with all
8114         field_chain issues here, not in tsubst_enum.
8115         (lookup_nested_type_by_name): Remove.
8116         (tsubst_aggr_type): Revise handling of enumeration types.
8117         (tsubst): Likewise.
8118         (tsubst_copy): Likewise.
8119         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
8120
8121 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
8122
8123         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
8124         uses template parameters.
8125         * method.c (build_template_parm_names): Use the full set of
8126         template arguments for tsubst'ing.
8127         (build_overload_identifier): Pass the full set of template
8128         arguments to build_template_parm_names, not just the
8129         innermost_args.
8130         * pt.c (TMPL_ARGS_DEPTH): Define using
8131         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
8132         (NUM_TMPL_ARGS): New macro.
8133         (add_outermost_template_args): Deal with the case where the outer
8134         args will be completely discarded.
8135         (coerce_template_parms): Use the full set of template arguments
8136         for tsubst'ing.  Simplify.  Add some asserts.  Improve
8137         error messages.
8138         (lookup_template_class): Pass the full set of template arguments
8139         to coerce_template_parms.
8140         (tsubst): Add assertion.
8141         (do_type_instantiation): Don't instantiate member template
8142         classes.
8143
8144         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
8145         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
8146
8147 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
8148
8149         * method.c (set_mangled_name_for_decl): Change return type to void.
8150
8151         * decl.c (lookup_name_real): A namespace-level decl takes priority
8152         over implicit typename.  Avoid doing the same lookup twice.
8153
8154         * search.c (dependent_base_p): New fn.
8155         (dfs_pushdecls, dfs_compress_decls): Use it.
8156
8157         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
8158         virtual functions if the type doesn't have any.
8159
8160 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
8161
8162         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
8163         uses template parameters.
8164
8165 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
8166
8167         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
8168         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
8169         * lex.c (do_identifier): Don't use a second argument, or a type,
8170         when building LOOKUP_EXPRs.
8171         (do_identifier): Likewise.
8172         (do_scoped_id): Likewise.
8173         * method.c (hack_identifier): Improve error message.
8174         * pt.c (lookup_template_function): Don't needlessly call
8175         copy_to_permanent or build_min.
8176         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
8177         necessary.
8178         (do_decl_instantiation): Improve error message.
8179         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
8180         (build_min): Copy the type to the permanent obstack, too.
8181
8182 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
8183
8184         * init.c (init_init_processing): Remove BI* handling.
8185         (build_builtin_call): Remove.
8186         (build_builtin_delete_call): New fn.
8187         (build_delete): Use it.
8188
8189 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
8190
8191         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
8192         (maybe_check_template_type): New function.
8193         * decl.c (maybe_process_template_type_declaration): New function,
8194         split out from pushtag  Call maybe_check_template_type.
8195         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
8196         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8197         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8198         * pt.c (template_class_depth_real): Generalization of ...
8199         (template_class_depth): Use it.
8200         (register_specialization): Use duplicate_decls for duplicate
8201         declarations of specializations.
8202         (maybe_check_template_type): New function.
8203         (push_template_decl_real): Fix comment.
8204         (convert_nontype_argument): Likewise.
8205         (lookup_template_class): Likewise.  Avoid an infinite loop on
8206         erroneous code.
8207         (tsubst_friend_function): Fix comment.
8208         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
8209         an IDENTIFIER_NODE.
8210         * semantics.c (begin_function_definition): Use
8211         reset_specialization to note that template headers don't apply
8212         directly to declarations after the opening curly for a function.
8213
8214 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
8215
8216         * decl.c (push_overloaded_decl): Use current_namespace instead of
8217         DECL_CONTEXT (decl) to determine where we go.
8218
8219         * decl.c (lookup_name_real): Fix typo.
8220
8221 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
8222
8223         * friend.c (is_friend): Be lenient with member functions to deal
8224         with nested friends.
8225
8226 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
8227
8228         * class.c (finish_struct_1): Convert integer_zero_node to
8229         ssizetype before passing it to set_rtti_entry.
8230         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
8231         of any size to a pointer.
8232
8233 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
8234
8235         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
8236         (build_template_decl_overload): Remove.
8237         (set_mangled_name_for_decl): New function.
8238         (innermost_args): Remove is_spec parameter.
8239         (most_specialized, most_specialized_class): Remove declarations.
8240         (lookup_template_class): Add entering_scope parameter.
8241         (maybe_process_partial_specialization): New function.
8242         (finish_template_decl): Likewise.
8243         (finish_template_type): Likewise.
8244         * class.c (finish_struct): Clean up processing of member template
8245         specializations.
8246         * decl.c (pushtag): Fix formatting.
8247         (lookup_tag): Improve handling of pseudo-global levels.
8248         (make_typename_type): Adjust call to lookup_template_class.
8249         (shadow_tag): Use maybe_process_partial_specialization.
8250         (xref_tag): Improve handling of member friends.
8251         (start_function): Call push_nested_class before
8252         push_template_decl.  Don't call push_template_decl for
8253         specializations.
8254         * decl2.c (grok_x_components): Don't call xref_tag for
8255         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
8256         (grokclassfn): Use set_mangled_name_for_decl.
8257         (arg_assoc_class): Adjust call to innermost_args.
8258         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
8259         * error.c (dump_function_name): Improve printing of template
8260         function names.
8261         * friend.c (is_friend): Don't compare types of decls to determine
8262         friendship, unless flag_guiding_decls.
8263         (make_friend_class): Partial specializations cannot be friends.
8264         (do_friend): Use set_mangled_name_for_decl.  Call
8265         push_template_decl_real instead of push_template_decl.
8266         * method.c (build_decl_overload_real): Remove prototype.  Give it
8267         external linkage.
8268         (build_overload_identififer): Adjust call to innermost_args.
8269         (build_template_decl_overload): Remove.
8270         (set_mangled_name_for_decl): New function.
8271         * parse.y (.finish_template_type): New non-terminal.
8272         (template_def): Use finish_template_decl.  Use template_extdef
8273         instead of extdef.
8274         (template_extdef, template_datadef): New non-terminals, containing
8275         only those rules for things which can be templates.
8276         (datadef): Tidy.
8277         (template_type, self_template_type): Use .finish_template_type.
8278         (named_class_head): Use maybe_process_partial_specialization.
8279         * pt.c (mangle_class_name_for_template): Remove context parameter.
8280         (get_class_bindings): Remove outer_args parameter.
8281         (complete_template_args): Remove.
8282         (add_outermost_template_args): New function.
8283         (register_specialization): Return the specialization.
8284         (unregister_specialization): New function.
8285         (tsubst_template_parms): Likewise.
8286         (most_specialized, most_specialized_class): Prototype here as
8287         static.
8288         (original_template): Rename to most_general_template.
8289         (tsubst_template_parms): New function.
8290         (set_mangled_name_for_template_decl): Likewise.
8291         (TMPL_ARGS_DEPTH): New macro.
8292         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
8293         (TMPL_ARGS_LEVEL): New macro.
8294         (SET_TMPL_ARGS_LEVEL): Likewise.
8295         (TMPL_ARG): Likewise.
8296         (SET_TMPL_ARG): Likewise.
8297         (TMPL_ARGS_DEPTH): Likewise.
8298         (finish_member_template_decl): Use finish_template_decl.
8299         (maybe_process_partial_specialization): New function, split out
8300         from tsubst.
8301         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
8302         (maybe_begin_member_template_processing): Use new macros.
8303         (is_member_template): Likewise.
8304         (is_member_template_class): Likewise.
8305         (add_to_template_args): Likewise.  Deal with multiple levels of
8306         args.
8307         (maybe_process_partial_specialization): New function.
8308         (retrieve_specialization): Add consistency check.
8309         (determine_specialization): Return full argument list.
8310         (check_explicit_specialization): Tweak friend handling.  Use full
8311         argument lists.  Simplify.
8312         (current_template_args): Use new macros.
8313         (push_template_decl_real): Change ill-named mainargs to specargs.
8314         Check that a partial specialization actually specializes at least
8315         one parameter.   Improve friend handling.  Modify for full
8316         template arguments.
8317         (classtype_mangled_name): Don't mangle the names of
8318         specializations.
8319         (lookup_template_class): Add entering_scope parameter.  Use it to
8320         avoid finding a template type when an instantiation is required.
8321         Simplify.  Use full template arguments.
8322         (tsubst_friend_function): Use unregister_specialization.  Use new
8323         macros.  Use full template arguments.
8324         (tsubst_friend_class): Substitute, using tsubst_template_parms,
8325         into the template parameters before passing them to
8326         redeclare_class_template.
8327         (instantiate_class_template): Simplify.  Use full template
8328         arguments.  Adjust calls to get_class_bindings.  Use
8329         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
8330         (innermost_args): Use new macros.
8331         (tsubst_aggr_type): New function, split out from tsubst.
8332         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
8333         conventions for lookup_template_class.  Refine handling of partial
8334         instantiations.   Remove calls to complete_template_args.
8335         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
8336         and set_mangled_name_for_template_decl.
8337         (tsubst_copy): Use tsubst_aggr_type.
8338         (instantiate_template): Use full template arguments.
8339         (more_specialized): Improve formatting.
8340         (more_specialized_class): Adjust calls to get_class_bindings.
8341         (get_bindings_real): Don't call complete_template_args.
8342         (most_specialized): Don't overwrite input; create a new list.
8343         (most_specialized_class): Use most_general_template.
8344         (regenerate_decl_from_template): Use unregister_specialization.
8345         Use full template arguments.
8346         (instantiate_decl): Use full template arguments.
8347         (set_mangled_name_for_template_decl): New function.
8348         * semantics.c (begin_class_definition): Use
8349         maybe_process_partial_specialization.
8350         (finish_member_class_template): New function.
8351         (finish_template_decl): Likewise.
8352         (finish_template_type): Likewise.
8353         (typeck.c): Don't crash after issuing a compiler_error.
8354         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
8355
8356 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
8357
8358         * typeck2.c (build_functional_cast): Handle default-initialization.
8359
8360         * call.c (build_over_call): Pass 1 to popclass.
8361
8362         * parse.y (direct_notype_declarator): Add precedence declaration
8363         to notype_unqualified_id case.
8364         * Makefile.in (EXPECT): Adjust.
8365
8366         * tree.c (ovl_member): Fix for single function in OVL.
8367
8368 1998-07-27  Dave Brolley  <brolley@cygnus.com>
8369
8370         * c-lex.c (yylex): Fix boundary conditions in character literal and
8371         string literal loops.
8372
8373 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
8374
8375         * decl.c (lookup_name_real): OK, do return the from_obj value
8376         unless got_object depends on template parms.
8377
8378         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8379
8380         * pt.c (coerce_template_parms): Also complain about local enums.
8381
8382         * cp-tree.h: Add prototype for set_identifier_local_value.
8383         * decl.c (set_identifier_local_value_with_scope): Make static,
8384         prototype.
8385         * search.c (covariant_return_p): Likewise.
8386         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8387
8388         * call.c (build_method_call): Only pull out the type of a destructor
8389         if it's a template type parm.
8390         * decl.c (lookup_name_real): Never return the from_obj value.
8391
8392 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8393
8394         * except.c (process_start_catch_block_old): Call start_decl_1 for
8395         catch parm.
8396         * decl.c (start_decl_1): Avoid duplicate error.
8397
8398         * init.c (expand_default_init): Only perform the initialization if
8399         it will do something.
8400
8401 1998-07-23  H.J. Lu  (hjl@gnu.org)
8402
8403         * parse.y (base_class): Check for invalid base class.
8404
8405 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8406
8407         * decl2.c (import_export_template): Fold in...
8408         (import_export_class): ...to here.  Handle dllimport/export.
8409
8410         * class.c (build_vtable): Pass at_eof to import_export_vtable.
8411         (prepare_fresh_vtable): Likewise.
8412         * decl2.c (import_export_class): Split out...
8413         (finish_prevtable_vardecl): From here.
8414         * class.c (finish_struct_1): Call import_export_class if at_eof.
8415
8416         * decl.c (start_function): #if 0 mysterious code I wrote and have
8417         forgotten why.
8418         * rtti.c (get_tinfo_fn): If this is for a class type, set
8419         DECL_CONTEXT.
8420
8421 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
8422
8423         * inc/exception: Change terminate and unexpected to ().
8424
8425         * parse.y (named_class_head_sans_basetype_defn): A
8426         named_class_head_sans_basetype followed by '{' or ':' is a defn.
8427
8428 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
8429
8430         * tree.c (canonical_type_variant): New fn to handle arrays.
8431         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8432         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
8433         * method.c (process_overload_item): Use build_overload_value for
8434         arrays.
8435
8436 1998-07-20  Dave Brolley  <brolley@cygnus.com>
8437
8438         * lex.c (mbchar.h): #include it.
8439         (GET_ENVIRONMENT): New macro.
8440         (init_parse): Set character set based on LANG environment variable.
8441         (real_yylex): Handle multibyte characters in character literals.
8442         (real_yylex): Handle multibyte characters in string literals.
8443
8444 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
8445
8446         * lex.c (do_identifier): Look for class value even if we don't
8447         have a global value.  Do implicit declaration if parsing is 2.
8448         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8449         lookup.
8450
8451 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
8452
8453         * decl.c (pushtag): Revert previous change.
8454         * pt.c (lookup_template_class): Don't put out debugging
8455         information for types that use template parameters.
8456
8457         * decl.c (pushtag): Don't put out debugging information for
8458         compiler-generated typedefs.
8459
8460         * error.c (dump_type_real): Don't crash when presented with
8461         intQI_type_node or the like.
8462
8463         * semantics.c (finish_translation_unit): Fix spelling error in
8464         comment.
8465
8466 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
8467
8468         * decl.c (lookup_name_real): Pull out single function here.
8469         (select_decl): Not here.
8470         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8471
8472         * decl.c (qualify_lookup): Tweak again.
8473
8474         * pt.c (lookup_template_class): Don't mess with the context of the
8475         instantiation.
8476         * decl2.c (current_decl_namespace): Remove special handling for
8477         templates.
8478
8479         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8480         a member template specialization.
8481
8482         * tree.c (ovl_member): Use decls_match to compare functions.
8483         * decl.c (decls_match): Check the context of a function.
8484
8485         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8486         in Koenig lookup support rules.
8487         * semantics.c (finish_call_expr): Handle the new cases.
8488
8489         * typeck.c (build_x_function_call): Handle overloaded methods.
8490
8491         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8492
8493 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8494
8495         * semantics.c (finish_object_call_expr): Revert previous change.
8496         * call.c (build_new_method_call): Likewise.  Instead, convert
8497         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8498
8499 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8500
8501         * decl.c (qualify_lookup): Handle templates.
8502
8503         * decl2.c (do_using_directive): Don't pass ancestor.
8504         * decl.c (push_using_directive): Calculate ancestor.
8505
8506         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8507         * decl.c (pushdecl): Move type shadowing handling from here...
8508         (duplicate_decls): ...to here.
8509         * decl.c (set_identifier_local_value_with_scope): New fn.
8510         (pushdecl): Use it.
8511         (set_identifier_local_value, lookup_type_current_level): New fns.
8512         * decl2.c (do_local_using_decl): Handle types and binding level
8513         stuff properly.
8514
8515         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8516         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8517         (lookup_namespace_name): Likewise.
8518         * typeck.c (build_unary_op): Not here anymore.
8519
8520         * decl2.c (do_class_using_decl): Make sure we get an identifier.
8521         * class.c (handle_using_decl): Ignore TYPE_DECLs.
8522
8523         * decl.c (qualify_lookup): New fn.
8524         (lookup_name_real): Use it.
8525
8526 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8527
8528         * decl2.c (add_using_namespace): When directly using a namespace
8529         that was indirect before, promote it.
8530
8531         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8532         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8533         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8534         * decl.c (select_decl): Replace two flag parameters by one.
8535         (unqualified_namespace_lookup): Likewise, pass flag.
8536         (lookup_flags): New function.
8537         (lookup_name_real): Compute flags, pass them.
8538         (lookup_namespace_name): Call with zero-flag.
8539         * decl2.c (ambiguous_decl): Add flag parameter, complain only
8540         according to flags.
8541         (lookup_using_namespace, qualified_lookup_using_namespace):
8542         Add flag parameter, pass them through.
8543         * lex.c (do_scoped_id): Call with zero-flag.
8544
8545 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8546
8547         * typeck.c (convert_for_assignment): Use comptypes.
8548
8549 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8550
8551         * semantics.c (finish_object_call_expr): Move test for the
8552         function called being a TYPE_DECL to ...
8553         * call.c (build_new_method_call): Here.
8554
8555 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8556
8557         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8558         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8559
8560         * lex.c (looking_for_typename): Don't initialize.
8561
8562         * decl2.c (ambiguous_decl): Clarify error message.
8563
8564         * decl.c (push_using_directive): Iterate over namespaces used
8565         indirectly.
8566
8567 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8568
8569         * decl2.c (add_using_namespace): Iterate over namespaces used
8570         indirectly.
8571
8572         * decl.c (lookup_name_real): Accept namespace aliases as locals.
8573         (cat_namespace_levels): Ignore aliases.
8574         (duplicate_decls): Ignore duplicate aliases.
8575         * decl2.c (do_namespace_alias): Process block level namespace
8576         aliases.  Store alias with pushdecl.  Remove odr errors.
8577         * parse.y (namespace_alias): New non-terminal.
8578         (extdef): Use it.
8579
8580 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8581
8582         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8583         Handle TEMPLATE_TYPE_PARM.
8584         (arg_assoc): Rewrite.
8585
8586         * pt.c (complete_template_args): Don't look at the context unless
8587         we have to.
8588
8589         * method.c (build_decl_overload_real): Fix namespace handling.
8590
8591         * typeck.c (build_unary_op): Extract a lone function from an
8592         OVERLOAD.
8593
8594         * call.c (build_scoped_method_call): Handle getting a namespace
8595         for basetype in a destructor call.
8596         (check_dtor_name): Handle enums.
8597
8598         * parse.y (using_directive): New nonterminal.
8599         (extdef, simple_stmt): Use it.
8600
8601 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8602
8603         * decl2.c (add_function): Move error message ...
8604         (arg_assoc_namespace): ... from here.
8605
8606 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8607
8608         * parse.y (namespace_qualifier): Fix multiple level handling.
8609         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
8610         (arg_assoc): Don't skip the first argument of a function.
8611
8612 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
8613
8614         * search.c (my_tree_cons): Clean up.
8615
8616 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8617
8618         * call.c (joust): Don't warn about "confusing" conversions to the
8619         same type.
8620
8621 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8622
8623         * class.c (push_nested_class): Complain about namespaces.
8624         * decl.c (start_decl): Enter the object's namespace.
8625         (cp_finish_decl): Leave it.
8626         (grokdeclarator): Likewise.
8627         * decl2.c (check_decl_namespace): New function.
8628         (finish_file): Call it.
8629         * parse.y (complex_direct_notype_declarator): Set complexity
8630         of namespace-qualified ids to -1, enter the namespace.
8631
8632         * method.c (build_template_decl_overload): Expect _DECL as first
8633         parameter.  Put context temporarily into current_namespace.
8634         * pt.c (check_explicit_specialization): Change caller.
8635         (tsubst): Likewise.
8636
8637         * init.c (build_offset_ref): Call mark_used and
8638         convert_from_reference for namespace members.
8639
8640 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8641
8642         * search.c (my_tree_cons): The bitfield is at index 2.
8643
8644 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
8645
8646         * lang-options.h: Format changed to work with new --help support
8647         in gcc/toplev.c
8648
8649 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8650
8651         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
8652         Do Koenig lookup in CALL_EXPR.
8653         (arg_assoc): Handle error_mark.
8654         * lex.c (is_global): New function.
8655         (do_identifier): Expect arguments for Koenig lookup.
8656         * parse.y (primary): Add rules for calls of unqualified function calls.
8657         (do_id): Change call of do_identifier.
8658         * pt.c (finish_stmt_expr): Likewise.
8659         * semantics.c (finish_id_expr): Likewise.
8660         (finish_call_expr): Add integer parameter to indicate
8661         argument-dependent lookup.
8662
8663         * decl.c (struct binding_level): New field using_directives.
8664         (push_using_decl): Not sorry anymore.
8665         (push_using_directive): New function.
8666         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
8667         (unqualified_namespace_lookup): New function, code from ...
8668         (lookup_name_real): ... here.
8669         * decl2.c (lookup_using_namespace): Pass using list instead of
8670         initial scope.
8671         (validate_nonmember_using_decl): New function.
8672         (do_nonmember_using_decl): New function.
8673         (do_toplevel_using_decl): Use them.
8674         (do_local_using_decl): New function.
8675         (do_using_directive): Support block-level directives.
8676         * parse.y (simple_stmt): Support using declarations and
8677         directives.
8678         (namespace_qualifier, namespace_using_decl): New non-terminals.
8679
8680         * xref.c (classname): New function.
8681         (GNU_xref_hier): Change class and base parameters to tree.
8682         * decl.c (xref_baseypes): Change caller.
8683         * friend.c (make_friend_class): Likewise.
8684
8685 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8686
8687         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
8688         comparison.
8689
8690         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
8691         template template parameter, record its use.
8692         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
8693         its template arguments if exists.
8694
8695         * pt.c (coerce_template_template_parms): New function equivalent
8696         to coerce_template_parms when IS_TMPL_PARM is true.
8697         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
8698         all callers changed.
8699
8700         (coerce_template_parms): Access ARGLIST properly when creating a
8701         new vector.  Only accept implicit TYPE_DECL as valid argument for
8702         a template template parameter when it is a base class of
8703         current_class_type.  Don't display error message when COMPLAIN is
8704         false.
8705
8706 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
8707
8708         * repo.c (get_base_filename): Use file_name_nondirectory.
8709         (open_repo_file): Likewise.
8710         * cp-tree.h (file_name_nondirectory): Add prototype.
8711
8712 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
8713
8714         * friend.c (do_friend): Pull the identifier out of declarator.
8715         Use cp_error and friends.
8716         * decl2.c (qualified_lookup_using_namespace): Fix call to
8717         purpose_member.
8718         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
8719         (grokvardecl): Use DECL_CLASS_SCOPE_P.
8720         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
8721         * class.c (warn_hidden): Fix for OVERLOAD.
8722         From grahams@rcp.co.uk:
8723         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
8724         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
8725
8726 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
8727
8728         * g++.1 (-traditional): Remove duplicated documentation.
8729
8730 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
8731
8732         * method.c (flush_repeats): Add nrepeats parameter.
8733         (issue_nrepeats): Likewise.
8734         (is_back_referenceable_type): New function.  Don't back-reference
8735         TEMPLATE_TYPE_PARMs as well as simple types like integers.
8736         (build_mangled_name_for_type): Likewise.
8737         (build_mangled_name_for_type_with_Gcode): Likewise.
8738         (lasttype): Remove.
8739         (nrepeats): Likewise.
8740         (Nrepeats): Likewise.
8741         (start_squangling): Don't clear the variables removed above.
8742         (end_squangling): Likewise.
8743         (flush_repeats): Tidy.  Use nrepeats parameter rather than
8744         Nrepeats global.
8745         (issue_nrepeats): Likewise, but with nrepeats global.  Use
8746         is_backreferenceable_type.
8747         (build_overload_nested_name): Tidy.  Add comment.  Use
8748         build_mangled_name_for_type.
8749         (build_underscore_int): Comment.
8750         (build_overload_scope_ref): Use build_mangled_name_for_type.
8751         (build_overload_int): Likewise.
8752         (build_template_template_parm_names): Tidy.
8753         (build_template_parm_names): Use build_mangled_name_for_type.
8754         (build_overload_identifier): Add comments.
8755         (build_mangled_name_for_type_with_Gcode): Split out from
8756         build_mangled_name.
8757         (build_mangled_name_for_type): Use it.
8758         (build_mangled_name): Rework to use build_mangled_name_for_type
8759         and to not use global nrepeats/Nrepeats.  Tidy.
8760         (process_modifiers): Tidy.
8761         (check_btype): Use is_backreferenceable_type.  Add comment.
8762         Rename `node' to `type'.
8763         (process_overload_item): Set numeric_output_need_bar here.
8764         Use build_mangled_name_for_type.  Tidy.
8765         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
8766         build_mangled_name_for_type.
8767
8768         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
8769         for TYPE_DECLs.
8770
8771 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
8772
8773         * cp-tree.h (warn_long_long): Define.
8774         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
8775         warning "ANSI C++ does not support `long long'".
8776         * decl2.c (warn_long_long): Define.
8777         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
8778
8779 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
8780
8781         * decl.c (xref_tag): Handle attributes between 'class' and name.
8782         * parse.y (aggr): Likewise.
8783         * semantics.c (finish_class_definition): Likewise.
8784         * Makefile.in (EXPECTED): Adjust.
8785
8786         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
8787         * decl2.c: Define them.
8788         (lang_decode_option): Handle them.
8789         * lang-options.h: Add -foptional-diags.
8790         * class.c (finish_struct): Don't complain about multiple meanings of
8791         name if -fno-optional-diags.
8792         * decl.c (pushdecl_class_level): Likewise.
8793         * lex.c (real_yylex): Check warn_multichar.
8794
8795 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
8796
8797         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
8798
8799         * tree.c (make_binfo): Fix length.
8800
8801 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
8802
8803         * decl2.c (lang_decode_option): Remove warn_template_debugging.
8804         * lang-options.h: Likewise.
8805
8806 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8807
8808         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
8809         (process_start_catch_block): Likewise for variables
8810         `false_label_rtx', `call_rtx' and `return_value_rtx'.
8811
8812 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
8813
8814         * tree.c (build_srcloc): Make sure we allocate this node on the
8815         permanent obstack.
8816
8817 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
8818
8819         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
8820         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
8821         (lang_specific_driver): Only add -lm automatically if need_math is
8822         nonzero.
8823
8824 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
8825
8826         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
8827
8828 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8829
8830         * Makefile.in (EXPR_H): New dependency variable.
8831         (decl2.o): Depend on $(EXPR_H).
8832         (typeck.o): Likewise.
8833         (init.o): Likewise.
8834         (expr.o): Likewise.
8835
8836 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
8837
8838         * decl.c (start_enum): Put local enums on permanent_obstack.
8839
8840 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
8841
8842         * cp-tree.h (c_get_alias_set): Declare.
8843         * decl.c (init_decl_processing): Set lang_get_alias_set.
8844
8845 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
8846
8847         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
8848         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
8849         flag for all function decls which are in the exception table.
8850         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
8851         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
8852         code is emitted for any referenced rtti function.
8853
8854 1998-06-25  Dave Brolley  <brolley@cygnus.com>
8855
8856         * lang-specs.h: Use new | syntax to eliminate
8857         string concatenation.
8858
8859 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
8860
8861         * cp-tree.h (CP_DECL_CONTEXT): New macro.
8862         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
8863         * method.c (build_overload_nested_name): Likewise.
8864         * sig.c (build_signature_pointer_or_reference_type): Don't set
8865         DECL_CONTEXT.
8866
8867 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8868
8869         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
8870         * cp-tree.h (FROB_CONTEXT): New macro.
8871         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
8872         * decl.c (namespace_binding): Replace NULL_TREE with
8873         global_namespace.
8874         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
8875         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
8876         Likewise.
8877         * decl.c (pushtag): Use FROB_CONTEXT.
8878         (pushdecl, make_typename_type, define_function, grokdeclarator):
8879         Likewise.
8880         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
8881         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
8882         Likewise.
8883         * decl2.c (decl_namespace): Return global_namespace if no context.
8884         * method.c (build_overload_nested_name): Expect null as context.
8885         * pt.c (mangle_class_name_for_template): Do nothing for null
8886         contexts.
8887         (lookup_template_class): Allow for null id_context.
8888
8889 1998-06-25  Richard Henderson  <rth@cygnus.com>
8890
8891         * method.c (emit_thunk): Set current_function_is_thunk for the
8892         ASM_OUTPUT_MI_THUNK case as well.
8893
8894 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8895
8896         * exception.cc (__cplus_type_matcher): Get a match_info pointer
8897         instead of an exception table entry as a parameter.
8898
8899 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8900
8901         * parse.y (function_try_block): Don't call start_catch_handler.
8902         * except.c (call_eh_info): Remove coerced field from declaration.
8903         (build_eh_type_type_ref): New function to create an address of a
8904         rtti function for the new style exception tables.
8905         (expand_start_catch_block): Split function, this contains the
8906         common part.
8907         (process_start_catch_block_old): New function to perform the rest
8908         of expand_start_catch_block under old style exceptions.
8909         (process_start_catch_block_old): New function to perform the rest
8910         of expand_start_catch_block under new style exceptions.
8911         (expand_end_catch_block): Only pop the false label off the stack under
8912         the old style of exceptions.
8913         * semantics.c (finish_try_block): Don't call start_catch_handler.
8914         * exception.cc (struct cp_eh_info): Add original_value field.
8915         (__cplus_type_matcher): Perform type matching on the original exception
8916         value, and if we have a match, set the current value.
8917         (__cp_push_exception): Set the original exception value.
8918
8919 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
8920
8921         * call.c (joust): Fix confusing conversion warning.
8922
8923         * call.c (build_op_delete_call): Add placement parm.  Check
8924         LOOKUP_SPECULATIVELY.
8925         * cp-tree.h, decl2.c, init.c: Adjust.
8926         * decl.c (finish_function): Use it.
8927
8928         * pt.c (tsubst): Diagnose creating void fields or variables.
8929
8930 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8931
8932         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8933
8934         * cp-tree.h (check_dtor_name): Add prototype.
8935
8936         * init.c (expand_member_init): Remove unused variables
8937         `ptr_type_node', `parm' and `rval'.
8938
8939         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8940         in call to fprintf.
8941         (lang_print_xnode): Likewise.
8942
8943         * typeck2.c (enum_name_string): Cast argument to sprintf to long
8944         and use %ld specifier.
8945
8946         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8947         specifier in call to fprintf.
8948         (GNU_xref_member): Cast argument to sprintf to int.
8949
8950 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
8951
8952         * typeck2.c (pop_init_level): Warn about implicit zero initialization
8953         of struct members.
8954
8955 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8956
8957         * cp-tree.h: Prototype function `check_java_method'.
8958
8959 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8960
8961         * class.c (finish_struct): Make conflicting use of id a pedwarn.
8962         * decl.c (pushdecl_class_level): Likewise.
8963
8964 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8965
8966         * pt.c (convert_nontype_argument): Issue an error when presented
8967         with an integer (real) constant that cannot be simplified to an
8968         INT_CST (REAL_CST).
8969
8970         * cp-tree.h (c_get_alias_set): Remove declaration added in
8971         1998-06-13 change that should never have been checked in.
8972
8973 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8974
8975         * typeck.c (build_binary_op_nodefault): Change % in format strings
8976         to %%.
8977
8978         * decl.c (grokvardecl): Don't build_static_name for decls that
8979         aren't at namespace scope.
8980
8981         * init.c (perform_member_init): Catch default-initialization of
8982         references.
8983
8984 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8985
8986         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8987
8988 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8989
8990         * method.c (hack_identifier): Complain about getting a namespace
8991         or class template.
8992         * typeck.c (decay_conversion): Remove check for namespaces.
8993         * typeck2.c (incomplete_type_error): Likewise.
8994         * parse.y (template_arg): Add PTYPENAME expansion.
8995
8996 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
8997
8998         * decl.c (grokvardecl): Don't build external assembler names for
8999         TYPENAMEs in other namespaces as there is no declarator.
9000         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
9001         info from DECL_CONTEXT if it is NULL.
9002
9003 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
9004
9005         * call.c (check_dtor_name): Split out.
9006         (build_scoped_method_call): Use it.
9007         (build_method_call): Use it.
9008         * init.c (build_offset_ref): Use it.
9009
9010         * typeck.c (build_static_cast): Fix handling of pointers to members.
9011
9012         * decl.c (finish_function): Just return nothing from a constructor.
9013         * typeck.c (c_expand_return): Complain about returning a void
9014         expression from a destructor.
9015
9016 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
9017
9018         * class.c (alter_access): Accept a BINFO explaining how to get
9019         from the entity whose accessed is being altered to the type doing
9020         the altering.
9021         (handle_using_decl): New function containing code split out from ...
9022         (finish_struct_1): Here.
9023
9024         * cp-tree.h (complete_type_or_else): Declare.
9025         * init.c (build_new_1, build_delete): Use it.
9026         * typeck.c (require_complete_type): Use complete_type, rather than
9027         expanding it inline.
9028         (complete_type_or_else): New function.
9029         (build_component_ref): Use it.
9030         (pointer_int_sum): Make sure the type pointed to is complete.
9031         (pointer_diff): Likewise.
9032
9033         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
9034         types.
9035
9036         * search.c (get_matching_virtual): Note that member templates
9037         cannot override virtual functions.
9038
9039 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
9040
9041         * pt.c (check_explicit_specialization): If DECLARATOR turned into
9042         an error_mark_node from lookup_template_function, return the same.
9043         (determine_specialization): Also make sure TEMPLATE_ID isn't an
9044         error_mark_node, before we try to read its operands.
9045         * decl.c (grokdeclarator): If we got an error_mark_node from
9046         check_explicit_specialization, just return it right back.
9047
9048 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
9049
9050         * class.c (instantiate_type): Don't treat template-ids that don't
9051         specify any template arguments as equivalent to ordinary
9052         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
9053         pointer-to-members for member templates.  Tidy slightly.
9054         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
9055         * init.c (build_offset_ref): Handle template-ids like ordinary
9056         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
9057         offset part of the OFFSET_REF.
9058         * typeck.c (build_unary_op): Change check for unknown types to
9059         look for OFFSET_REFs, not SCOPE_REFs.
9060
9061 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
9062
9063         * pt.c (is_member_template_class): New function.
9064         (push_template_decl_real): Use it.
9065
9066 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
9067
9068         * friend.c (do_friend): Add support for nested classes using
9069         member functions of the enclosing class as friends.
9070
9071 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
9072
9073         * call.c (convert_default_arg): Make global, not static.
9074         (convert_arg_for_ellipsis): Split out from ...
9075         (build_over_call): Here.
9076         * cp-tree.h (convert_default_arg); Declare.
9077         (convert_arg_to_ellipsis): Likewise.
9078         (do_member_init): Remove.
9079         * init.c (do_member_init): Remove; this code is dead.
9080         (expand_member_init): Remove much of this code; it is dead.
9081         * typeck.c (convert_arguments): Use convert_default_arg and
9082         convert_arg_for_ellipsis, rather than duplicating here.
9083
9084         * call.c (convert_like): Don't fail silently if
9085         build_user_type_conversion fails.  Always return error_mark_node
9086         for failure.
9087
9088 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9089
9090         * search.c (covariant_return_p): Complain about ambiguous base.
9091
9092         * typeck.c (build_component_ref): Diagnose ref to nested type.
9093
9094 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9095
9096         * decl.c (grokparms): Check that INIT isn't an error_mark_node
9097         before giving error about invalid type for default arg.
9098
9099 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9100
9101         * call.c (build_method_call): Fix thinko.
9102
9103 1998-06-10  Dave Brolley  <brolley@cygnus.com>
9104
9105         * decl2.c (lang_decode_option): New argc/argv interface.
9106         * cp-tree.h (lang_decode_option): New argc/argv interface.
9107         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
9108         specified for cpplib-enabled compilers.
9109         * lex.c (lang_init): Don't check_newline for cpplib.
9110         (init_parse): Don't initialize cpplib here.
9111
9112 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9113
9114         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
9115         piece before checking DECL_MUTABLE_P.
9116
9117 1998-06-10  John Carr  <jfc@mit.edu>
9118
9119         * tree.c (debug_binfo): Make printf format match arguments.
9120
9121         * error.c (OB_PUTI): Make printf format match arguments.
9122
9123 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9124
9125         * init.c (perform_member_init): Handle default-initialization.
9126
9127         * except.c (build_throw): Handle throwing NULL.
9128
9129         * typeck.c (build_x_function_call): Use resolve_offset_ref.
9130
9131         * search.c (compute_access): Only strip an anonymous union
9132         for a FIELD_DECL.
9133
9134         * call.c (add_builtin_candidates): Tweak.
9135
9136         * cvt.c (build_expr_type_conversion): Restore code for conversion
9137         from class types.
9138         * decl2.c (delete_sanity): Use it.  Clean up.
9139
9140         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
9141
9142 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
9143
9144         * typeck.c (c_expand_return): Don't warn about void expressions on
9145         return statements in functions returning void.
9146
9147 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
9148
9149         * pt.c (fn_type_unification): Revise documentation.  Tidy.
9150         (type_unification): Likewise.
9151
9152 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
9153
9154         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
9155         expand_end_catch.
9156         * parse.y (function_try_block): Rename expand_start_catch, and delete
9157         expand_end_catch.
9158         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
9159         expand_end_catch.
9160
9161 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
9162
9163         * search.c (lookup_member): New fn.
9164         * class.c (finish_struct_1): Use it.
9165         * decl.c (lookup_name_real): Use it.
9166
9167 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9168
9169         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
9170
9171         * cp-tree.h: Add prototype for `maybe_print_template_context' and
9172         `maybe_make_one_only'.
9173
9174         * decl.c (auto_function): Remove unused variable `decl'.
9175
9176         * decl2.c: Include dwarf2out.h and dwarfout.h.
9177
9178         * lex.c: Remove redundant declarations of `set_float_handler' and
9179         `asm_out_file'.
9180
9181 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
9182
9183         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
9184         time flag.  Call __cp_eh_info instead of __cp_exception_info.
9185         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
9186         (__cp_exception_info): Return offset into cp_eh_info structure to
9187         match what use to be the start of this structure.
9188         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
9189         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
9190         compile time flag.
9191         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
9192         __cp_eh_info instead of __cp_exception_info.
9193
9194 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
9195
9196         * decl.c (cp_finish_decl): Disable inlining of extern inlines
9197         with static variables.
9198
9199 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
9200
9201         * init.c (build_offset_ref): Correct previous change to use build,
9202         not build_min.
9203
9204 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
9205
9206         * class.c (instantiate_type): Handle pointer-to-members where the
9207         member is a template.
9208         * init.c (build_offset_ref): Likewise.
9209         * typeck.c (build_unary_op): Likewise.
9210
9211 1998-06-07  Richard Henderson  <rth@cygnus.com>
9212
9213         * lex.c (lang_init_options): New function.
9214         (lang_init): Remove flag_exceptions == 2 hack.
9215
9216 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9217
9218         * search.c (envelope_add_decl): Tweak for implicit typename.
9219
9220         * call.c (joust): Also warn about confusing conversion op/constructor
9221         overload resolution.
9222
9223         * spew.c (yylex): Also return the TYPE_DECL if got_object.
9224         Don't clear got_object after '~'.
9225         * call.c (build_scoped_method_call): Tweak destructor handling.
9226         (build_method_call): Likewise.
9227         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
9228         TYPE_MAIN_VARIANT for destructors.
9229         * semantics.c (finish_object_call_expr): Complain about calling a
9230         TYPE_DECL.
9231
9232 1998-06-05  Per Bothner  <bothner@cygnus.com>
9233
9234         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
9235         Define - update needed by gcc.c change.
9236
9237 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9238
9239         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
9240
9241 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9242
9243         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
9244         * decl.c (lookup_name_real): Add namespaces_only parameter.
9245         If set, return only NAMESPACE_DECLs.
9246         (select_decl): Likewise.
9247         (identifier_type_value): Give additional parameter.
9248         (lookup_name_nonclass): Likewise.
9249         (lookup_name): Likewise.
9250         (find_binding): Skip namespace aliases.
9251         (binding_for_name): Likewise.
9252         (push_namespace): Check for namespace aliases.
9253         (lookup_name_namespace_only): New function.
9254         (begin_only_namespace_names, end_only_namespace_names): New functions.
9255         * decl2.c (set_decl_namespace): Skip namespace aliases.
9256         (do_using_directive): Likewise.
9257         (do_namespace_alias): Produce namespace aliases, fix alias
9258         redeclaration.
9259         * error.c (dump_decl): Support SCOPE_REF.
9260         * parse.y (extdef): Wrap lookup with namespace_only for namespace
9261         aliases and using declarations.
9262
9263 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
9264
9265         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
9266
9267         * error.c (dump_expr): Clean up NEW_EXPR case.
9268
9269 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9270
9271         Suggested by Brendan Kehoe
9272         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
9273         treat it as using ::decl.
9274
9275         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
9276
9277         * tree.c (mapcar): Support NEW_EXPR.
9278
9279         * error.c (dump_expr): Support NEW_EXPR.
9280
9281 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
9282
9283         * method.c (make_thunk): Use overload machinery to make name.
9284         * search.c (covariant_return_p): New fn.
9285         (get_matching_virtual): Use it.
9286
9287         * init.c (build_new_1): Fix check for void.
9288
9289 1998-06-01  Per Bothner  <bothner@cygnus.com>
9290
9291         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
9292         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
9293         java_int_type_node, java_long_type_node, java_float_type_node,
9294         java_double_type_node, java_char_type_node, java_boolean_type_node):
9295         New "primitive" types, with predefined names __java_byte etc.
9296         (record_builtin_java_type):  New function.
9297         (init_decl_processing):  Make Java types with record_builtin_java_type.
9298         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
9299         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
9300         (grokfndecl):  Call check_java_method for Java classes.
9301         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
9302         (process_overload_item):  Match types against specific
9303         java_XX_type_node types, rather than using is_java_type.
9304         * class.c (finish_struct_1):  Don't add default copy constructor
9305         or operator= if TYPE_FOR_JAVA.
9306         (pop_lang_conext):  Restore strict_prototyp proper if Java.
9307         * decl2.c (acceptable_java_type, check_java_method):  New functions.
9308         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
9309         (tsubst):  Move common statement after if statement.
9310         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
9311
9312 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
9313
9314         * pt.c (for_each_template_parm): Use first_rtl_op.
9315
9316         * tree.c (build_cplus_array_type_1): Also check index_type for
9317         template parms.
9318
9319 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
9320
9321         * pt.c (tsubst): Always copy BINFO_BASETYPES.
9322
9323 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
9324
9325         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
9326         TYPE_SIZE_UNIT too.
9327
9328 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
9329
9330         * decl.c (grokdeclarator): Don't complain about in-class
9331         initialization of static consts if we don't really know the type
9332         of the variable.
9333
9334 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
9335
9336         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
9337         * method.c (build_destructor_name): New fn.
9338         * decl2.c (maybe_retrofit_in_chrg): Split out...
9339         (grokclassfn): From here.  Reorganize.
9340         * decl.c (grok_ctor_properties): Make sure ctors for types with
9341         vbases have the in_chrg parm.
9342         * pt.c (instantiate_class_template): Update
9343         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
9344         grok_*_properties.
9345         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
9346
9347 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
9348
9349         * pt.c (instantiate_decl): Make test for whether or not static
9350         variables should be instantiated early match its comment.
9351
9352 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
9353
9354         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
9355         a member.
9356         (start_function): Call check_default_args.
9357         * decl2.c (grokfield): Don't call check_default_args.
9358         (check_default_args): Use cp_error_at.
9359         * lex.c (do_pending_defargs): Call check_default_args.
9360
9361 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
9362
9363         * call.c (build_method_call): Make sure get_type_value returns
9364         something before we try to use its TYPE_MAIN_VARIANT.
9365         (build_scoped_method_call): Likewise.
9366
9367 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
9368
9369         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9370         initialize an array.
9371
9372         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9373         DECL_VIRTUAL_P.
9374
9375         * friend.c (do_friend): Clarify template warning.
9376
9377 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
9378
9379         * decl.c (shadow_label): Don't treat decls as identifiers.
9380         (maybe_push_to_top_level): Clear shadowed_labels.
9381
9382         * pt.c (instantiate_decl): Reset lineno and filename after calling
9383         regenerate_decl_from_template.
9384
9385         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9386         error_mark_node.
9387
9388 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
9389
9390         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9391
9392 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9393
9394         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9395         (convert_nontype_argument): Handle cases when nontype template
9396         parameters become classes after substitution.
9397
9398 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9399
9400         * friend.c (is_friend): Use comptypes, rather than == to compare
9401         types.  Modify for new representation of template friends.
9402         (make_friend_class): Likewise.
9403         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
9404         (instantiate_class_template): Deal with template friends.
9405
9406         * decl.c (store_parm_decls): Remove redundant call to
9407         expand_main_function.
9408
9409 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9410
9411         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9412         DECL_USE_TEMPLATE.
9413
9414 1998-05-26  Per Bothner  <bothner@cygnus.com>
9415
9416         * language_as_string:  Handle lang_java.
9417
9418 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
9419
9420         * decl.c (pushdecl): Don't copy the type_decl.
9421
9422 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9423
9424         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9425         current_class_type.
9426         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9427
9428         * parse.y (complex_direct_notype_declarator): Use $1 to access
9429         scope of notype_qualified_id.
9430
9431 1998-05-26  Dave Brolley  <brolley@cygnus.com>
9432
9433         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9434         (init_parse): Initialize cpplib interface.
9435
9436         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9437         empty continuation.
9438
9439 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9440
9441         * decl.c (pushtag): Avoid crashing on erroneous input.
9442
9443 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9444
9445         * decl.c (push_namespace): Only produce one unique name for
9446         anonymous namespaces.
9447         (get_unique_name): Remove.
9448
9449 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
9450
9451         * call.c (tourney): Don't do any extra comparisons.
9452
9453         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9454
9455         * cp-tree.h (processing_template_parmlist): Declare.
9456         * decl.c (pushtag): Don't call push_template_decl when we
9457         shouldn't.
9458         * pt.c (processing_template_parmlist): New variable.
9459         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9460         (complete_template_args): Use it.
9461         (add_to_template_args): Likewise.
9462         (innermost_args): Likewise.
9463         (tsubst): Likewise.
9464         (begin_template_parm_list): Use processing_template_parmlist.
9465         (end_template_parm_list): Likewise.
9466
9467         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9468         * decl.c (grokdeclarator): Use it.
9469         * decl2.c (grok_x_components): Likewise.
9470         * init.c (initializing_context): Likewise.
9471         * method.c (do_build_copy_constructor): Likewise.
9472         (do_build_assign_ref): Likewise.
9473         * search.c (compute_access): Likewise.
9474         * typeck.c (build_component_ref): Likewise.
9475
9476         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9477         unnamed type a typedef name "for linkage purposes".
9478
9479         * pt.c (lookup_template_class): Don't look at
9480         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9481
9482         * method.c (build_overload_int): Handle error cases gracefully.
9483
9484         * pt.c (instantiate_decl): Handle static member variables
9485         correctly.
9486
9487         * pt.c (tsubst): Use the tsubst'd type when producing new
9488         TEMPLATE_PARM_INDEX nodes.
9489
9490 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
9491
9492         * tree.c (cp_tree_equal): Handle pointers to member functions.
9493
9494         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
9495         sure the type of the REF_BIND is a reference type.
9496         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9497         target_type for clarity.
9498
9499         * parse.y (xcond): Move call to condition_conversion ...
9500         * semantics.c (finish_for_cond): Here.
9501         * parse.c: Regenerated.
9502
9503 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
9504
9505         * decl.c (push_namespace): Namespaces have type void.
9506         * typeck2.c (incomplete_type_error): Complain about namespace
9507         used as expression.
9508         * typeck.c (decay_conversion): Likewise.
9509
9510 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9511
9512         * error.c (dump_expr): Support namespaces.
9513
9514 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
9515
9516         * cp-tree.def: Add SRCLOC.
9517         * cp-tree.h: Add struct tree_srcloc and accessor macros.
9518         * tree.c (build_srcloc, build_srcloc_here): New fns.
9519         * pt.c (add_pending_template): Use build_srcloc_here.
9520         (push_tinst_level): Update last_template_error_tick before erroring.
9521         (instantiate_decl): Restore lineno and input_filename before
9522         calling add_pending_template.
9523         * decl2.c (finish_file): Set up lineno and input_filename for
9524         pending templates.
9525
9526 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9527
9528         * decl.c (lang_print_error_function): New fn.
9529         (init_decl_processing): Set print_error_function to use it.
9530         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9531
9532         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9533         ICS_BAD_FLAG.
9534
9535         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9536         copy-initialization.
9537
9538         * class.c (build_vtable_entry): Use int_fits_type_p.
9539         (build_vtable): Pass a signed offset to build_vtable_entry.
9540         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9541         set_rtti_entry): Likewise.
9542
9543 1998-05-22  Per Bothner  <bothner@cygnus.com>
9544
9545         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
9546         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
9547
9548 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9549
9550         * pt.c (print_template_context): Use fprintf instead of cp_error.
9551
9552         * pt.c (determine_specialization): Just return an error_mark_node.
9553         Also print the decl we want in error messages.  If we complain,
9554         return error_mark_node.
9555         (tsubst_friend_function): Set lineno and input_filename so
9556         error messages will be useful.
9557         (instantiate_template): Just return an error_mark_node.
9558         (check_explicit_specialization): Don't mess with a returned
9559         error_mark_node.
9560
9561         * pt.c (print_template_context): Add new argument.
9562         (maybe_print_template_context): New fn.
9563         (push_tinst_level): Increment tinst_level_tick.
9564         (pop_tinst_level): Likewise.
9565         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
9566         xrealloc instead of xmalloc.
9567
9568         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9569
9570 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9571
9572         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9573         if the template we looked up is the same as the one we already
9574         have.
9575
9576 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
9577
9578         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9579         (cpp_reader,parse_in): Add for cpplib.
9580         (check_newline): Call handle_sysv_pragma with new interface.
9581         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9582
9583         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9584         (sub_getch): Call GETC for cpplib.
9585
9586         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9587         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9588
9589         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9590
9591 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9592
9593         * decl2.c (maybe_make_one_only): New fn.
9594         (import_export_vtable): Use it.
9595         (import_export_decl): Likewise.
9596         * pt.c (mark_decl_instantiated): Likewise.
9597
9598 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
9599
9600         * decl2.c (find_representative_member): Rename to ...
9601         (build_anon_union_vars): New function.
9602         (finish_anon_union): Fix stupidity of previous change.
9603
9604 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9605
9606         * decl.c (grokfndecl): Handle definition of specialization in
9607         friend declaration.
9608
9609         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
9610
9611 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9612
9613         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
9614         to look for type declarations.
9615         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
9616         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
9617         (finish_member_class_template): Declare.
9618         * decl.c (pushtag): Put member class templates on the
9619         CLASSTYPE_TAGS list, just as for ordinary member classes.
9620         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
9621         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
9622         IDENTIFIER_NAMESPACE_VALUEs.
9623         * parse.y (component_decl): Move code to ...
9624         * semantics.c (finish_member_class_template): New function.
9625         Don't put member class templates on the list of components for a
9626         class.
9627         * parse.c: Regenerated.
9628         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
9629         In fact, don't use DECL_CONTEXT at all here.
9630
9631 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9632
9633         * decl.c (record_unknown_type): New function.
9634         (init_decl_processing): Call it for the unknown and global type
9635         nodes.
9636
9637 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9638
9639         * decl2.c (find_representative_member): New function.
9640         (finish_anon_union): Use it.
9641
9642         * cp-tree.h (MAIN_NAME_P): New macro.
9643         (DECL_MAIN_P): Likwise.
9644         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
9645         (grokfndecl): Use the new macros.
9646         (grokdeclarator): Likewise.
9647         (start_function): Likewise.
9648         (store_parm_decls): Likewise.
9649         (finsh_function): Likewise.
9650         * friend.c (do_friend): Likewise.
9651         * typeck.c (build_function_call_real): Likewise.
9652         (build_unary_op): Likewise.
9653
9654 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
9655
9656         * decl2.c (start_objects, finish_objects, do_dtors,
9657         do_ctors): Split out from...
9658         (finish_file): ...here.
9659
9660 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
9661
9662         * tree.c (is_overloaded_fn): Don't abort on placeholders from
9663         push_class_decls.
9664
9665 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
9666
9667         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
9668
9669         * error.c (dump_expr): Handle an ARROW_EXPR.
9670
9671 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
9672
9673         * decl.c (saveable_obstack): Declare.
9674         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
9675         declare, if necessary.
9676
9677 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
9678
9679         * call.c (compare_qual): Remove.
9680         (is_subseq): Tweak.
9681         (is_properly_derived_from): New function.
9682         (maybe_handle_ref_bind): Likewise.
9683         (maybe_handle_implicit_object): Likewise.
9684         (compare_ics): Modify substantially to bring into conformance with
9685         the standard.
9686         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
9687         (comp_cv_qualification): Declare.
9688         (comp_cv_qual_signature): Likewise.
9689         * typeck.c (comp_cv_qualification): Likewise.
9690         (comp_cv_qual_signature): Likewise.
9691
9692 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9693
9694         * Makefile.in (parse.o): Depend on toplev.h.
9695
9696         * class.c (typecode_p): Remove prototype and definition.
9697
9698         * cp-tree.h (currently_open_class, is_empty_class, member_p):
9699         Add prototype.
9700
9701         * decl.c (push_overloaded_decl_top_level): Remove prototype and
9702         definition.
9703
9704         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
9705         in call to `cp_thing'.
9706         (cp_warning): Likewise for function pointer `warning'.
9707
9708         * except.c (do_function_call): Remove prototype and definition.
9709         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
9710
9711         * method.c (is_java_type): Add prototype and make it static.
9712
9713         * parse.y: Include toplev.h.
9714
9715         * pt.c (type_unification): Remove unused variable `arg'.
9716         (instantiate_decl): Likewise for `save_ti'.
9717
9718         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
9719
9720 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
9721
9722         * init.c (build_member_call): Handle template_ids.
9723         * parse.y (primary): Add global_scope template_id.
9724
9725 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
9726
9727         * decl2.c (get_sentry): Use end_temporary_allocation.
9728         Don't declare permanent_obstack.
9729
9730 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
9731
9732         * parse.y (.finish_new_placement): New non-terminal.
9733         (unary_expr, new_type_id): Use it.
9734         * parse.c: Regenerated.
9735
9736 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
9737
9738         * pt.c (redeclare_class_template): Say where the original definition
9739         of the template-parameter's default argument appeared.
9740
9741 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
9742
9743         * call.c (build_over_call): Tweak empty class handling.
9744
9745         * decl.c (make_typename_type): Use currently_open_class.
9746
9747         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
9748
9749 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9750
9751         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
9752         for a type unless it is one.
9753
9754         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
9755
9756 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
9757
9758         * Makefile.in (program_transform_name, objdir): Define.
9759
9760         * Makefile.in (BISON): Use bison from the build tree if it exists.
9761         (FLEX): Likewise.
9762
9763 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9764
9765         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
9766
9767         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
9768
9769 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
9770
9771         * call.c (build_scoped_method_call): Likewise.
9772
9773 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
9774
9775         * init.c (build_new_1): Call suspend_momentary around the creation
9776         of values that must be saved for exception handling.
9777         * parse.y (.build_new_placement): New non-terminal.
9778         (unary_expr, new_placement): Use it.
9779         * parse.c: Regenerated.
9780
9781 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
9782
9783         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
9784         old and new types.
9785
9786         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
9787         canonical type.
9788
9789         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
9790
9791 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
9792
9793         * decl.c (start_decl): Revert problem change.
9794
9795         * Makefile.in (CONFLICTS): Fix.
9796
9797 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9798
9799         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
9800
9801 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
9802
9803         * class.c (finish_struct_1): Use BINFO_SIZE.
9804
9805         * decl.c (start_decl): Use 'tem'.
9806
9807 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
9808
9809         * exception.cc: Include eh-common.h.
9810         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
9811         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
9812         (__cp_push_exception): Initialize eh_info struct as well.
9813         * except.c: Remove local structs and include eh-common.h.
9814         (init_exception_processing): Set language and version codes.
9815         (call_eh_info): Add presence of eh_info to runtime description of
9816         struct cp_eh_info.
9817         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
9818         * semantics.c (finish_try_block): Call start_catch_block() and
9819         end_catch_block().
9820         * parse.y (function_try_block): Call start_catch_block() and
9821         end_catch_block().
9822
9823 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
9824
9825         * typeck.c (original_type): New function.
9826         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
9827         to see if they're actually the same.
9828         * cp-tree.h (original_type): Declare.
9829
9830 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9831
9832         * Makefile.in (lex.o): Depend on output.h.
9833
9834         * call.c (add_function_candidate): Remove unused variable `cand'.
9835         (add_conv_candidate): Likewise.
9836         (build_builtin_candidate): Likewise.
9837
9838         * cp-tree.h: Add prototype for `types_overlap_p'.
9839
9840         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
9841
9842         * decl2.c (merge_functions): Remove unused variables `tmp' and
9843         `tempn'.
9844
9845         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
9846         (code_as_string): Likewise.
9847         (language_as_string): Likewise.
9848         (parm_as_string): Likewise.
9849         (op_as_string): Likewise.
9850         (assop_as_string): Likewise.
9851         (cv_as_string): Likewise.
9852
9853         * lex.c: Include output.h.
9854
9855         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
9856
9857         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
9858         ATTRIBUTE_UNUSED.
9859
9860         * tinfo.cc (__class_type_info::dcast): Change the type of variable
9861         `i' from int to size_t.
9862
9863         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
9864         ATTRIBUTE_UNUSED.
9865
9866 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
9867
9868         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
9869         DECL_NAMESPACE_SCOPE_P.
9870         (lang_decl_name): Likewise.
9871         * pt.c (tsubst_friend_function, tsubst): Likewise.
9872         * decl.c (pushdecl, redeclaration_error_message, start_decl,
9873         cp_finish_decl, start_function): Likewise.
9874         * class.c (finish_struct_1): Likewise.
9875         * call.c (build_over_call): Likewise.
9876         (compare_ics): Use DERIVED_FROM_P.
9877
9878 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
9879
9880         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
9881         * method.c (build_mangled_name): Use it.
9882         (build_decl_overload_real): Likewise.
9883
9884         * error.c (dump_simple_decl): New function, broken out from ...
9885         (dump_decl): Use it.
9886
9887 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
9888
9889         * ptree.c (lang_print_xnode): Add missing `break'.
9890
9891         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
9892
9893         * call.c (add_template_candidate): Adjust for changes to
9894         fn_type_unification.
9895         (add_template_candidate_real): Likewise.
9896         (add_template_conv_candidate): Likewise.
9897         (build_user_type_conversion_1): Likewise.
9898         (build_new_function_call): Likewise.
9899         (build_object_call): Likewise.
9900         (build_new_op): Likewise.
9901         (build_new_method_call): Likewise.
9902         * class.c (instantiate_type): Likewise.
9903         * cp-tree.h (unification_kind_t): New type.
9904         (fn_type_unification): Adjust prototype.
9905         (type_unificaiton): Likewise.
9906         * pt.c (UNIFY_ALLOW_NONE): New macro.
9907         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
9908         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
9909         (UNIFY_ALLOW_DERIVED): Likewise.
9910         (unify): Change prototype.
9911         (maybe_adjust_types_for_deduction): New function.
9912         (check_cv_quals_for_unify): Likewise.
9913         (determine_specialization): Adjust.
9914         (fn_type_unification): Likewise.
9915         (type_unification): Likewise.
9916         (type_unification_real): Likewise.  Use
9917         maybe_adjust_types_for_deduction.  Fix mishandling of
9918         back-unification of template functions passed as arguments.  Pass
9919         appropriate combination of UNIFY_ALLOW_* to unify.
9920         (unify): Remove unused NTPARMS parameter.  Use
9921         check_cv_quals_for_unify.  Remove bogus code that allowed
9922         too-generous unification in order to adhere more closely to standard.
9923         (get_bindings_real): Adjust.
9924         (get_class_bindings): Likewise.
9925
9926         * method.c (build_overload_identifier): Only use the innermost
9927         template arguments when mangling.
9928         * pt.c (tsubst_template_argument_vector): New function.
9929         (complete_template_args): Deal with the situation where the
9930         extra_args contain more than one level of arguments.
9931         (lookup_template_class): Deal with member template classes, which
9932         may have more than one level of arguments.
9933         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9934         Improve handling of member template classes.  Use
9935         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
9936         tsubst_template_argument_vector where appropriate.
9937         (regenerate_decl_from_template): Break out from ...
9938         (instantiate_decl): Here.
9939
9940         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9941         * parse.h: Regenerated.
9942         * parse.c: Really regenerated.
9943
9944         * cp-tree.h (finish_unary_op_expr): New function.
9945         (finish_id_expr): Likewise.
9946         (begin_new_placement): Likewise.
9947         (finish_new_placement): Likewise.
9948         (finish_declarator): Likewise.
9949         (finish_translation_unit): Likewise.
9950         (finish_parmlist): Likewise.
9951         (begin_class_definition): Likewise.
9952         (finish_class_definition): Likewise.
9953         (finish_default_args): Likewise.
9954         (finish_inline_definitions): Likewise.
9955         * parse.y (GCC_ASM_KEYWORD): Remove.
9956         (TYPENAME_ELLIPSIS): Likewise.
9957         * parse.c: Regenerated.
9958         Use new functions in semantics.c in the actions for many rules.
9959         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9960         * hash.h: Regenerated.
9961         * semantics.c (finish_expr_stmt): Allow NULL expr.
9962         (finish_unary_op_expr): New function, containing
9963         code previously in parse.y.
9964         (finish_id_expr): Likewise.
9965         (begin_new_placement): Likewise.
9966         (finish_new_placement): Likewise.
9967         (finish_declarator): Likewise.
9968         (finish_translation_unit): Likewise.
9969         (finish_parmlist): Likewise.
9970         (begin_class_definition): Likewise.
9971         (finish_class_definition): Likewise.
9972         (finish_default_args): Likewise.
9973         (finish_inline_definitions): Likewise.
9974
9975 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
9976
9977         * typeck.c (build_c_cast): Don't decay arrays and functions to
9978         pointer type when converting to a class type.
9979
9980 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
9981
9982         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9983         (DECL_CLASS_SCOPE_P): Likewise.
9984
9985 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
9986
9987         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9988         * decl2.c (constructor_name_full): Likewise.
9989
9990 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
9991
9992         * tree.c (mapcar): Add OVERLOAD support.
9993
9994         * init.c (resolve_offset_ref): We must use basetype_path before we
9995         destroy it with a call to convert_pointer_to.
9996
9997 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
9998
9999         * class.c (currently_open_class): New fn.
10000         * decl.c (lookup_name_real): Use it.
10001         * search.c (lookup_field): Likewise.
10002
10003 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10004
10005         * cp-tree.def (OVERLOAD): New node.
10006         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
10007         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
10008         (NAMESPACE_BINDING): Remove.
10009         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
10010         namespace_binding.
10011         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
10012         Define.
10013         (tree_overload): New struct.
10014         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
10015         (REAL_IDENTIFIER_TYPE_VALUE): Define.
10016         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
10017         (lang_decl_flags): Remove in_namespace.
10018         (lang_decl): Remove chain.
10019         (DECL_CHAIN, DECL_NAMESPACE): Remove.
10020         (flag_honor_std): Declare extern.
10021         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
10022         namespace_binding, set_namespace_binding,
10023         lookup_function_nonclass, cat_namespace_levels,
10024         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
10025         scratch_ovl_cons, ovl_member, build_overload): Declare.
10026         (decl_list_length, get_namespace_id, current_namespace_id,
10027         overloaded_globals_p): Remove.
10028         (lookup_using_namespace, qualified_lookup_using_namespace): Change
10029         return type.
10030         (push_scratch_obstack): New macro.
10031         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
10032         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
10033         convs, fns.
10034         (build_new_function_call): Iterate using OVL_CHAIN.
10035         Print DECL_NAME in when reporting ambiguities.
10036         (build_object_call): Iterate using OVL_NEXT for fns, convs.
10037         (build_new_op): Call lookup_function_nonclass.
10038         Iterate using OVL_NEXT.
10039         (build_op_delete_call): Change detection of members.
10040         Do not wrap TREE_LIST around fields and single global functions.
10041         (build_over_call): Don't push a class level if the context is a
10042         namespace.
10043         (build_new_method_call): Iterate using OVL_NEXT.
10044         * class.c (add_method): Chain overloaded members using
10045         build_overload.  Remove copying of method.
10046         (grow_method): When iterating through the obstack, expect OVERLOAD
10047         nodes.  Chain overload members.
10048         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
10049         nodes in call to get_baselinks.
10050         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
10051         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
10052         fdecls that are OVERLOAD nodes.
10053         (validate_lhs): New function.
10054         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
10055         code.  Use DECL_NAME in error messages.  Split code between global
10056         and member function processing.
10057         * decl.c (global_type_node): New static variable.
10058         (in_std): New global.
10059         (struct binding_level): New field usings.
10060         (resume_binding_level): Assert that we are not in a class.
10061         (toplevel_bindings_p): Just check for namespace_p or
10062         pseudo_global.
10063         (resume_level): Remove.
10064         (find_binding): New function.
10065         (binding_for_name): Call it.
10066         (namespace_binding, set_namespace_binding): New functions.
10067         (push_namespace): Associate binding level with new namespace,
10068         resume_binding_level for existing namespace.  Remove old code.
10069         Fake std by counting.
10070         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
10071         (maybe_push_to_top_level): Save current namespace.
10072         (pop_from_top_level): Restore saved namespace.
10073         (pop_namespace): Call suspend_binding_level.  Remove old code.
10074         (cat_namespace_levels): New function.
10075         (set_identifier_type_value_with_scope): For namespace bindings,
10076         set BINDING_TYPE, and use global_type_node.
10077         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
10078         (identifier_type_value): New function.
10079         (pushtag): If no context, use current_namespace.
10080         (duplicate_decls): Don't process DECL_CHAIN.
10081         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
10082         already set.  Never reset it to NULL_TREE.  Lookup global variables
10083         in their namespace.  Push overloaded templates if they are on
10084         namespace level.
10085         (pushdecl_namespace_level): New function.
10086         (pushdecl_top_level): Implement using pushdecl_namespace_level.
10087         (pushdecl_using_decl): New function.
10088         (overloaded_globals_p): Remove.
10089         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
10090         them.  Use namespace_binding and set_namespace_value.
10091         (redeclaration_error_message): Complain if the declarations come
10092         from different namespaces.
10093         (lookup_tag): On namespace level, look in the BINDING_TYPE.
10094         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
10095         old code.
10096         (select_decl): New function.
10097         (lookup_name_real): Call it for qualified and unqualified lookup.
10098         Pass tree_bindings from the stack.
10099         If prefer_type is 1, also accept namespaces.
10100         (lookup_function_nonclass): New function.
10101         (init_decl_processing): Set the binding level of the global
10102         namespace to global_binding_level.
10103         Build a proper type list for __builtin_apply.
10104         Initialize std_node to "fake std" if flag_honor_std is set.
10105         Initialize global_type_node.
10106         Allocated bad_alloc in namespace std if flag_honor_std.
10107         (define_function): Set the DECL_CONTEXT to the current_namespace.
10108         (start_decl): A namespace is not considered as a context here.  If
10109         the DECL_CONTEXT is a namespace, push the decl.
10110         (cp_finish_decl): Check for namespaces used as initializers.
10111         (grokfndecl): Add namespace parameter.  Remove processing of
10112         DECL_CHAIN.
10113         (grokvardecl): Add namespace parameter.
10114         (grokdeclarator): Process SCOPEs that are namespaces.  For
10115         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
10116         (start_function): Check for contexts that are namespaces.
10117         Set context for declarations that have not been pushed.
10118         (store_parm_decls): Check for ::main only.
10119         (finish_function): Likewise.
10120         (start_method): Check for contexts that are namespaces.
10121         (start_method): Remove DECL_CHAIN processing.
10122         * decl2.c (flag_honor_std): Declare.
10123         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
10124         (decl_namespace_list): New static global.
10125         (grok_x_components): Ignore namespaces as type contexts.
10126         (check_classfn): Expect OVERLOAD nodes.
10127         (grokfield): Remove DECL_CHAIN processing.
10128         (finish_file): Call cat_namespace_levels.
10129         (merge_functions): New function.
10130         (ambiguous_decl): Rewrite.
10131         (lookup_using_namespace): Produce tree_bindings.
10132         (qualified_lookup_using_namespace): Likewise.
10133         (set_decl_namespace, decl_namespace, current_decl_namespace,
10134         push_decl_namespace, pop_decl_namespace): New functions.
10135         (arg_lookup): New struct.
10136         (add_function, arg_assoc_namespace, arg_assoc_class,
10137         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
10138         New functions.
10139         (get_namespace_id, current_namespace_id): Remove.
10140         (do_toplevel_using_decl): Rewrite.
10141         (do_class_using_decl): Complain about namespace qualifiers.
10142         (do_using_directive): Sorry if not on namespace level.  Complain
10143         about unknown namespaces.
10144         * error.c (dump_aggr_type): Check for namespace contexts.
10145         * except.c (init_exception_processing): Push terminate into std.
10146         * friend.c (is_friend): A namespace is not a context, here.
10147         * init.c (expand_member_init): Remove DECL_CHAIN processing.
10148         (build_offset_ref): Process OVERLOAD nodes.
10149         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
10150         * lex.c (identifier_type): Loop using OVL_CHAIN.
10151         (see_typename): Set looking_for_typename to 2.
10152         (real_yylex): Likewise.
10153         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
10154         (do_scoped_id): Expect OVERLOAD nodes.
10155         Change calling convention for qualified_lookup_using_namespace.
10156         (build_lang_decl): Don't set in_namespace anymore.
10157         * method.c (typevec_size): New global.
10158         (build_overload_nested_name): Return if global_namespace.
10159         Otherwise, always expect a declaration context.
10160         (build_qualified_name): Likewise.
10161         Make sure we don't write beyond typevec_size.
10162         (build_decl_overload_real): Likewise.
10163         Allocate one extra slot for the namespace.
10164         (hack_identifier): Mark code dead.
10165         Process OVERLOAD and NAMESPACE_DECL nodes.
10166         * parse.y (program): Pop namespaces until in global namespace.
10167         (extdef): In a using-declaration, don't discard the identifier if
10168         there is no declaration.
10169         (left_curly): Ignore type contexts which are namespaces.
10170         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
10171         used as scope.
10172         * pt.c (template_class_depth): Expect types to be namespaces.
10173         (determine_specialization): Simplify by expecting OVERLOAD nodes.
10174         (push_template_decl): Push into namespace level.
10175         Reset ctx if it is a namespace.
10176         Set DECL_CONTEXT to current_namespace if not set already.
10177         Ignore real contexts that are namespaces.
10178         (mangle_class_name_for_template): Skip global_namespace.
10179         Mangle other namespaces as declarations.
10180         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
10181         (lookup_template_class): Push into namespace of context.
10182         If the context is a namespace, set it to global_namespace.
10183         Use id_context for mangling.
10184         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
10185         (tsubst_friend_function): Ignore namespace contexts.
10186         Push into namespace level.
10187         (tsubst): Handle NAMESPACE_DECL nodes.
10188         Remove DECL_CHAIN processing.
10189         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
10190         * ptree.c (print_lang_identifier): Print bindings.
10191         (lang_print_xnode): Print OVERLOAD nodes.
10192         * rtti.c (init_rtti_processing): Push type_info into std.
10193         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
10194         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
10195         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
10196         lookup_fnfields_here): Likewise.
10197         Process all nodes, instead of going through TREE_CHAIN.
10198         * sig.c (build_signature_pointer_or_reference_type): Set context
10199         to global_namespace.
10200         (build_signature_table_constructor): Expect OVERLOAD nodes.
10201         * spew.c (yylex): Save old setting of looking_for_typename.
10202         * tree.c (decl_list_length): Remove.
10203         (binding_init): New function.
10204         (count_functions): Rewrite.
10205         (is_overloaded_fn): Expect OVERLOAD nodes.
10206         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
10207         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
10208         ovl_member): New functions.
10209         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
10210         (type_unknown_p): Likewise.
10211         (require_instantiated_type): Likewise.
10212         (build_component_ref): Declare code dead.
10213         (build_x_function_call): Create and expect OVERLOAD nodes.
10214         (build_function_call_real): Check for ::main only.
10215         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
10216         (convert_for_assignment): Check for TREE_LIST before accessing
10217         TREE_VALUE.
10218         * decl.c (duplicate_decls): Check for namespace bindings instead
10219         of global bindings.
10220         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
10221         lookup_name_current_level, start_decl, xref_tag,
10222         finish_enum): Likewise.
10223         * init.c (build_offset_ref): Likewise.
10224         * search.c (lookup_field): Likewise.
10225         (lookup_fnfields): Likewise.
10226         (dfs_debug_mark): Likewise.
10227         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
10228         (poplevel_class, pop_from_top_level): Likewise.
10229         * decl2.c (finish_method): Likewise.
10230         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
10231         * decl.c (record_builtin_type): Likewise.
10232         (init_decl_processing, grokfndecl): Likewise.
10233         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
10234         (make_lang_type): Likewise.
10235         * parse.y (make_thunk): Likewise.
10236         * pt.c (tsubst): Likewise.
10237         * tree.c (debug_binfo): Likewise.
10238         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
10239         tinfo2.cc, inc/new.h: Add std qualifications.
10240         * inc/new: Wrap with namespace std if __HONOR_STD.
10241         * inc/typeinfo: Likewise.
10242
10243 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
10244
10245         * call.c (build_user_type_conversion_1): Handle second_conv
10246         properly for templates.
10247
10248 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
10249
10250         * method.c (build_decl_overload_real): Set TREE_USED flag to
10251         zero for build_type_variants nodes as well.
10252
10253 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
10254
10255         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
10256
10257 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
10258
10259         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
10260         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
10261         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
10262         xref.o): Add toplev.h dependencies.
10263
10264 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
10265
10266         * errfn.c (cp_error, cp_warning): Remove declarations for
10267         error and warning respectively.
10268
10269 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10270
10271         * error.c: Convert to using ctype macros defined in system.h.
10272         * method.c: Likewise.
10273         * xref.c: Likewise.
10274         * lex.c: Likewise.  Also remove redundant system header stuff.
10275
10276 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
10277
10278         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
10279         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
10280         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
10281         xref.c: Add include of toplev.h.
10282
10283 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
10284
10285         * tree.c (perm_manip): Also regenerate the RTL of an extern.
10286         (copy_to_permanent): Use end_temporary_allocation.
10287
10288 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
10289
10290         * init.c (expand_vec_init): The initialization of each array
10291         element is a full-expression.
10292
10293 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
10294
10295         * method.c (build_mangled_name): Add a call to build_type_variant
10296         to get the right type.
10297
10298 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
10299
10300         * Makefile.in: Add .SUFFIXES.
10301
10302         * cp-tree.def: Remove NAMESPACE_DECL.
10303
10304 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
10305
10306         * call.c (build_over_call): Do evaluate arg even if it has empty
10307         class type.
10308         * decl.c (start_function): Don't push a member function.
10309
10310 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
10311
10312         * Makefile.in (g++FAQ.info): Put -o option before input file.
10313
10314 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
10315
10316         * gxxint.texi: Add info for squangling codes K and B.
10317
10318 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
10319
10320         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
10321         the expression in templates.
10322         (finish_stmt_expr): Likewise.
10323
10324 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
10325
10326         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
10327
10328 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
10329
10330         * decl.c (maybe_push_to_top_level): Always clear
10331         current_template_parms and processing_template_decl.
10332         (pushtag): Remove check of current_class_type and some comments,
10333         since maybe_push_to_top_level no longer creates confusion.
10334
10335 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
10336
10337         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
10338         (DECL_CLASS_TEMPLATE_P): Likewise.
10339         (DECL_PRIMARY_TEMPLATE): Likewise.
10340         (PRIMARY_TEMPLATE_P): Use it.
10341         (push_template_decl_real): New function.
10342         (redeclare_class_template): Take new template parameters as
10343         input.
10344         (is_specialization_of): New function.
10345         (comp_template_args): Declare.
10346         * decl.c (pushtag): Handle friend template classes.
10347         (xref_tag): Likewise.  Use new calling convention for
10348         redeclare_class_template.
10349         * decl2.c (grok_x_components): Handle friend templates.
10350         * friend.c (is_friend): Use is_specialization_of where
10351         appropriate.  Deal with friend class templates.
10352         (make_friend_class): Let a class template be friends with itself.
10353         * pt.c (comp_template_args): Remove declaration.
10354         (tsubst_friend_class): New function.
10355         (push_template_decl_real): New function.
10356         (push_template_decl): Use it.
10357         (redeclare_class_template): Adjust for new calling convention.
10358         (comp_template_args): Give it external linkage.
10359         (instantiate_class_type): Use tsubst_friend_class to deal
10360         with friend templates.
10361         * typeck.c (comptypes): Use comp_template_args, rather than
10362         expanding it inline.
10363         * parse.y (component_decl): Handle a nested template type
10364         like other component type declarations.
10365
10366         * pt.c (check_explicit_specialization): Handle overloaded
10367         constructors correctly.
10368
10369         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10370         (lookup_template_class): Use it.
10371
10372 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10373
10374         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
10375         * cp-tree.h: Add WRAPPER support.
10376         * call.c (add_candidate): Split out from add_*_candidate fns.
10377         (build_over_call): Take the candidate instead of function and args.
10378         Enforce access control here.  Emit overload warnings here.
10379         (add_warning): New fn.
10380         (joust): Add WARN parm.  If not set, call add_warning instead of
10381         printing a warning.  Re-enable some warnings.
10382         (tourney): Pass it.
10383         (convert_like): Adjust.
10384         (build_new_op): Adjust.
10385         (build_new_function_call): Adjust.
10386         (build_user_type_conversion_1): Adjust.
10387         (USER_CONV_FN): Adjust.
10388         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10389         build_int_wrapper): New fns.
10390
10391 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
10392
10393         * pt.c (unify): Fix typo in previous change.
10394
10395 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10396
10397         * error.c (dump_type_real): Declare canonical_name.
10398
10399         * typeck.c (comp_target_types): Fix PMFs.
10400
10401 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
10402
10403         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10404         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10405         TEMPLATE_DECL.
10406
10407         * pt.c (tsubst): Decrease the template-level of
10408         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
10409         TEMPLATE_PARM_INDEX.
10410         (template_decl_level): New function.
10411         (unify): Make sure to record unifications for template
10412         parameters, even when the parameters exactly match the arguments.
10413         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10414         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
10415         aren't from the level we're currently working on.
10416
10417 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
10418
10419         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10420
10421         * decl2.c (check_member_template): Set DECL_IGNORED for member
10422         class templates, too.
10423
10424         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10425
10426 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10427
10428         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10429
10430 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
10431
10432         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10433         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10434         (init_decl_processing): Handle TI types.
10435         * typeck.c (unsigned_type, signed_type): Handle TI types.
10436
10437 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
10438
10439         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10440         New local added_libraries.  Increment count when add library to
10441         arglist.
10442
10443 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
10444
10445         * cp-tree.h (type_as_string_real): New function.
10446         * pt.c (mangle_class_name_for_template): Use it.
10447         * error.c (dump_aggr_type): Change prototype.
10448         (dump_type_prefix): Likewise.
10449         (dump_type_suffix): Likewise.
10450         (dump_type_real): Convert from dump_type.  If desired, the
10451         "canonica" name of a typedef, i.e., the name of the underlying
10452         type, can be printed.
10453         (dump_type): Call dump_type_real.
10454
10455 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
10456
10457         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10458
10459         * typeck.c (comp_target_types): Tweak pedantic case.
10460         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
10461         Return -1 or 1 instead of 1 or 2.
10462         (compparms): Remove STRICT handling.
10463         (convert_for_assignment): Fix handling of pmfs.
10464
10465 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
10466
10467         * typeck.c (comp_target_types): Handle references like pointers.
10468         (comp_target_parms): Note that return code from comp_target_types
10469         can be negative to indicate failure.
10470
10471 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10472
10473         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10474         which requires a working target compiler to build.
10475
10476 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
10477
10478         * tree.c (avoid_overlap): Add prototype.
10479
10480         * spew.c (num_tokens): Add prototype.
10481         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10482
10483         * search.c (dfs_check_overlap): Add prototype.
10484         (dfs_no_overlap_yet): Likewise.
10485
10486         * pt.c (original_template): Add prototype.
10487         (inline_needs_template_parms): Likewise.
10488         (push_inline_template_parms_recursive): Likewise.
10489         (retrieve_specialization, register_specialization): Likewise.
10490         (print_candidates, reduce_template_parm_level): Likewise.
10491         (build_template_decl, mark_template_parm): Likewise.
10492         (tsubst_friend_function, get_bindings_real): Likewise.
10493
10494         * method.c (start_squangling): Add prototype.
10495         (end_squangling, check_ktype, issue_ktype): Likewise.
10496         (build_overloaded_scope_ref, check_btype): Likewise.
10497         (build_mangled_template_parm_index): Likewise.
10498
10499         * lex.c (init_cpp_parse): Add prototype.
10500         (handle_cp_pragma, handle_sysv_pragma): Likewise.
10501         (reduce_cmp, token_cmp): Likewise.
10502
10503         * except.c (call_eh_info): Add prototype.
10504         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10505         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10506
10507         * decl2.c (is_namespace_ancestor): Add prototype.
10508         (namespace_ancestor, add_using_namespace): Likewise.
10509         (ambiguous_decl): Likewise.
10510
10511         * decl.c (indent): Add prototype.
10512
10513         * call.c (add_template_candidate_real): Add prototype.
10514
10515 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
10516
10517         * decl2.c (build_expr_from_tree): Just return a PMF.
10518
10519 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
10520
10521         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10522         when doing initializations.
10523
10524         * pt.c (unify): Use comptypes to compare type args.
10525
10526 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
10527
10528         * decl.c (duplicate_decls): Fix check for when it's safe to free
10529         the new decl.
10530
10531         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10532         to type_as_string.
10533
10534 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
10535
10536         * pt.c (build_template_parm_index): Add prototype.
10537
10538         * search.c (my_tree_cons): Don't clear words outside the
10539         newly allocated node.
10540
10541 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
10542
10543         * lex.c (init_parse): Now returns char* containing the filename.
10544
10545 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
10546                           Jeff Law   <law@cygnus.com>
10547
10548         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10549         than a pointer.
10550
10551 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10552
10553         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10554
10555 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10556
10557         * decl.c (duplicate_decls): Don't warn for redundant decls if
10558         friend: let add_friend take care of it.
10559
10560 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10561
10562         * sig.c (build_signature_pointer_constructor): Don't set
10563         TREE_HAS_CONSTRUCTOR for a signature pointer.
10564         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10565         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10566         here, too.
10567         * typeck.c (build_unary_op): Only allow taking the address of a
10568         real constructor.
10569         * typeck2.c (digest_init): Simplify.
10570         (store_init_value): Don't pedwarn about using { } for pmfs.
10571
10572 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
10573
10574         * cp-tree.h (start_decl):  Update prototype.
10575         * decl.c (start_decl):  Like the C version, new parameters
10576         for the attributes.  Call cplus_decl_attributes here,
10577         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
10578         (grokdeclarator):  Pass NULL for new start_decl arguments.
10579         * pt.c (tsubst_expr):  Likewise.
10580         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
10581         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10582         * lex.c (build_lang_decl): Add lang_name_java.
10583         * class.c (push_lang_context): Add lang_name_java.
10584         * method.c (build_mangled_name): Check for is_java_type.
10585
10586 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10587
10588         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10589         * call.c (build_scoped_method_call): Check for TREE_CODE for
10590         VOID_TYPE instead of type ==  void_type_node.
10591         (build_method_call): Likewise.
10592         * decl.c (lookup_name_real): Likewise.
10593         (grokdeclarator): Likewise.
10594         (start_decl): Likewise.
10595         (grokparms): Likewise.
10596         (start_function): Likewise.
10597         (finish_function): Likewise.
10598         (start_method): Likewise.
10599
10600 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
10601
10602         * lex.c (finput): New variable.
10603         (init_cpp_parse):  Renamed from init_parse.
10604         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
10605         (finish_parse): New function.
10606         * cp-tree.h (init_lex, init_parse): Remove declarations.
10607
10608 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10609
10610         * call.c (build_call): Still evaluate the actual argument.
10611         * class.c (is_empty_class): Update for -fnew-abi.
10612
10613         * decl2.c: -fnew-abi implies -fsquangle.
10614
10615         * method.c (do_build_assign_ref): Don't do anything to copy
10616         an empty class.
10617         (do_build_copy_constructor): Likewise.
10618         * call.c (build_over_call): Likewise.
10619
10620 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10621
10622         * tree.c (avoid_overlap): Return a value.
10623
10624 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
10625
10626         * method.c (check_btype): Add missing argument to xrealloc.
10627         (check_ktype): Likewise.
10628
10629 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10630
10631         Implement empty base optimization.
10632         * class.c (finish_struct_1): Add vbase fields earlier.  Set
10633         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
10634         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
10635         (types_overlap_p): New fn.
10636         * tree.c (avoid_overlap): New fn.
10637         (build_base_fields): Use it to avoid overlapping empty bases.
10638         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
10639
10640         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
10641
10642         Re-implement allocation of base class subobjects.
10643         * tree.c (unshare_base_binfos): New fn.
10644         (layout_basetypes): Use it.  Now handles offsets of both virtual and
10645         non-virtual bases, after layout_type.
10646         (layout_vbasetypes): Remove.
10647         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
10648         (build_vbase_pointer_fields): Split out from old layout_basetypes.
10649         * class.c (finish_base_struct): Lose offset handling code.
10650         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
10651         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
10652         * cp-tree.h: Adjust.
10653
10654 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
10655
10656         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
10657         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
10658         * class.c (duplicate_tag_error): Likewise.
10659         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
10660         * tree.c (layout_vbasetypes): Update from layout_record, remove
10661         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
10662         (layout_basetypes): Likewise.
10663
10664 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
10665
10666         * class.c, Make sure system.h is included just after config.h.
10667         Delete lingering stdio and errno references too.
10668         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
10669
10670 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
10671
10672         * friend.c (is_friend): Fix access control for local classes.
10673
10674         * class.c (is_empty_class): New fn.
10675         * call.c (build_call): Don't pass empty class objects to a function.
10676
10677 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
10678
10679         * call.c (build_over_call): Do name resolution for default
10680         arguments of function templates in the scope of the templates.
10681
10682 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
10683
10684         * call.c: Include system.h.  Remove includes, declarations and
10685         defines provided by system.h.
10686         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
10687         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
10688         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
10689         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
10690         * typeck2.c, xref.c: Likewise.
10691         * Makefile.in: Dependencies updated as appropriate.
10692         * Make-lang.in: Likewise.
10693
10694 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
10695
10696         * pt.c (fn_type_unification): Allow incomplete unification without
10697         an immediate error message.
10698
10699 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10700
10701         * tree.c (member_p): New fn.
10702         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
10703         initializing class members.
10704
10705         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
10706         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
10707
10708         * call.c (build_method_call): Handle non-scoped destructors, too.
10709         * pt.c (tsubst_copy): Likewise.
10710
10711         * pt.c (print_template_context): Split out...
10712         (push_tinst_level): ...from here.
10713
10714         * friend.c (is_friend): Don't pass a type to decl_function_context.
10715
10716         * typeck.c (convert_for_initialization): Always hand off
10717         conversions to class type.
10718
10719 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10720
10721         * friend.c (is_friend): Local classes have the same access as the
10722         enclosing function.
10723
10724 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
10725
10726         * typeck.c (expand_target_expr): Delete dead function.
10727
10728         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
10729
10730         * repo.c (save_string): Delete dead function.
10731
10732         * method.c (thunk_printable_name): Delete dead function.
10733
10734         * lex.c (yynextch): Delete dead function.
10735
10736         * expr.c (tree_extract_aggr_init): #if 0 out.
10737
10738         * except.c (do_unwind): Delete dead function.
10739         (easy_expand_asm): Likewise.
10740
10741         * cvt.c (build_conversion_type_1): Delete dead function.
10742
10743         * cp-tree.h (push_expression_obstack): Declare.
10744
10745         * call.c (source_type): #if 0 out.
10746
10747         * class.c (alter_access): Remove unused label.  Add braces
10748         around empty else clause.
10749
10750         * lex.c (yyprint): Fix argument to printf.
10751
10752 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
10753
10754         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
10755
10756         * pt.c (instantiate_class_template): Make sure template
10757         arguments are permanent.
10758         * init.c (resolve_offset_ref): Don't go looking around in
10759         template types.
10760
10761         * semantics.c: Add routines to handle expressions, and some
10762         declaration processing.
10763         * parse.y: Use them.
10764         (current_class_depth): Move declaration to cp-tree.h.
10765         * parse.c: Regenerated.
10766         * cp-tree.h: Use them.
10767         (current_class_depth): Declare.
10768         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
10769
10770 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
10771
10772         * error.c (dump_decl): Be a bit more explicit with template
10773         type arguments, when verbose.
10774
10775 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
10776
10777         * inc/exception: Reorder closing braces.
10778
10779 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
10780
10781         * pt.c (redeclare_class_template): New function.
10782         * cp_tree.h (redeclare_class_template): Declare it.
10783         * decl.c (xref_tag): Use it.
10784
10785 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
10786
10787         * call.c (build_over_call): Check IS_AGGR_TYPE, not
10788         TYPE_LANG_SPECIFIC.
10789         * typeck.c (convert_arguments): Likewise.
10790
10791         * decl.c (grokdeclarator): Remove const and volatile from type after
10792         setting constp and volatilep.
10793
10794         * class.c (finish_struct_1): Don't warn about bool bitfield larger
10795         than one bit.
10796
10797 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
10798
10799         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
10800
10801 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
10802
10803         * call.c (build_object_call): Complain about ambiguous operator(),
10804         rather that crashing.
10805         (build_new_op): Likewise.
10806         (build_op_delete_call): Likewise.
10807
10808 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
10809
10810         * cvt.c (perform_qualification_conversions): Use comp_target_types
10811         instead of comp_ptr_ttypes.
10812
10813 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
10814
10815         * cp-tree.h (enforce_access): Declare.
10816         * call.c (enforce_access): Make it extern, not static.
10817         * class.c (alter_access): Use enforce_access; modify code for ISO
10818         compliance, rather than ARM rules.
10819
10820 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10821
10822         * cp-tree.h: Fix typo.
10823
10824 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
10825
10826         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
10827         if (aggregate_value_p (type)).
10828
10829         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
10830
10831 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
10832
10833         * tree.c (mapcar): When dealing with a DECL, use it's constant
10834         value, if any.
10835         * pt.c (lookup_template_class): Don't mangle the names of template
10836         classes whose arguments are unknown.
10837
10838         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
10839
10840 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
10841
10842         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
10843
10844 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
10845
10846         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
10847         boolean_type_node to 1.
10848
10849 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
10850
10851         * error.c (dump_expr): Remove unused variable `l'.
10852
10853         * pt.c (for_each_template_parm): New function, created by
10854         converting uses_template_parms.
10855         (tree_fn_t): New typedef.
10856         (uses_template_parms): Use it.
10857         (mark_template_parm): New function.
10858         (push_template_decl): Check that the argument list of a partial
10859         specialization uses all the template parameters.
10860
10861         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
10862         with it; we might want it for debugging.
10863         * cp-tree.h (type_unification): Change interface.
10864         * class.c (finish_struct_1): Skip nested template types, just like
10865         ordinary nested types.
10866         (instantiate_type): Use new interface to type_unification.
10867         * lex.c (init_lex): Add __sz as opname for sizeof.
10868         * method.c (build_overload_scope_ref): New function.
10869         (build_overload_int): Handle complex expressions.  Set
10870         numeric_output_need_bar if necessary.
10871         (build_overload_value): Handle non-PARM_DECL nodes; this
10872         routine is now used by build_overload_int.  Remove some
10873         assignments to numeric_output_need_bar.  Use
10874         build_overload_scope_ref.
10875         (build_qualified_name): Note that some template mangled names end
10876         with digits, and set numeric_output_need_bar appropriately.  Use
10877         build_underscore_int.
10878         * pt.c (unify): Change interface.
10879         (type_unification_real): Likewise.
10880         (determine_specialization): Use new interfaces.
10881         (tsubst): Deal gracefully with situations in which the argument
10882         vector is not fully filled.
10883         (fn_type_unification): Use new interfaces.
10884         (type_unification): Likewise.  Remove NOP_EXPR hack.
10885         (type_unification_real): Likewise.
10886         (unify): Likewise.  Deal with unification of complex expressions.
10887
10888 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10889
10890         * pt.c (complete_template_args): Initialize skip properly.
10891
10892         * decl.c (make_typename_type): Revert.
10893         (make_implicit_typename): Remove.
10894         (lookup_name_real): Don't call it.  Call lookup_field if we see a
10895         TYPE_DECL from a template base.
10896         * search.c (lookup_field): Do implicit typename stuff.
10897
10898 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
10899                           Geoff Noer    <noer@cygnus.com>
10900
10901         * Makefile.in: Various fixes for building cygwin32 native toolchains.
10902         * Make-lang.in: Likewise.
10903
10904 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10905
10906         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
10907
10908 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
10909
10910         * decl.c (make_implicit_typename): Rewrite removed code.
10911         (make_typename_type): Call it if the type we look up comes from
10912         a base that uses template parms.
10913
10914         * pt.c (complete_template_args): Rewrite.
10915         (tsubst, FUNCTION_DECL): Use it.
10916
10917 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
10918
10919         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
10920         c_expand_asm_operands () if output_operands, input_operands or
10921         clobbers is not NULL_TREE.
10922
10923 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10924
10925         * pt.c (complete_template_args): New function.
10926         (get_bindings): Deal with specializations of function templates
10927         with return type containing parameters from outer class
10928         templates.
10929         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10930         substitute arguments and compose a new type.
10931
10932 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
10933
10934         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10935         FUNCTION_DECLs.
10936
10937 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10938
10939         * decl.c (make_implicit_typename): Lose useless code.
10940
10941         * call.c (standard_conversion): Handle A* -> const A* properly.
10942
10943         * pt.c (get_bindings_real): Rename from get_bindings.  Add
10944         check_rettype parm.
10945         (get_bindings): Pass 1.
10946         (get_bindings_overload): Pass 0.
10947
10948 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
10949
10950         * pt.c (check_explicit_specialization): When reverting a static
10951         member function, also remove the `this' parameter from
10952         last_function_parms.
10953
10954 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10955
10956         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10957         a function context.
10958
10959         * decl.c (store_bindings): Use free_binding_vecs.
10960         (pop_from_top_level): Likewise.
10961
10962 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
10963
10964         * decl.c (make_implicit_typename): Only change the type of a
10965         TYPENAME_TYPE.
10966
10967 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
10968
10969         * semantics.c: New file, containing routines to perform the
10970         semantic phase of parsing.
10971         * parse.y: Use it.
10972         * pt.c (tsubst_expr): Likewise.
10973         * cp-tree.h: Declare the various functions in semantics.c.
10974         Provide macros to access _STMT tree nodes.
10975         * cp-tree.def: Add ASM_STMT tree node.
10976         * Makefile.in, Make-lang.in: Add dependencies on and for
10977         semantics.c.
10978
10979 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
10980
10981         * pt.c (push_template_decl): Only check primary templates.
10982
10983         * pt.c (check_explicit_specialization): Complain about default args
10984         in explicit specialization.
10985
10986         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10987         constructor_declarator.
10988
10989 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
10990
10991         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
10992         has no overloaded operator ->.
10993
10994         * call.c (build_field_call): Don't crash when presented with a
10995         field that is actually a nested type.
10996
10997         * decl.c (pushtag): Deal with friend class injection in local
10998         classes.
10999
11000         * call.c (build_object_call): Don't crash if OBJ is a
11001         pointer-to-member-function.
11002
11003 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11004
11005         * pt.c (push_template_decl): Complain about template with C linkage,
11006         anonymous template class.
11007
11008 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11009
11010         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
11011         * search.c: Likewise.
11012
11013         * lex.c (do_pending_defargs): Only call
11014         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
11015
11016         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
11017
11018 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
11019
11020         * parse.y: Deal with CONSTRUCTORS in new_initializers.
11021
11022 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
11023
11024         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
11025         closely mimics the behavior in parse.y.
11026         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
11027         into a compound statement.
11028
11029 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11030
11031         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
11032         * pt.c (inline_needs_template_parms): New fn.
11033         (original_template): New fn.
11034         (push_inline_template_parms_recursive): New fn.
11035         (maybe_begin_member_template_processing): Use them.
11036         (maybe_end_member_template_processing): Likewise.
11037         (is_member_or_friend_template): Rename to is_member_template.
11038         Member functions of local classes are never member templates.
11039
11040 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11041
11042         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
11043         added in the class scope to catch redefinition error.
11044
11045         * pt.c (reduce_template_parm_level): Also copy
11046         the DECL_TEMPLATE_PARMS field.
11047
11048 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
11049
11050         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
11051         reduced-level template type parameter.
11052
11053 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11054
11055         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
11056         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
11057         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
11058         * decl.c (duplicate_decls): Propagate it.
11059         * typeck2.c (abstract_virtuals_error): Use two loops to emit
11060         abstract virtual functions and virtual functions which need a
11061         final overrider separately.
11062
11063 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11064
11065         * lang-specs.h: Properly put brackets around array elements in
11066         initializer.
11067
11068         * typeck.c (build_binary_op_nodefault): Correctly place parens around
11069         && and || in expression.
11070
11071 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11072
11073         * call.c (default_parm_conversions): Remove prototype definition.
11074         (build_method_call): Remove unused variable result.
11075
11076         * cvt.c (ocp_convert): Remove unused variable conversion.
11077
11078         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
11079
11080         * except.c (do_unwind): #if 0 definition of unused variables fcall
11081         and next_pc.
11082
11083         * expr.c (extract_scalar_init): #if 0 prototype and function
11084         definition.
11085
11086         * init.c (expand_aggr_init_1): Remove unused variable init_type.
11087         (build_new_1): Remove unused variable t.
11088
11089         * pt.c (instantiate_class_template): Remove unused variable newtag;
11090         cast called function return value to void.
11091         (do_decl_instantiation): Remove unused variables name and fn.
11092
11093         * tree.c (get_type_decl): Add default return to shut up compiler from
11094         complaining control reaches end of non-void function.
11095
11096         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
11097
11098 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11099
11100         * call.c (default_parm_conversions): Remove prototype definition.
11101         (build_method_call): Remove unused variable result.
11102         (build_over_call): Add default case in enumeration switch.
11103
11104 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11105
11106         * decl2.c (lang_decode_option): Change j's type to size_t.
11107
11108         * tree.c (layout_vbasetypes): record_align and desired_align are of
11109         type unsigned int; const_size and nonvirtual_const_size likewise.
11110
11111 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
11112
11113         * parse.y (new_initializer): Make sure all initializers are
11114         lists.
11115
11116 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
11117
11118         * decl2.c (import_export_decl): Mark tinfo functions for
11119         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
11120
11121 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
11122
11123         * method.c: Fix typo.
11124
11125 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11126
11127         * method.c: Include "system.h" to get stdlib.h, stdio.h,
11128         ctype.h, string.h, etc.
11129         (issue_nrepeats): Add default case in enumeration switch.
11130         (check_btype): Likewise.
11131         (process_overload_item): Likewise.
11132
11133         * Makefile.in (method.o): Depend on system.h.
11134
11135 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11136
11137         * lex.c (do_scoped_id): Fix parenthesizing.
11138
11139 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
11140
11141         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
11142         FLAG_RTTI is unset, initialize type info machinery and continue
11143         with FLAG_RTTI enabled.
11144         (get_typeid): Likewise.
11145
11146 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11147
11148         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
11149         from B.
11150
11151 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
11152
11153         * pt.c (finish_member_template_decl): Deal more gracefully with
11154         invalid declarations.
11155
11156 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
11157
11158         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
11159         cp-tree.h: Clean up more old overloading code, old RTTI code, and
11160         some formatting quirks.
11161
11162         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
11163         method.c, pt.c, ptree.c, typeck.c: Remove support for
11164         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
11165         * class.h: Remove.
11166         * Makefile.in: Adjust.
11167
11168         * pt.c (unify): Don't allow reduced cv-quals when strict.
11169
11170         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
11171         *type_unification* and unify.
11172
11173 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
11174
11175         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
11176         (nested_name_specifier): And add it before this use.
11177         (typename_sub0): And this use.  Also add use without the keyword.
11178         (typename_sub1): Likewise.
11179         * pt.c (instantiate_class_template): Don't actually instantiate
11180         anything if our type uses template parms.
11181
11182 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
11183
11184         * decl.c (start_function): Don't call temporary_allocation for a
11185         nested function.
11186
11187 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11188
11189         * pt.c (instantiate_class_template): Don't mess with friends if
11190         our type uses template parms.
11191
11192 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11193
11194         * parse.y (nested_name_specifier): Use explicit_template_type.
11195         (typename_sub): Allow a template_type, an explicit_template_type,
11196         or an implicit template type at the end.
11197         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
11198         * decl.c (make_typename_type): Handle template-id where the name
11199         is a TEMPLATE_DECL.
11200         * call.c (build_scoped_method_call): Handle member template
11201         destructor call.
11202         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
11203         destructor is represented by the type.
11204
11205         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
11206         * parse.y (nested_name_specifier): Add 'template' case.
11207         (explicit_template_type): New rule.
11208         (typename_sub): Use it.
11209         * decl.c (make_typename_type): Handle getting a template-id for NAME.
11210         * pt.c (tsubst): Likewise.
11211
11212 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11213
11214         * pt.c (add_to_template_args): Fix thinko.
11215         (instantiate_class_template): Call it later.
11216
11217         * pt.c (get_class_bindings): Add outer_args parm.
11218         (most_specialized_class): Likewise.
11219         (instantiate_class_template): Pass it.
11220         (more_specialized_class): Likewise.
11221         (lookup_template_class): Get context from template if none
11222         was specified.
11223         (finish_member_template_decl): Don't do anything with a
11224         partial specialization.
11225         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
11226         AGGREGATE_TYPE_P.
11227         * class.c (finish_struct): Member class templates have already been
11228         checked for name clashes.
11229         * decl.c (pushdecl_with_scope): Handle pushing at class level.
11230
11231 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11232
11233         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
11234         (tsubst, *_PARM): Support multiple levels of template classes.
11235         (instantiate_class_template): Look up the pattern from the
11236         original template.
11237         (lookup_template_class): Handle getting a template for d1.
11238         (push_template_decl): Correct setting of 'primary'.
11239         (reduce_template_parm_level): Add 'levels' parm.
11240         (finish_member_template_decl): Support member class templates.
11241         (template_class_depth): Handle multiple levels.
11242         * parse.y (component_decl_1, fn.def2): Remove member template case.
11243         (component_decl): Add member template cases.
11244         * decl2.c (check_member_template): We now handle member template
11245         classes.
11246         * decl.c (pushtag): Handle member templates.
11247         * method.c (do_inline_function_hair): Don't touch
11248         IDENTIFIER_GLOBAL_VALUE.
11249         * init.c (build_offset_ref): If name isn't an identifier, just
11250         return it.
11251         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
11252
11253         * typeck.c (get_delta_difference): Do adjust for conversions to
11254         and from virtual base.
11255
11256 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
11257
11258         * typeck.c (get_delta_difference): Give hard error for conversion
11259         from virtual base.
11260
11261         * cp-tree.h: Tweak formatting.
11262
11263 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
11264
11265         * decl.c (push_namespace): Handle redeclaration error.
11266
11267         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
11268         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
11269         (NAMESPACE_BINDING): New macro.
11270         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
11271         * *.c: Use them.
11272
11273         * pt.c (push_template_decl): Use innermost_args.
11274
11275         * decl.c (get_unique_name): Tweak from earlier in the name.
11276
11277 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11278
11279         * cp-tree.def: Add CPLUS_BINDING node.
11280         * cp-tree.h (tree_binding): New struct.
11281         (BINDING_SCOPE, BINDING_VALUE): New macros.
11282         (current_namespace, global_namespace): Declare extern.
11283         (struct lang_decl_flags): New field in_namespace.
11284         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
11285         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
11286         (TREE_INDIRECT_USING): New macro.
11287         * decl2.c (current_namespace, global_namespace): Declare.  The
11288         value is a NAMESPACE_DECL now, not a TREE_LIST.
11289         (is_namespace_ancestor, namespace_ancestor): New static functions.
11290         (add_using_namespace, ambiguous_decl): Likewise.
11291         (lookup_using_namespace): New support function for lookup_name.
11292         (qualified_lookup_using_namespace): New support function for
11293         do_scoped_id and lookup_namespace_name.
11294         (get_namespace_id): Mark as obsolete.
11295         (current_namespace_id): Likewise.
11296         (do_namespace_alias): Implement.
11297         (do_using_directive): Implement as call to add_using_namespace.
11298         * decl.c (binding_for_name): New function.
11299         (push_namespace, pop_namespace): Implement.
11300         (push_decl): Don't install a FUNCTION_DECL in the global branch.
11301         (lookup_namespace_name): Implement using qualified lookup.
11302         (lookup_name_real): For global scoping, lookup in
11303         global_namespace.  For namespace scoping, lookup in given
11304         namespace.  For unscoped lookup, iterate over namespace,
11305         considering using directives.
11306         (init_decl_processing): Initialize global_namespace.
11307         (grokvardecl): Build assembler name as static name for globals.
11308         (grokdeclarator): Remove old namespace mangling.
11309         (xref_tag): When installing a global binding for the
11310         tag, make sure we have an identifier.
11311         * method.c (build_overload_nested_name): Mangle namespaces.
11312         (build_qualified_name): Likewise.
11313         (build_decl_overload_real): Likewise.
11314         * lex.c (build_lang_decl): Set namespace for new declaration to
11315         current_namespace.
11316         (do_scoped_id): Find global names in global or current
11317         namespace, or using qualified namespace lookup, depending on
11318         context.
11319         * init.c (build_member_call): When scope is namespace, use
11320         build_x_function_call instead.
11321         (build_offset_ref): When scope is namespace, collapse processing
11322         to lookup_namespace_name instead.
11323         * error.c (dump_decl): Support NAMESPACE_DECL.
11324         * decl.c (pushdecl): Bind globals to current namespace.
11325         (push_overloaded_decl): Likewise.
11326         (lookup_tag): Likewise.
11327         (lookup_name_current_level): Likewise.
11328         (xref_tag): Likewise.
11329         (start_function): Likewise.
11330         * lex.c (do_identifier): Likewise.
11331         (identifier_typedecl_value): Likewise.
11332         (real_yylex): Likewise.
11333         * method.c (do_inline_function_hair): Likewise.
11334         * parse.y (unscoped): Likewise.
11335         * pt.c (check_explicit_specialization): Likewise.
11336         (lookup_template_class): Likewise.
11337         * rtti.c (call_void_fn): Likewise.
11338         * sig.c (build_sigtable): Likewise.
11339         * ptree.c (lang_print_xnode): New function.
11340
11341 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
11342
11343         * pt.c (instantiate_class_template): Don't instantiate if pedantic
11344         and the args use template parms.
11345
11346         * pt.c (push_tinst_level): If the instantiation uses template parms,
11347         fail silently.
11348         * decl.c (xref_basetypes): Do call complete_type for basetypes
11349         that involve template parameters.
11350
11351 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11352
11353         * typeck2.c (process_init_constructor): Fix labeled init check.
11354
11355 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11356
11357         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
11358         argument to tsubst and friends.
11359
11360         * pt.c (tsubst, FUNCTION_DECL): Tidy.
11361
11362         * typeck.c (build_x_function_call): Handle static member function
11363         templates like non-templates.  Handle friend templates like normal
11364         function templates.
11365         * pt.c (tsubst, *_PARM): Don't use orig_level.
11366         (get_bindings): Don't call add_to_template_args.
11367         (instantiate_template): Likewise.
11368         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11369         * ptree.c (print_lang_type): Print index/level for template parms.
11370
11371 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
11372
11373         * Make-lang.in (cc1plus): Note that cc1plus depends on
11374         cp/cp-tree.h and cp/cp-tree.def.
11375
11376         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11377         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11378         position in a template parameter list.
11379         * cp-tree.h (template_parm_index): New structure, used as the tree
11380         structure for a TEMPLATE_PARM_INDEX.
11381         (TEMPLATE_PARM_IDX): New macro.
11382         (TEMPLATE_PARM_LEVEL): Likewise.
11383         (TEMPLATE_PARM_DESCENDANTS): Likewise.
11384         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11385         (TEMPLATE_PARM_DECL): Likewise.
11386         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11387         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11388         (TEMPLATE_TYPE_DECL): Likewise.
11389         (TEMPLATE_CONST_IDX): Remove.
11390         (TEMPLATE_CONST_LEVEL): Likewise.
11391         (TEMPLATE_CONST_SET_INFO): Likewise.
11392         (TEMPLATE_TYPE_SET_INFO): Likewise.
11393         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11394         node.
11395         (TEMPLATE_TYPE_LEVEL): Likewise.
11396         * decl.c (decls_match): Call comp_template_parms, rather than
11397         expanding it inline.
11398         (duplicate_decls): If two template declarations are being merged,
11399         then their TEMPLATE_INFOs should be merged as well.
11400         (grokfndecl): Save template-id information when declaring a friend
11401         with explicit template arguments.  Pass arguments to
11402         check_explicit_specialization via correct convention; at some
11403         point check_explicit_specialization changed, but these call-sites
11404         did not.
11405         (grokdeclarator): Tidy up slightly.
11406         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
11407         two template functions with the same DECL_ASSEMBLER_NAME the same,
11408         since the names are not yet mangled.
11409         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11410         TEMPLATE_CONST_PARM.
11411         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
11412         decl for a non-type parameter, rather than printing `<tparm ...>'.
11413         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11414         (do_friend): Deal with template friends.
11415         * lex.c (do_pending_inlines): Call
11416         maybe_begin_member_template_processing, rather than
11417         conditionally calling begin_member_template_processing.
11418         (process_next_inline): Likewise.  Call
11419         maybe_end_member_template_processing, rather than
11420         conditionally calling end_member_template_processing.
11421         (do_pending_defargs): Likewise.
11422         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11423         TEMPLATE_CONST_PARM.
11424         * method.c (build_mangled_template_parm_index): New function.
11425         (build_overload_value): Use it.
11426         (build_overload_name): Likewise.
11427         * pt.c (finish_member_template_decl): Allow friend declarations.
11428         (template_class_depth): New function.
11429         (is_member_template): Rename, and modify, to become...
11430         (is_member_or_friend_template): New function.
11431         (end_member_template_processing): Rename, and modify, to become...
11432         (maybe_end_member_template_processing).
11433         (build_template_parm_index): New function.
11434         (reduce_template_parm_level): New function.
11435         (process_template_parm): Modify to use build_template_parm_index.
11436         (push_template_decl): Deal with friend templates.
11437         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11438         TEMPLATE_CONST_PARM.
11439         (tsubst_friend_function): New function.
11440         (instantiate_class_template): Generate the DECL_FRIENDLIST
11441         for a new instantiation by using tsubst_friend_function rather
11442         than just tsubst.
11443         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11444         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11445         appropriate new macros.  Use reduce_template_parm_level to
11446         generate lower-level template parameters.  Handle tsubst'ing into
11447         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
11448         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11449         templates.  Similarly for the template parameters for a new
11450         template.
11451         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
11452         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
11453         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11454         (get_bindings): Call add_to_template_args if necessary.
11455         (instantiate_decl): Handle instantiations of friend templates.
11456         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11457         TEMPLATE_TYPE_PARM as a list of fields; it's not!
11458         * spew.c (yylex): Do a little manual constant propagation to
11459         clarify the code.
11460
11461 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
11462
11463         * error.c: Include sys/types.h.
11464
11465 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
11466
11467         * method.c (build_mangled_name): Start CPP directives in column zero.
11468
11469 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11470
11471         * typeck2.c (process_init_constructor): Sorry about non-trivial
11472         labeled initializers.
11473         * parse.y (initlist): Re-enable labeled initializers.
11474
11475 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11476
11477         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11478         all callers changed.  Rely on the new parameter instead of arg
11479         being a TREE_LIST when determine whether we are working inside
11480         template template parameter.  Clean up is_type test.
11481
11482 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11483
11484         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11485         * typeck2.c (initializer_constant_valid_p): Allow conversions
11486         between pointers and references.
11487
11488 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
11489
11490         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11491         if pedantic || warn_pointer_arith.
11492
11493 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11494
11495         * pt.c (unify): Handle TEMPLATE_DECL.
11496
11497 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
11498
11499         * cp-tree.h (strip_attrs): Remove decl.
11500
11501 1998-02-18  Doug Evans  <devans@cygnus.com>
11502
11503         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11504         Update olddecl's attributes too.
11505         (strip_attrs): Remove function.
11506         * typeck.c (common_type): Call merge_machine_type_attributes.
11507
11508 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
11509
11510         * parse.y (initdcl0_innards): New grammar symbol.
11511         (nomods_initdecls, nomods_initdcl0): Change type from itype to
11512         none, since the resulting value is never used.
11513         (parse_decl): New function.
11514         (datadef): Remove redundant actions.
11515         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11516         * parse.c: Regenerated.
11517
11518 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11519
11520         * parse.y (simple_stmt): Use getdecls() to check for decl.
11521
11522 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11523
11524         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11525         macros.
11526         (c++.install-common): Install c++filt properly as native or as cross
11527         variant.
11528         (c++.uninstall): Add c++filt.
11529
11530 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11531
11532         * call.c (standard_conversion): Fix multi-level ptr conversions.
11533
11534 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
11535
11536         * init.c (build_new): Propagate error_mark_node up.
11537
11538 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
11539
11540         * parse.y (simple_stmt): If the condition isn't a declaration,
11541         start the controlled block after the test.
11542
11543 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11544
11545         * call.c (build_over_call): Convert builtin abs, labs and fabs to
11546         tree-codes.
11547         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11548         builtins.
11549
11550 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11551
11552         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11553
11554 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11555
11556         * cp-tree.h: Add access_protected_virtual_node.
11557         * class.c (init_class_processing): Initialize it.
11558         * decl.c (xref_basetypes): Use it.
11559         * parse.y (base_class_access_list): Likewise.
11560
11561         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11562         (c++.install-common): Install c++filt.
11563
11564 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11565
11566         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11567
11568 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
11569
11570         * call.c (reference_binding): Use comptypes when comparing
11571         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11572
11573 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
11574
11575         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11576         (really_overloaded_fn): Move check here from is_overloaded_fn.
11577         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11578
11579 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
11580
11581         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11582         conversions.
11583
11584 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
11585
11586         * cp-tree.h (push_template_decl): Return the decl passed in, or an
11587         equivalent duplicate.
11588         * decl.c (pushtag): Use the return value from push_template_decl.
11589         (duplicate_decls): When duplicating a template declaration, merge
11590         the DECL_TEMPLATE_RESULTs as well.
11591         (make_implicit_typename): Don't try to dive into typename types to
11592         find a context for making a new implicit typename.
11593         (start_decl): Use the return value from push_template_decl.
11594         (grokdeclarator): Complain about declarations list `const operator
11595         int'.  Since we don't correctly handle in-class initializations of
11596         non-static data members, complain about this (now illegal)
11597         practice.  Issue an error for initializations of non-const statics
11598         since that is illegal as well, and since we don't handle that case
11599         correctly either.
11600         (start_function): Use the return value from push_template_decl.
11601         (start_method): Likewise.
11602         * decl2.c (grokfield): Likewise.  Since the change to
11603         grokdeclarator ensures that all initialized fields are in fact
11604         static, remove a redundant test for TREE_PUBLIC.
11605         * parse.y (initlist): Disable labeled initializers since they do
11606         not work as per the documentation, and since they do not use the
11607         same syntax as the C front end.
11608         * pt.c (push_template_decl): Return the decl passed in, or an
11609         equivalent duplicate.
11610         (lookup_template_class): When searching in a nested context,
11611         use the right arguments.
11612         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
11613         * typeck.c (build_component_ref): Assign the correct type to the
11614         result of build_vfn_ref.
11615
11616 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
11617
11618         * pt.c (convert_nontype_argument): Fix typo.
11619         (check_explicit_specialization): Allow old-style specialization
11620         of class template members.
11621
11622 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
11623                           Manfred Hollstein  <manfred@s-direktnet.de>
11624
11625         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
11626         when deciding to override DECL_ASSEMBLER_NAME.
11627
11628 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
11629
11630         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
11631         * cp-tree.h (flag_do_squangling): Add declaration.
11632         * lang-options.h: Add -fsquangle and -fno-squangle.
11633         * method.c: Add macros and static variables for squangling.
11634         (build_overload_name): Rename to build_mangled_name, add logic for B
11635         compression, and split into process_modifiers and
11636         process_overload_item.
11637         (process_modifiers): New function, to handle constant, reference,
11638         and pointer types.
11639         (process_overload_item): New function, handles issue of type codes.
11640         (build_overload_name): New function, start squangling and call
11641         build_mangled_name.
11642         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
11643         (start_squangling): New function to initialize squangling structs.
11644         (end_squangling): New function to destroy squangling structs.
11645         (nrepeats): Rename variable to Nrepeats.
11646         (issue_nrepeats): New function for issuing 'n' type repeats.
11647         (check_ktype): New function to check for type K name compression.
11648         (build_overload_nested_name): Add a check for K name compression.
11649         (build_qualified_name): Add a check for K name compression and don't
11650         use DECL_ASSEMBLER_NAME when squangling is on.
11651         (check_btype): New function, checks for B type compression.
11652         (build_static_name, build_decl_overload_real): Initiate squangling.
11653         (build_typename_overload, build_overload_with_type): Initiate
11654         squangling
11655
11656 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
11657
11658         * method.c (make_thunk): Avoid name buffer overflow.
11659
11660 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
11661
11662         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
11663         don't define them yet.
11664
11665         * parse.y (nomods_initdcl0): Add constructor_declarator case.
11666
11667 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11668
11669         * config-lang.in (diff_excludes): Use basename only.
11670
11671 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11672
11673         * tinfo2.cc: Add tinfo for signed char.
11674
11675 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
11676
11677         * search.c (compute_access): Handle protected constructors in derived
11678         classes as accessible.
11679
11680 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
11681
11682         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
11683         Call convert_from_reference sooner.
11684
11685 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
11686
11687         * cvt.c (ocp_convert): Obtain the constant values from constant
11688         decls even if the destination type is the same as the type of the
11689         decl.
11690
11691         * decl2.c (finish_file): Make sure that static inlines with
11692         definitions are not marked DECL_EXTERNAL before returning.
11693
11694 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11695
11696         * decl.c: Lose arg_looking_for_template.
11697         (lookup_name_real): Likewise.
11698         * parse.y: Lose processing_template_arg, template_arg1.
11699         (primary): Likewise.
11700         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
11701
11702 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11703
11704         * error.c (dump_decl): Fix type of default arguments for template
11705         template parameters and nontype template parameters.
11706         * parse.y (template_parm): Handle invalid default template
11707         template arguments here.
11708
11709         * parse.y (template_parm): Use template_arg instead of PTYPENAME
11710         for default template template argument.
11711         * pt.c (coerce_template_parms): Merge default template argument
11712         codes.  Can treat RECORD_TYPE as template name if it is implicitly
11713         created.  Fix argument index in error message.
11714         * typeck.c (comptypes): Merge template argument comparison codes in
11715         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
11716
11717 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
11718
11719         * lex.c (file_name_nondirectory): Also check for '/'.
11720
11721 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
11722
11723         * parse.y (primary): Deal with statement-expressions in
11724         templates.
11725         * pt.c (tsubst_copy): Handle BIND_EXPR.
11726         * tree.c (mapcar): Likewise.
11727
11728         * call.c (add_template_candidate_real): Pass extra parameter to
11729         fn_type_unification.
11730         * cp-tree.h (fn_type_unification): Add parameter.
11731         * pt.c (fn_type_unification): Add additional parameter to deal with
11732         static member functions.
11733         (get_bindings): Deal with static member functions.
11734
11735         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
11736         (revert_static_member_fn): Declare.
11737         * decl.c (revert_static_member_fn): Remove declaration.  Change
11738         linkage from internal to external.
11739         (cp_finish_decl): Deal with virtual functions in classes local to
11740         template functions.
11741         * decl2.c (finish_file): Don't forget to emit increment/decrement
11742         expressions in initializers for file-scope variables.
11743         * parse.y (typename_sub2): If the typename doesn't names a
11744         template, rather than a type, issue an error message.
11745         * pt.c (check_explicit_specialization): Handle specializations of
11746         static member functions.
11747         (coerce_template_parms): Handle offset references to lists of
11748         member functions.
11749         * search.c (note_debug_info_needed): Don't crash when handed a
11750         type which is being defined.
11751         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
11752         that can happen with some illegal code.
11753
11754 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11755
11756         * call.c (user_harshness): Initialize `code' to 0.
11757         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
11758         (null_ptr_cst_p): Add parentheses around && within ||.
11759         (standard_conversion): Likewise.
11760         (z_candidate): Likewise.
11761         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
11762         (build_object_call): Likewise for `mem_args'.
11763         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
11764         default case in enumeration switch.
11765
11766         * class.c (build_vtable_entry): Add explicit braces to avoid
11767         ambiguous `else'.
11768         (build_class_init_list): Likewise.
11769         (finish_struct_1): Initialize `width' to 0.
11770         (instantiate_type): Initialize `name' to NULL_TREE.  Add
11771         explicit braces to avoid ambiguous `else'.
11772
11773         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
11774         `else'.
11775
11776         * decl.c (grok_reference_init): Eliminate unused parameter, all
11777         callers changed.
11778         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
11779         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
11780         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
11781         (grokdeclarator): Add parentheses around && within ||.  Add
11782         explicit braces to avoid ambiguous `else'.
11783         (grokparms): Initialize `type' to NULL_TREE.
11784         (xref_tag): Remove unused label `just_return'.
11785         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
11786         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
11787         (hack_incomplete_structures): Add parentheses around assignment
11788         used as truth value.
11789
11790         * decl2.c (coerce_delete_type): Hide definition of `e3'.
11791
11792         * error.c: Include <stdlib.h>.
11793         (dump_expr): Change the type of `i' to size_t.  Remove unused
11794         label `error'.
11795
11796         * except.c (init_exception_processing): Remove unused variable `d'.
11797         (expand_throw): Likewise for `label'.
11798
11799         * friend.c (add_friends): Add explicit braces to avoid ambiguous
11800         `else'.
11801
11802         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
11803         (sort_base_init): Likewise for `binfo'.
11804         (expand_member_init): Likewise for `rval'.
11805         (build_member_call): Add parentheses around assignment used as
11806         truth value.
11807         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
11808         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
11809         `old_immediate_size_expand' to 0.
11810         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
11811         (build_vec_delete_1): Remove unused variable `block'.
11812         (expand_vec_init): Initialize `itype' to NULL_TREE.
11813
11814         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
11815         declaration of `index' and `rindex' with autoconf macros.
11816         (reinit_parse_for_expr): Remove unused variables
11817         `look_for_semicolon' and `look_for_lbrac'.
11818         (cons_up_default_function): Initialize `args' to NULL_TREE.
11819         (readescape): Initialize `firstdig' to 0.
11820         (real_yylex): Add parentheses around assignment used as truth value.
11821
11822         * method.c: Include <strings.h> if we don't have <string.h>.
11823         Protect declaration of `index' with autoconf macro.
11824
11825         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
11826         Initialize `type' to NULL_TREE.
11827         (structsp): Remove unused variable `id'.
11828
11829         * pt.c (coerce_template_parms): Add explicit braces to avoid
11830         ambiguous `else'.
11831         (lookup_template_class): Initialize `template' to NULL_TREE.
11832         (instantiate_class_template): Remove unused variable `name' and `e'.
11833         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
11834         (do_poplevel): Initialize `saved_warn_unused' to 0.
11835         (type_unification): Remove unused varable `parm'.
11836         (unify): Likewise for `j'.
11837
11838         * repo.c (init_repo): Add parentheses around assignment used as
11839         truth value.
11840         (finish_repo): Remove unused varable `p'.
11841
11842         * search.c (get_binfo): Initialize `type' to NULL_TREE.
11843         (get_base_distance): Likewise.
11844         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
11845         and `new_v' to NULL_TREE.
11846         (lookup_fnfields): Likewise for `rval_binfo_h'.
11847         (breadth_first_search): Add parentheses around assignment used as
11848         truth value.
11849         (get_template_base): Initialize `type' to NULL_TREE.
11850
11851         * sig.c (append_signature_fields): Initialize `last_mfptr' to
11852         NULL_TREE.
11853         (build_signature_table_constructor): Likewise for
11854         `last_rhs_field', `pfn' and `vt_off'.
11855         (build_sigtable): Likewise for `init'.
11856
11857         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
11858         (propagate_binfo_offsets): Likewise for `delta'.
11859         (hash_tree_cons): Initialize hashcode to 0.
11860         (can_free): Likewise for `size'.
11861         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
11862
11863         * typeck.c (convert_sequence): Hide prototype.
11864         (common_type): Add explicit braces to avoid ambiguous `else'.
11865         (comp_target_types): Likewise.
11866         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
11867         (build_function_call_real): Add explicit braces to avoid ambiguous
11868         `else'.
11869         (convert_arguments): Initialize `called_thing' to 0.
11870         (convert_for_initialization): Initialize `savew' and `savee' to 0.
11871
11872         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
11873         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
11874         (build_x_arrow): Likewise for `last_rval'.
11875
11876         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
11877
11878 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
11879
11880         * decl.c (init_decl_processing): Use set_sizetype.
11881         * decl2.c (sizetype): Don't declare.
11882         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
11883         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
11884         (build_component_addr, unary_complex_lvalue): Likewise.
11885         * rtti.c (expand_class_desc): Likewise.
11886         * class.c (get_vfield_offset): Likewise.
11887
11888 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
11889
11890         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
11891         early to avoid bogus error.  Handle overloaded function
11892         names provided as template arguments correctly.
11893         (coerce_template_parms): Don't mishandle overloaded functions when
11894         dealing with template template parameters.
11895         (lookup_template_class): Issue an error message, rather than
11896         crashing, when the TYPE_DECL provided is not a template type.
11897
11898 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11899
11900         * class.c (instantiate_type): Don't just return a known type if
11901         it's wrong.
11902
11903 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
11904
11905         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
11906         since that code could never be reached.
11907
11908         * error.c (dump_decl): Avoid aborting in the midst of printing an
11909         error message about an illegal template declaration.
11910
11911         * parse.y (structsp): Print an error message, rather than crashing,
11912         when a class-head does not name a class.
11913
11914         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
11915         template arguments as a g++ extension.
11916
11917         * cp-tree.def (ALIGNOF_EXPR): New tree code.
11918         * decl2.c (grok_alignof): If processing_template_decl, just store
11919         the expression.
11920         * typeck.c (c_alignof): Likewise.
11921         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11922         * error.c (dump_expr): Likewise.
11923         * pt.c (tsubst_copy): Likewise.
11924         * tree.c (cp_tree_equal): Likewise.
11925         * pt.c (uses_template_parms): Correctly determine whether or not a
11926         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11927         folding can be done.
11928
11929         * cp-tree.h (grok_enum_decls): Remove type parameter.
11930         * decl.c (grok_enum_decls): Likewise.
11931         * decl2.c (grok_x_components): Call grok_enum_decls
11932         unconditionally, since it will do nothing if there is no
11933         current_local_enum.  Use the new calling sequence.
11934         * pt.c (tsubst_enum): Use the new calling sequence for
11935         grok_enum_decls.
11936
11937         * decl.c (start_function): Make member functions of local classes
11938         in extern inline functions have comdat linkage here...
11939         (grokdeclarator): Rather than here.
11940
11941 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
11942
11943         * pt.c (convert_nontype_argument): Use decl_constant_value.
11944
11945 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
11946
11947         * call.c (add_template_candidate_real): New function.
11948         (add_template_candidate): Use it.
11949         (add_template_conv_candidate): Likewise.
11950         (joust): Pass extra argument to more_specialized.
11951         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11952         (is_local_class): Remove.
11953         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11954         * cp-tree.h (is_local_class): Remove.
11955         (perform_array_to_pointer_conversion): Likewise.
11956         (finish_member_template_decl): Add.
11957         (check_explicit_specialization): Return a tree, not an int.
11958         (more_specialized): Take additional argument.
11959         (get_bindings): Likewise.
11960         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11961         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11962         (perform_array_to_pointer_conversion): Remove.
11963         * decl.c (saved_scope): Add processing_specialization,
11964         processing_explicit_instantiation fields.
11965         (maybe_push_to_top_level): Save them.
11966         (pop_from_top_level): Restore them.
11967         (grokfndecl): Use new return value from
11968         check_explicit_specialization.
11969         (start_decl): Don't check flag_guiding_decls before pushing
11970         decls.
11971         (cp_finish_decl): Remove previous (bogus) change.
11972         (grok_declarator): Use decl_function_context rather than
11973         is_local_class.
11974         * decl2.c (finish_file): Pass extra argument to get_bindings.
11975         (build_expr_from_tree): Let build_x_component_ref check
11976         validity of arguments rather than doing it here.
11977         * lex.c (cons_up_default_function): Remove code fooling with
11978         processing_specialization, processing_explicit_instantiation
11979         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11980         * method.c (build_overload_identifier): Mangle local classes in
11981         template functions correctly.
11982         * parse.y (finish_member_template_decl): Move to pt.c.
11983         * pt.c (finish_member_template_decl): Moved here from parse.y.
11984         (print_candidates): New function.
11985         (determine_specialization): Change interface.  Properly look for
11986         most specialized versions of template candidates.
11987         (check_explicit_specialization): Fully process explicit
11988         instantiations.
11989         (push_template_decl): Avoid looking at CLASSTYPE fields in
11990         FUNCTION_DECLS.
11991         (determine_overloaded_function): Remove.
11992         (convert_nontype_argument): Change name from
11993         convert_nontype_parameter.  Use determine_overloaded_function
11994         instead of instantiate_type.
11995         (mangle_class_name_for_template): Handle type contexts as well as
11996         function contexts.
11997         (classtype_mangled_name): Likewise.
11998         (lookup_template_class): Likewise.
11999         (tsubst): Likewise.
12000         (more_specialized): Take explict template arguments as a
12001         parameter.
12002         (most_specialized): Likewise.
12003         (get_bindings): Likewise.  Check that return types match before
12004         proclaiming a function a match.
12005         (do_decl_instantiation): Remove code searching for function to
12006         instantiate; that is now done in check_explicit_specialization.
12007         (add_maybe_template): Pass extra argument to get_bindings.
12008         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
12009         implementation.
12010         * typeck.c (build_component_ref): Check for invalid arguments.
12011
12012 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
12013
12014         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
12015         return_target and call_target are equivalent.
12016
12017         * pt.c (type_unification_real): Just accept function parms that
12018         don't use any template parms.
12019
12020 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12021
12022         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
12023         unset DECL_NOT_REALLY_EXTERN.
12024
12025         * parse.y (typename_sub*): Fix std::.
12026
12027 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12028
12029         * error.c (dump_decl): Fix type default template args.
12030         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
12031
12032 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
12033
12034         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
12035         (file_name_nondirectory): Use.
12036
12037 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12038
12039         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
12040         that are not really present.  Substitute default arguments in
12041         template template arguments.  Correctly convert TEMPLATE_DECL to
12042         TEMPLATE_TEMPLATE_PARM.
12043         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
12044         are no longer treated specially here.
12045         * parse.y (template_template_parm): Fix copy error.
12046         * decl.c (grokdeclarator): Warn about missing `typename' for nested
12047         type created from template template parameters.
12048         * parse.y (bad_parm): Likewise
12049
12050         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
12051         (push_nested_class): Likewise.
12052         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
12053         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
12054         (copy_template_template_parm): Declare.
12055         * decl.c (arg_looking_for_template): New variable.
12056         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
12057         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
12058         node if arg_looking_for_template is nonzero.
12059         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
12060         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
12061         (grokdeclarator): Handle TEMPLATE_DECL.
12062         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
12063         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
12064         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
12065         (dump_decl): Handle unnamed template type parameters.
12066         Handle template template parameters.
12067         (dump_function_name): Handle template template parameters.
12068         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
12069         Handle TEMPLATE_TEMPLATE_PARM.
12070         * method.c (build_template_template_parm_names): New function.
12071         (build_template_parm_names): Handle TEMPLATE_DECL.
12072         (build_overload_nested_name, build_overload_name):
12073         Handle TEMPLATE_TEMPLATE_PARM.
12074         * parse.y (maybe_identifier): New nonterminal.
12075         (template_type_parm): Use it.
12076         (template_template_parm, template_arg1): New nonterminal.
12077         (template_parm): Add template_template_parm rules.
12078         (template_arg): Set processing_template_arg.
12079         (template_arg1): Rules moved from template_arg.
12080         (primary, nonnested_type): Set arg_looking_for_template if we are
12081         processing template arguments.
12082         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
12083         (process_template_parm): Handle template template parameters.
12084         (coerce_template_parms, comp_template_args): Likewise.
12085         (mangle_class_name_for_template, lookup_template_class): Likewise.
12086         (uses_template_parms): Handle TEMPLATE_DECL and
12087         TEMPLATE_TEMPLATE_PARM.
12088         (current_template_args): Handle TEMPLATE_DECL.
12089         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
12090         * search.c (dfs_walk, dfs_record_inheritance):
12091         Handle TEMPLATE_TEMPLATE_PARM.
12092         * tree.c (copy_template_template_parm): New function.
12093         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
12094         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
12095
12096 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
12097
12098         * decl.c (start_decl): Don't allow duplicate definitions of static
12099         data members.
12100
12101         * call.c (build_user_type_conversion_1): Handle user-defined
12102         template conversion operators correctly.
12103
12104         * decl2.c (build_expr_from_tree): Issue an error message if the
12105         object in a COMPONENT_REF is a TEMPLATE_DECL.
12106
12107         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
12108
12109         * class.c (is_local_class): New function.
12110         * cp-tree.h (is_local_class): Declare it.
12111         (last_tree): Likewise.
12112         (begin_tree): Likewise.
12113         (end_tree): Likewise.
12114         (lookup_template_class): Change prototype.
12115         * decl.c (cp_finish_decl): Check for NULL where necessary.
12116         Consider FUNCTION_DECLS to declare objects with top-level binding,
12117         when calling make_decl_rtl.
12118         (grokdeclarator): Give members of local classes internal linkage.
12119         (start_function): Remove declaration of last_tree.
12120         (finish_function): Set flag_keep_inline_functions around call to
12121         rest_of_compilation if we are processing a member function in a
12122         local class.
12123         (start_method): Call push_template_decl for member functions of
12124         local classes in template functions.
12125         * decl2.c (import_export_decl): Don't give external linkage to
12126         instantiations of templates with internal linkage.
12127         * parse.y (last_tree): Remove declaration.
12128         (template_type): Pass extra parameter to lookup_template_class.
12129         (self_template_type): Likewise.
12130         (structsp): Move call to reset_specialization into left_curly.
12131         (left_curly): Call reset_specialization, and begin_tree.
12132         * pt.c (saved_trees): New variable.
12133         (mangle_class_name_for_template): Change prototype.  Use
12134         additional function context to name local classes in templates
12135         correctly.
12136         (classtype_mangled_name): Pass the context.
12137         (push_template_decl): Handle local classes and templates, and
12138         member functions for such classes.
12139         (convert_nontype_parameter): Fix handling of pointer-to-member
12140         constants.
12141         (lookup_template_class): Handle local classes in templates.
12142         (tsubst): Likewise.  Don't assume that template instantiations
12143         have external linkage; pay attention to the template declaration.
12144         (mark_decl_instantiated): Likewise.
12145         (begin_tree): New function.
12146         (end_tree): Likewise.
12147
12148         * decl.c (xref_basetypes): Don't call complete_type for basetypes
12149         that involve template parameters; that can lead to infinite
12150         recursion unnecessarily.
12151
12152         * pt.c (register_specialization): Do not register specializations
12153         that aren't ready to be registered yet.
12154         (check_explicit_specialization): Handle explicit specialization of
12155         constructors and destructors.
12156         (build_template_decl): New function.
12157         (push_template_delc): Handle out-of-class specializations of
12158         member templates.
12159
12160         * pt.c (check_explicit_specialization): Set up the template
12161         information before registering the specialization.
12162         (coerce_template_parms): Fix thinko.
12163         (tsubst): Handle specializations of member templates correctly.
12164
12165         * class.c (finish_struct_methods): Remove calls to
12166         check_explicit_specialization from here.
12167         (finish_struct): And insert them here.
12168         * cp-tree.h (perform_qualification_conversions): New function.
12169         (perform_array_to_pointer_conversion): Likewise.
12170         (begin_explicit_instantiation): Likewise.
12171         (end_explicit_instantiation): Likewise.
12172         (determine_specialization): Renamed from
12173         determine_explicit_specialization.
12174         (comp_template_parms): New function.
12175         (processing_explicit_instantiation): New variable.
12176         * cvt.c (perform_qualification_conversions): New function.
12177         (perform_array_to_pointer_conversion): Likewise.
12178         * decl.c (duplicate_decls): Don't consider template functions
12179         alike unless they have the same parameters.  Refine handling of
12180         instantiation/specialization mismatches.
12181         (start_decl): Don't call pushdecl for template specializations,
12182         since they don't affect overloading.
12183         (start_function): Likewise.
12184         (grokfndecl): Call check_explicit_specialization a little later.
12185         Don't call duplicate_decls for memberm template specializations.
12186         (grokdeclarator): Don't update template_count for classes that are
12187         themselves specializations.  Remove use of `2' as parameter to
12188         grokfndecl since that value isn't used.
12189         * lex.c (cons_up_default_function): Save and restore
12190         processing_explicit_instantiation around calls to grokfield.
12191         * parse.y (finish_member_template_decl): New function.
12192         (component_decl_1): Use it.
12193         (fn.def2): Likewise.
12194         (template_arg_list_opt): New nonterminal.
12195         (template_type): Use it.
12196         (self_template_type): Likewise.
12197         (template_id): Likewise.
12198         (object_template_id): Likewise.
12199         (notype_template_declarator): Likwise.
12200         (begin_explicit_instantiation): Likewise.
12201         (end_explicit_instantiation): Likewise.
12202         (explicit_instantiation): Use them.
12203         * pt.c (coerce_template_parms): Add parameters.
12204         (processing_explicit_instantiation): New variable.
12205         (convert_nontype_parameter): New function.
12206         (determine_overloaded_function): Likewise.
12207         (begin_explicit_instantiation): Likewise.
12208         (end_explicit_instantiation): Likewise.
12209         (retrieve_specialization): Likewise.
12210         (register_specialization): Likewise.
12211         (processing_explicit_specialization): Removed.
12212         (determine_specialization): Handle specializations of member
12213         functions of template class instantiations.
12214         (check_explicit_specialization): Refine to conform to standard.
12215         (comp_template_parms): New function.
12216         (coerce_template_parms): Call convert_nontype_parameter.
12217         (tsubst): Refine handling of member templates.  Use
12218         register_specialization.
12219         (instantiate_template): Use retrieve_specialization.
12220         (do_decl_instantiation): Likewise.
12221         (instantiate_decl): Likewise.
12222         (type_unification): Improve handling of explict template
12223         arguments.
12224         * tree.c (mapcar): Return error_mark_node, rather than aborting,
12225         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
12226         * typeck.c (build_unary_op): Call determine_specialization, rather
12227         than determine_explicit_specialization.
12228
12229 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
12230
12231         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
12232
12233 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12234
12235         * error.c (dump_decl): For enum tags, output the tag, not its value.
12236
12237 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
12238
12239         * decl.c (init_decl_processing): Only call init_rtti_processing
12240         FLAG_RTTI is set.
12241
12242 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
12243
12244         * init.c (build_new_1): Split out from build_new.
12245         (build_new): Just return a NEW_EXPR.
12246         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
12247
12248         * decl2.c (get_temp_regvar): Tweak.
12249
12250         * cp-tree.h (TREE_CALLS_NEW): Comment out.
12251         * class.c (resolves_to_fixed_type_p): Remove use.
12252         * method.c (build_opfncall): Likewise.
12253         * call.c (build_new_op): Likewise.
12254
12255 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
12256
12257         * exception.cc (__eh_alloc, __eh_free): New fns.
12258         (__cp_push_exception, __cp_pop_exception): Use them.
12259         (__uncatch_exception): Call terminate here if no exception.
12260         * except.c (build_terminate_handler): New fn.
12261         (expand_start_catch_block): Use it.
12262         (expand_exception_blocks): Likewise.
12263         (alloc_eh_object): New fn.
12264         (expand_throw): Use it.  Protect exception init with terminate.
12265         * typeck.c (build_modify_expr): Remove code that ignores trivial
12266         methods.
12267
12268 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12269
12270         * call.c (add_builtin_candidate): Add default case in enumeration
12271         switch.
12272         (build_new_op): Likewise.
12273         (convert_like): Likewise.
12274         * cvt.c (build_expr_type_conversion): Likewise.
12275         * tree.c (real_lvalue_p): Likewise.
12276         (lvalue_p): Likewise.
12277         (cp_tree_equal): Likewise.
12278         * typeck.c (comptypes): Likewise.
12279         (build_component_ref): Likewise.
12280         (build_function_call_real): Likewise.
12281         (build_binary_op_nodefault): Likewise.
12282         (build_unary_op): Likewise.
12283         (build_modify_expr): Likewise.
12284         * typeck2.c (initializer_constant_valid_p): Likewise.
12285
12286 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
12287
12288         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
12289
12290 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
12291
12292         * pt.c (coerce_template_parms): Make sure to digest_init if
12293         possible.
12294
12295         * decl.c (duplicate_decls): Make the newdecl virtual if the
12296         olddecl was, just as is done with other attributes of olddecl.
12297
12298 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12299
12300         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
12301         address of an OFFSET_REF.
12302
12303         * cp-tree.def: Add AGGR_INIT_EXPR.
12304         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
12305         AGGR_INIT_EXPR where appropriate.
12306         * expr.c (cplus_expand_expr): Likewise.  Simplify.
12307
12308         * decl2.c (finish_file): Remove call to register_exception_table.
12309
12310 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12311
12312         * pt.c (instantiate_class_template): Don't do injection when
12313         processing_template_decl is true, as pollutes current_binding_level
12314         for base classes.
12315
12316 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
12317
12318         * pt.c (maybe_fold_nontype_arg): Add prototype.
12319
12320 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12321
12322         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
12323         * error.c (dump_expr): Likewise.
12324
12325 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12326
12327         * typeck.c (build_function_call_real): Remove "inline called before
12328         definition" pedwarn.
12329
12330         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
12331
12332 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12333
12334         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
12335
12336         * pt.c (type_unification_real): Change __null to type void* with
12337         a warning.
12338
12339 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
12340
12341         * call.c (implicit_conversion): Don't call
12342         build_user_type_conversion_1 with a NULL expr, since it will
12343         crash.
12344
12345         * pt.c (unify): Don't try to unify array bounds if either array is
12346         unbounded.
12347
12348 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12349
12350         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
12351         Replace extern decls with casts.
12352
12353         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
12354         Update last_parm_cleanup_insn.
12355         (store_after_parms): Remove.
12356         * cp-tree.h: Adjust.
12357
12358 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12359
12360         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12361         (finish_file): Check DECL_COMDAT instead of weak|one_only.
12362         (import_export_vtable): Use make_decl_one_only instead of
12363         comdat_linkage for win32 tweak.
12364         (import_export_decl): Likewise.
12365         * pt.c (mark_decl_instantiated): Likewise.
12366
12367         * decl2.c (finish_file): Lose handling of templates in pending_statics.
12368
12369 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
12370
12371         * decl2.c (finish_file): Lose call to expand_builtin_throw.
12372         * except.c (expand_builtin_throw): Remove.
12373         * cp-tree.h: Remove ptr_ptr_type_node.
12374         * decl.c: Likewise.
12375
12376 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
12377
12378         * decl.c (ptr_ptr_type_node): Define.
12379         (init_decl_processing): Initialize it.
12380         * cp-tree.h: Declare it.
12381         * exception.cc (__cp_exception_info): Use __get_eh_info.
12382         (__cp_push_exception): Likewise.
12383         (__cp_pop_exception): Likewise.
12384
12385         From Scott Snyder <snyder@d0sgif.fnal.gov>:
12386         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12387         saved_pc.
12388         (init_exception_processing): Removed saved_pc initialization.
12389
12390 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
12391
12392         * pt.c (instantiate_decl): Defer all templates but inline functions.
12393
12394 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12395
12396         * init.c (expand_vec_init): Don't fold a list of parameters.
12397
12398         * decl.c (copy_args_p): Handle copy elision for types with virtual
12399         bases.
12400         * call.c (build_over_call): Likewise.
12401
12402 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
12403
12404         * pt.c (lookup_template_function): Copy the template arguments,
12405         not just the list containing them, to the permanent obstack.
12406
12407 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
12408
12409         * except.c (expand_start_catch_block): suspend_momentary for the
12410         terminate handler.
12411
12412         * error.c (dump_decl): Handle LOOKUP_EXPR.
12413
12414 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
12415
12416         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12417         permanent obstack if we are processing a template decl.
12418         * typeck.c (build_static_cast): Likewise.
12419         (build_const_cast): Likewise.
12420         (build_reinterpret_cast): Likewise.
12421
12422         * pt.c (coerce_template_parms): Coerce some expressions, even
12423         when processing_template_decl.
12424
12425 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12426
12427         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12428         handling of pointer difference expressions.
12429
12430         * typeck.c (comp_target_types): Comparison of function/method types
12431         is independent of nptrs.
12432
12433 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
12434
12435         * pt.c (tsubst): Avoid creating pointer to reference and
12436         reference to reference types.
12437
12438 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12439
12440         * parse.y (do_id): New nonterminal.
12441         (template_id): Use it.
12442
12443 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12444
12445         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12446         * spew.c (yylex): Don't do_identifier here.
12447         * decl2.c (build_expr_from_tree): Revert last change.
12448
12449         * decl2.c (build_expr_from_tree): Expand the name for a method call.
12450         * parse.y (object_template_id): Don't try to take the DECL_NAME.
12451
12452 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
12453
12454         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12455         alloc_expr.
12456         * call.c (build_op_delete_call): Adjust.
12457
12458         * except.c (expand_end_catch_block): Lose rethrow region.
12459         (expand_start_catch_block): Likewise.
12460         (expand_end_catch_block): Don't expand_leftover_cleanups.
12461
12462 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12463
12464         * pt.c (tsubst): Remove tree_cons call (places redundant info into
12465         DECL_TEMPLATE_INSTANTIATION).
12466
12467 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12468
12469         * tree.c (is_overloaded_fn): Handle getting a fn template.
12470         (really_overloaded_fn): Likewise.
12471         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12472         * pt.c (check_explicit_specialization): Tweak.
12473         (determine_explicit_specialization): Tweak.
12474
12475         * tree.c, cp-tree.h (get_target_expr): New fn.
12476
12477 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
12478
12479         * pt.c (check_explicit_specialization): Fix misspelling in
12480         diagnostic: `preceeded'.
12481         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12482         `conversiona'.
12483
12484 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
12485
12486         * pt.c (determine_explicit_specialization): Avoid an internal
12487         error for bad specializations.
12488
12489         * method.c (build_overload_value): Handle SCOPE_REF.
12490
12491 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
12492
12493         * class.c (prepare_fresh_vtable): Enable even more complex MI
12494         vtable names.
12495
12496 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12497
12498         * exception.cc (__check_eh_spec): Optimize a bit.
12499
12500         * exception.cc (__cp_pop_exception): Lose handler arg.
12501         * except.c (do_pop_exception): Likewise.
12502         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12503         (expand_end_catch_block): Likewise.
12504
12505 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12506
12507         * pt.c (check_explicit_specialization): Complain about using a
12508         template-id for a non-specialization.
12509
12510 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
12511
12512         * repo.c: Prototype rindex only if needed.
12513         * xref.c: Likewise.
12514
12515 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12516
12517         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12518
12519 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12520
12521         * typeck.c (build_const_cast): Handle references here instead of
12522         handing off to convert_to_reference.
12523
12524         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12525         TerminateFunctionCall.
12526         (init_exception_processing): Likewise.  Terminate et al are now
12527         the fns, not ADDR_EXPRs.
12528         (various): Lose redundant assemble_external calls.
12529         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12530
12531         * cp-tree.h (struct lang_decl_flags): Add comdat.
12532         (DECL_COMDAT): New macro.
12533         * decl.c (duplicate_decls): Propagate it.
12534         (cp_finish_decl): Handle it.
12535         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12536
12537         * class.c: Remove static pending_hard_virtuals.
12538         (add_virtual_function): Take pointers to pending_virtuals
12539         and pending_hard_virtuals.
12540         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
12541
12542 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
12543
12544         * decl2.c (import_export_vtable): If we support one_only but not
12545         weak symbols, mark instantiated template vtables one_only.
12546         (import_export_decl): Likewise for tinfo functions.
12547         (finish_vtable_vardecl): Also write out vtables from explicitly
12548         instantiated template classes.
12549         * pt.c (mark_class_instantiated): Revert last change.
12550
12551         * except.c (expand_throw): Call mark_used on the destructor.
12552
12553 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
12554
12555         * lex.c (lang_init): Enable flag_exceptions by default if no
12556         command line switch was specified.
12557
12558 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
12559
12560         * pt.c (unify): Handle `void' template parameters in
12561         specializations.
12562
12563 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
12564
12565         * rtti.c (build_dynamic_cast): Handle template case here.
12566         (build_dynamic_cast_1): Not here.
12567
12568         * typeck2.c (digest_init): Make copies where appropriate.
12569
12570         * decl2.c (delete_sanity): resolve_offset_ref.
12571
12572         * except.c: Call terminate without caching so many bits.
12573
12574         * except.c (expand_start_catch_block): Fix catching a reference
12575         to pointer.
12576
12577 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12578
12579         * init.c (build_new): Copy size to the saveable obstack.
12580
12581         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12582         TRY_CATCH_EXPR for now.
12583
12584 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12585
12586         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12587         has DECL_LANG_SPECIFIC.
12588
12589         * exception.cc (struct cp_eh_info): Add handlers field.
12590         (__cp_push_exception): Initialize it.
12591         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
12592         (__throw_bad_exception): Remove.
12593         * except.c (call_eh_info): Add handlers field.
12594         (get_eh_handlers): New fn.
12595         (push_eh_cleanup): Increment handlers.
12596
12597 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12598
12599         * except.c (expand_start_eh_spec): Use the try/catch code.
12600         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
12601         doing everything inline.
12602         (init_exception_processing): throw_type_match now takes
12603         const void pointers.
12604         * exception.cc (__check_eh_spec): New fn.
12605         * inc/exception: Neither terminate nor unexpected return.
12606         * decl.c: Make const_ptr_type_node public.
12607         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
12608
12609         * except.c (expand_start_catch_block): We only need the rethrow
12610         region for non-sjlj exceptions.
12611         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
12612
12613 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
12614
12615         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
12616         (various.o): Likewise.
12617         * inc/new: Add placement deletes.  Add throw specs for default new.
12618         * new.cc (set_new_handler): Move here from libgcc2.
12619         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
12620         (new): Move from libgcc2.  Throw bad_alloc.
12621         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
12622         * decl.c (init_decl_processing): Update exception specs on new and
12623         delete.
12624
12625         * method.c (build_decl_overload_real): Don't mess with global
12626         placement delete.
12627
12628         * init.c (build_new): Check for null throw spec, not nothrow_t.
12629
12630         * decl.c (duplicate_decls): Don't complain about different exceptions
12631         from an internal declaration.
12632
12633         * call.c (build_op_delete_call): Fix check for member fns again.
12634
12635         * decl2.c (import_export_decl): Interface hackery affects
12636         virtual synthesized methods.
12637
12638 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12639
12640         * decl.c (start_decl): Don't just complain about a mismatched
12641         scope, fix it.
12642
12643         * decl.c (make_implicit_typename): Handle case where t is not
12644         actually from context.
12645         * tree.c (get_type_decl): Lose identifier case.
12646         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
12647         * parse.y (nonnested_type): Just use lookup_name.
12648         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
12649
12650 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
12651
12652         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
12653         T was built in C language context (for example, by
12654         output_func_start_profiler).
12655
12656 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
12657
12658         * decl.c (make_implicit_typename): New fn.
12659         (lookup_name_real): Use it.  Use current_class_type as the context.
12660
12661 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
12662
12663         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
12664
12665 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12666
12667         * friend.c (do_friend): Warn about non-template friends in templates.
12668
12669         * call.c (build_op_delete_call): Fix handling of inherited delete.
12670
12671         * search.c (dfs_record_inheritance): Ignore template type parms.
12672
12673 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
12674
12675         * call.c (build_new_op): Fix copy error.
12676         (build_op_new_call): New fn.
12677         (build_op_delete_call): New fn.
12678         * cp-tree.h: Declare them.
12679         * init.c (build_new): Use them.  Support placement delete.
12680         (build_x_delete): Use build_op_delete_call.
12681         (build_delete): Likewise.
12682         * decl2.c (delete_sanity): Likewise.
12683         (coerce_delete_type): Don't complain about placement delete.
12684
12685 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12686
12687         * call.c (build_new_function_call): Remove unused 'obj' parm.
12688         * cp-tree.h, typeck.c: Adjust.
12689
12690         * init.c (build_new): Make the cleanup last longer.
12691         (expand_vec_init): Call do_pending_stack_adjust.
12692
12693 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
12694
12695         * pt.c (do_type_instantiation): Fix typo.
12696         (mark_class_instantiated): If we support one_only but not weak
12697         symbols, don't mark this as known.
12698
12699         * init.c (build_new): Handle vec delete in EH cleanup.
12700
12701 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12702
12703         * call.c (build_method_call): Call complete_type before checking
12704         for destructor.
12705
12706 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
12707
12708         * decl.c (add_block_current_level): Delete.
12709         * init.c (build_vec_delete_1): Delete build_block and
12710         add_block_current_level calls.
12711
12712 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
12713
12714         * init.c (build_new): Handle freeing allocated memory when the
12715         constructor throws.
12716
12717         * call.c (build_new_method_call): Fix flags arg.
12718
12719         * pt.c (do_type_instantiation): Don't try to instantiate
12720         member templates.
12721         (mark_decl_instantiated): If we support one_only but not
12722         weak symbols, mark this one_only.
12723         * decl2.c (import_export_vtable): Don't defer handling of vtables
12724         if MULTIPLE_SYMBOL_SPACES.
12725
12726 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12727
12728         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
12729
12730 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
12731
12732         * except.c (do_pop_exception): Return a value.
12733
12734 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
12735
12736         * call.c (build_new_method_call): Handle getting a
12737         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
12738         if we got template parms.
12739         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
12740         not just the args.
12741         * decl2.c (build_expr_from_tree): Tweak last change.
12742         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
12743         (maybe_fold_nontype_arg): Split out from tsubst_copy.
12744         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
12745
12746 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
12747
12748         * pt.c (tsubst_copy): Handle explicit template arguments in
12749         function calls.
12750         * typeck.c (build_x_function_call): Likewise.
12751         * decl2.c (build_expr_from_tree): Lookup function name if it
12752         hasn't been done.
12753
12754         * pt.c (tsubst): Instantiate template functions properly when
12755         template parameter does not appear in function arguments and return
12756         type.
12757         (comp_template_args): Handle member templates required by tsubst.
12758
12759 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12760
12761         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
12762         previous change.
12763
12764 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12765
12766         * pt.c (coerce_template_parms): Tweak error message.
12767
12768         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
12769         return type defaults to `int', even if there are storage-class
12770         specifiers.
12771
12772 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12773
12774         Complete nested exception support.
12775         * except.c (do_pop_exception): Split out...
12776         (push_eh_cleanup): From here.  Handle the EH region by hand.
12777         (expand_start_catch_block): Add a new level for the catch parm.
12778         Move the rethrow region outside the two cleanup regions.
12779         Protect the initializer for the catch parm with terminate.
12780         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
12781         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
12782         popping off the middle of the stack.
12783         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
12784         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
12785         (build_cplus_new): Only wrap CALL_EXPRs.
12786         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
12787         the constructor call.
12788
12789 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12790
12791         * Make-lang.in (c++.distdir): Make inc subdirectory.
12792
12793 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12794
12795         * decl2.c (finish_file): Put back some code.
12796
12797 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12798
12799         * decl2.c (finish_file): Remove redundant code.
12800         * method.c (emit_thunk): Don't let the backend defer generic thunks.
12801
12802 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
12803
12804         * except.c (call_eh_info): Split out...
12805         (push_eh_info): From here.
12806         (expand_builtin_throw): Use it.
12807         (expand_start_catch_block): Move region start back.
12808
12809 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
12810
12811         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
12812         (real_yylex): Record wide strings using target endianness, not host.
12813
12814 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
12815
12816         * repo.c (rindex): Add decl unconditionally.
12817         (get_base_filename, open_repo_file): Don't cast rindex.
12818         * xref.c (rindex): Add decl unconditionally.
12819         (index): Remove unused decl.
12820         (open_xref_file): Don't cast rindex.
12821
12822 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12823
12824         * class.c (build_vbase_path): Propagate the result type properly.
12825
12826 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
12827
12828         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
12829         remaining use of saved_throw_type with a call to get_eh_type.
12830
12831 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
12832
12833         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
12834         (file_name_nondirectory): New function, doing the same as the macro.
12835         (set_typedecl_interface_info): Use it instead of the macro.
12836         (check_newline): Likewise.
12837         (handle_cp_pragma): Likewise.
12838
12839         * repo.c (get_base_filename): Cast result of rindex to char*.
12840         (open_repo_file): Likewise.
12841         * xref.c (open_xref_file): Likewise.
12842         * error.c (dump_char): Make its arg int, not char.
12843
12844         * except.c (push_eh_info): Pass the number of fields - 1 down, not
12845         the exact number of fields.
12846
12847 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
12848
12849         Support for nested exceptions.
12850         * tinfo2.cc (__is_pointer): New fn.
12851         * exception.cc (struct cp_eh_info): Define.
12852         (__cp_exception_info, __uncatch_exception): New fns.
12853         (__cp_push_exception, __cp_pop_exception): New fns.
12854         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
12855         Lose empty_fndecl.
12856         (init_exception_processing): Likewise.  __eh_pc is now external.
12857         (push_eh_info): New fn.
12858         (get_eh_{info,value,type,caught}): New fns.
12859         (push_eh_cleanup): Just call __cp_pop_exception.
12860         (expand_start_catch_block): Use push_eh_info.  Start the eh region
12861         sooner.
12862         (expand_end_eh_spec): Use push_eh_info.
12863         (expand_throw): Call __cp_push_exception to set up the exception info.
12864         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
12865         when we rethrow.
12866         (expand_builtin_throw): Don't refer to empty_fndecl.
12867
12868 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
12869
12870         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
12871
12872 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
12873
12874         * method.c (build_template_parm_names, build_decl_overload_real):
12875         Add static to definitions.
12876         * pt.c (add_to_template_args, note_template_header,
12877         processing_explicit_specialization, type_unification_real): Likewise.
12878         ({determine,check}_explicit_specialization): Use a single string for
12879         error messages.
12880
12881 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12882
12883         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
12884         (expand_end_catch_block): Likewise.
12885         (expand_end_eh_spec): Likewise.
12886
12887 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
12888
12889         * decl.c (duplicate_decls): Handle template specializations
12890         correctly.
12891         * error.c (dump_function_name): Fix printing of specializations of
12892         member functions that are not member templates.
12893         * cp-tree.h (processing_specialization): Make global.
12894         * pt.c (processing_specialization): Likewise.
12895         * lex.c (cons_up_default_function): Save and restore
12896         processing_specialization to avoid confusion.
12897
12898 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12899
12900         * decl.c (init_decl_processing): Give null_node unknown* type.
12901         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
12902         (common_type): Likewise.
12903         * error.c (args_as_string): Recognize null_node.
12904
12905 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12906
12907         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
12908         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
12909
12910         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
12911
12912         * Make-lang.in (g++): Include prefix.o.
12913
12914 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
12915
12916         * pt.c (determine_explicit_specialization): Initialize "dummy"
12917         to keep Purify quiet.
12918
12919 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12920
12921         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12922         (build_overload_int): Not here.
12923
12924 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
12925
12926         * class.c (build_type_pathname): Remove.
12927         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12928
12929 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
12930
12931         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12932         &&label GNU extension.
12933
12934 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
12935
12936         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12937         so as to avoid incorrect manglings.
12938         * method.c (build_decl_overload_real): Don't mangle return types
12939         for constructors.
12940
12941 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12942
12943         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12944         scratch_tree_cons): Define as macros for now.
12945         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12946         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12947         typeck2.c: Use them and the expression_obstack variants.
12948
12949 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12950
12951         * decl.c (store_return_init): Allow classes with explicit ctors to
12952         be used with the named return values extension.
12953
12954 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
12955
12956         * pt.c (instantiate_decl): Fix previous change.
12957
12958 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12959
12960         * pt.c (tsubst): Fix thinko.
12961         (instantiate_decl): Really use the original template.
12962
12963         * call.c (build_new_method_call): Use simple constructor_name for
12964         error messages.
12965
12966 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
12967
12968         * method.c (build_underscore_int): Don't use ANSI specific
12969         features.
12970
12971 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12972
12973         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12974         for our key method; it might have been inlined by -O3.
12975
12976 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
12977
12978         * decl.c (make_typename_type): Do not try to call lookup_field for
12979         non-aggregate types.
12980
12981 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
12982
12983         * typeck.c (build_reinterpret_cast): Tweak.
12984
12985 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
12986
12987         * typeck.c (build_reinterpret_cast): Converting a void pointer
12988         to function pointer with a reinterpret_cast produces a warning
12989         if -pedantic is issued.
12990
12991 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12992
12993         * typeck.c (c_expand_return): Don't warn about returning a
12994         reference-type variable as a reference.
12995
12996 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12997
12998         * method.c (build_static_name): Fix typo.
12999
13000 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
13001
13002         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
13003         OLDDECL before we try to do DECL_USE_TEMPLATE.
13004
13005 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13006
13007         * decl.c (duplicate_decls): Don't warn about template instances.
13008
13009         * typeck.c (mark_addressable): Lose ancient code that unsets
13010         DECL_EXTERNAL.
13011
13012         * pt.c (do_decl_instantiation): Lose support for instantiating
13013         non-templates.
13014
13015         * call.c (build_new_function_call): Fix handling of null explicit
13016         template args.
13017         (build_new_method_call): Likewise.
13018
13019 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
13020
13021         * method.c (build_underscore_int): Fix typo.
13022
13023 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
13024
13025         * tree.c (print_lang_statistics): #if 0 call to
13026         print_inline_obstack_statistics until its definition is checked in.
13027
13028 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13029
13030         * decl2.c (finish_file): Move dump_tree_statistics to end.
13031
13032         * pt.c (instantiate_decl): Look for the original template.
13033         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
13034         of member templates.
13035
13036 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13037
13038         * Makefile.in (g++FAQ.*): New rules.
13039         (CONFLICTS): Update.
13040         * g++FAQ.texi: Moved from libg++.
13041
13042         * parse.y (PFUNCNAME): Only specify the type once.
13043
13044 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
13045
13046         * lex.c (real_yylex): Clean up the code to fully behave the way
13047         the c-lex.c parser does for complex and real numbers.
13048
13049 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13050
13051         * method.c (build_decl_overload_real): Reformat.
13052
13053 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
13054
13055         * method.c (synthesize_method): If at_eof, determine our linkage.
13056
13057 1997-09-29  Paul Eggert  <eggert@twinsun.com>
13058
13059         * lex.c (real_yylex): Treat `$' just like `_', except issue a
13060         diagnostic if !dollars_in_ident or if pedantic.
13061
13062         * lang-specs.h (@c++): -ansi no longer implies -$.
13063
13064         * decl2.c (lang_decode_option):
13065         -traditional and -ansi now do not mess with
13066         dollars_in_ident.
13067
13068 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
13069
13070         * Makefile.in (parse.o, decl.o): Also depend on
13071         $(srcdir)/../except.h $(srcdir)/../output.h.
13072         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
13073         $(srcdir)/../except.h $(srcdir)/../output.h.
13074         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
13075         ../insn-codes.h.
13076
13077         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
13078
13079         * expr.c (cplus_expand_expr): Make it static.
13080
13081         * decl2.c, init.c, typeck.c: Include "expr.h".
13082         (expand_expr): Use proper values when calling the function.
13083
13084 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13085
13086         * lang-options.h: New -Wold-style-cast flag.
13087         * cp-tree.h (warn_old_style_cast): New variable.
13088         * decl2.c (warn_old_style_cast): Likewise.
13089         (lang_decode_option): Support -Wold-style-cast.
13090         (reparse_absdcl_as_casts): Produce old-style-cast warning.
13091
13092 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13093
13094         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
13095         TREE_USED, reset value based on already_used.
13096
13097         * init.c (expand_member_init): Revert change.
13098
13099 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13100
13101         * cp-tree.h, decl.c, decl2.c, pt.c:
13102         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
13103
13104         * decl2.c (lang_decode_option): Add missing ;.
13105
13106 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13107
13108         * friend.c (do_friend): Disable injection for all template-derived
13109         decls.
13110         * decl2.c (lang_decode_option): Handle -fguiding-decls.
13111         * parse.y (notype_template_declarator): New nonterminal.
13112         (direct_notype_declarator): Use it.
13113         (complex_direct_notype_declarator): Likewise.
13114         (object_template_id): Accept any kind of identifier after TEMPLATE.
13115         (notype_qualified_id): Don't add template declarators here.
13116
13117 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
13118
13119         * call.c (add_template_candidate): Add explicit_targs parameter.
13120         (build_scoped_method_call): Use it.
13121         (build_overload_call_real): Likewise.
13122         (build_user_type_conversion_1): Likewise.
13123         (build_new_function_call): Likewise.
13124         (build_object_call): Likewise.
13125         (build_new_op): Likewise.
13126         (build_new_method_call): Likewise.
13127         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
13128         (build_new_method_call): Likewise.
13129
13130         * class.c (finish_struct_methods): Add specialization pass to
13131         determine which methods were specializing which other methods.
13132         (instantiate_type): Handle TEMPLATE_ID_EXPR.
13133
13134         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
13135
13136         * cp-tree.h (name_mangling_version): New variable.
13137         (flag_guiding_decls): Likewise.
13138         (build_template_decl_overload): New function.
13139         (begin_specialization): Likewise.
13140         (reset_specialization): Likewise.
13141         (end_specialization): Likewise.
13142         (determine_explicit_specialization): Likewise.
13143         (check_explicit_specialization): Likewise.
13144         (lookup_template_function): Likewise.
13145         (fn_type_unification): Add explicit_targs parameter.
13146         (type_unification): Likewise.
13147
13148         * decl.c (duplicate_decls): Add smarts for explicit
13149         specializations.
13150         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
13151         specializations.
13152         (grokfndecl): Call check_explicit_specialization.
13153
13154         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
13155         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
13156         (check_classfn): Handle specializations.
13157
13158         * error.c (dump_function_name): Print specialization arguments.
13159
13160         * friend.c (do_friend): Don't call pushdecl for template
13161         instantiations.
13162
13163         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
13164
13165         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
13166         and -fno-guiding-decls.
13167
13168         * lex.c (identifier_type): Return PFUNCNAME for template function
13169         names.
13170
13171         * method.c (build_decl_overload_real): New function.
13172         (build_template_parm_names): New function.
13173         (build_overload_identifier): Use it.
13174         (build_underscore_int): New function.
13175         (build_overload_int): Use it.  Add levels for template
13176         parameters.
13177         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
13178         (build_overload_nested_names): Handle template type parameters.
13179         (build_template_decl_overload): New function.
13180
13181         * parse.y (YYSTYPE): New ntype member.
13182         (nested_name_specifier): Use it.
13183         (nested_name_specifier_1): Likewise.
13184         (PFUNCNAME): New token.
13185         (template_id, object_template_id): New non-terminals.
13186         (template_parm_list): Note specializations.
13187         (template_def): Likewise.
13188         (structsp): Likewise.
13189         (fn.def2): Handle member template specializations.
13190         (component_decl_1): Likewise.
13191         (direct_notype_declarator): Handle template-ids.
13192         (component_decl_1): Likewise.
13193         (direct_notype_declarator): Handle template-ids.
13194         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
13195
13196         * pt.c (processing_specializations): New variable.
13197         (template_header_count): Likewise.
13198         (type_unification_real): New function.
13199         (processing_explicit_specialization): Likewise.
13200         (note_template_header): Likewise.
13201         (is_member_template): Handle specializations.
13202         (end_template_decl): Call reset_specialization.
13203         (push_template_decl): Handle member template specializations.
13204         (tsubst): Likewise.
13205         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
13206         (instantiate_template): Handle specializations.
13207         (instantiate_decl): Likewise.
13208         (fn_type_unification): Handle explicit_targs.
13209         (type_unification): Likewise.  Allow incomplete unification
13210         without an error message, if allow_incomplete.
13211         (get_bindings): Use new calling sequence for fn_type_unification.
13212
13213         * spew.c (yylex): Handle PFUNCNAME.
13214
13215         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
13216         (really_overloaded_fn): Likewise.
13217         (get_first_fn): Handle function templates.
13218
13219         * typeck.c (build_x_function_call): Use really_overloaded_fn.
13220         Handle TEMPLATE_ID_EXPR.
13221         (build_x_unary_op): Likewise.
13222         (build_unary_op): Likewise.
13223         (mark_addressable): Templates whose address is taken are marked
13224         as used.
13225
13226 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13227
13228         * decl.c (init_decl_processing): Declare __builtin_constant_p as
13229         accepting any kind of type, not only int.
13230
13231 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13232
13233         * search.c (get_matching_virtual): Notice virtual bases when sorrying
13234         about covariant returns.
13235
13236         * parse.y (member_init): Also imply typename here.  Remove ancient
13237         extension for initializing base members.
13238
13239 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13240
13241         Handle multi-level typenames and implicit typename in base list.
13242         * parse.y (typename_sub{,[0-2]}): New rules.
13243         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
13244         (nonnested_type): New rule.
13245         (complete_type_name): Use it.
13246         (base_class.1): Use typename_sub and nonnested_type.
13247         (nested_name_specifier): Don't elide std:: here.
13248         * decl.c (make_typename_type): Handle getting a type for NAME.
13249         (lookup_name_real): Turn std:: into :: here.
13250
13251         Rvalue conversions were removed in London.
13252         * call.c (is_subseq): Don't consider lvalue transformations.
13253         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
13254         (joust): Re-enable ?: kludge.
13255
13256 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
13257
13258         * decl.c (start_function): Up warning of no return type to be a
13259         pedwarn.
13260
13261 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13262
13263         * init.c (expand_member_init): Don't set TREE_USED.
13264         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
13265         set,don't clear TREE_USED wholesale.
13266
13267 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
13268
13269         * call.c (build_over_call): Do require_complete_type before
13270         build_cplus_new.
13271
13272 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13273
13274         * search.c (lookup_field): Call complete_type in all cases.
13275
13276         * decl.c (finish_function): Just warn about flowing off the end.
13277
13278 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13279
13280         * decl.c (grokparms): Don't bash a permanent list node if we're
13281         in a function.
13282
13283 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
13284
13285         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
13286
13287 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13288
13289         * call.c (build_new_op): Give better error for syntactically
13290         correct, but semantically invalid, use of undeclared template.
13291
13292         * call.c (compare_qual): Handle pmfs.
13293
13294         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
13295         after the exception spec.
13296
13297 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13298
13299         * call.c (null_ptr_cst_p): Integer type, not integral type.
13300
13301         * call.c (joust): Disable warnings until they can be moved to the
13302         right place.
13303
13304 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
13305
13306         * Makefile.in, config-lang.in:  Convert to autoconf.
13307
13308 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13309
13310         * decl.c (lookup_name_real): Add implicit 'typename' to types from
13311         base classes.
13312
13313         * pt.c (most_specialized_class): Fix typo.
13314         (tsubst): Move constant folding to TREE_VEC case.
13315
13316 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
13317
13318         * pt.c (do_poplevel): Don't warn about unused local variables
13319         while processing_template_decl since we don't always know whether
13320         or not they will need constructing/destructing.
13321
13322         * pt.c (uses_template_parms): Check the values of an enumeration
13323         type to make sure they don't depend on template parms.
13324
13325         * decl.c (make_typename_type): Don't lookup the field if the
13326         context uses template parms, even if we're not
13327         processing_template_decl at the moment.
13328
13329         * pt.c (coerce_template_parms): Avoid looking at the
13330         TYPE_LANG_DECL portion of a typename type, since there won't be
13331         one.
13332         (tsubst): Do constant folding as necessary to make sure that
13333         arguments passed to lookup_template_class really are constants.
13334
13335 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13336
13337         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
13338         * decl2.c (finish_file): Only register exception tables if we
13339         need to.
13340
13341         * decl.c (init_decl_processing): Add __builtin_[fs]p.
13342
13343 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13344
13345         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
13346
13347 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
13348
13349         * error.c (dump_decl): Avoid crashing when presented with a
13350         uninitialized constant, as can occur with a template parameter.
13351         (dump_expr): Make sure that there are enough levels of
13352         current_template_parms before we start diving through them.
13353
13354 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
13355
13356         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
13357         c-typeck.c.
13358
13359 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13360
13361         * except.c (expand_throw): Call build_delete for all
13362         exception types, not just objects with destructors.
13363
13364 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
13365
13366         * decl.c (current_local_enum): Remove static.
13367         * pt.c (tsubst_enum): Save and restore value of current_local_enum
13368         in case template is expanded in enum decl.
13369         (instantiate_class_template): Use new tsubst_enum signature.
13370         (tsubst_expr): Likewise.
13371
13372 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
13373
13374         * pt.c (begin_member_template_processing): Take a function as
13375         argument, not a set of template arguments.  Use the template
13376         parameters, rather than the arguments.  Handle non-type parameters
13377         correctly.  Push a binding level for the parameters so that multiple
13378         member templates using the same parameter names can be declared.
13379         (end_member_template_processing): Pop the binding level.
13380         (push_template_decl): Mark member templates as static when
13381         appropriate.
13382
13383         * lex.c (do_pending_inlines): Pass the function, not its template
13384         arguments, to begin_member_template_processing.
13385         (process_next_inline): Likewise.
13386         (do_pending_defargs): Likewise.
13387
13388         * error.c (dump_expr): Obtain the correct declaration for a
13389         TEMPLATE_CONST_PARM.
13390
13391         * call.c (add_template_conv_candidate): New function.
13392         (build_object_call): Handle member templates, as done in the other
13393         build_ functions.
13394
13395 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
13396
13397         * decl.c (replace_defag): Undo previous change.
13398         * lex.c (do_pending_defargs): Deal with member templates.
13399
13400         * pt.c (is_member_template): Avoid crashing when passed a
13401         non-function argument.
13402
13403 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13404
13405         * class.c (grow_method): Remove check for redeclaration.
13406
13407 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
13408
13409         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13410         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13411         (PRIMARY_TEMPLATE_P): Use it.
13412         * call.c (build_overload_call_real): Use it.
13413         * class.c (instantiate_type): Likewise.
13414         * decl.c (decls_match): Likewise.
13415         * method.c (build_overload_identifier): Likewise.
13416         * pt.c (push_template_decl): Likewise.
13417         (classtype_mangled_name): Likewise.
13418         (lookup_template_class): Likewise.
13419
13420         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13421         DECL_NTPARMS to conform to usage elsewhere.
13422         * call.c (add_template_candidate): Likewise.
13423         * class.c (instantiate_type): Likewise.
13424         * pt.c (instantiate_template): Likewise.
13425         (get_bindings): Likewise.
13426
13427         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13428         is_member_template.
13429
13430         * pt.c (unify): Undo changes to allow multiple levels of template
13431         parameters.
13432         (type_unification): Likewise.
13433         (fn_type_unification): Likewise.
13434         (get_class_bindings): Likewise.
13435         * cp-tree.h (Likewise).
13436
13437         * decl.c (replace_defarg): Check that the type of the default
13438         parameter does not invlove a template type before complaining
13439         about the initialization.
13440
13441         * error.c (dump_expr): Deal with template constant parameters in
13442         member templates correctly.
13443
13444         * pt.c (is_member_template): Deal with class specializations
13445         correctly.
13446         (tsubst): Handle "partial instantiation" of member templates
13447         correctly.
13448
13449 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
13450
13451         * pt.c (type_unification): Change calling sequence to allow for
13452         multiple levels of template parameters.
13453         (tsubst_expr): Likewise.
13454         (tsubst): Likewise.
13455         (tsubst_copy): Likewise.
13456         (instantiate_template): Likewise.
13457         (unify): Likewise.
13458         * call.c (build_overload_call_real): Use it.
13459         (add_builtin_candidate): Use it.
13460         (build_new_method_call): Use it.
13461         * class.c (instantiate_type): Use it.
13462         * decl.c (grokdeclarator): Use it.
13463         * decl2.c (finish_file): Use it.
13464         * method.c (build_overload_identifier): Use it.
13465
13466         * call.c (add_template_candidate):  Add additional parameter for
13467         the function return type.  Call fn_type_unification istead of
13468         type_unification.
13469         (build_user_type_conversion_1): Handle member templates.
13470         (build_new_function_call): Likewise.
13471         (build_new_op): Likewise.
13472         (build_new_method_call): Likewise.
13473
13474         * class.c (grow_method): Don't give an error message indicating
13475         that two member templates with the same name are ambiguous.
13476         (finish_struct): Treat member template functions just like member
13477         functions.
13478
13479         * cp-tree.h (check_member_template): Add declaration.
13480         (begin_member_template_processing): Likewise.
13481         (end_member_template_processing): Likewise.
13482         (fn_type_unification): Likewise.
13483         (is_member_template): Likewise.
13484         (tsubst): Change prototype.
13485         (tsubst_expr): Likewise.
13486         (tsubst_copy): Likewise.
13487         (instantiate_template): Likewise.
13488         (get_bindings): Likewise.
13489
13490         * decl.c (decls_match): Handle multiple levels of template
13491         parameters.
13492         (pushdecl): Handle template type params just like other type
13493         declarations.
13494         (push_class_level_binding): Return immediately if the
13495         class_binding_level is NULL.
13496         (grokfndecl): If check_classfn() returns a member_template, use
13497         the result of the template, not the template itself.
13498
13499         * decl2.c (check_member_template): New function.  Check to see
13500         that the entity declared to be a member template can be one.
13501         (check_classfn): Allow redeclaration of member template functions
13502         with different types; the new functions can be specializations or
13503         explicit instantiations.
13504
13505         * error.c (dump_decl): Handle multiple levels of template
13506         parameters.
13507         (dump_function_decl): Update to handle function templates.
13508
13509         * lex.c (do_pending_inlines): Set up template parameter context
13510         for member templates.
13511         (process_next_inline): Likewise.
13512
13513         * method.c (build_overload_identifier): Adjust for multiple levels
13514         of template parameters.
13515
13516         * parse.y (fn.def2): Add member templates.
13517         (component_decl_1): Likewise.
13518
13519         * pt.c (begin_member_template_processing): New function.
13520         (end_member_template_processing): Likewise.
13521         (is_member_template): Likewise.
13522         (fn_type_unification): Likewise.
13523         (current_template_parms): Return a vector of all the template
13524         parms, not just the innermost level of parms.
13525         (push_template_decl): Deal with the possibility of member
13526         templates.
13527         (lookup_template_class): Likewise.
13528         (uses_template_parms): Likewise.
13529         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13530         TEMPLATE_CONST_PARM to deal with multiple levels of template
13531         arguments.   Add processing of TEMPLATE_DECL to produce new
13532         TEMPLATE_DECLs from old ones.
13533         (do_decl_instantiation): Handle member templates.
13534
13535         * search.c (lookup_fnfields_1): Handle member template conversion
13536         operators.
13537
13538         * tree.c (cp_tree_equal): Check the levels, as well as the
13539         indices, of TEMPLATE_CONST_PARMs.
13540
13541         * typeck.c (comptypes): Check the levels, as well as the indices,
13542         fo TEMPLATE_TYPE_PARMs.
13543         (build_x_function_call): Treat member templates like member
13544         functions.
13545
13546 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13547
13548         * typeck.c (c_expand_return): Always convert_for_initialization
13549         before checking for returning a pointer to local.
13550
13551         * pt.c (type_unification): If strict and the function parm doesn't
13552         use template parms, just compare types.
13553
13554 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
13555
13556         * method.c (build_overloaded_value): Replace direct call
13557         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13558
13559 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13560
13561         * typeck.c (convert_arguments): Don't arbitrarily choose the first
13562         of a set of overloaded functions.
13563
13564 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13565
13566         * lex.c (real_yylex): Don't elide __FUNCTION__.
13567
13568         * method.c (build_overload_value): Add in_template parm.
13569         (build_overload_int): Likewise.
13570         (build_overload_identifier): Pass it.
13571
13572         * decl.c (duplicate_decls): Don't bash a previous template
13573         definition with a redeclaration.
13574
13575         * pt.c (unify): float doesn't match double.
13576
13577         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13578         TYPE_DECL.  Handle getting non-template types.
13579         * parse.y (explicit_instantiation): Use typespec instead of
13580         aggr template_type.
13581
13582 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
13583
13584         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13585
13586 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
13587
13588         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13589         (compare_ics): Likewise.
13590
13591 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13592
13593         * call.c (joust): Warn about choosing one conversion op over
13594         another because of 'this' argument when the other return type is
13595         better.
13596         (source_type): New fn.
13597
13598         * call.c (build_new_op): Strip leading REF_BIND from first operand
13599         to builtin operator.
13600
13601         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
13602         use its RTL.
13603
13604 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13605
13606         * call.c (null_ptr_cst_p): Remove support for (void*)0.
13607
13608 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
13609
13610         * typeck.c (expand_target_expr): Make definition match declaration.
13611
13612         * class.c (get_basefndecls): Make definition match declaration.
13613
13614 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
13615
13616         * input.c (sub_getch): Eventually give up and release the input file.
13617
13618         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
13619         right place.
13620
13621         * call.c (joust): Tweak message.
13622
13623 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
13624
13625         * error.c (type_as_string): Put const/volatile on template type
13626         parameters where appropriate.
13627
13628 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
13629
13630         * call.c (strictly_better): Make arguments unsigned ints.
13631
13632 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
13633
13634         * lex.c (real_yylex): Refer to __complex instead of complex.
13635
13636 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
13637
13638         * lex.c (real_yylex): Don't use getc directly.
13639
13640 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13641
13642         * call.c (is_subseq): Don't try to be clever.
13643
13644 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13645
13646         * parse.y, pt.c: Include "except.h".
13647         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
13648         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
13649         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
13650         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
13651         prototyping.
13652
13653 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13654
13655         * decl2.c (mark_vtable_entries): Instead of replacing pure
13656         virtuals with a reference to __pure_virtual, copy the decl and
13657         change the RTL.
13658
13659 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13660
13661         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
13662
13663         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
13664
13665         * pt.c (instantiate_class_template): Call repo_template_used
13666         before finish_prevtable_vardecl.
13667
13668         * call.c (is_subseq): New fn.
13669         (compare_ics): Use it.
13670
13671         * repo.c (finish_repo): Don't crash on no args.
13672
13673         * parse.y (named_complex_class_head_sans_basetype): Handle
13674         explicit global scope.
13675         * decl2.c (handle_class_head): New fn.
13676
13677         * pt.c (unify): Add CONST_DECL case.
13678
13679 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13680
13681         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
13682
13683         * cp-tree.h (report_type_mismatch): Add prototype.
13684         * call.c (build_overload_call_real): Remove erroneous fourth
13685         argument to report_type_mismatch.
13686         (build_user_type_conversion_1): Remove erroneous second arg to
13687         tourney.
13688         (build_new_function_call): Likewise.
13689         (build_object_call): Likewise.
13690         (build_new_op): Likewise.
13691         (build_new_method_call): Likewise.
13692
13693 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13694
13695         * error.c (dump_decl): Don't bother processing a function with no
13696         DECL_LANG_SPECIFIC.
13697
13698         * method.c (emit_thunk): Call init_function_start in the macro case.
13699
13700 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13701
13702         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
13703         defined and used to set flag_vtable_thunks.
13704
13705 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13706
13707         * parse.y: Don't clear the inlines from their obstack until they've
13708         all been processed.
13709
13710         * decl.c (duplicate_decls): Don't complain about exception
13711         specification mismatch if flag_exceptions is off.
13712
13713 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
13714
13715         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
13716
13717 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
13718
13719         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
13720         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
13721         Include <stdio.h> before include files that formerly used STDIO_PROTO.
13722
13723         * decl.c, g++spec.c, lex.c, method.c, repo.c:
13724         Include "config.h" first, as per autoconf manual.
13725
13726 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13727
13728         * decl.c (duplicate_decls): Tweak wording.
13729         * lex.c (do_pending_defargs): Don't die if we see a default arg
13730         that isn't a DEFAULT_ARG.
13731         * error.c (dump_expr): Handle DEFAULT_ARG.
13732
13733         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
13734         * lang-options.h: Add -fhandle-exceptions.
13735
13736         * class.c (build_vtable): Vtables are artificial.
13737         (prepare_fresh_vtable): Likewise.
13738
13739 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13740
13741         * cvt.c (ocp_convert): After converting to the target type, set
13742         LOOKUP_NO_CONVERSION.
13743
13744         * call.c (joust): Warn about potentially confusing promotion rules
13745         with -Wsign-promo.
13746         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
13747
13748 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
13749
13750         * exception.cc: Declare __terminate_func with noreturn attribute.
13751
13752 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
13753
13754         * parse.y: Break out eat_saved_input, handle errors.
13755         (function_try_block): Use compstmt instead of compstmt_or_error.
13756
13757 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13758
13759         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
13760
13761 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13762
13763         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
13764         existence of cc1plus check whether $(LANGUAGES) contains C++.
13765
13766 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13767
13768         * method.c (do_build_copy_constructor): When copying an anonymous
13769         union member loop around to handle nested anonymous unions.  Use
13770         the offset of the member relative to the outer structure, not the
13771         union.
13772
13773 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13774
13775         * call.c (resolve_args): New fn.
13776         (build_new_function_call): Use it.
13777         (build_object_call): Likewise.
13778         (build_new_method_call): Likewise.
13779
13780 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13781
13782         * call.c (build_over_call): tsubst all default parms from templates.
13783
13784 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13785
13786         * decl.c (struct cp_function): Add static_labelno.
13787         (push_cp_function_context): Save it.
13788         (pop_cp_function_context): Restore it.
13789
13790 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13791
13792         * typeck.c (build_component_ref_1): Convert from reference.
13793
13794 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13795
13796         * parse.y (current_declspecs, prefix_attributes): Initialize to
13797         NULL_TREE.
13798
13799         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
13800         before we try to force it to be a TREE_LIST.
13801         (decl): Make sure $1.t is non-nil.
13802
13803 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13804
13805         * pt.c (uses_template_parms): Handle template first-parse codes.
13806
13807         * decl.c (cp_finish_decl): Only warn about user-defined statics.
13808
13809 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13810
13811         * pt.c (unify): Handle BOOLEAN_TYPE.
13812
13813         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
13814         * pt.c (tsubst): Don't set it.
13815         * call.c (build_over_call): Use uses_template_parms.
13816
13817 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13818
13819         * method.c (build_overload_nested_name): Use static_labelno
13820         instead of var_labelno.
13821         (build_qualified_name): New fn.
13822         (build_overload_name): Split out from here.
13823         (build_static_name): Use build_qualified_name.
13824         * decl.c (cp_finish_decl): Statics in extern inline functions
13825         have comdat linkage.
13826         (start_function): Initialize static_labelno.
13827
13828 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13829
13830         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
13831         before "all member functions in class [] are private".
13832
13833 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13834
13835         * lex.c (do_scoped_id): convert_from_reference.
13836         * init.c (build_offset_ref): Likewise.
13837
13838 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13839
13840         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
13841
13842 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13843
13844         * typeck.c (get_member_function_from_ptrfunc): Promote index
13845         before saving it.
13846
13847 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13848
13849         * tree.c (layout_basetypes): Move non-virtual destructor warning.
13850         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
13851
13852 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13853
13854         * decl.c (grokdeclarator): Call add_defarg_fn for the function
13855         type, too.
13856         * lex.c (add_defarg_fn): Adjust.
13857         (do_pending_defargs): Adjust.  Don't skip the first parm.
13858
13859 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13860
13861         * decl.c (build_enumerator): Global enumerators are also readonly.
13862
13863         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
13864         (build_dynamic_cast): Call it and convert_from_reference.
13865
13866         * lex.c (add_defarg_fn): New fn.
13867         (snarf_defarg): Don't add to defarg_types.
13868         (do_pending_defargs): Lose defarg_types.  All fns we process now
13869         have defargs.
13870         * decl.c (grokfndecl): Call add_defarg_fn.
13871
13872         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
13873         * cp-tree.def: Add DEFAULT_ARG.
13874         * spew.c (yylex): Call snarf_defarg as appropriate.
13875         * parse.y: New tokens DEFARG and DEFARG_MARKER.
13876         (defarg_again, pending_defargs, defarg, defarg1): New rules.
13877         (structsp): Use pending_defargs.
13878         (parms, full_parm): Use defarg.
13879         * lex.c (init_lex): Initialize inline_text_firstobj.
13880         (do_pending_inlines): Never pass the obstack to feed_input.
13881         (process_next_inline): Call end_input instead of restore_pending_input.
13882         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
13883         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
13884         * input.c (end_input): New fn.
13885         (sub_getch): At the end of some fed input, just keep returning EOF
13886         until someone calls end_input.
13887         Remove 'obstack' field from struct input_source.
13888         * decl.c (grokparms): Handle DEFAULT_ARG.
13889         (replace_defarg): New fn.
13890         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
13891
13892 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13893
13894         * call.c (implicit_conversion): If nothing else works, try binding
13895         an rvalue to a reference.
13896
13897 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
13898
13899         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
13900         ifndef for Cygwin32 to include SIGSEGV.
13901
13902 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13903
13904         * class.c (finish_struct_1): Only complain about pointers without
13905         copy stuff if there are any constructors.
13906
13907         * rtti.c (build_dynamic_cast): Call complete_type on the types.
13908
13909         * decl.c (grokfndecl): If the function we chose doesn't actually
13910         match, die.
13911
13912         * decl2.c (grokclassfn): Don't specify 'const int' for the
13913         artificial destructor parm.
13914
13915         * pt.c (type_unification): If we are called recursively, nothing
13916         decays.
13917
13918 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
13919
13920         * decl.c (init_decl_processing): Stop trying to catch signals
13921         other than SIGABRT since the Cygwin32 library doesn't support
13922         them correctly yet.  This fixes a situation in which g++ causes
13923         a hang on SIGSEGVs and other such signals in our Win32-hosted
13924         tools.
13925
13926 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
13927
13928         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13929
13930 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13931
13932         * typeck2.c (store_init_value): Always return the value if our
13933         type needs constructing.
13934
13935         * method.c (hack_identifier): Convert class statics from
13936         reference, too.
13937
13938 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13939
13940         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13941
13942 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
13943
13944         * typeck.c (c_expand_return): Make sure we clean up temporaries at
13945         the end of return x;
13946
13947 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13948
13949         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13950
13951 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
13952
13953         * except.c (expand_builtin_throw): Add support
13954         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13955
13956 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13957
13958         * repo.c (extract_string): Null-terminate.
13959
13960         * cp-tree.h (TI_SPEC_INFO): New macro.
13961         (CLASSTYPE_TI_SPEC_INFO): New macro.
13962         * pt.c (push_template_decl): Correctly determine # of template parms
13963         for partial specs.
13964
13965         * call.c (compare_ics): Really fix 'this' conversions.
13966
13967         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13968         non-template fn.
13969
13970         * pt.c (push_template_decl): Complain about mismatch in # of
13971         template parms between a class template and a member template.
13972
13973 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13974
13975         * method.c (synthesize_method): You can't call
13976         function_cannot_inline_p after finish_function.
13977         * decl.c (finish_function): Turn on flag_inline_functions and turn
13978         off DECL_INLINE before handing a synthesized method to the
13979         backend.
13980
13981 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13982
13983         * method.c (synthesize_method): Remove July 30 change to never set
13984         DECL_INLINE if at_eof.
13985
13986 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
13987
13988         * xref.c (GNU_xref_member): Ensure that the node has a
13989         decl_lang_specific part before checking DECL_FRIEND_P.
13990
13991 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13992
13993         * pt.c (instantiate_class_template): Diagnose non-class types used
13994         as bases.
13995
13996 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13997
13998         * typeck.c (build_conditional_expr): Use convert_for_initialization
13999         instead of convert_and_check.
14000
14001 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14002
14003         * parse.y (typespec): Don't pedwarn for typeof.
14004
14005 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
14006
14007         * repo.c (finish_repo): Only check changes if we would write a
14008         repo file.
14009
14010         * call.c (compare_ics): Fix handling of 'this' conversions.
14011
14012         * pt.c (do_decl_instantiation): Support static data too.  Rename
14013         from do_function_instantiation.
14014         * cp-tree.h: Adjust.
14015         * parse.y: Adjust.
14016
14017         * repo.c (extract_string): New fn.
14018         (get_base_filename): Use it.
14019         (init_repo): Compare old args with current args.
14020
14021 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
14022
14023         * Makefile.in, Make-lang.in: Protect C-ls with a comment
14024         character, idea from Paul Eggert <eggert@twinsun.com>.
14025
14026 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
14027
14028         * typeck.c (c_expand_return): Be more persistent in looking for
14029         returned temps.
14030
14031         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
14032         pointer to reference.
14033
14034         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
14035
14036 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14037
14038         * init.c (build_member_call, build_offset_ref):
14039         Use do_scoped_id instead of do_identifier.
14040
14041         * cvt.c (convert): Remove bogosity.
14042
14043 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14044
14045         * cvt.c (build_up_reference): Do checks of ARGTYPE and
14046         TARGET_TYPE before trying to use get_binfo.
14047
14048 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
14049
14050         * cvt.c (build_up_reference): Call get_binfo to get access control.
14051
14052         * decl2.c (import_export_decl): If we don't support weaks, leave
14053         statics undefined.
14054
14055 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
14056
14057         * except.c (expand_builtin_throw): Add support for machines that
14058         cannot access globals after throw's epilogue when
14059         -fno-sjlj-exceptions is used.
14060
14061 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14062
14063         * parse.y: 'std::' becomes '::'.
14064         * lex.c (real_yylex): Remove 'namespace' warning.
14065         * init.c (build_member_call): Ignore 'std::'.
14066         (build_offset_ref): Likewise.
14067         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
14068         (do_toplevel_using_decl): Ignore 'using std::whatever'.
14069         * decl.c (push_namespace): Just sorry.
14070         (pop_namespace): Nop.
14071         (init_decl_processing): Declare std namespace.
14072
14073 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14074
14075         * search.c (push_class_decls): A name which ambiguously refers to
14076         several instantiations of the same template just refers to the
14077         template.
14078
14079 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
14080
14081         * decl.c (build_enumerator): Fix problem with unsigned long
14082         enumerated values being smashed to ints, causing overflow
14083         when computing next enumerated value (for enum values around
14084         MAX_VAL).
14085
14086 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14087
14088         * typeck.c (build_component_ref): Only call mark_used on a decl.
14089
14090 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14091
14092         * typeck.c (build_c_cast): Make the check for a ptr to function
14093         more specific before possible default_conversion call.
14094
14095 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
14096
14097         * except.c (expand_exception_blocks): Simplify and fix and make
14098         sure we don't end a region in a sequence, as expand_end_bindings
14099         doesn't like it.
14100
14101 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
14102
14103         * except.c (init_exception_processing): Mark terminate as not
14104         returning so that the optimizer can optimize better.
14105
14106 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
14107
14108         * cvt.c (convert): Don't do any extra work, if we can avoid it
14109         easily.
14110
14111 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
14112
14113         * *.[chy]: Change cp_convert to ocp_convert, change convert to
14114         cp_convert.  convert is now reserved for the backend, and doesn't
14115         have the semantics a frontend person should ever want.
14116
14117 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14118
14119         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
14120         Lose -traditional support.
14121
14122 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14123
14124         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
14125
14126         * parse.y (self_reference): Do it for templates, too.
14127         * class.c (pushclass): Don't overload_template_name; the alias
14128         generated by build_self_reference serves the same purpose.
14129
14130         * tree.c (list_hash): Make static, take more args.
14131         (list_hash_lookup): Likewise.
14132         (list_hash_add): Make static.
14133         (list_hash_canon): Lose.
14134         (hash_tree_cons): Only build a new node if one isn't already in the
14135         hashtable.
14136         (hash_tree_chain): Use hash_tree_cons.
14137         * cp-tree.h: Adjust.
14138         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
14139         of calling lookup_name.
14140
14141 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14142
14143         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
14144         doesn't refer to the CONST_DECLs.
14145
14146 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
14147
14148         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
14149         is bigger.
14150         (expand_class_desc): Convert the last argument to a sizetype.
14151
14152 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14153
14154         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
14155         __real__): Add reswords.
14156         * hash.h: Regenerate.
14157         * lex.h (rid): Add RID_COMPLEX.
14158         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
14159         * lex.c (init_lex): Add building of RID_COMPLEX.
14160         (real_yylex): General cleanup in line with what c-lex.c also has,
14161         sans the cruft for traditional; add handling of SPEC_IMAG, complex
14162         types, and imaginary numeric constants.
14163         * parse.y (REALPART, IMAGPART): Add tokens.
14164         (unary_expr): Add REALPART and IMAGPART rules.
14165         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
14166         * decl.c (complex_{integer,float,double,long}_type_node): Define
14167         types.
14168         (init_decl_processing): Set up the types.
14169         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
14170         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
14171         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14172         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
14173         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
14174         COMPLEX_TYPE case.
14175         * method.c (build_overload_name): Add handling of the different
14176         COMPLEX_TYPEs, prefixing them with `J'.
14177         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
14178         as a template parm.
14179         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
14180         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
14181         (mapcar): Handle COMPLEX_CST.
14182         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
14183         (common_type): Add code for complex types.
14184         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14185         (convert_for_assignment): Likewise.
14186         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
14187
14188 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14189
14190         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
14191         tsubst_expr, as it might try to do overload resolution.
14192
14193 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14194
14195         * pt.c (instantiate_class_template): Oops.
14196
14197 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14198
14199         * cp-tree.def: Add TAG_DEFN.
14200         * pt.c (tsubst_enum): New fn.
14201         (instantiate_class_template): Use it.
14202         (tsubst_expr): Support TAG_DEFN.
14203         (tsubst): Support local enums.
14204         (tsubst_copy): Likewise.
14205         * decl.c (finish_enum): Likewise.
14206         (start_enum): If this is a local enum, switch to permanent_obstack.
14207
14208 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
14209
14210         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
14211         (finish_function): Put the base init code for constructors just
14212         after the parm cleanup insns.
14213         (struct cp_function): Add last_parm_cleanup_insn.
14214         (push_cp_function_context): Likewise.
14215         (pop_cp_function_context): Likewise.
14216
14217 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14218
14219         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
14220
14221 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14222
14223         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
14224         for THUNK_FNDECL before we switch to temporary allocation.
14225
14226 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14227
14228         * call.c (build_new_op): Handle null arg2 for ?:.
14229
14230 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
14231
14232         * except.c (expand_exception_blocks): Ensure that we flow through
14233         the end of the exception region for the exception specification.
14234         Move exception region for the exception specification in, so that
14235         it doesn't protect the parm cleanup.  Remove some obsolete code.
14236         * decl.c (store_parm_decls): Likewise.
14237         (finish_function): Likewise.
14238
14239 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14240
14241         * init.c (build_new): Fix nothrow handling.
14242
14243 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14244
14245         * init.c (emit_base_init): Don't warn about the initialization
14246         list for an artificial member.
14247
14248 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14249
14250         * expr.c (do_case): Handle !START case for the error msg.
14251
14252 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14253
14254         * decl2.c, lang-options.h: New option -Weffc++.
14255         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
14256         to -Weffc++.
14257
14258         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
14259         to MULTIPLE_SYMBOL_SPACES.
14260
14261 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14262
14263         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
14264
14265         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
14266
14267         * typeck.c (c_expand_return): Don't complain about returning void
14268         to void in an artificial function.
14269         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
14270         don't set DECL_RESULT, set DECL_ARTIFICIAL.
14271         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
14272
14273 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
14274
14275         * init.c (init_decl_processing): Add support for setjmp/longjmp based
14276         exception handling.
14277         * except.c (init_exception_processing): Likewise.
14278         (expand_end_catch_block): Likewise.
14279         (expand_exception_blocks): Likewise.
14280         (expand_throw): Likewise.
14281         * exception.cc (__default_terminate): Likewise.
14282
14283         * init.c (perform_member_init): Use new method of expr level
14284         cleanups, instead of cleanups_this_call and friends.
14285         (emit_base_init): Likewise.
14286         (expand_aggr_vbase_init_1): Likewise.
14287         (expand_vec_init): Likewise.
14288         * decl.c (cp_finish_decl): Likewise.
14289         (expand_static_init): Likewise.
14290         (store_parm_decls): Likewise.
14291         (cplus_expand_expr_stmt): Likewise.
14292         * decl2.c (finish_file): Likewise.
14293
14294         * Make-lang.in (exception.o): Ok to compile with -O now.
14295
14296         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
14297         we know it will be done later by the backend.
14298
14299         * decl2.c (lang_f_options): Remove support for short temps.
14300         * lang-options.h: Likewise.
14301
14302 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14303
14304         * tree.c (varargs_function_p): New fn.
14305         * method.c (emit_thunk): Replace broken generic code with code to
14306         generate a heavyweight thunk function.
14307
14308 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
14309
14310         * pt.c (process_template_parm): pedwarn about floating-point parms.
14311
14312         * decl.c (grokdeclarator): inline no longer implies static.
14313
14314         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
14315
14316 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14317
14318         * class.c (check_for_override): The signature of an overriding
14319         function is not changed.
14320
14321         * call.c (build_over_call): Move setting of conv into the loop.
14322         Note: this change, along with the related changes of the 18th thru
14323         the 20th of April, fix an infinite loop problem in conversions.
14324
14325 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14326
14327         * call.c (build_user_type_conversion_1): Really ignore rvalue
14328         conversions when looking for a REFERENCE_TYPE.
14329
14330         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
14331         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
14332         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
14333         (build_unary_op): Likewise.
14334         * call.c (build_over_call): See through a CONVERT_EXPR around the
14335         ADDR_EXPR for on a temporary.
14336         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
14337         the ADDR_EXPR for a local variable.
14338
14339 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
14340
14341         * call.c (build_user_type_conversion_1): If we're trying to
14342         convert to a REFERENCE_TYPE, only consider lvalue conversions.
14343         (build_new_function_call): Print candidates.
14344         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
14345         (reference_binding): Binding a temporary of a reference-related type
14346         is BAD.
14347
14348 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14349
14350         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
14351         * tinfo2.cc (type_info::before): Likewise.
14352
14353 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
14354
14355         * call.c (implicit_conversion): Oops.
14356
14357 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14358
14359         * call.c (implicit_conversion): Try to find a reference conversion
14360         before binding a const reference to a temporary.
14361
14362 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
14363
14364         * exception.cc (__default_unexpected): Call terminate by default,
14365         so that if the user overrides terminate, the correct function will
14366         be called.
14367
14368 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
14369
14370         * parse.y (left_curly): Avoid trying to use any fields of
14371         error_mark_node, as there aren't any.
14372
14373 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14374
14375         * lex.c (do_identifier): Avoid breaking on overloaded methods
14376         as default arguments.
14377
14378 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
14379
14380         * call.c (add_template_candidate): Initialize the variable "dummy".
14381
14382 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
14383
14384         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
14385         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
14386
14387 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14388
14389         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
14390         (debug_binfo): Delete decl, not needed.
14391
14392         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
14393         promotes_to_aggr_type): Delete fns.
14394         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
14395         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
14396         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
14397
14398         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
14399
14400         * friend.c (is_friend_type): Delete fn.
14401         * cp-tree.h (is_friend_type): Delete decl.
14402
14403         * decl.c (original_result_rtx, double_ftype_double,
14404         double_ftype_double_double, int_ftype_int, long_ftype_long,
14405         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
14406         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
14407
14408         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
14409         fwd decls.
14410         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
14411
14412         * decl.c (pushdecl_nonclass_level): #if 0, unused.
14413         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14414
14415         * lex.c (reinit_lang_specific): #if 0, unused.
14416         * cp-tree.h (reinit_lang_specific): #if 0 decl.
14417
14418         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14419         * cp-tree.h (revert_static_member_fn): Delete decl.
14420
14421         * class.c (root_lang_context_p): Delete fn.
14422         * cp-tree.h (root_lang_context_p): Delete decl.
14423
14424         * decl.c (set_current_level_tags_transparency): #if 0, unused.
14425         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14426
14427         * lex.c (set_vardecl_interface_info): Make static.
14428         * cp-tree.h (set_vardecl_interface_info): Delete decl.
14429
14430         * call.c (find_scoped_type): Make static.
14431         * cp-tree.h (find_scoped_type): Delete decl.
14432
14433         * search.c (convert_pointer_to_vbase): Make static.
14434         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14435
14436         * decl.c (const_ptr_type_node): Likewise.
14437         * cp-tree.h (const_ptr_type_node): Delete decl.
14438
14439         * typeck.c (common_base_type): Make static.
14440         * cp-tree.h (common_base_types): Delete erroneous decl.
14441
14442         * pt.c (classtype_mangled_name): Make static.
14443         * cp-tree.h (classtype_mangled_name): Delete decl.
14444
14445         * lex.c (check_newline): Make static.
14446         * cp-tree.h (check_newline): Delete decl.
14447
14448         * typeck.c (build_x_array_ref): Delete fn, same idea as
14449         grok_array_decl.
14450         * cp-tree.h (build_x_array_ref): Delete decl.
14451
14452         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14453         copy_lang_decl.
14454         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14455
14456         * class.c (build_vtable_entry): Make static.
14457         * cp-tree.h (build_vtable_entry): Delete decl.
14458
14459         * class.c (build_vbase_pointer): Make static.
14460         * cp-tree.h (build_vbase_pointer): Delete decl.
14461
14462         * sig.c (build_sptr_ref): Add forward decl and make static.
14463         * cp-tree.h (build_sptr_ref): Delete decl.
14464
14465         * call.c (build_new_method_call): Add forward decl and make static.
14466         * cp-tree.h (build_new_method_call): Delete decl.
14467
14468         * call.c (build_object_call): Make static.
14469         * class.c (check_for_override, complete_type_p, mark_overriders):
14470         Likewise.
14471         * decl.c (cp_function_chain): Likewise.
14472         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14473         Likewise.
14474         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14475         Likewise.
14476         * tree.c (build_cplus_array_type_1): Likewise.
14477         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14478         (comp_target_parms): Likewise.
14479
14480         * init.c (build_builtin_call): Make static.
14481         * cp-tree.h (build_builtin_call): Delete decl.
14482
14483         * typeck.c (binary_op_error): Delete decl.
14484         * cp-tree.h (binary_op_error): Likewise.
14485
14486 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14487
14488         * call.c (build_method_call): Compare against error_mark_node
14489         directly, rather than the ERROR_MARK tree code.
14490         * cvt.c (cp_convert): Likewise.
14491         * decl.c (print_binding_level): Likewise.
14492         (duplicate_decls): Likewise.
14493         (grokdeclarator): Likewise.
14494         (grokdeclarator): Likewise.
14495         * init.c (expand_aggr_init_1): Likewise.
14496         (decl_constant_value): Likewise.
14497         * method.c (build_opfncall): Likewise.
14498         (hack_identifier): Likewise.
14499         * typeck.c (build_modify_expr): Likewise.
14500
14501         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14502
14503 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14504
14505         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14506
14507         * pt.c (coerce_template_parms): Add new error message.
14508
14509         * method.c (build_overload_value): Implement name mangling for
14510         floating-point template arguments.
14511
14512         * method.c (build_overload_int, icat, dicat): Fix mangling of template
14513         arguments whose absolute value doesn't fit in a signed word.
14514
14515 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14516
14517         * friend.c: New file; put all of the friend stuff in here.
14518         * init.c: Instead of here.
14519         * Makefile.in (CXX_OBJS): Add friend.o.
14520         (friend.o): Add dependencies.
14521         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14522
14523 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14524
14525         * call.c (build_scoped_method_call): Complain if the scope isn't a
14526         base.
14527
14528 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14529
14530         * parse.y (left_curly): Don't crash on erroneous type.
14531
14532         * init.c (build_delete): Fix type of ref.
14533
14534 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14535
14536         * search.c (get_vbase_1): Renamed from get_vbase.
14537         (get_vbase): Wrapper, now non-static.
14538         (convert_pointer_to_vbase): Now static.
14539
14540         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14541         * init.c (build_delete): Pass one.
14542         (build_partial_cleanup_for): Use build_scoped_method_call.
14543         * decl.c (finish_function): Pass a binfo.
14544
14545 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14546
14547         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14548
14549         * typeck.c (build_c_cast): Lose other reference to flag.
14550
14551         * call.c (build_field_call): Don't look for [cd]tor_identifier.
14552         * decl2.c (delete_sanity): Remove meaningless use of
14553         LOOKUP_HAS_IN_CHARGE.
14554         * decl.c (finish_function): Use build_scoped_method_call instead
14555         of build_delete for running vbase dtors.
14556         * init.c (build_delete): Call overload resolution code instead of
14557         duplicating it badly.
14558
14559 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14560
14561         * call.c (build_over_call): Call mark_used before trying to elide
14562         the call.
14563
14564         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14565
14566 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14567
14568         * typeck.c (build_modify_expr): Always pedwarn for a cast to
14569         non-reference used as an lvalue.
14570
14571 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14572
14573         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14574
14575 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14576
14577         * parse.y (handler): Fix template typo.
14578
14579 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14580
14581         * error.c (lang_decl_name): New fn.
14582         * tree.c (lang_printable_name): Use it.
14583
14584 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
14585
14586         * g++spec.c: Include config.h so that we can catch bzero #defines
14587         from the config file.
14588
14589 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
14590
14591         * new1.cc: Include a declaration for malloc, to avoid warning, and
14592         avoid lossing on systems that require one (ones that define malloc
14593         in xm.h).
14594
14595 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14596
14597         * decl2.c (max_tinst_depth): New variable.
14598         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14599         option.
14600         * pt.c (max_tinst_depth): Variable moved.
14601         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
14602         as legal.
14603
14604 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14605
14606         * decl.c (xref_basetypes): Allow a base class that depends on
14607         template parms to be incomplete.
14608
14609         * decl2.c (build_expr_from_tree): Support typeid(type).
14610         * rtti.c (get_typeid): Support templates.
14611         (expand_si_desc, expand_class_desc): Fix string length.
14612         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
14613
14614 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
14615
14616         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
14617
14618         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
14619
14620 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14621
14622         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
14623         smashes together template and non-template decls of the same
14624         signature.
14625
14626 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14627
14628         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
14629
14630 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14631
14632         * decl.c (duplicate_decls): Next route, pedwarn about different
14633         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
14634
14635 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14636
14637         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
14638         (struct lang_type): Delete has_default_implementation member.
14639         Increase dummy to 21.
14640         * decl.c (start_method): Delete usage.
14641
14642         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
14643         store_after_parms, start_decl_1, auto_function): Add decls.
14644         (get_arglist_len_in_bytes, declare_implicit_exception,
14645         have_exceptions_p, make_type_decl, typedecl_for_tag,
14646         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
14647         build_component_type_expr, cplus_exception_name,
14648         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
14649         * call.c (build_this): Make static.
14650         (is_complete): Likewise.
14651         (implicit_conversion): Likewise.
14652         (reference_binding): Likewise.
14653         (standard_conversion): Likewise.
14654         (strip_top_quals): Likewise.
14655         (non_reference): Likewise.
14656         (build_conv): Likewise.
14657         (user_harshness): Likewise.
14658         (rank_for_ideal): Likewise.
14659         * decl.c (start_decl_1): Delete forward decl.
14660         (push_decl_level): Make static.
14661         (resume_binding_level): Make static.
14662         (namespace_bindings_p): Make static.
14663         (declare_namespace_level): Make static.
14664         (lookup_name_real): Make static.
14665         (duplicate_decls): Make static.  Take register off NEWDECL and
14666         OLDDECL parm decls.
14667         * decl2.c (get_sentry): Make static.
14668         (temp_name_p): Delete fn.
14669         * except.c (auto_function): Delete decl.
14670         * lex.c (handle_{cp,sysv}_pragma): Make static.
14671         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
14672         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
14673         * pt.c (tsubst_expr_values): Make static.
14674         * rtti.c (combine_strings): Delete decl.
14675
14676 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14677
14678         * pt.c (push_template_decl): Handle getting a typedef.
14679
14680         * call.c (build_new_function_call): Complain about void arg.
14681
14682 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14683
14684         * decl.c (duplicate_decls): Give pedwarn of different exceptions
14685         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
14686
14687 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
14688
14689         * except.c (expand_throw): Don't expand the cleanup tree here,
14690         since we are not going to write the rtl out.  Fixes problem with
14691         -g -O on SPARC.
14692
14693 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
14694
14695         * Make-lang.in: Add $(exeext) as necessary.
14696
14697 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
14698
14699         * parse.y (handler_seq): Must have at least one catch clause.
14700
14701 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14702
14703         * call.c (add_builtin_candidate): Restore ?: hack.
14704
14705         * decl.c (grok_op_properties): More warnings.
14706
14707 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14708
14709         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
14710         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
14711
14712         * decl.c (duplicate_decls): Scale back to a warning, and only do
14713         'em if -pedantic.
14714
14715 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
14716
14717         * decl.c (duplicate_decls): pedwarn mismatched exception
14718         specifications.
14719
14720 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
14721
14722         * call.c (build_new_method_call): Don't display the invisible
14723         argument for controlling virtual bases.
14724
14725 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
14726
14727         * new: Add nothrow new and delete, bad_alloc and throw specifications
14728         for delete.
14729         * decl.c (init_decl_processing): Add throw specification for delete.
14730         * new.cc (nothrow): Define.
14731         * lex.c (real_yylex): Removing warning that throw and friends are
14732         keywords.
14733         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
14734         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
14735         * Make-lang.in: Add new{1,2}.{cc,o}.
14736
14737 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14738
14739         * lex.c (cons_up_default_function): Fix return type of synth op=.
14740
14741         * init.c (emit_base_init): Add warnings for uninitialized members
14742         and bases.
14743
14744         * decl.c (xref_basetypes): Add warning for non-polymorphic type
14745         with destructor used as base type.
14746
14747         * decl.c (grok_op_properties): Add warning for op= returning void.
14748         * typeck.c (c_expand_return): Add warning for op= returning anything
14749         other than *this.
14750
14751         * class.c (finish_struct_1): Add warning for class with pointers
14752         but not copy ctor or copy op=.
14753
14754         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
14755         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
14756         (instantiate_template): If -fexternal-templates, add this
14757         instantiation to pending_templates.
14758
14759         * decl2.c (copy_assignment_arg_p): Disable old hack to support
14760         Booch components.
14761
14762 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
14763
14764         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
14765
14766 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
14767
14768         * call.c (standard_conversion): Handle getting references.  Tack
14769         on RVALUE_CONV here.  Do it for non-class types, too.
14770         (reference_binding): Pass references to standard_conversion.
14771         (implicit_conversion): Likewise.
14772         (add_builtin_candidate): Disable one ?: kludge.
14773         (convert_like): Handle RVALUE_CONVs for non-class types.
14774         (joust): Disable the other ?: kludge.
14775
14776 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14777
14778         * decl.c (init_decl_processing): Add code to build up common
14779         function types beforehand, to avoid creation then removal of
14780         things already in the hash table.
14781
14782 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14783
14784         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
14785         the arguments.
14786
14787         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
14788         current_template_parms.
14789
14790 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
14791
14792         * search.c (lookup_field): Don't return a function, check want_type.
14793
14794 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14795
14796         * init.c (build_new): Make sure PLACEMENT has a type.
14797
14798 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14799
14800         * init.c (build_new): Support new (nothrow).
14801
14802 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14803
14804         * pt.c (instantiate_decl): Also do push_to_top_level before setting
14805         up DECL_INITIAL.
14806
14807         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
14808         * pt.c (tsubst): Defer instantiation of default args.
14809         * call.c (build_over_call): Until here.
14810
14811 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14812
14813         * search.c (lookup_field): Make sure we have an
14814         IDENTIFIER_CLASS_VALUE before we try to return it.
14815
14816 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14817
14818         * call.c (build_method_call): Delete unused var PARM.
14819         (build_overload_call_real): Likewise.
14820         (build_object_call): Delete unused var P.
14821         (build_new_op): Likewise.
14822         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
14823         var definitions, which are never used.
14824         (shadow_tag): Delete unused var FN.
14825         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
14826         * init.c (build_new): Delete unused var ALLOC_TEMP.
14827         * method.c (hack_identifier): Delete unused var CONTEXT.
14828         (do_build_copy_constructor): Delete unused var NAME.
14829         (synthesize_method): Delete unused var BASE.
14830         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
14831         * rtti.c (build_headof): Delete unused var VPTR.
14832         (get_typeid): Delete unused var T.
14833         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
14834         and ORIG_OP2.
14835         (build_ptrmemfunc): Delete unused vars U and NINDEX.
14836         * typeck2.c (build_functional_cast): Delete unused var BINFO.
14837
14838 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14839
14840         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
14841         things in a type being defined.
14842         * decl.c (finish_enum): Reverse the values so that they are in
14843         the correct order.
14844
14845         * pt.c (instantiate_class_template): Don't initialize
14846         BINFO_BASETYPES until the vector is filled out.
14847         (unify): Don't abort on conflicting bindings, just fail.
14848         (instantiate_decl): Do push_tinst_level before any tsubsting.
14849
14850         * method.c (build_overload_value): Handle getting a
14851         TEMPLATE_CONST_PARM for a pointer.
14852
14853 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
14854
14855         * init.c (expand_member_init): Don't give 'not a base' error for
14856         templates.
14857
14858         * pt.c (instantiate_decl): Call import_export_decl later.
14859
14860         * pt.c (instantiate_class_template): Return a value.
14861
14862         * parse.y (extension): New rule for __extension__.
14863         (extdef, unary_expr, decl, component_decl): Use it.
14864
14865 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
14866
14867         * class.c (base_binfo): Remove unused base_has_virtual member.
14868         (finish_base_struct): Likewise.
14869         (finish_struct_1): Likewise.
14870
14871 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
14872
14873         * search.c (expand_upcast_fixups): Fix bogus code generation
14874         problem where the generated code uses the wrong index into the
14875         runtime built vtable on the stack.  Old code could clobber random
14876         stack values.
14877
14878 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
14879
14880         * init.c (perform_member_init): Make sure the partial EH cleanups
14881         live on the function_obstack.
14882
14883 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
14884
14885         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
14886         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
14887
14888 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
14889
14890         * decl.c (grokvardecl): Avoid ANSI style initialization.
14891
14892 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
14893
14894         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
14895
14896 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
14897
14898         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
14899
14900 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14901
14902         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
14903         arguments we compare against.  Start the count of I at 1, not 0,
14904         since argv[0] is still the command.
14905
14906 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
14907
14908         * lang-specs.h: Accept .cp as an C++ extension.
14909
14910 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14911
14912         * cp-tree.h (ptr_reasonably_similar): Add decl.
14913
14914 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14915
14916         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14917         pointer.  New local SPECBITS with the parm's value.
14918         (grokdeclarator): Pass &specbits down.
14919
14920         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14921         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14922
14923         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14924         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14925
14926         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14927         not an error_mark_node.
14928
14929 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14930
14931         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14932         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14933
14934 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
14935
14936         * decl.c (grokdeclarator): When giving an anonymous struct a name,
14937         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14938         not affected).
14939
14940         * typeck2.c (build_m_component_ref): If component is a pointer
14941         to data member, resolve the OFFSET_REF now.
14942
14943         * call.c (convert_like): Don't go into infinite recursion.
14944
14945         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14946
14947         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14948         * tree.c (layout_basetypes): And on the vbase ptr.
14949
14950 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14951
14952         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14953         CHAR_TYPE_SIZE so bool is always the same size as another type.
14954
14955         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14956
14957 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
14958
14959         * decl2.c (grok_x_components): Remove synthesized methods from
14960         TYPE_METHODS of an anonymous union, complain about member
14961         functions.
14962         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14963         anonymous unions.
14964         (finish_function): Just clear the DECL_RTL of our arguments.
14965
14966 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14967
14968         * decl2.c (finish_file): Emit DWARF debugging info for static data
14969         members.
14970
14971         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14972
14973 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
14974
14975         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14976         IDENTIFIER_NODE.
14977
14978 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14979
14980         * Make-lang.in (g++-cross$(exeext)): Fix typo.
14981
14982 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14983
14984         Make the g++ driver now be a standalone program, rather than one
14985         that tries to run the gcc driver after munging up the options.
14986         * Make-lang.in (g++.c, g++spec.o): New rules.
14987         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14988         added.
14989         (g++$(exeext)): New rule, based on xgcc rule.
14990         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14991         * g++spec.c: New file.
14992         * g++.c: Removed file.
14993
14994 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
14995
14996         * cvt.c (build_up_reference): Arrange for any temporary values
14997         that have been keep in registers until now to be put into memory.
14998
14999 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15000
15001         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
15002         that make -j3 bootstrap works better.
15003
15004 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
15005
15006         * decl.c (pushtag): Do pushdecl for anon tags.
15007
15008 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15009
15010         * typeck.c (c_expand_return): Fix logic.
15011         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
15012
15013 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
15014
15015         * g++.c (main): Make sure arglist has a final NULL entry.  Add
15016         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
15017         stdin/stdout of the invoked program are redirected to
15018         nowheresville.
15019
15020 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15021
15022         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
15023
15024 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
15025
15026         * init.c (resolve_offset_ref): Handle obj.vfn better.
15027         * typeck.c (build_component_ref): Set TREE_TYPE on result from
15028         build_vfn_ref.
15029
15030 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
15031
15032         * typeck.c (convert_for_assignment): Also handle anachronistic
15033         implicit conversions from (::*)() to cv void*.
15034         * cvt.c (cp_convert_to_pointer): Likewise.
15035
15036 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15037
15038         * lex.c (handle_cp_pragma): Fix bogus warning.
15039
15040 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
15041
15042         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
15043         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
15044
15045 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15046
15047         * class.c (finish_struct_1): Support DWARF2_DEBUG.
15048         * search.c (dfs_debug_mark): Likewise.
15049         * decl2.c (finish_vtable_vardecl): Likewise.
15050         * decl.c (pushtag, finish_enum): Likewise.
15051         * lex.c (check_newline): Use debug_* instead of calling *out
15052         functions directly.
15053
15054 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15055
15056         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
15057         on some picky hosts.
15058
15059 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15060
15061         * class.c (finish_struct_1): A class has a non-trivial copy
15062         constructor if it has virtual functions.
15063
15064         * cvt.c (cp_convert): Always call a constructor.
15065
15066         * call.c (reference_binding): Still tack on a REF_BIND
15067         for bad conversions.
15068         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
15069
15070         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
15071         (c_expand_return): Likewise.
15072         * typeck2.c (digest_init): Likewise for { }.
15073         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
15074         * cvt.c (cp_convert): Handle failure better.
15075
15076 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15077
15078         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
15079         of GCC be path-relative.
15080
15081 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15082
15083         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
15084         it does need choose-temp.o and pexecute.o.
15085
15086 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15087
15088         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
15089         that we still use it.
15090         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
15091
15092 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15093
15094         * init.c (expand_default_init): Avoid calling constructors to
15095         initialize reference temps.
15096
15097         * cvt.c (convert_to_reference): Fix.
15098
15099 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15100
15101         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
15102         (convert_to_reference): Likewise.
15103         * typeck.c (convert_for_initialization): Likewise.
15104         * init.c (expand_default_init): Likewise.
15105         (expand_aggr_init_1): Likewise.
15106         * cp-tree.h (CONV_NONCONVERTING): Lose.
15107         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
15108         * *.c: Adjust.
15109         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
15110
15111 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
15112
15113         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
15114
15115 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15116
15117         * init.c (expand_aggr_init_1): Don't crash on non-constructor
15118         TARGET_EXPR.
15119
15120 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15121
15122         * g++.c: Include gansidecl.h.
15123         (VPROTO, PVPROTO, VA_START): Delete.
15124         (choose_temp_base_try, choose_temp_base, perror_exec,
15125         run_dos) [__MSDOS__]: Delete fns.
15126         (pfatal_with_name): Delete fn.
15127         (temp_filename): Declare like in gcc.c.
15128         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
15129         (error_count, signal_count): Define.
15130         (error): Delete both definitions.
15131         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
15132         (pfatal_pexecute): Add fn from gcc.c.
15133         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
15134         code to use the pexecute stuff also used by gcc.c.
15135         (MIN_FATAL_STATUS): Define.
15136         * Make-lang.in (g++): Add dependency on and linking with
15137         choose-temp.o and pexecute.o.
15138
15139         * cp-tree.h: Include gansidecl.h.
15140         (STDIO_PROTO): Delete #undef/#define.
15141         * cvt.c (NULL): Delete #undef/#define.
15142         * expr.c (NULL): Likewise.
15143         * init.c (NULL): Likewise.
15144         * rtti.c (NULL): Likewise.
15145         * xref.c (NULL): Likewise.
15146
15147         * cp-tree.h (build_user_type_conversion): Add prototype.
15148         * call.c (build_user_type_conversion): Delete prototype.  Correct
15149         decl of FLAGS arg to be an int.
15150         * cvt.c (build_user_type_conversion): Likewise.
15151
15152 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
15153
15154         * cp-tree.def: Add TRY_BLOCK and HANDLER.
15155         * except.c (expand_start_catch_block): Support templates.
15156         * parse.y (try_block, handler_seq): Likewise.
15157         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
15158
15159 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15160
15161         * pt.c (current_template_args): New fn.
15162         (push_template_decl): Use it.
15163         * decl.c (grokdeclarator): Use it.
15164
15165         * decl2.c (build_expr_from_tree): Dereference ref vars.
15166
15167         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
15168         the decl-specifier-seq.
15169
15170         * decl.c (grok_op_properties): Don't force the type of a conversion
15171         op to be complete.  Don't warn about converting to the same type
15172         for template instantiations.
15173
15174         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
15175         methods.
15176
15177 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
15178
15179         * typeck.c (get_delta_difference): Remove previous bogusness.
15180         Don't give errors if force is set.
15181
15182 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15183
15184         * decl2.c (finish_file): Don't emit debug info.
15185         * decl.c (pushdecl): Lose obsolete code.
15186         (grokdeclarator): Still do the long long thing after complaining.
15187         * search.c (note_debug_info_needed): Don't do anything if we're in a
15188         template.
15189         * method.c (synthesize_method): For non-local classes,
15190         push_to_top_level first.
15191
15192 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
15193
15194         * typeck.c (get_delta_difference): Add no_error parameter.
15195         (build_ptrmemfunc): Call get_delta_difference with no_error set;
15196         we don't want error messages when converting unrelated
15197         pointer-to-member functions.
15198
15199 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
15200
15201         * error.c (dump_expr): Improve the wording on error messages that
15202         involve pointer to member functions.
15203
15204 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
15205
15206         * cvt.c (cp_convert_to_pointer): Move code for conversions from
15207         (::*)() to void* or (*)() up a bit, so that we can convert from
15208         METHOD_TYPEs as well.
15209
15210 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15211
15212         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
15213         There are no 'member' types.
15214         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
15215         (build_x_typeid): Handle errors.
15216
15217 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
15218
15219         * typeck.c (convert_for_assignment): Handle anachronistic implicit
15220         conversions from (::*)() to void* or (*)().
15221         * cvt.c (cp_convert_to_pointer): Likewise.
15222         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
15223         conversions from here.
15224         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
15225         * lang-options.h: Likewise.
15226         * decl2.c (warn_pmf2ptr): Define.
15227         * cp-tree.h: Declare it.
15228         * typeck2.c (digest_init): Allow pmfs down into
15229         convert_for_initialization.
15230
15231 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15232
15233         * typeck.c (c_expand_return): Fix for returning overloaded fn.
15234
15235 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15236
15237         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
15238         * decl.c (grok_reference_init): Pass DIRECT_BIND.
15239         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
15240         DIRECT_BIND.
15241         * call.c (convert_like): Don't pass INDIRECT_BIND.
15242         * typeck.c (convert_arguments): Likewise.
15243         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
15244
15245 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15246
15247         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
15248         similar code in build_up_ref.
15249         * cvt.c (build_up_reference): Drastically simplify.
15250
15251 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
15252
15253         * typeck.c (signed_or_unsigned_type): If the given type already
15254         as the correct signedness, then just return it.
15255
15256         * typeck.c ({un,}signed_type): If can't do anything, call
15257         signed_or_unsigned_type.
15258
15259 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
15260
15261         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
15262         current_class_type is NULL.
15263
15264 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
15265
15266         * class.c (finish_struct_1): Avoid empty structs by adding a field
15267         so layout_type gets the mode right.
15268
15269         * typeck.c (c_expand_return): Drastically simplify.
15270
15271 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15272
15273         * typeck.c (decay_conversion): Handle overloaded methods.
15274
15275 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15276
15277         * call.c (build_over_call): A TARGET_EXPR has side-effects.
15278
15279 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
15280
15281         * cvt.c (convert_to_pointer_force): Add code to support pointer to
15282         member function to pointer to function conversions.
15283         * init.c (resolve_offset_ref): Add code to allow faked up objects,
15284         ignoring them if they are not used, and giving an error, if they
15285         are needed.
15286         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
15287         code, and so that we can give an error, if we needed an object,
15288         and one was not provided.
15289         (build_c_cast): Don't call default_conversion when we want to
15290         convert to pointer to function from a METHOD_TYPE.
15291
15292 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
15293
15294         * Make-lang.in (cplib2.ready): Fix logic.
15295
15296         * decl.c (shadow_tag): Only complain about non-artificial function
15297         members.
15298
15299         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
15300
15301 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
15302
15303         * expr.c (cplus_expand_expr): Pre-tweak call_target like
15304         expand_inline_function would.
15305
15306         * pt.c (mark_decl_instantiated): If extern_p, call
15307         mark_inline_for_output.
15308
15309 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
15310
15311         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
15312         pmd conversions.
15313
15314         * typeck.c (get_delta_difference): Fix wording, as we can be used
15315         for pointer to data members.
15316
15317 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
15318
15319         * pt.c (tsubst): If the function decl isn't a member of this
15320         template, return a copy of the decl (including copying the
15321         lang-specific part) so we don't hose ourselves later.
15322
15323 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15324
15325         * class.c (finish_struct): Remove DWARF-specific tag handling.
15326         * decl.c (pushtag): Likewise.
15327         (finish_function): Always clear DECL_ARGUMENTS on function decls with
15328         no saved RTX.
15329         * decl2.c (finish_file): Emit DWARF debugging info for static data
15330         members.
15331
15332 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
15333
15334         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
15335         isn't the same as the new one before we whack it.
15336
15337 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15338
15339         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
15340         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
15341         warn_traditional and warn_strict_prototypes; remove ancient
15342         'overload' code; remove references to flag_traditional.
15343
15344 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
15345
15346         * input.c (sub_getch): Handle 8-bit characters in string literals.
15347
15348 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
15349
15350         * tree.c (mapcar): Handle CONSTRUCTORs.
15351         (copy_to_permanent): Handle expression_obstack properly.
15352
15353         * Make-lang.in (cplib2.txt): Also depend on the headers.
15354
15355         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
15356         INT_TYPE_SIZE.
15357         (expand_class_desc): Use USItype for offset field.
15358         * tinfo.h (struct __class_type_info): Likewise.
15359
15360         * method.c (build_overload_int): TYPE_PRECISION should be applied
15361         to types.
15362
15363 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15364
15365         * call.c (build_new_op): A COND_EXPR involving void must be a
15366         builtin.
15367
15368 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15369
15370         * typeck.c (build_x_component_ref): New fn.
15371         (build_object_ref): Use it.
15372         * parse.y (primary): Use it.
15373         * decl2.c (build_expr_from_tree): Use it.
15374         * cp-tree.h: Declare it.
15375
15376         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
15377         * error.c (dump_type_suffix): Handle variable arrays.
15378
15379 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15380
15381         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
15382
15383 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15384
15385         * decl.c (lookup_name_real): Don't try to look up anything in a
15386         TYPENAME_TYPE.
15387
15388         * tinfo2.cc (__throw_type_match_rtti): Oops.
15389
15390 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15391
15392         * Make-lang.in (exception.o): Use -fno-PIC for now.
15393
15394 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15395
15396         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
15397         calling them.
15398         (get_tinfo_fn_dynamic): Extracted from build_typeid.
15399         * tinfo2.cc (__dynamic_cast): Adjust.
15400
15401         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
15402         (build_x_typeid): Likewise.
15403
15404         * parse.y: Call build_x_typeid instead of build_typeid.
15405         * cp-tree.def: Add TYPEID_EXPR.
15406         * pt.c (tsubst_copy): Handle typeid.
15407         * decl2.c (build_expr_from_tree): Likewise.
15408         * rtti.c (build_x_typeid): Throw bad_typeid from here.
15409         (build_typeid): Not here.
15410         * cp-tree.h: Declare build_x_typeid.
15411
15412 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
15413
15414         * call.c (convert_like): Pull out constant values.
15415
15416         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15417
15418 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15419
15420         * decl.c (init_decl_processing): Create short int types before
15421         creating size_t in case a machine description needs to use
15422         unsigned short for size_t.
15423
15424 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15425
15426         * Make-lang.in (exception.o): Turn off pic.
15427
15428         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15429         type, multi-level ptr conversions.
15430
15431         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15432         (throw_bad_cast): Use it.
15433         (throw_bad_typeid): New fn.
15434         (build_typeid): Throw bad_typeid as needed.
15435         Use build_call.
15436         (synthesize_tinfo_fn): Handle functions and arrays before checking
15437         for cv-quals.
15438
15439         * Remove .h from standard C++ headers, add new.h, move into inc
15440         subdirectory.
15441
15442         * exception*: Remove pointer from object, constructors.  Add
15443         default exception::what that uses type_info::name.  Add
15444         __throw_bad_typeid.
15445
15446         * init.c (build_new): Don't add a cookie to new (void *) T[2].
15447
15448 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
15449
15450         * Make-lang.in: Building C++ code depends on cc1plus.
15451
15452 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15453
15454         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15455         a HOST_WIDE_INT, not a tree.
15456
15457 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15458
15459         * exception.cc: Don't include <stdlib.h>.
15460
15461         * Make-lang.in (c++.clean): Remove cplib2.*.
15462
15463 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
15464
15465         * parse.y (component_decl_1, component_costructor_declarator case):
15466         Pass attributes/prefix_attributes in tree list.
15467
15468 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15469
15470         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15471
15472 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15473
15474         * lex.c (do_identifier): Don't do deferred lookup in a template
15475         header.
15476
15477         * typeck2.c (store_init_value): Oops.
15478
15479         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15480         New files for C++ lang-support library.
15481         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15482         (CXX_LIB2FUNCS): Define.
15483         And rules for building the C++ lang-support code.
15484         * config-lang.in (headers): Define.
15485         (lib2funcs): Define.
15486
15487 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15488
15489         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15490         digest_init.
15491         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15492         * typeck2.c (store_init_value): Check for initializing pmf with { }
15493         here.
15494         (process_init_constructor): Not here.
15495
15496 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15497
15498         * pt.c (begin_template_parm_list): Increment
15499         processing_template_decl here.
15500         (end_template_parm_list): Not here.
15501         (process_template_parm): No need to add 1 to it now.
15502         * *.c: Use processing_template_decl instead of current_template_parms
15503         to check for being in a template.
15504
15505         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
15506         (tsubst_copy): Handle CONSTRUCTOR.
15507         (instantiate_decl): Set up context properly for variables.
15508         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15509         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15510
15511 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15512
15513         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15514
15515 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15516
15517         * method.c (make_thunk): Call comdat_linkage before setting the
15518         TREE_CODE.
15519
15520         * decl2.c (comdat_linkage): Use make_decl_one_only.
15521         (import_export_decl): Likewise.
15522         * decl.c (init_decl_processing): Check supports_one_only instead of
15523         SUPPORTS_WEAK.
15524
15525 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15526
15527         * decl2.c (grokfield): Tighten checking for access decls.
15528
15529         * decl.c (make_typename_type): Resolve references to
15530         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
15531         (lookup_name_real): Types that depend on a template parameter get
15532         an implicit 'typename' unless they're in the current scope.
15533         (start_decl_1): We don't care about incomplete types that depend
15534         on a template parm.
15535         (grokdeclarator): Resolve 'typename's in the type specifier that
15536         refer to members of the current scope.
15537
15538         * call.c (build_over_call): Remove 'inline called before
15539         definition' diagnostic.
15540         (build_method_call): Likewise.
15541         * decl.c (duplicate_decls): Downgrade 'used before declared
15542         inline' to a warning, only with -Winline.
15543
15544 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
15545
15546         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15547
15548 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15549
15550         * call.c (build_method_call): When calling a signature
15551         default implementation, as in other cases, let instance_ptr simply
15552         be instance.
15553
15554 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
15555
15556         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15557
15558 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
15559
15560         * except.c (expand_start_catch_block): Add a pushlevel so that -g
15561         works on hppa and SPARC.
15562
15563 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15564
15565         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15566
15567 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15568
15569         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15570         before testing whether it's a signature.
15571
15572 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15573
15574         * call.c (build_new_method_call): Don't complain about signature
15575         pointers and references not being an aggr type.
15576         (build_this): If a signature pointer or reference was passed in,
15577         just return it.
15578         (build_new_method_call): If instance is a signature pointer, set
15579         basetype to the signature type of instance.
15580         * sig.c (build_signature_method_call): Deleted basetype and
15581         instance parameters, they can be found as the DECL_CONTEXT of
15582         function and as the first argument passed in.
15583         * cp-tree.h: Changed declaration of build_signature_method_call.
15584         * call.c (build_method_call): Deleted first two arguments in call
15585         of build_signature_method_call.
15586         (build_over_call): Added call to build_signature_method_call.
15587
15588 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15589
15590         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15591         target_expr.
15592
15593 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15594
15595         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15596
15597 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
15598
15599         * except.c (expand_start_try_stmts): Move to except.c in the backend.
15600         (expand_end_try_stmts): Remove.
15601
15602         * init.c (perform_member_init): Use add_partial_entry () instead
15603         of directly manipulating lists.
15604         (emit_base_init): Likewise.
15605
15606 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
15607
15608         * except.c (expand_exception_blocks): Always make sure USE and
15609         CLOBBER insns that came at the end still do, the backend relies
15610         upon this.
15611
15612 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15613
15614         * call.c (build_over_call): We can only use a TARGET_EXPR of the
15615         right type.
15616
15617 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
15618
15619         * cvt.c (convert_to_reference): Revert last change, don't complain
15620         about temp without target decl.
15621
15622 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
15623
15624         * decl.c (grokdeclarator): Don't core dump when void() is given.
15625
15626 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
15627
15628         * decl.c (copy_args_p): Don't crash.
15629
15630 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
15631
15632         * pt.c (tsubst): And support template args inside the exception
15633         specification.
15634
15635         * pt.c (tsubst): Add support for exception specifications in
15636         template functions.
15637
15638 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
15639
15640         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
15641         fields now.
15642         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
15643         (start_function): Likewise.
15644         (start_method): Likewise.
15645         (grokfield): Likewise.
15646         (make_call_declarator): Add throw spec parameter.
15647         (set_quals_and_spec): Add routine.
15648         * lex.c (set_quals_and_spec): Likewise.
15649         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
15650         * decl.c (shadow_tag): Eliminate the throw spec parameter to
15651         grokdeclarator.
15652         (groktypename): Likewise.
15653         (start_decl): Eliminate the throw spec parameter.  Eliminate the
15654         throw spec parameter to grokdeclarator.  Eliminate the throw spec
15655         field in DECL_STMT.
15656         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
15657         (grokfndecl): Remove useless set of raises.
15658         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
15659         the throw spec parameter to start_decl.  Pull the throw spec out
15660         of the call declarator.
15661         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
15662         (start_function): Eliminate the throw spec parameter.  Eliminate
15663         the throw spec parameter to grokdeclarator.
15664         (start_method): Likewise.
15665         * decl2.c (grokfield): Likewise.
15666         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
15667         (grokoptypename): Likewise.
15668         (finish_file): Eliminate the throw spec parameter to
15669         start_function.  Add throw spec to make_call_declarator.
15670         * except.c (init_exception_processing): Add throw spec to
15671         make_call_declarator.  Eliminate the throw spec parameter to
15672         start_decl.
15673         (expand_start_catch_block): Eliminate the throw spec parameter to
15674         grokdeclarator.
15675         (expand_builtin_throw): Add throw spec to make_call_declarator.
15676         Eliminate the throw spec parameter to start_function.
15677         (start_anon_func): Likewise.
15678         * lex.c (make_call_declarator): Add throw spec parameter.
15679         (set_quals_and_spec): New routine.
15680         (cons_up_default_function): Add throw spec to make_call_declarator.
15681         Eliminate the throw spec parameter to grokfield.
15682         * method.c (synthesize_method): Eliminate the throw spec parameter
15683         to start_function.
15684         * pt.c (process_template_parm): Eliminate the throw spec parameter
15685         to grokdeclarator.
15686         (tsubst): Add throw spec to make_call_declarator.
15687         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
15688         (do_function_instantiation): Eliminate the throw spec parameter to
15689         grokdeclarator.  Eliminate the throw spec parameter to
15690         start_function.
15691         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
15692         to start_function.
15693         * parse.y (datadef): Remove non-winning optimization.
15694         (decl): Likewise.
15695         (fndef): Remove ambiguous error productions uncovered by grammar
15696         fixing.
15697         (constructor_declarator): Add exception_specification_opt here.
15698         (component_constructor_declarator): Likewise.
15699         (direct_after_type_declarator): Likewise.
15700         (complex_direct_notype_declarator): Likewise.
15701         (direct_abstract_declarator): Likewise.
15702         (fn.def1): Remove exception_specification_opt.
15703         (fn.def2): Likewise.
15704         (condition): Likewise.
15705         (initdcl0): Likewise.
15706         (initdcl): Likewise.
15707         (notype_initdcl0): Likewise.
15708         (nomods_initdcl0): Likewise.
15709         (component_decl_1): Likewise.
15710         (component_declarator): Likewise.
15711         (after_type_component_declarator0): Likewise.
15712         (after_type_component_declarator): Likewise.
15713         (notype_component_declarator): Likewise.
15714
15715 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15716
15717         * call.c (build_over_call): Also use an INIT_EXPR when
15718         initializing anything from an rvalue.
15719
15720         * call.c (build_over_call): Call stabilize_reference when building
15721         an INIT_EXPR instead of calling the copy ctor.
15722
15723         * call.c (joust): Extend the previous change to all comparisons.
15724
15725         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
15726         NO_LINKAGE_HEURISTICS.
15727
15728         * decl2.c (finish_file): Emit any statics that weren't already.
15729
15730         * typeck.c (build_static_cast): Implement.
15731         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
15732         * decl.c (grokparms): Use can_convert_arg instead of
15733         implicit_conversion directly.
15734         (copy_args_p): New fn.
15735         * cvt.c (convert_to_reference): Don't complain about temp with
15736         static_cast.
15737         (build_up_reference): Handle TARGET_EXPRs.
15738         * call.c (build_over_call): Elide unnecessary temps.
15739         (can_convert*): Use new overloading code.
15740
15741 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
15742
15743         * call.c: Move TYPE_PTR*_MACROS ...
15744         * cp-tree.h: To here.
15745         * typeck.c (build_reinterpret_cast): Implement.
15746
15747         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
15748         ptr_complete_ob.
15749         (joust): If we're comparing a function to a builtin and the worst
15750         conversion for the builtin is worse than the worst conversion for the
15751         function, take the function.
15752
15753         * typeck.c (build_const_cast): Implement.
15754         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
15755         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
15756
15757 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
15758
15759         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
15760         too early.  Make sure we explode if exprtype turns out to be a
15761         NULL_TREE when it shouldn't be.
15762
15763 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
15764
15765         * cp-tree.h: New routine make_call_declarator.
15766         * lex.c (make_call_declarator): Define it.
15767         * except.c (init_exception_processing): Use it.
15768         (expand_builtin_throw): Likewise.
15769         (start_anon_func): Likewise.
15770         * decl2.c (finish_file): Likewise.
15771         * lex.c (cons_up_default_function): Likewise.
15772         * parse.y: Likewise.
15773         * pt.c (tsubst): Likewise.
15774
15775 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
15776
15777         * decl2.c (groktypefield): Remove unused code.
15778
15779 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
15780
15781         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
15782         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
15783         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
15784         nonempty_cv_qualifiers.
15785         * hash.h: Rebuild.
15786
15787         * lex.c (make_pointer_declarator): Change type_quals into
15788         cv_qualifiers.
15789         (make_reference_declarator): Likewise.
15790
15791 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15792
15793         * decl.c (start_function): Only check interface_* for templates
15794         with flag_alt_external_templates.
15795
15796         * call.c (build_new_op): Check for comparison of different enum types.
15797         (build_over_call): Fix arg # output.
15798
15799         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
15800
15801 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
15802
15803         * call.c (build_new_op): Check for erroneous args.
15804
15805         * call.c (build_new_method_call): Add missing args to cp_error.
15806
15807         * tree.c (error_type): Don't print reference-to-array.
15808
15809         * typeck.c (convert_for_assignment): Don't say contravariance for
15810         removing const.
15811
15812 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15813
15814         * call.c (build_over_call): Diagnose bad convs for `this'.
15815
15816         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
15817         on _ctor_arg.
15818
15819         * call.c (convert_like): Handle bad convs.
15820         (build_over_call): Handle bad convs better.
15821
15822         * decl2.c: -fansi-overloading is now the default.
15823
15824         * call.c (build_new_method_call): Check for erroneous args.
15825
15826         * pt.c (instantiate_class_template): Propagate
15827         TYPE_USES_MULTIPLE_INHERITANCE.
15828
15829 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
15830
15831         * call.c (enforce_access): Add static to routine.
15832
15833 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
15834
15835         * call.c (build_user_type_conversion_1): Fix bad handling.
15836         (compare_ics): Likewise.
15837
15838 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15839
15840         * call.c (standard_conversion): Oops.
15841
15842 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
15843
15844         * g++.c: Update test for win32 (&& ! cygwin32).
15845
15846 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15847
15848         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
15849         (ptr_reasonably_similar): New fn.
15850         * call.c (BAD_RANK): New rank.
15851         (ICS_BAD_FLAG): New macro.
15852         (standard_conversion): Handle almost-right pointer conversions.
15853         (reference_binding): Handle bad rvalue bindings.
15854         (add_*_candidate): Stuff.
15855         (build_over_call): Pass bad conversions to convert_for_initialization.
15856         (compare_ics): Handle bad convs.
15857         (joust): Likewise.
15858
15859 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
15860
15861         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
15862         integer_type_node when computing pointer offsets.
15863
15864 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
15865
15866         * tree.c (lvalue_type): New fn.
15867         (error_type): New fn.
15868         * call.c (op_error): Use error_type.
15869         (add_conv_candidate): Use lvalue_type.
15870         (add_builtin_candidates): Likewise.
15871         * error.c (args_as_string): Use error_type.
15872
15873 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15874
15875         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
15876         (tsubst): Not here.
15877
15878         * decl.c (init_decl_processing): With -ansi, __null's type is the
15879         signed integral type with the same number of bits as a pointer.
15880         Introduce a new variable null_node for it.
15881         * cp-tree.h: Adjust.
15882         * call.c (null_ptr_cst_p): Adjust.
15883
15884 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
15885
15886         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
15887         optimize.
15888
15889 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15890
15891         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
15892         fns of classes without virtual functions.
15893
15894         * call.c (add_function_candidate): Handle `this' specially.
15895         (compare_ics): Likewise.
15896
15897 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
15898
15899         * typeck.c (build_conditional_expr): Fix handling of __null.
15900
15901         * decl2.c (comdat_linkage): New fn.
15902         (import_export_vtable): Use it.
15903         (import_export_decl): Use it.
15904         * method.c (make_thunk): Use it.
15905
15906 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15907
15908         * pt.c (end_template_decl): If we don't actually have parms, return.
15909         * parse.y (template_header): Accept 'template <>'.
15910
15911         * errfn.c: Allow 5 args.
15912
15913 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
15914
15915         * tree.c (make_temp_vec): New fn.
15916         * pt.c (push_template_decl): Handle partial specs.
15917         (instantiate_class_template): Likewise.
15918         (more_specialized): Use get_bindings.
15919         (more_specialized_class): New fn.
15920         (get_class_bindings): New fn.
15921         (most_specialized_class): New fn.
15922         (do_function_instantiation): List candidates for ambiguous case.
15923         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15924         (shadow_tag): Call push_template_decl for partial specializations.
15925         * parse.y: Likewise.
15926         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15927         DECL_TEMPLATE_MEMBERS.
15928         * call.c (print_z_candidates): Reduce duplication.
15929
15930 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15931
15932         * decl2.c (lang_decode_option): Allow -fansi-overloading.
15933
15934 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15935
15936         * pt.c (get_bindings): New fn.
15937         (most_specialized): Likewise.
15938         (do_function_instantiation): Use them.
15939         (add_maybe_template): New fn.
15940         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15941         * call.c (build_new_op): Handle guiding decls.
15942         (build_new_function_call): Likewise.
15943         * decl2.c (finish_file): Likewise.
15944
15945         * decl2.c (mark_used): Do synthesis here.
15946         * call.c (build_method_call): Not here.
15947         (build_over_call): Or here.
15948         * typeck.c (build_function_call_real): Or here.
15949         * tree.c (bot_manip): Call mark_used on functions used in default
15950         args.
15951
15952 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15953
15954         * decl2.c (import_export_vtable): Delete code that disabled vtable
15955         heuristic on systems with ASM_OUTPUT_EXTERNAL.
15956
15957 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15958
15959         * typeck.c (build_x_function_call): Handle static call context
15960         better.
15961
15962         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15963         the function, not its outer block.
15964
15965         * call.c (build_field_call): Pass fields on to build_opfncall
15966         regardless of TYPE_OVERLOADS_CALL_EXPR.
15967         (build_method_call): Pass on to build_new_method_call sooner.
15968
15969         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15970         gives us.
15971         * class.c (instantiate_type): Don't put a POINTER_TYPE to
15972         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
15973         modifying it.
15974
15975 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
15976
15977         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15978         (add_builtin_candidate): Don't take enums for ++.
15979         (build_new_method_call): Handle non-aggregates and field calls.
15980         Move new overloading code from...
15981         * cvt.c: Here.
15982
15983         * decl.c (grokparms): Don't check default args in templates.
15984
15985 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
15986
15987         * cvt.c (build_new_op): Fix args to build_unary_op.
15988         (add_builtin_candidates): Don't call type_promotes_to on float.
15989
15990         * decl.c (grokparms): Check the type of the default arg.
15991
15992         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
15993         returning NULL_TREE.
15994
15995         * typeck.c (build_x_binary_op): Avoid doing extra work.
15996         (build_x_unary_op): Likewise.
15997         (build_x_conditional_expr): Likewise.
15998         * cvt.c (build_over_call): Return.
15999         (add_builtin_candidate): Fix MEMBER_REF.
16000         (build_new_op): Likewise.
16001
16002 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
16003
16004         * method.c (build_overload_name): Put bug fix into code but leave
16005         disabled for now so we can be bug compatible with older releases
16006         that do repeats incorrectly.  In the future, we can enable it.
16007
16008 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
16009
16010         * cvt.c (convert_like): Don't call build_cplus_new twice.
16011
16012         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
16013         Control new overloading code with -fansi-overloading.
16014
16015 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16016
16017         * cvt.c (build_over_call): Call build_cplus_new.
16018         * call.c (build_method_call): Likewise.
16019         * typeck.c (build_function_call_real): Likewise.
16020         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
16021         the COND_EXPR in a TARGET_EXPR so they use the same slot.
16022
16023         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
16024         recursive calls.
16025         * typeck.c (complete_type): Propagate
16026         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
16027
16028 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
16029
16030         * cvt.c (joust): More ?: kludging.  Sigh.
16031         (build_over_call): Don't try to synthesize global fns.
16032
16033         * search.c (lookup_conversions): Use binfo marking.
16034
16035 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
16036
16037         * search.c (build_mi_matrix): Use the correct value of cid
16038         when determining the new mi_size.
16039
16040 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16041
16042         * cvt.c (add_builtin_candidates): Do consider type conversion ops
16043         for the first parms of += et al.
16044         (strip_top_quals): New fn.
16045         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
16046         (implicit_conversion): Likewise.
16047         (add_builtin_candidates): Be careful about arrays.
16048         (build_new_method_call): Handle vtable optimization.
16049
16050 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16051
16052         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
16053         * cvt.c (reference_binding): Use it.
16054         (implicit_conversion): Use it.
16055         (add_builtin_candidate, COND_EXPR): Use it.
16056
16057         * cvt.c (build_new_function_call): Check for error args.
16058
16059         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
16060
16061         * gxx.gperf: Add __null.
16062         * hash.h: Regenerate.
16063         * lex.h: Add RID_NULL.
16064         * lex.c (init_lex): Create null_pointer_node here, stick it in
16065         RID_NULL.
16066         * decl.c (init_decl_processing): Still set its type here.
16067         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
16068         (convert_to_pointer_force): Likewise.
16069         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
16070         if (! pedantic).
16071         * call.c (convert_harshness): Use null_ptr_cst_p.
16072         * typeck.c (convert_for_assignment): Likewise.  Don't produce
16073         null_pointer_node.
16074
16075         * error.c (args_as_string): Handle lists of actual args, too.
16076         * cvt.c (null_ptr_cst): Support (void*)0 for now.
16077         (build_user_type_conversion_1): Improve diagnostics.
16078         (build_new_function_call): Likewise.
16079         (build_object_call): Likewise.
16080         (build_new_method_call): Likewise.  Move call before def diagnostic...
16081         (build_over_call): Here.
16082
16083         * cvt.c (build_new_method_call): Don't complain about no match if
16084         LOOKUP_SPECULATIVELY.
16085         (build_over_call): Fix 'this' for virtual fn.
16086         (build_new_method_call): Add diagnostic.
16087
16088 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16089
16090         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
16091         constructors to be passed in.
16092         (build_over_call): Likewise.
16093         (build_user_type_conversion_1): Pass them in.
16094         (convert_like): Likewise.
16095         (build_object_call): Handle overloaded conversions.
16096         (build_over_call): Pass the right args to build_vfn_ref.
16097         (standard_conversion): Fix pmf convs.
16098         (joust): Handle comparing statics and non-statics.
16099         (build_new_method_call): New fn.
16100         * call.c (build_method_call): Call it if NEW_OVER.
16101
16102 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
16103
16104         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
16105         %D instead.
16106
16107 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
16108
16109         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
16110         instead of just maybe_build_cleanup so that we deallocate the
16111         thrown object.
16112
16113 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16114
16115         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
16116         * cp-tree.h (finish_prevtable_vardecl): Add decl.
16117
16118 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
16119
16120         * pt.c (instantiate_class_template): Call complete_type.  Also, if
16121         we're at the end of the file and we just instantiated a template
16122         class with a vtable, call finish_prevtable_vardecl.
16123
16124         * error.c (dump_decl): Don't explode (or explode more gracefully
16125         as appropriate) if the object being dumped has a null type.
16126         (dump_expr): Likewise.
16127
16128         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
16129         by counting the number of nodes that we'll need before allocating
16130         the array.
16131         (lookup_fnfields): Fix comment.
16132         (breadth_first_search): Fix comment.
16133
16134 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
16135
16136         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
16137         TYPE_ALIGN.
16138         * class.c (finish_struct): Call cplus_decl_attributes here.
16139         (finish_struct_1): Not here.
16140         * cp-tree.h: Adjust.
16141
16142         * pt.c (type_unification): New parameter STRICT.
16143         (unify): If STRICT, don't allow cv addition or base deduction.
16144         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
16145
16146 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16147
16148         * search.c (get_template_base{_recursive}): New fns.
16149         * pt.c (more_specialized): New fn.
16150         (do_function_instantiation): Use it.
16151         (unify): Handle base deduction.
16152         * cvt.c (joust): Use more_specialized.
16153         Don't arbitrarily choose between non-builtin candidates.
16154         (build_over_call): Call require_complete_type.
16155
16156         * decl.c (start_function): Statics are static even in a #pragma
16157         interface file.
16158
16159         * decl2.c (import_export_vtable): Disable vtable heuristic on
16160         systems with ASM_OUTPUT_EXTERNAL.
16161
16162         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
16163         (standard_conversion): No std conv to enum type.
16164
16165         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
16166         for ptm's.
16167
16168         * cvt.c (reference_binding): Bind directly to a base subobject of
16169         a class rvalue.
16170
16171         * cvt.c (build_new_op): Enforce access control.
16172
16173 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16174
16175         * typeck2.c (process_init_constructor): When scanning the
16176         union for a named field, skip things that aren't FIELD_DECLs.
16177
16178         * method.c (synthesize_method): Don't scan fndecl's rtl if
16179         we're at the end of the file; just assume the function can't
16180         be inlined.
16181
16182 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16183
16184         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
16185         it failed.
16186
16187         * cvt.c (build_user_type_conversion_1): Handle overloaded
16188         conversion ops.
16189
16190         * cvt.c (add_builtin_candidates): Don't consider type conversion
16191         operators for the first parameter of operator=.
16192
16193 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16194
16195         * typeck.c (complete_type): Only call layout_type if we're not
16196         expanding a template.
16197
16198 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16199
16200         * cvt.c (compare_ics): Oops.
16201
16202         * cvt.c (op_error): Oops.
16203
16204         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
16205         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
16206         (build_conv): Use them.
16207         (implicit_conversion): Use them.
16208         (convert_like): Handle them.
16209         (build_new_op): Handle builtin COND_EXPR again.
16210         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
16211         in lists of types for COND_EXPR.
16212         (add_builtin_candidate): Add enum candidates for COND_EXPR.
16213
16214 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16215
16216         * typeck.c (build_modify_expr): Always attempt to build a call to
16217         the assignment operator, even if we're using a default one.
16218         (convert_for_initialization): Call complete_type.
16219
16220 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16221
16222         * cvt.c (reference_binding): A REF_BIND gets the reference type.
16223         (implicit_conversion): Likewise.
16224         (convert_like): Likewise.
16225         (compare_ics): Likewise.
16226         (compare_qual): Likewise.
16227         (print_z_candidates): Handle no candidates.
16228         (build_new_op): Don't handle builtin COND_EXPR for now.
16229
16230 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
16231
16232         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
16233
16234 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16235
16236         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
16237
16238         * cvt.c (build_builtin_candidate): Oops.
16239         (build_new_op): Oops.
16240
16241         * method.c (build_opfncall): Pass COND_EXPR on.
16242         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
16243         (add_builtin_candidate{,s}): Likewise.
16244         (add_builtin_candidates): Likewise.
16245         (print_z_candidates, op_error, build_new_op): Likewise.
16246         (type_decays_to): New fn.
16247         * lex.c (init_lex): Just say ?: for COND_EXPR.
16248
16249 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16250
16251         * typeck.c (complete_type): Call layout_type rather than building
16252         a new array type.
16253
16254         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
16255         only use ptrdiff_t.
16256
16257 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16258
16259         * cvt.c: Always compile the new overloading code (but don't use it).
16260         (implicit_conversion): Add a BASE_CONV when converting to
16261         the same class type.
16262         (convert_like): Handle BASE_CONV.
16263
16264 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16265
16266         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
16267         (add_builtin_candidate): Likewise.
16268
16269         NEW_OVER changes:
16270         * typeck.c (build_x_function_call): Try an operator function
16271         whenever we call an object of class type.
16272         * method.c (build_opfncall): Pass CALL_EXPRs through.
16273         * cvt.c (implicit_conversion): Do const-ref case first.
16274         (add_conv_candidate, build_object_call, op_error): New fns.
16275         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
16276         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
16277         builtin candidates.
16278         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
16279         Fall back on preincrement handling.  Use op_error.
16280         Handle warn_synth.
16281         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
16282         an error_mark_node.
16283         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
16284         properly.
16285
16286 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16287
16288         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
16289
16290 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
16291
16292         * typeck.c (build_component_ref_1): Use build_component_ref
16293         instead of open coding it here.
16294
16295 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16296
16297         * g++.c (main): Don't link with -lg++.
16298
16299         NEW_OVER changes:
16300         * cvt.c (convert_to_reference): Don't use convert_from_reference on
16301         result of build_type_conversion.
16302         (cp_convert): Only call build_method_call for ctors if
16303         build_type_conversion failed.
16304         (ptr_complete_ob): New function.
16305         (TYPE_PTR{,OB,MEM}_P): New macros.
16306         ({add,build}_builtin_candidate{,s}): New functions.
16307         (print_z_candidates): Handle builtins.
16308         (build_user_type_conversion_1): Don't use conversion fns for
16309         converting to a base type.
16310         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
16311         (build_user_type_conversion): Use convert_from_reference.
16312         (build_new_op): New function.
16313         (build_over_call): Fix handling of methods.
16314         (compare_ics): Handle AMBIG_CONV properly.
16315         * typeck2.c: Increment abort count.
16316         * method.c (build_opfncall): Forward most requests to build_new_op.
16317         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
16318
16319 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16320
16321         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
16322         invalid second argument to dump_expr_list.
16323
16324 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
16325
16326         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
16327
16328 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
16329
16330         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
16331         ASSEMBLE_EXTERNAL.
16332
16333 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
16334
16335         * typeck2.c (process_init_constructor): New pedwarn for using { }
16336         to initialize a pointer to member function.
16337         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
16338         we can avoid the new error.
16339
16340 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
16341
16342         * typeck.c (build_ptrmemfunc1): New function to hide details of
16343         pointer to member functions better.
16344
16345 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
16346
16347         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
16348         methods into the actual method, as we know the implied object is
16349         not used.
16350
16351 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16352
16353         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
16354         inside a system header.
16355
16356 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
16357
16358         * call.c (build_method_call): Call complete_type on the
16359         instance type.
16360
16361 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
16362
16363         * typeck.c (build_component_ref): Always build up an OFFSET_REF
16364         for obj_ptr->func so that we can know which object to use in a
16365         method call.
16366
16367 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
16368
16369         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
16370         around things.  Also improve maintainability.
16371
16372 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
16373
16374         * decl.c (grokdeclarator): Check for overflow when evaluating an
16375         array dimension.
16376
16377 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16378
16379         * cvt.c (cp_convert): Don't check for ambiguity with constructor
16380         if NEW_OVER.
16381
16382         * typeck.c (build_x_function_call): Pass function overload
16383         questions to new overloading code if NEW_OVER.
16384         * init.c (expand_aggr_init_1): Only check for type conversion ops
16385         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
16386         Don't check for ambiguity with constructor if NEW_OVER.
16387         * cvt.c (convert_to_reference): Dereference the result of a type
16388         conversion operator.
16389         (build_conv): Propagate ICS_USER_FLAG.
16390         (implicit_conversion): Call instantiate_type.
16391         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
16392         (add_function_candidate): Fix cv-quals on argtype.
16393         (print_z_candidates): New function.
16394         (build_new_function_call): Call it.
16395         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
16396         consider non-converting constructors.
16397         Call print_z_candidates.
16398         Return an AMBIG_CONV for an ambiguous conversion.
16399         (build_user_type_conversion): Handle AMBIG_CONV.
16400         (convert_like): Fix test for building TARGET_EXPR.
16401         Call instantiate_type.
16402         Handle AMBIG_CONV and LVALUE_CONV.
16403         (build_over_call): Handle 0 args and ellipsis.
16404         * cp-tree.def: Add AMBIG_CONV.
16405
16406 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
16407
16408         * decl.c (lookup_name_real): If we find mem in obj when parsing
16409         `obj->mem', make sure we return the right value.
16410
16411 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
16412
16413         * search.c (get_base_distance): Call complete_type.
16414
16415 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
16416
16417         * decl.c (store_bindings): Make static.
16418
16419 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16420
16421         * init.c (expand_aggr_init_1): Don't check type conversions if
16422         NEW_OVER.
16423
16424         * cvt.c (z_candidate): Put back template field.
16425         (add_function_candidate): Set it.
16426         (add_template_candidate): Likewise.
16427         (joust): Use it.
16428         (compare_qual): Handle references and pointers to members.
16429         (compare_ics): Handle reference bindings.
16430
16431         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16432
16433 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
16434
16435         * call.c (compute_conversion_costs): Call complete_type.
16436
16437         * tree.c (vec_binfo_member): Use comptypes instead of comparing
16438         pointers, so we can handle template parameters.
16439
16440 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16441
16442         * cvt.c (cp_convert_to_pointer): We have to call complete_type
16443         here; let's make it explicit instead of a side effect of an
16444         error check.
16445
16446 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16447
16448         * cvt.c (z_candidate): Remove template field.
16449         (reference_binding): Handle binding to temporary.
16450         (implicit_conversion): Likewise.
16451         (add_function_candidate): Handle artificial constructor parms.
16452         Handle functions with too few parms.
16453         (add_template_candidate): New function.
16454         (build_user_type_conversion_1): Handle constructors.
16455         (convert_like): Likewise.
16456         (build_over_call): Likewise.
16457         (build_new_function_call): Support templates.
16458         (compare_ics): Fix reference, inheritance handling.
16459
16460 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16461
16462         * decl.c: Add signed_size_zero_node.
16463         (init_decl_processing): Build it.
16464         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16465         when we're trying to make a negative delta.
16466
16467 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16468
16469         Stop doing this damn index==strchr variable name confusion.
16470         * class.c (add_virtual_function): Change local var INDEX to be
16471         named IDX.
16472         (add_method): Likewise.
16473         * lex.c (print_parse_statistics): Likewise.
16474         * search.c (make_memoized_table_entry): Likewise.
16475         (lookup_fnfields_here): Likewise.
16476         (lookup_field): Likewise.
16477         (lookup_fnfields): Likewise.
16478         (get_baselinks): Likewise.
16479         * sig.c (build_signature_table_constructor): Likewise.
16480         (build_signature_method_call): Likewise.
16481         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16482         (get_member_function_from_ptrfunc): Likewise.
16483         (build_ptrmemfunc): Change local var INDEX to be IDX.
16484         (c_expand_start_case): Likewise.
16485
16486 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16487
16488         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16489         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16490         (convert_to_reference): Use build_type_conversion to convert to
16491         the reference type directly.
16492         (standard_conversion): Fix void* case, non-conversions.
16493         (reference_binding): Fix expr == 0 case, non-conversions.
16494         (convert_like): Support REF_BIND.
16495         (compare_qual): Split out from compare_ics.
16496         (compare_ics): Use it, handle icses with only a qual_conv.
16497
16498         * init.c (expand_vec_init): Don't crash if decl is NULL.
16499
16500 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
16501
16502         * mpw-config.in: New file, configury for Mac MPW.
16503         * mpw-make.sed: New file, makefile editing for MPW.
16504
16505 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16506
16507         * pt.c (instantiate_class_template): Call repo_template_used.
16508
16509         * search.c (lookup_conversions): Only lookup conversions in
16510         complete types.
16511
16512 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16513
16514         * cp-tree.def: Renamed from tree.def, to avoid confusion with
16515         gcc's tree.def.
16516         * cp-tree.h, lex.c: Include cp-tree.def.
16517         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16518
16519 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16520
16521         * init.c (build_vec_delete_1): Call complete_type.
16522
16523 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
16524
16525         * except.c (start_anon_func): Make sure anonymous functions are
16526         never external.
16527
16528 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16529
16530         * decl.c (finish_function): If function_depth > 1, set nested.
16531
16532         * decl2.c (grokbitfield): Revert Bob's change.
16533         * class.c (finish_struct_1): Fix handling of named bitfield widths.
16534
16535 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16536
16537         * pt.c (add_pending_template): Handle types.
16538         (lookup_template_class): With -fexternal-templates, just add the class
16539         to pending_templates instead of instantiating it now.
16540         * decl2.c (finish_file): Handle types in pending_templates.
16541
16542 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16543
16544         * decl2.c (grokbitfield): Handle constant decls appropriately.
16545         Give an appropriate error message now instead of spewing core
16546         later.
16547
16548 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16549
16550         * decl2.c: Don't turn on thunks by default for now.
16551
16552 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
16553
16554         * typeck.c (complete_type): Handle error_mark_node.
16555         (common_type, OFFSET_TYPE): Handle template_type_parms.
16556
16557 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16558
16559         * pt.c (instantiate_decl): If at_eof, call import_export_decl
16560         regardless of DECL_INLINE.
16561
16562         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16563
16564         * class.c (finish_struct_bits): Copy TYPE_SIZE.
16565
16566         * rtti.c (build_dynamic_cast): Support templates.
16567         * tree.def: Support DYNAMIC_CAST_EXPR.
16568         * pt.c (tsubst_copy): Likewise.
16569         * decl2.c (build_expr_from_tree): Likewise.
16570
16571 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16572
16573         * typeck.c (build_static_cast): Support templates.
16574         (build_const_cast): Likewise.
16575         * tree.def: Support CONST/STATIC_CAST_EXPR.
16576         * pt.c (tsubst_copy): Likewise.
16577         * decl2.c (build_expr_from_tree): Likewise.
16578
16579 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16580
16581         * decl2.c (finish_vtable_vardecl): Don't trust
16582         TREE_SYMBOL_REFERENCED for vtables of local classes.
16583
16584 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16585
16586         * pt.c (tsubst_copy): Handle operator T.
16587
16588 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16589
16590         * init.c (build_delete): Move creation of PARMS inside test of
16591         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16592
16593 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16594
16595         * typeck.c (build_conditional_expr): Don't assume that
16596         the arguments to ?: are always pointers or records.
16597
16598 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16599
16600         * decl2.c (import_export_decl): Still emit static/weak/comdat
16601         copies of inline template functions with -fno-implicit-templates.
16602
16603 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
16604
16605         * init.c (build_delete): Determine the complete basetype
16606         path to the destructor we're calling.
16607
16608 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
16609
16610         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
16611         initialize the enum, because we really and truly don't know where
16612         it came from.
16613         (start_enum): Don't copy integer_zero_node because
16614         build_enumerator will do it.
16615
16616 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16617
16618         * decl.c (finish_function): Do access control on base destructors.
16619
16620         * pt.c (tsubst, case FUNCTION_DECL): Set up
16621         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
16622         hose us.
16623
16624 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
16625
16626         * cvt.c (build_up_reference): If we have already extended the
16627         lifetime of the temporary, don't try it again.
16628         * typeck.c (c_expand_return): Don't try and convert the return
16629         value twice when we want a reference, once is enough.
16630
16631 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
16632
16633         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
16634         LOOKUP_ONLYCONVERTING at all for now.
16635
16636         * search.c (add_conversions): Put the conversion function in
16637         TREE_VALUE, the basetype in TREE_PURPOSE.
16638         * cvt.c (build_type_conversion): Adjust.
16639         * cvt.c (build_expr_type_conversion): Adjust.
16640         * call.c (user_harshness): Adjust.
16641
16642 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16643
16644         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
16645         backend's benefit.
16646
16647 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
16648
16649         * except.c (expand_start_catch_block): Add a dummy region, if we
16650         get an error, so that we can avoid core dumping later.
16651
16652 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
16653
16654         * cp-tree.h (OFFSET_REF): Remove.
16655         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
16656         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
16657         * init.c (expand_aggr_init_1): Likewise.
16658         (build_new): Likewise.
16659         * typeck.c (expand_target_expr): Likewise.
16660
16661 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16662
16663         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
16664         TARGET_EXPR.
16665
16666 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
16667
16668         * cvt.c (build_up_reference): Redo how and when temporaries are
16669         created.
16670         * decl.c (grok_reference_init): Don't try and be smart about
16671         running cleanups.
16672
16673 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
16674
16675         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
16676         (TARGET_EXPR...), now that it has 4 arguments.
16677         * tree.c (build_cplus_new): Likewise.
16678
16679 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16680
16681         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
16682
16683         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
16684         * decl.c (struct saved_scope): Remove named_labels,
16685         {base,member}_init_list.
16686         (maybe_push_to_top_level): Don't set them.  Call
16687         push_cp_function_context if appropriate.
16688         (pop_from_top_level): Likewise.
16689
16690         * method.c (do_build_assign_ref): Remove obsolete check of
16691         TYPE_HAS_ASSIGN_REF (basetype).
16692
16693         * decl.c (grokfndecl): Diagnose user definition of
16694         implicitly-declared methods.
16695
16696 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
16697
16698         * method.c (do_build_copy_constructor): Add code to give
16699         meaningful error messages instead of crashing.
16700         (do_build_assign_ref): Don't synthesize assignment operators for
16701         classes containing reference or const members.
16702
16703         * class.c (struct base_info): Remove cant_synth_copy_ctor
16704         and cant_synth_asn_ref.
16705         (finish_base_struct): Remove the code that tries to conditionalize
16706         synthesis of copy constructors & assignment operators based on
16707         access permissions.  Instead, let it fail when it tries to
16708         synthesize the copy constructor.  This will give meaningful error
16709         messages instead of silently generating code to perform a bitcopy.
16710
16711 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
16712
16713         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
16714         determining types for constant values.
16715
16716         * decl.c (struct named_label_list): Use instead of stuffing
16717         random items into a TREE_LIST node.
16718         (named_label_uses): Use the new struct.
16719         (poplevel): Likewise.
16720         (lookup_label): Likewise.
16721         (define_label): Add an error message to tell the user the line
16722         where the goto is located in addition to the destination of the
16723         goto.
16724         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
16725         named_label_uses.
16726         (finish_function): Likewise.
16727
16728         (start_decl): Complain about defining a static data member
16729         in a different type from which it was declared.
16730
16731 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16732
16733         * cvt.c (build_expr_type_conversion): Adjust.
16734
16735 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
16736
16737         * call.c (build_method_call): Always convert 'this' to the
16738         appropriate type.
16739
16740         * search.c (add_conversions): Put the conversion function in
16741         TREE_VALUE, the type in TREE_PURPOSE.
16742         * cvt.c (build_type_conversion): Adjust.
16743         * call.c (user_harshness): Adjust.
16744
16745         * method.c (emit_thunk): Call temporary_allocation and
16746         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
16747
16748         * tree.c (build_cplus_array_type): Handle tweaking of
16749         TYPE_MAIN_VARIANT here.
16750         * typeck.c (common_type): Not here.
16751
16752         * typeck.c (complete_type): Only try to complete an array type if
16753         it has a domain.
16754
16755 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16756
16757         * decl.c (grokvardecl): Call complete_type.
16758         (grokdeclarator): Call complete_type for PARM_DECLs.
16759
16760 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16761
16762         * pt.c (instantiate_class_template): Re-set
16763         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
16764
16765 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
16766
16767         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
16768         smart enough to do it right.
16769         * tree.c (cp_expand_decl_cleanup): Likewise.
16770         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
16771         cp_expand_decl_cleanup.
16772         (store_parm_decls): Likewise.
16773         (hack_incomplete_structures): Likewise.
16774         * except.c (push_eh_cleanup): Likewise.
16775
16776 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
16777
16778         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
16779         frontend to the backend where it belongs.
16780         * tree.c (unsave_expr): Likewise.
16781         (unsave_expr_now): Likewise.
16782         * tree.def (UNSAVE_EXPR): Likewise.
16783         * cp-tree.h (unsave_expr): Likewise.
16784         (unsave_expr_now): Likewise.
16785
16786 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
16787
16788         * init.c (emit_base_init): Make sure the partial EH cleanups live
16789         on the function_obstack.
16790
16791 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
16792
16793         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
16794         when checking for pointer types.
16795
16796 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16797
16798         * pt.c (instantiate_class_template): Remove obsolete check for
16799         access declarations.
16800
16801 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
16802
16803         * call.c (build_overload_call): Simplify calls to
16804         build_overload_call by removing last parameter.
16805         (build_method_call): Likewise.
16806         * cp-tree.h: Likewise.
16807         * method.c (build_opfncall): Likewise.
16808         * typeck.c (build_x_function_call): Likewise.
16809
16810 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
16811
16812         * call.c (default_parm_conversions): Factor out common code.
16813         (build_method_call): Use it.
16814         (build_overload_call_real): Use it.
16815
16816 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
16817
16818         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
16819         but pedwarn as the code is bogus.
16820         * typeck.c (decay_conversion): Likewise.
16821         (build_function_call_real): Use build_addr_func instead of
16822         default_conversion.  Don't allow pointer-to-method functions down
16823         here.
16824         (build_unary_op): Use real pointer-to-member functions instead of
16825         fake ones.
16826         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
16827         (convert_for_assignment): Removed some obsolete code.
16828         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
16829         build_x_function_call instead of current_class_ptr.  Only call
16830         digest_init once on an initializer, we do this just checking
16831         TREE_TYPE.
16832         (build_expr_from_tree): Pass current_class_ref to
16833         build_x_function_call instead of current_class_ptr.
16834         * init.c (build_member_call): Likewise.
16835         * pase.y: Likewise.
16836         * error.c (dump_expr): Handle OFFSET_REFs better.
16837         * pt.c (unify): Handle pointer-to-member functions better.
16838         * decl.c (finish_function): Clear out current_class_ref just like
16839         we do for current_class_ptr.
16840
16841         * typeck.c (get_delta_difference): Handle virtual bases better.
16842
16843 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
16844
16845         * sig.c (build_signature_table_constructor): Use the delta for
16846         the original basetype for this virtual function with thunks.
16847         (build_signature_method_call): We still need to adjust 'this'
16848         with thunks.
16849
16850 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
16851
16852         * call.c (build_addr_func): New routine.  Used to get the `real'
16853         address of a function or a method.  Needed to avoid getting a
16854         pointer-to-member function.
16855         (build_call): New routine to build CALL_EXPRs.
16856         (build_method_call): Use it.
16857         * cvt.c (convert_to_aggr): Likewise.
16858         * typeck.c (build_function_call_real): Likewise.
16859         * sig.c (build_signature_table_constructor): Use build_addr_func.
16860         * cp-tree.h (build_call, build_addr_func): Declare them.
16861
16862 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
16863
16864         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
16865         * parse.y: Remove uses of LOOKUP_AGGR.
16866
16867 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
16868
16869         * *.[chy]: Rename current_class_decl to current_class_ptr, and
16870         C_C_D to current_class_ref.
16871
16872 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16873
16874         * call.c (convert_harshness): Tighten up pointer conversions.
16875
16876 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
16877
16878         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
16879         (finish_file): Likewise.
16880
16881 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16882
16883         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
16884
16885         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
16886         code.
16887
16888 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16889
16890         * decl2.c: Turn on thunks by default where supported.
16891
16892 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
16893
16894         * cp-tree.h (build_overload_call_maybe): Removed.
16895         * call.c (build_overload_call_real): Invert meaning of last arg to
16896         be require_complete.
16897         (build_overload_call): Likewise.
16898         * typeck.c (build_x_function_call): Use build_overload_call_real
16899         instead of build_overload_call_maybe.
16900
16901 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
16902
16903         * decl2.c (finish_file): Don't try to emit functions that haven't
16904         been compiled.
16905
16906 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16907
16908         * decl2.c (finish_vtable_vardecl): Oops.
16909
16910         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
16911         Also store the bindings from previous_class_values.
16912         (pop_from_top_level): Restore them.
16913
16914 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16915
16916         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16917         symbol has been referenced.
16918         (finish_file): Re-join synthesis/vtable loop with inline emission
16919         loop, disable inlining when an inline is output.
16920
16921 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
16922
16923         * except.c (init_exception_processing): Setup saved_in_catch.
16924         (push_eh_cleanup): Reset __eh_in_catch.
16925         (expand_start_catch_block): Set __eh_in_catch.
16926
16927 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
16928
16929         * except.c (push_eh_cleanup): Add tracking for whether or not we
16930         have an active exception object.
16931         (expand_builtin_throw): Use it to make sure a rethrow without an
16932         exception object is caught.
16933
16934 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16935
16936         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16937         cache.
16938
16939 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16940
16941         * decl2.c (finish_file): Also use sentries for vars with
16942         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16943         created).
16944
16945         * lex.c (handle_cp_pragma): Disable #pragma
16946         interface/implementation if SUPPORTS_ONE_ONLY > 1.
16947
16948 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16949
16950         * method.c (emit_thunk): Wrap default case in
16951         temporary/permanent_allocation.
16952
16953         * method.c (make_thunk): Use DECL_ONE_ONLY.
16954         (emit_thunk): Call assemble_end_function.
16955
16956 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16957
16958         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16959         (import_export_decl): Likewise.
16960         (finish_prevtable_vardecl): Disable vtable hack if
16961         SUPPORTS_ONE_ONLY > 1.
16962
16963 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
16964
16965         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16966         PREDECREMENT_EXPRs take two arguments, not one.
16967
16968 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
16969
16970         * class.c (build_vtable_entry): Don't build thunks for abstract
16971         virtuals.
16972
16973         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16974         frontend.
16975
16976 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
16977
16978         * class.c (set_rtti_entry): Use size_zero_node.
16979         (build_vtable): Likewise.
16980
16981 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
16982
16983         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16984         (prepare_fresh_vtable): Likewise.
16985
16986 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
16987
16988         * method.c (emit_thunk): Call mark_used on the target function.
16989
16990         * call.c (build_method_call): Don't warn about pending templates.
16991
16992 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
16993
16994         * decl2.c (finish_file): Fix list walking logic.
16995
16996         * typeck2.c (check_for_new_type): Only warn if -pedantic.
16997
16998 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
16999
17000         * class.c (finish_struct_1): Remove old code for
17001         dont_allow_type_definitions.
17002         * cp-tree.h: Likewise.
17003         * spew.c: Make sure cp-tree.h is included before parse.h, so the
17004         definition of flagged_type_tree is found before it is used.
17005         * lex.c: Likewise.
17006         * parse.y: Added the ftype member to the type union, and changed a
17007         number of rules to use it instead of ttype.  Added calls to
17008         check_for_new_type() as appropriate.
17009         * typeck2.c (check_for_new_type): New function for checking
17010         if a newly defined type appears in the specified tree.
17011         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
17012         for check_for_new_type().
17013
17014 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
17015
17016         * decl2.c (finish_file): Only use a sentry if the decl is public.
17017
17018         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
17019         don't pass LOOKUP_ONLYCONVERTING.
17020
17021 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
17022
17023         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
17024         properly keeps track of const and volatile type modifiers.
17025
17026 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
17027
17028         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
17029         * pt.c (comp_template_args): Use it.
17030
17031         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
17032         assemble_external for artificial function decls.
17033
17034         * decl.c (cp_finish_decl): Oops.
17035
17036 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17037
17038         * decl2.c (import_export_decl): Put static data member templates
17039         into common storage, or make them weak, depending on whether they
17040         are dynamically or statically initialized.
17041         (get_sentry): New function.
17042         (finish_file): Do import_export_decl for static data members before
17043         building the init/fini functions.  Don't init/fini a variable that's
17044         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
17045         push/pop_temp_slots.
17046         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
17047         expand_static_init thang.
17048         * method.c (get_id_2): New function.
17049
17050 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
17051
17052         * parse.y (empty_parms): Make sure we use C++-style prototypes
17053         when we're declaring member functions.
17054
17055 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17056
17057         * Makefile.in (CONFLICTS): 16 s/r conflicts.
17058         * parse.y (self_template_type): New nonterminal.
17059
17060 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17061
17062         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
17063         name.
17064         * parse.y (base_class.1): Allow 'typename foo::bar'.
17065
17066         * lex.c (check_newline): Remove #pragma code that plays with the
17067         input stream, since we now deal with tokens.  Clear nextchar when
17068         we're done.
17069         (handle_cp_pragma): Use real_yylex.
17070         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
17071         in one place.
17072
17073         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
17074
17075         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
17076
17077 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17078
17079         * parse.y: New token SELFNAME for potential constructor.
17080         * spew.c (yylex): Handle it.
17081         * lex.c (identifier_type): Produce it.
17082
17083         * parse.y (complete_type_name): In :: case, don't push class binding.
17084         (complex_type_name): Likewise.
17085
17086 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
17087
17088         * typeck.c (build_reinterpret_cast): Handle pointer to member
17089         functions.
17090
17091 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17092
17093         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
17094         pragmas.
17095         (check_newline): Put the vtable/unit/implementation/interface pragma
17096         code into handle_cp_pragma, replacing it with a call.
17097         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
17098         args.  Get the next token after handling the pragma token.
17099
17100 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17101
17102         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
17103         (convert_to_pointer_force): Likewise.
17104
17105         * init.c (build_new): Fix array new without -fcheck-new.
17106
17107 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
17108
17109         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
17110         tree.c: Lose TYPE_NESTED_NAME.
17111
17112         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
17113         as identifiers.
17114
17115         * tree.def: Add VEC_INIT_EXPR.
17116         * expr.c (cplus_expand_expr): Handle it.
17117         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
17118         the extra file-scope symbol nastiness.
17119
17120 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17121
17122         * method.c (make_thunk): Thunks are static.
17123         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
17124
17125         * decl2.c (mark_vtable_entries): Emit thunks as needed.
17126         (finish_file): Don't emit them here.
17127
17128 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17129
17130         * rtti.c (build_dynamic_cast): Handle null pointers.
17131         (ifnonnull): New function.
17132
17133 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
17134
17135         * call.c (build_method_call): Remember the original basetype we
17136         were called with.  Give an error message instead of trying
17137         (incorrectly) to call a non-static member function through a
17138         non-inherited class.
17139
17140         * search.c (expand_upcast_fixups): Mark the new fixup as
17141         DECL_ARTIFICIAL.
17142
17143 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17144
17145         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
17146
17147         * class.c (set_rtti_entry): Fix for thunks.
17148
17149         * decl2.c (import_export_decl): Still emit typeinfo fns for
17150         cv-variants of builtin types.
17151
17152         * rtti.c (expand_class_desc): Set up base_info_type_node here.
17153         (init_rtti_processing): Instead of here.
17154
17155 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
17156
17157         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
17158         (build_typeid): Only complain about taking dynamic typeid without
17159         -frtti.
17160
17161         * decl2.c: flag_rtti defaults to 1.
17162
17163         * rtti.c (get_tinfo_var): The general class case is now smaller.
17164         (init_rtti_processing): Pack the latter three fields of base_info
17165         into 32 bits.
17166
17167 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
17168
17169         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
17170
17171 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
17172
17173         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
17174         (push_memoized_context): Split out code to undefer pop_type_level to
17175         (clear_memoized_cache): here.
17176         (pop_memoized_context): We can only handle one layer of deferral of
17177         pop_type_level so clear the cache, if there was a previous level.
17178
17179 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17180
17181         * rtti.c (init_rtti_processing): Build up base_info_type_node.
17182         (expand_class_desc): Use one pointer to an array of base_info
17183         structs, passed using a CONSTRUCTOR.
17184
17185 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
17186
17187         * class.c (build_vbase_path): Remove block extern for
17188         flag_assume_nonnull_objects here.
17189         (build_vfn_ref): Split out functionality into build_vtbl_ref.
17190         (build_vtbl_ref): New routine.
17191         (build_vtable): Set up rtti info here.
17192         (add_virtual_function): Note in CLASSTYPE_RTTI the best
17193         place where we can get the rtti pointers from to avoid having to
17194         search around for a place.
17195         (finish_base_struct): Likewise.
17196         (finish_struct_1): Likewise.  Never create totally new vtables
17197         with totally new vtable pointers for rtti.  Disable code to layout
17198         vtable pointers better until we want to break binary
17199         compatibility.
17200         * rtti.c (build_headof_sub): New routine to convert down to a
17201         sub-object that has an rtti pointer in the vtable.
17202         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
17203         maintainable.
17204         (build_dynamic_cast): Make sure we have saved it, if we need to.
17205         * search.c (dfs_init_vbase_pointers): Disable code that deals with
17206         a more efficient vtable layout, enable later.
17207         * call.c (flag_assume_nonnull_objects): Moved declaration to
17208         * cp-tree.h: here.  Declare build_vtbl_ref.
17209         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
17210         function calls that want a tree.
17211
17212 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17213
17214         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
17215         other X subobjects in the most derived type.  Ack.
17216
17217         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
17218         get_typeid will do it for us.
17219         (get_typeid_1): Break out call-building for expand_*_desc to use.
17220         (get_typeid): Call it.
17221         (expand_*_desc): Likewise.
17222         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
17223         and void *.
17224         (init_decl_processing): Lose builtin_type_tdescs lossage.
17225         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
17226
17227 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
17228
17229         * pt.c (tsubst): When calling set_nested_typename, use
17230         TYPE_NESTED_NAME (current_class_type) instead of
17231         current_class_name.
17232
17233         * decl.c (pushdecl): Likewise.
17234         (pushdecl_class_level): Likewise.
17235         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
17236         set_nested_typename.
17237
17238 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
17239
17240         * rtti.c (synthesize_tinfo_fn): Handle arrays.
17241
17242         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
17243
17244 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17245
17246         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
17247         (init_rtti_processing): Lose bad_cast_type.
17248         (build_dynamic_cast): Use throw_bad_cast.
17249
17250         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
17251
17252         * decl2.c (finish_file): Don't synthesize artificial functions
17253         that are external and not inline.
17254
17255         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
17256
17257         * decl2.c (finish_file): Handle having new inlines added to
17258         saved_inlines by synthesis.
17259
17260         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
17261
17262 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17263
17264         RTTI rewrite to initialize nodes as needed, not require that
17265         users #include <typeinfo>, complete functionality and reduce wasted
17266         space.
17267         * rtti.c (init_rtti_processing): New fn.
17268         (build_typeid): The vtable entry is now a function.
17269         (get_tinfo_var): New fn.
17270         (get_tinfo_fn): Likewise.
17271         (get_typeid): Use it.
17272         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
17273         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
17274         points __rtti_*.
17275         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
17276         (synthesize_tinfo_fn): New fn.
17277         * method.c (build_t_desc_overload): Lose.
17278         (build_overload_with_type): More generic.
17279         * decl.c (init_decl_processing): Call init_rtti_processing.
17280         * class.c (set_rtti_entry): Use get_tinfo_fn.
17281         * decl2.c (mark_vtable_entries): Mark the rtti function.
17282         (finish_prevtable_vardecl): Don't build_t_desc.
17283         (import_export_decl): Handle tinfo functions.
17284         (finish_file): Likewise.
17285         * typeck.c (inline_conversion): New fn.
17286         (build_function_call_real): Use it.
17287         * cp-tree.h: Add decls.
17288
17289         * method.c (hack_identifier): Also convert component_refs from
17290         references.
17291
17292         * lex.c (cons_up_default_function): Use the type, not the name, in
17293         declspecs.
17294
17295         * decl2.c (import_export_vtable): Fix weak vtables.
17296
17297 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
17298
17299         * search.c (get_base_distance_recursive): Fix access checks for
17300         protected bases.
17301
17302 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17303
17304         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
17305         cp-tree.h.
17306         (convert_harshness): Add prototypes wrapped by PROTO.
17307         * decl2.c (grok_function_init): Likewise.
17308         (do_toplevel_using_decl): Change to void return type.
17309         * class.c (build_vtable_entry): Remove decl of make_thunk.
17310         (merge_overrides): Fix order of arg definitions.
17311         (finish_vtbls): Likewise.
17312         (fixup_vtable_deltas): Likewise.
17313         (modify_all_direct_vtables): Likewise.
17314         (modify_all_indirect_vtables): Likewise.
17315         * search.c (get_base_distance_recursive): Likewise.
17316         (get_abstract_virtuals_1): Likewise.
17317         (fixup_virtual_upcast_offsets): Likewise.
17318         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
17319         * init.c (perform_member_init): Fix order of arg definitions.
17320         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
17321         * cp-tree.h (make_thunk): Add decl.
17322         (overload_template_name, push_template_decl): Add decls.
17323         (do_toplevel_using_decl): Change to void return type.
17324         (vec_binfo_member): Add decl.
17325
17326 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17327
17328         * typeck.c (mark_addressable, convert_for_assignment,
17329         convert_for_initialization, pointer_int_sum, pointer_diff,
17330         unary_complex_lvalue): Add prototypes wrapped by PROTO.
17331         (convert_sequence): #if 0 fn decl, since definition also is.
17332
17333 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
17334
17335         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
17336         cast to pointer types for type searching.
17337
17338 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17339
17340         * typeck.c (get_delta_difference): Use cp_error, not error, in the
17341         case where BINFO == 0.
17342
17343 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
17344
17345         * call.c (build_method_call): Fix wording of error messages so
17346         constructors come out right.
17347
17348 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
17349
17350         * decl.c (push_overloaded_decl): Don't warn about hidden
17351         constructors when both the type and the function are declared
17352         in a system header file.
17353
17354 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
17355
17356         * class.c (finish_struct_1): Propagate the TYPE_PACKED
17357         flag for the type to the type's fields.
17358
17359 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17360
17361         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
17362
17363 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
17364
17365         * class.c (base_info, finish_base_struct): Replace
17366         needs_virtual_dtor with base_has_virtual.
17367
17368         (finish_struct_1): Remove the old code that tried to make default
17369         destructors virtual.  Use base_has_virtual when checking if we need
17370         to add a vtable entry for the rtti code.
17371
17372 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17373
17374         * pt.c (push_template_decl): Complain about template decl with
17375         inappropriate declaration.
17376
17377 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17378
17379         * typeck.c (build_x_unary_op): Remove bogus check for taking
17380         the address of a member function.
17381
17382 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17383
17384         * parse.y (constructor_declarator): Only push the class if
17385         we are not already in the class.
17386
17387 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
17388
17389         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
17390         Add additional argument to INIT_CUMULATIVE_ARGS.
17391
17392 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17393
17394         * decl.c (shadow_tag): Fix error about anon union with methods.
17395
17396         * parse.y (self_reference): Only generate a self-reference if this
17397         is a non-template class.
17398         (opt.component_decl_list): Only use it if it was generated.
17399
17400         * parse.y (component_decl_1): Use constructor_declarator.
17401         (fn.def2): Likewise.
17402         (notype_component_declarator0): Likewise.
17403
17404 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17405
17406         * typeck.c (build_x_unary_op): Add checks for taking the address
17407         of a TARGET_EXPR or of a member function, and give appropriate
17408         warnings.
17409
17410 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17411
17412         * pt.c (process_template_parm): Allow template type parms to be
17413         used as types for template const parms.
17414
17415 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
17416
17417         * init.c (expand_vec_init): Ensure the eh cleanups are on the
17418         function_obstack.
17419
17420 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17421
17422         * decl.c (lookup_name_real): Be even more picky about the
17423         ambiguous lookup warning.
17424         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17425         * parse.y (constructor_declarator): Rather than here.
17426
17427         * parse.y (constructor_declarator): New nonterminal.
17428         (fn.def1): Use it.
17429         (explicit_instantiation): Likewise.
17430
17431 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17432
17433         Add implicit declaration of class name at class scope.
17434         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17435         * parse.y (self_reference): New nonterminal.
17436         (opt.component_decl_list): Use it.
17437         (fn.def1): Add nested_name_specifier type_name cases.
17438         * class.c (build_self_reference): New function.
17439         (finish_struct): Handle access_default later, move self-reference
17440         decl to the end.
17441         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17442         * cp-tree.h: Adjust.
17443
17444         * pt.c (do_function_instantiation): Separate handling of member
17445         functions and non-member functions properly.
17446
17447 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17448
17449         * pt.c (process_template_parm): Improve error for 'volatile class K'.
17450
17451         * class.c (finish_struct_1): Check the right slot for destructors.
17452
17453         * decl.c (start_enum): Complain about enum templates.
17454
17455 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
17456
17457         * init.c (resolve_offset_ref): Offset pointers to member data by one.
17458         * typeck.c (unary_complex_lvalue): Likewise.
17459
17460 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
17461
17462         * typeck.c (c_expand_return): Check for a returned local
17463         array name, similar to the check for an ADDR_EXPR.
17464
17465 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17466
17467         * decl.c (cp_finish_decl): Don't build cleanups for static
17468         variables here.
17469
17470 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
17471
17472         * typeck.c (build_modify_expr): Fix error messages to be more
17473         accurate.
17474         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17475         assignment operators.
17476         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
17477         assignment operators.
17478
17479 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17480
17481         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
17482         give an error if initialized.  pedwarn about nested type with the
17483         same name as its enclosing class.
17484
17485         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17486
17487         * typeck.c (require_complete_type): Be sure to instantiate the
17488         MAIN_VARIANT of the type.
17489
17490         * decl2.c (finish_file): Instantiate pending templates before
17491         processing static constructors and destructors.
17492
17493         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17494         unless at_eof.
17495
17496 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
17497
17498         * decl2.c (delete_sanity): If error_mark_node is passed
17499         in as an expression, quit while we're ahead.
17500
17501         * decl.c (grokdeclarator): Give an error message if `friend'
17502         is combined with any storage class specifiers.
17503
17504 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
17505
17506         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17507         definition of nonexistent nested type.
17508
17509         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17510         not to say 'typedef'.
17511
17512 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17513
17514         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17515         * search.c (dfs_walk, dfs_init_vbase_pointers,
17516         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17517         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17518
17519 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17520
17521         * except.c (build_throw): Support minimal parse.
17522         * pt.c (tsubst_copy): Support THROW_EXPR.
17523         * decl2.c (build_expr_from_tree): Likewise.
17524
17525         * pt.c (mangle_class_name_for_template): Always allocate
17526         scratch_firstobj.
17527
17528 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
17529
17530         * cvt.c (cp_convert_to_pointer): Give an appropriate error
17531         when trying to cast from an incomplete type.
17532
17533 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17534
17535         * pt.c (instantiate_class_template): Don't bother setting up
17536         CLASSTYPE_TAGS explicitly, as the nested types will add
17537         themselves.
17538
17539 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
17540
17541         * decl.c (shadow_tag): Remove old error check for usage of
17542         an enum without a previous declaration.
17543         (xref_tag): Add error message about usage of enums without a
17544         previous declaration.
17545
17546 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17547
17548         * lex.c (do_identifier): Only do name consistency check if we're
17549         parsing.
17550
17551         * pt.c (push_template_decl): Don't crash if we get a member defn
17552         that doesn't match.
17553
17554         * decl.c (xref_tag_from_type): New function to do an xref without
17555         always having to figure out code_type_node.
17556         * cp-tree.h: Declare it.
17557         * pt.c (instantiate_class_template): Use it for friend classes.
17558         (lookup_template_class): Use it.
17559
17560         * typeck2.c (build_functional_cast): Pull out a single parm before
17561         passing it to build_c_cast.
17562
17563 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
17564
17565         * expr.c (do_case): Give an error message if a pointer is
17566         given as a case value.
17567
17568 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17569
17570         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17571         an overload list.
17572
17573         * lex.c (cons_up_default_function): Really, now, interface hackery
17574         does not apply to synthesized methods.
17575
17576 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
17577
17578         * call.c (build_method_call): Ctors and dtors now have special names
17579         with respect to lookups.
17580         * class.c (add_method): Likewise.
17581         (grow_method): Likewise.
17582         (finish_struct_methods): Likewise.
17583         (warn_hidden): Likewise.
17584         (finish_struct_1): Likewise.
17585         * cvt.c (convert_to_reference): Likewise.
17586         (convert_to_aggr): Likewise.
17587         (cp_convert): Likewise.
17588         * decl2.c (check_classfn): Likewise.
17589         * init.c (expand_member_init): Likewise.
17590         (expand_default_init): Likewise.
17591         (expand_aggr_init_1): Likewise.
17592         (build_offset_ref): Likewise.
17593         (build_new): Likewise.
17594         (build_delete): Likewise.
17595         * lex.c (do_inline_function_hair): Likewise.
17596         * search.c (lookup_field_1): Likewise.
17597         (lookup_fnfields_here): Likewise.
17598         (lookup_field): Likewise.
17599         (lookup_fnfields): Likewise.
17600         (get_virtual_destructor): Likewise.
17601         (dfs_debug_mark): Likewise.
17602         (dfs_pushdecls): Likewise.
17603         (dfs_compress_decls): Likewise.
17604         * tree.c (layout_basetypes): Likewise.
17605         * typeck.c (build_component_ref): Likewise.
17606         (build_x_function_call): Likewise.
17607         (build_modify_expr): Likewise.
17608         (convert_for_initialization): Likewise.
17609         (build_functional_cast): Likewise.
17610         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
17611         (CTOR_NAME): New.
17612         (DTOR_NAME): New.
17613         * decl.c (ctor_identifier): New.
17614         (dtor_identifier): New.
17615         (init_decl_processing): Set them.
17616
17617 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
17618
17619         * typeck.c (build_component_ref): Don't get confused by fields whose
17620         context has no type name, like pointer to member functions.
17621
17622 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17623
17624         * decl.c (grokdeclarator): Handle typedef without declarator.
17625
17626         * pt.c (tsubst): Handle SCOPE_REF in declarator.
17627
17628         * parse.y (bad_parm): Catch another case of missing `typename'.
17629
17630         * lex.c (yyprint): Handle TYPE_DECLs.
17631
17632         * decl.c (start_function): Don't try to be clever.
17633
17634         * lex.c: Lose compiler_error_with_decl.
17635         * typeck2.c: Lose error_with_aggr_type.
17636         (incomplete_type_error): Use cp_* instead of old functions.
17637         (readonly_error): Likewise.
17638         * typeck.c (convert_arguments): Likewise.
17639         * search.c (lookup_nested_field): Likewise.
17640         * method.c (make_thunk): Likewise.
17641         * decl.c (grokparms): Likewise.
17642         * cp-tree.h: Update.
17643
17644         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
17645         and value.
17646
17647 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
17648
17649         * method.c (build_opfncall): When deleting a pointer to an
17650         array, build a new pointer to the tree past any ARRAY_TYPE
17651         nodes.
17652
17653 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17654
17655         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
17656
17657 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
17658
17659         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
17660         and ! DECL_INLINE.
17661
17662         * decl.c (finish_function): Don't set nested based on
17663         hack_decl_function_context.
17664         * parse.y (function_try_block): Check for nested function.
17665         (pending_inlines): Likewise.
17666
17667         * decl2.c (build_expr_from_tree): If a unary op already has a
17668         type, just return it.
17669
17670         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
17671
17672         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
17673         (finish_file): Check the return value of walk_vtables.
17674         (finish_prevtable_vardecl): Return int.
17675         (finish_vtable_vardecl): Likewise.
17676         (prune_vtable_vardecl): Likewise.
17677         * lex.c (set_vardecl_interface_info): Likewise.
17678         * cp-tree.h: Adjust return types.
17679
17680         * class.c (delete_duplicate_fields_1): Don't complain about
17681         duplicate nested types if they're the same type.
17682         (finish_struct): Remove check for duplicate.
17683         * decl2.c (grokfield): Don't check for typedef of anonymous type.
17684
17685 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17686
17687         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
17688
17689         * decl.c (grokdeclarator): Lose special handling of class-level
17690         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
17691         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
17692
17693         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
17694
17695         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
17696
17697         * search.c (compute_access): Fix handling of anonymous union
17698         members.
17699         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
17700         from anonymous unions to their members.
17701
17702         * typeck.c (build_x_function_call): For static member functions,
17703         hand off to build_member_call.
17704
17705 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17706
17707         * typeck.c (build_component_ref): Handle OFFSET_REFs.
17708
17709         * init.c (expand_vec_init): Fix init == 0 case.
17710
17711 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17712
17713         * init.c (build_new): pedwarn about init and array new.
17714         (expand_vec_init): Handle lists, use convert_for_initialization.
17715
17716         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
17717         when converting to an aggregate type.
17718         * cvt.c (cp_convert): Pass it through.
17719
17720         * typeck.c (build_conditional_expr): Handle user-defined
17721         conversions to slightly different types.
17722
17723         * decl.c (grokdeclarator): Force an array type in a parm to be
17724         permanent.
17725
17726         * decl2.c (do_using_directive): Sorry.
17727         (do_namespace_alias): Likewise.
17728         * lex.c (real_yylex): Warn about using the `namespace' keyword.
17729
17730 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17731
17732         * parse.y (datadef): Move call to note_list_got_semicolon up.
17733
17734 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
17735
17736         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
17737
17738 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
17739
17740         * decl.c (cp_finish_decl): The exception regions have to be
17741         nested, not overlapping.  We start the exception region for a
17742         decl, after it has been fully built, and all temporaries for it
17743         have been cleaned up.
17744
17745 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
17746
17747         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
17748
17749 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
17750
17751         * tree.def: Add RETURN_INIT.
17752         * pt.c (instantiate_decl): Handle RETURN_INIT.
17753         * decl.c (store_return_init): Handle minimal_parse_mode.
17754
17755         * tree.c (cp_build_type_variant): Just return an error_mark_node.
17756         * decl.c (make_typename_type): Don't try to get the file and line
17757         of an identifier.
17758         * typeck.c (comptypes): Handle TYPENAME_TYPE.
17759
17760 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
17761
17762         * decl.c (poplevel): Make sure we clear out and restore old local
17763         non-VAR_DECL values by default when they go out of scope.
17764
17765 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17766
17767         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
17768         referring to addresses of variables and functions.
17769
17770         * error.c (dump_expr): Support SIZEOF_EXPR.
17771
17772         * init.c (do_friend): Use the return value of check_classfn.
17773
17774         * typeck.c (convert_arguments): Call complete_type.
17775
17776         * method.c (hack_identifier): After giving an error, set value to
17777         error_mark_node.
17778
17779 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17780
17781         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
17782         lossage for local classes.
17783         * cp-tree.h: Declare it.
17784         * decl.c (lookup_name_real): Evil, painful hack for local classes.
17785         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
17786         Use hack_decl_function_context.
17787         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
17788         (start_function): Use hack_decl_function_context.
17789         (finish_function): Likewise.
17790         * method.c (synthesize_method): Likewise.
17791         * lex.c (process_next_inline): Likewise.
17792         (do_pending_inlines): Likewise.
17793         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
17794         done with it.
17795
17796 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
17797
17798         * sig.c (build_signature_pointer_or_reference_type): Align
17799         signature pointers/references on 8-byte boundaries so they can be
17800         grabbed 2 words at a time on a Sparc.
17801
17802 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
17803
17804         * method.c (hack_identifier): Requiring a static chain is now a
17805         hard error.
17806         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
17807         functions.
17808
17809 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17810
17811         * init.c (build_offset_ref): Call complete_type.
17812
17813         * decl.c (pop_from_top_level): Always pop previous_class_type.
17814
17815         * parse.y: Handle multiple decls in a for-init-statement.
17816         * pt.c (tsubst_expr): Likewise.
17817
17818         * pt.c (tsubst): Use tsubst_expr for the second operand of an
17819         ARRAY_REF.
17820
17821         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
17822         (poplevel_class): Set it here.
17823         (pop_from_top_level): Pop it here if we're returning to class scope.
17824         * class.c (pushclass): Don't set it here.
17825
17826         * decl.c (maybe_push_to_top_level): Save current_template_parms,
17827         and clear it if !pseudo.
17828         (pop_from_top_level): Restore it.
17829
17830         * decl2.c (finish_file): Push the dummy each time we walk the list
17831         of vtables.
17832
17833         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
17834         something for CAST_EXPR.
17835
17836 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17837
17838         * cvt.c (cp_convert): Warn about implicit conversion of the
17839         address of a function to bool, as it is always true.
17840
17841 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17842
17843         * typeck.c (c_expand_return): Fix warning for local externs returned.
17844
17845 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
17846
17847         * tree.c (mapcar): Propagate const and volatile properly.
17848
17849         * typeck.c (complete_type): Be sure to instantiate the
17850         MAIN_VARIANT of the type.
17851
17852         * method.c (synthesize_method): Class interface hackery does not
17853         apply to synthesized methods.
17854
17855 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
17856
17857         * pt.c (comp_template_args): Use comptypes rather than just
17858         checking for TEMPLATE_TYPE_PARM equivalence.
17859
17860         * typeck.c (build_x_function_call): Call complete_type before
17861         checking TYPE_OVERLOADS_CALL_EXPR.
17862
17863 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
17864
17865         * g++.c (main): Check also for new define ALT_LIBM.
17866
17867 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17868
17869         * pt.c (instantiate_class_template): If we don't have a pattern
17870         yet, that's OK.
17871         (coerce_template_parms): If we see a local class, bail.
17872
17873         * decl.c (grok_reference_init): Make sure there's a type before
17874         checking its code.
17875
17876         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
17877         (push_template_decl): Likewise.
17878
17879         * parse.y (named_class_head): Set
17880         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
17881
17882         * decl.c (xref_tag): Diagnose redeclaration of template
17883         type-parameter name.
17884
17885         * error.c (dump_type): Handle anonymous template type parms.
17886
17887         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
17888         TYPE_STUB_DECL.
17889         (coerce_template_parms): Likewise.
17890
17891 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
17892
17893         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
17894         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
17895
17896 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
17897
17898         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
17899         before trying to get its STUB_DECL.
17900         (coerce_template_parms): Likewise.
17901
17902         * parse.y (template_type_parm): If they didn't use 'class',
17903         pretend they did after giving an error.
17904
17905         * pt.c (coerce_template_parms): Diagnose use of local class.
17906
17907         * decl.c (grok_reference_init): Use instantiate_type.
17908
17909         * error.c (dump_expr): Handle TEMPLATE_DECLs.
17910
17911         * parse.y (named_class_head): Diagnose mismatching types and tags.
17912
17913         * decl.c (pushdecl): Type decls and class templates clash with
17914         artificial type decls, not hide them.
17915
17916         * decl.c (redeclaration_error_message): Diagnose redefinition of
17917         templates properly.
17918         (duplicate_decls): Diagnose disallowed overloads for template
17919         functions, too.
17920
17921         * decl.c (start_decl): Call complete_type before checking for a
17922         destructor.
17923
17924         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17925
17926         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17927
17928 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17929
17930         * decl.c (grok_op_properties): Don't check for operator++(int) in
17931         a template.
17932
17933         * tree.c (perm_manip): Return a copy of variable and function
17934         decls with external linkage.
17935
17936         * tree.def: Change some of the min tree codes to type "1".
17937         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17938         * method.c (build_overload_int): Emit something arbitrary for
17939         anything but an INTEGER_CST if we're in a template.
17940
17941         * decl.c (cp_finish_decl): Call complete_type before deciding
17942         whether or not to lay out the decl.
17943
17944         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17945
17946 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17947
17948         * typeck2.c (build_x_arrow): Call complete_type.
17949
17950         * pt.c (add_pending_template): Broken out.
17951         (lookup_template_class): If -fexternal-templates, call it for all
17952         the methods of implemented types.
17953         (instantiate_class_template): Instead of instantiating them here.
17954         (instantiate_decl): Handle -fexternal-templates earlier.
17955
17956 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17957
17958         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17959         memoized lookup stuff inside GATHER_STATISTICS.
17960
17961 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17962
17963         * decl.c (start_decl): Complain about array of incomplete type
17964         here.
17965         (grokdeclarator): Not here.
17966
17967         * parse.y (template_parm): Expand full_parm inline so we can set
17968         the rule's precedence.
17969
17970         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17971         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17972         * decl2.c (grokbitfield): Don't check for integer constant here.
17973         * class.c (finish_struct_1): Check here.
17974
17975         * decl.c (define_label): Make the min decl go on permanent_obstack.
17976
17977         * pt.c (unify): Don't handle CONST_DECLs.
17978         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17979         (tsubst_copy): Likewise.
17980
17981         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17982         CONST_DECL for a template parm.
17983
17984 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
17985
17986         * decl.c (grokdeclarator): Complain about array of incomplete type
17987         here.
17988         (start_decl_1): Not here.
17989
17990         * pt.c (tsubst): Handle pointer-to-function declarators.
17991
17992         * method.c (hack_identifier): If pedantic, diagnose local class
17993         methods that require a static chain.
17994
17995         * decl.c (grok_op_properties): No longer static.
17996         * cp-tree.h: Declare it.
17997         * pt.c (tsubst): Call it for operators.
17998         Use tsubst_copy for TREE_VECs.
17999
18000         * parse.y (template_arg): The expr has precedence like '>'.
18001
18002 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
18003
18004         * pt.c (coerce_template_parms): Don't coerce an expression using
18005         template parms.
18006         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
18007         (tsubst): Don't use build_index_2_type if the max_value uses template
18008         parms.
18009         * method.c (build_overload_int): Emit something arbitrary for an
18010         expression using template parms.
18011
18012         * parse.y (template_close_bracket): New non-terminal to catch use
18013         of '>>' instead of '> >' in template class names.
18014         (template_type): Use it.
18015         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
18016
18017         * tree.def: Add CAST_EXPR.
18018         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
18019         CONVERT_EXPR for minimal_parse_mode.
18020         * typeck.c (build_c_cast): Likewise.
18021         * pt.c (tsubst_copy): Likewise.
18022         * decl2.c (build_expr_from_tree): Likewise.
18023         * error.c (dump_expr): Likewise.
18024
18025 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18026
18027         * except.c (SetTerminate, SetUnexpected): Put back global vars.
18028         (init_exception_processing): Put back decl/init of
18029         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
18030         fns from libstdc++.
18031
18032         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
18033         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
18034         Delete unused fns.
18035         * cp-tree.h (declare_uninstantiated_type_level,
18036         uninstantiated_type_level_p): Delete prototypes.
18037
18038 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
18039
18040         * pt.c (tsubst_expr): Add default return.
18041
18042 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18043
18044         * error.c (fndecl_as_string): Delete unused arg CNAME.
18045         * sig.c (build_signature_table_constructor,
18046         build_signature_method_call): Fix calls.
18047
18048         * class.c (the_null_vtable_entry): Delete var definition.
18049         (init_class_processing): Delete tree the_null_vtable_entry init.
18050         * decl.c (no_print_{functions, builtins}): Declare as static.
18051         (__tp_desc_type_node): #if 0 var definition.
18052         (init_type_desc): #if 0 init of __tp_desc_type_node.
18053         (vb_off_identifier): Move var decl into init_decl_processing.
18054         (current_function_assigns_this): Declare as static.
18055         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
18056         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
18057         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
18058         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
18059         * init.c (BI_header_type, BI_header_size): Declare as static.
18060         * pt.c (template_classes): Delete unused var.
18061         (add_pending_template): Delete decl for non-existent fn.
18062         (lookup_template_class): Delete vars CODE and TAG_CODE.
18063         (instantiate_template): Delete unused var TARGS.
18064         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
18065         Delete decls.
18066         (__tp_desc_type_node): #if 0 var decl.
18067         (fndecl_as_string): Fix prototype.
18068
18069 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
18070
18071         * tree.def: Add GOTO_STMT.
18072         * pt.c (tsubst_expr): Support goto and labels.
18073         * decl.c (define_label): Support minimal parsing.
18074         * parse.y (simple_stmt): Likewise.
18075
18076 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18077
18078         * xref.c (GNU_xref_member): Only define/set var I if
18079         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
18080         used.
18081         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
18082         (GNU_xref_end): Fix call.
18083         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
18084         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
18085
18086         * tree.c (build_exception_variant): Delete unused vars I, A, T,
18087         T2, and CNAME.
18088         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
18089         (mapcar): Delete unused var CODE.
18090         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
18091         (break_out_cleanups): Fix call.
18092         (bot_manip): Likewise.
18093         * call.c (build_method_call): Likewise.
18094         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
18095         Likewise.
18096         * typeck.c (unary_complex_lvalue, build_modify_expr,
18097         convert_for_initialization): Likewise.
18098         * typeck2.c (build_functional_cast): Likewise.
18099         * cp-tree.h (build_cplus_new): Fix prototype.
18100
18101         * repo.c (open_repo_file): Delete unused var Q.
18102         (repo_compile_flags, repo_template_declared,
18103         repo_template_defined, repo_class_defined, repo_inline_used,
18104         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
18105         (repo_get_id, repo_vtable_used): Declare as static.
18106         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
18107         prototypes.
18108
18109 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
18110
18111         * parse.y (pending_inlines): Add function_try_block case.
18112
18113         * pt.c (unify): Fix for template const parms.
18114
18115 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18116
18117         * lex.c (extract_interface_info): Delete forward decl.
18118         (default_copy_constructor_body, default_assign_ref_body): Delete
18119         decls for non-existent functions.
18120         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
18121         (init_lex): Delete setting them.
18122         (cons_up_default_function): Delete unused vars FUNC_BUF,
18123         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
18124         #if 0'd synth code.
18125         (toplevel, expression_obstack): Delete unused extern decls.
18126         (tree_node_kind): Delete unused enum.
18127         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
18128         GATHER_STATISTICS.
18129         (tree_node_kind_names): Delete unused extern decl.
18130         (synth_obstack): Delete unused var.
18131         (init_lex): Don't set it.
18132         (init_parse): Add decl before use.
18133         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
18134         (current_unit_{name, language}): Delete unused vars.
18135         (check_newline): Don't bother setting them, just accept the #pragma.
18136         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
18137         (current_unit_{name, language}): Delete decls.
18138
18139         * search.c: Wrap all of the memoized functions, macros, and
18140         variables inside #ifdef GATHER_STATISTICS.
18141         (lookup_field, lookup_fnfields): Likewise.
18142         (init_search_processing): Likewise.
18143         (reinit_search_statistics): Wrap whole function.
18144         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
18145
18146         * decl.c (finish_function): Only call pop_memoized_context if
18147         GATHER_STATISTICS is defined.
18148         (start_function): Likewise for push_memoized_context.
18149         * class.c (pushclass, popclass): Likewise.
18150
18151         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
18152         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
18153
18154         * cvt.c (cp_convert): Delete unused local var FORM.
18155         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
18156         prototypes.
18157
18158 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18159
18160         * pt.c (do_poplevel): Oops; really return what we get from
18161         poplevel this time.
18162
18163 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18164
18165         * cp-tree.h (is_aggr_type): Add prototype.
18166
18167         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
18168         * method.c ({push,pop}_cp_function_context): Delete decls.
18169         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
18170         (SetUnexpected, SetTerminate): Delete unused vars.
18171         (init_exception_processing): Don't set SetUnexpected or
18172         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
18173         (output_exception_table_entry): Delete unused array LABEL.
18174         (expand_internal_throw): Delete unused var PARAMS.
18175         (expand_start_catch_block): Delete unused var CLEANUP.
18176         (emit_exception_table): Delete unused var EH_NODE_DECL.
18177         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
18178         GOTO_UNWIND_AND_THROW.  Don't set them.
18179         (end_eh_unwinder): Add top decl.
18180         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
18181         (exception_section, push_rtl_perm, do_function_call,
18182         lang_interim_eh, push_eh_cleanup, eh_outer_context,
18183         expand_end_eh_spec, end_eh_unwinder): Declare as static.
18184         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
18185         throw_used): Likewise.
18186         * cp-tree.h (expand_end_eh_spec): Delete prototype.
18187
18188         * search.c (dfs_mark, dfs_mark_vtable_path,
18189         dfs_unmark_vtable_path, dfs_mark_new_vtable,
18190         dfs_unmark_new_vtable, dfs_clear_search_slot,
18191         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
18192         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
18193         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
18194         functions.
18195         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
18196         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
18197         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
18198         Only define #ifdef GATHER_STATISTICS.
18199         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
18200         is defined.
18201         (vbase_decl): Delete var definition.
18202         (init_search): Delete old decl.
18203         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
18204         never actually used.
18205         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
18206         (get_base_distance_recursive): Delete unused fourth arg
18207         BASETYPE_PATH.  Fix call .
18208         (get_base_distance): Fix call.
18209         (push_class_decls): Delete unused var ID.
18210         (make_memoized_table_entry): Declare as static.
18211         (breadth_first_search): Declare as static.
18212         (tree_has_any_destructor_p): Declare as static.
18213         (pop_class_decls): Delete unused arg pop_class_decls.
18214         * class.c (popclass): Fix call to pop_class_decls.
18215         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
18216         tree_has_any_destructor_p): Delete prototypes.
18217
18218         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
18219         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
18220         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
18221         (build_user_desc): Delete unused var T.
18222         (build_class_desc): Delete unused vars T and OFF.
18223         (build_t_desc): Delete unused var NAME_STRING.
18224         (build_headof): Make static.
18225         (get_bad_cast_node): Likewise.
18226         (get_def_to_follow): Likewise.
18227         * cp-tree.h (init_type_desc): Add prototype.
18228         (build_headof): Remove prototype.
18229
18230 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18231
18232         * pt.c (tsubst): Only look for matching decls at file scope for
18233         non-member functions.
18234
18235         * call.c (build_scoped_method_call): Handle scoped destructor
18236         calls in templates.
18237
18238         * decl.c (*_top_level): Also save previous_class_values.
18239
18240         * pt.c (tsubst_expr): Support do {} while loops.
18241         * parse.y (simple_stmt): Likewise.
18242         * tree.def: Likewise.
18243
18244         * method.c (build_overload_identifier): For a class nested in a
18245         template class, don't mangle in the template parms from our
18246         context.
18247
18248         * lex.c, cp-tree.h: Remove support for template instantiations in
18249         the pending_inlines code.
18250         * pt.c: Remove dead functions and unused arguments.
18251         (uses_template_parms): TYPENAME_TYPEs always use template parms.
18252         * parse.y: Stop passing anything to end_template_decl.
18253         * tree.c (print_lang_statistics): Only print tinst info #ifdef
18254         GATHER_STATISTICS.
18255
18256 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18257
18258         * init.c (expand_recursive_init{,_1}): Delete decls.
18259         (sort_member_init): Delete unused var INIT.
18260         (emit_base_init): Delete unused var X.
18261         (build_offset_ref): Delete unused var CNAME.
18262         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
18263         (emit_base_init): Delete unused local var BASE.  Delete extern
18264         decl of IN_CHARGE_IDENTIFIER.
18265         (build_delete): Delete unused local var VIRTUAL_SIZE.
18266
18267         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
18268         (build_delete): Fix call.
18269         * decl2.c (delete_sanity): Likewise.
18270         * cp-tree.h (build_vec_delete): Update prototype.
18271
18272         * typeck.c (common_base_type): Delete unused var TMP.
18273         (build_binary_op): Delete local var ARGS_SAVE.
18274         (build_array_ref): Delete unused var ITYPE.
18275         (c_expand_return): Delete unused var USE_TEMP.
18276
18277         * typeck.c (compexcepttypes): Delete unused arg STRICT.
18278         (comptypes): Fix calls.
18279         * decl.c (duplicate_decls): Likewise.
18280         * cp-tree.h (compexcepttypes): Delete extra arg.
18281
18282         * decl2.c (check_classfn): Delete unused second arg CNAME.
18283         * decl.c (start_decl, grokfndecl): Fix calls.
18284         * init.c (do_friend): Likewise.
18285         * cp-tree.h (check_classfn): Update prototype.
18286
18287         * cp-tree.h (signature_error, import_export_vtable,
18288         append_signature_fields, id_in_current_class, mark_used,
18289         copy_assignment_arg_p): Add decls.
18290         * decl2.c (mark_used): Delete decl.
18291
18292         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
18293
18294         * class.c (get_vtable_entry): Disable unused function.
18295         (doing_hard_virtuals): Delete unused static global var.
18296         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
18297         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
18298         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
18299         (modify_one_vtable): Delete unused var OLD_RTTI.
18300         (finish_struct_anon): Delete unused vars OFFSET and X.
18301         (finish_struct_bits): Delete unused var METHOD_VEC.
18302         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
18303         for-scope local variable METHODS.
18304
18305         * call.c (user_harshness): Delete unused/unneeded arg PARM.
18306         (ideal_candidate): Delete unused args BASETYPE and PARMS.
18307         (build_method_call): Delete unused args passed into ideal_candidate.
18308         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
18309         * cp-tree.h (synthesize_method): Add decl.
18310
18311         * decl.c (note_level_for_for): Give void return type.
18312         (pushdecl_nonclass_level): Likewise.
18313         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
18314         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
18315         (suspend_binding_level): Delete unused var LEVEL.
18316         (duplicate_decls): Delete unused var CTYPE.
18317         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
18318         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
18319         PTR_ENDLINK.
18320         (grokdeclarator): Delete unused var C.
18321         (grokdeclarator): Delete unused var SIZE_VARIES.
18322         (grokparms): Delete unused var SAW_VOID.
18323         (start_function): Delete unused var OLDDECL.
18324         (cplus_expand_expr_stmt): Delete unused var
18325         REMOVE_IMPLICIT_IMMEDIATELY.
18326
18327         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
18328
18329         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
18330
18331 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18332
18333         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
18334         (build_min_nt): Likewise.
18335         * pt.c (do_pushlevel): Emit line note.
18336         (do_poplevel): Return what we get from poplevel.
18337         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
18338         * parse.y: Use do_pushlevel and do_poplevel.
18339         * cp-tree.h: Declare do_poplevel.
18340
18341         * cp-tree.h: Declare at_eof.
18342         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
18343         * decl2.c (import_export_decl): Renamed from import_export_inline.
18344         (finish_file): Call it to do interface handling for statics.
18345         * pt.c (tsubst_copy): Call mark_used on variables and functions
18346         used here.
18347
18348         * decl2.c (finish_file): Don't emit statics we can't generate.
18349         * pt.c (instantiate_decl): Don't set interface on instantiations
18350         we can't generate.
18351
18352         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
18353         * tree.c (print_lang_statistics): Print max template depth.
18354         * pt.c (push_tinst_level): Dump entire instantiation context.
18355         (instantiate_class_template): Use it and pop_tinst_level.
18356         (instantiate_decl): Likewise.
18357
18358         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
18359         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
18360
18361 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18362
18363         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
18364         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
18365         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
18366         the new template implementation.
18367
18368 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18369
18370         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
18371
18372 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
18373
18374         * decl.c (cp_finish_decl): Delay emitting the debug information for
18375         a typedef that has been installed as the canonical typedef, if the
18376         type has not yet been defined.
18377
18378 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18379
18380         * decl2.c (grokfield): Still call pop_nested_class for access decls.
18381
18382 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18383
18384         * decl.c (lookup_label): Call label_rtx.
18385
18386         * decl.c (make_binding_level): New function.
18387         (pushlevel, pushlevel_class): Call it instead of explicit
18388         duplicate calls to xmalloc.
18389
18390         * decl.c (init_decl_processing): Delete useless build_pointer_type
18391         call.
18392
18393         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
18394         (sizet_ftype_string): Delete variable.
18395         (init_decl_processing): Add built-in functions fabsf, fabsl,
18396         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
18397         variable strlen_ftype, used for strlen.
18398
18399 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18400
18401         * decl.c (push_to_top_level): Start from current_binding_level
18402         again for now; the stl hacks depend on g++ being broken in this
18403         way, and it'll be fixed in the template rewrite.
18404
18405         * tree.def: Add USING_DECL.
18406         * decl2.c (do_class_using_decl): Implement.
18407         (grokfield): Pass access decls off to do_class_using_decl instead of
18408         grokdeclarator.
18409         * error.c (dump_decl): Handle USING_DECLs.
18410         * decl.c (grokdeclarator): Remove code for handling access decls.
18411         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18412         as access decls for now.
18413         (finish_struct): Don't check USING_DECLs for other uses of the name.
18414
18415         * search.c (get_matching_virtual): Use cp_error_at.
18416
18417 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18418
18419         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18420         match c-typeck.c.
18421         (self_promoting_args_p): Move the check that TYPE is non-nil
18422         before trying to look at its main variant.
18423         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18424
18425         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18426         Delete macros.
18427         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18428         (do_friend): Delete call to xref_friend.
18429         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18430
18431         * typeck.c (convert_sequence): #if 0 unused function.
18432
18433         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18434         be in decl_in_memory_p.
18435         (decl_in_memory_p): Delete decl.
18436         * expr.c (decl_in_memory_p): Delete fn.
18437         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18438
18439         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18440
18441 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18442
18443         * class.c (finish_struct_1): Check for a pure-specifier on a
18444         non-virtual function here.
18445
18446         * decl2.c (grok_function_init): Don't check whether the function
18447         is virtual here.
18448         (grokfield): Don't call check_for_override here.
18449
18450         * decl.c (push_to_top_level): Start from inner_binding_level,
18451         check class_shadowed in class levels.
18452
18453 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
18454
18455         * decl.c (resume_level): Ignore things that don't have names, instead
18456         of core dumping.
18457
18458 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18459
18460         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18461
18462 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
18463
18464         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18465         synthesized dtor.
18466
18467         * parse.y (complete_type_name): Bind global_scope earlier.
18468         (complex_type_name): Likewise.
18469         (qualified_type_name): Remove.
18470
18471 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
18472
18473         * decl.c (grokfndecl): Move code that looks for virtuals in base
18474         classes...
18475         * class.c (check_for_override): ... to a new function.
18476         (finish_struct_1): Call it.
18477
18478         * cp-tree.h: Declare warn_sign_compare.
18479
18480         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18481         rather than extra_warnings to decide whether to warn about
18482         comparison of signed and unsigned.
18483
18484         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
18485         implies -Wsign-compare.  -Wall doesn't imply -W.
18486
18487 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
18488
18489         * typeck.c (build_component_ref): Fix to handle anon unions in base
18490         classes as well.
18491
18492 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18493
18494         * class.c (resolves_to_fixed_type_p): Delete code dealing with
18495         a WITH_CLEANUP_EXPR, since we don't generate them any more.
18496         * cvt.c (build_up_reference): Likewise.
18497         * decl.c (grok_reference_init): Likewise.
18498         (cp_finish_decl): Likewise.
18499         * error.c (dump_expr): Likewise.
18500         * tree.c (real_lvalue_p): Likewise.
18501         (lvalue_p): Likewise.
18502         (build_cplus_new): Likewise.
18503         (unsave_expr_now): Likewise.
18504         * typeck.c (unary_complex_lvalue, build_modify_expr,
18505         c_expand_return): Likewise.
18506
18507 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18508
18509         Make the C++ front-end pay attention to attributes for structures.
18510         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18511         finish_struct_1.
18512         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18513         Take out old round_up_size use and setting the DECL_ALIGN possibly
18514         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
18515         can override what the attribute set.
18516         * cp-tree.h (finish_struct): Update prototype.
18517         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18518         attributes to finish_struct.
18519         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18520         value down into finish_struct.
18521         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18522
18523 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
18524
18525         * decl.c (poplevel):  Re-word dead for local handling.
18526         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
18527         (cp_finish_decl):  If is_for_scope, check for duplicates so
18528         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
18529
18530         * lex.c (do_identifier):  Use global binding in preference of
18531         dead for local variable.
18532
18533 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
18534
18535         * init.c (initializing_context): Handle anon union changes, the
18536         context where fields of anon unions can be initialized now has to be
18537         found by walking up the TYPE_CONTEXT chain.
18538
18539 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
18540
18541         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18542         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18543         (obscure_complex_init): If bss is supported, always set
18544         DECL_INITIAL to error_mark_node.
18545
18546 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18547
18548         * init.c (is_friend): Make sure there's a context before we see if
18549         it's an aggr type.
18550
18551 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
18552
18553         * init.c (is_friend): Classes are not friendly with nested classes.
18554
18555 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
18556
18557         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18558         and record its result.
18559
18560 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
18561
18562         * class.c (finish_struct_anon): Switch around code to not move anon
18563         union elements around, nor mess up their contexts, nor offsets,
18564         instead we now build up the right number of COMPONENT_REFs for all
18565         the anon unions that may be present at build_component_ref time.
18566         * typeck.c (lookup_anon_field): New routine to handle field lookup
18567         on fields without names.  We find them, based upon their unique type
18568         instead.
18569         * typeck.c (build_component_ref): Allow FIELD_DECL components.
18570         Handle finding components in anonymous unions, and ensure that a
18571         COMPONENT_REF is built for each level as necessary.
18572
18573 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
18574
18575         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18576         code that ensures that copy ctors are used if appropriate.
18577
18578 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18579
18580         * init.c (build_vec_delete): Only give an error if base isn't an
18581         error_mark_node.
18582
18583 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
18584
18585         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18586         (yylex): If we see `new', keep slurping.
18587
18588 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
18589
18590         * class.c (finish_struct_1): Move code for handling anon unions...
18591         (finish_struct_anon): to here.  Fixup so that we do the offset
18592         calculations right, and so that the fields are physically moved to
18593         the containers's chain.
18594
18595 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18596
18597         * decl.c (grokdeclarator): Avoid trying to get an operand off an
18598         identifier node.
18599
18600 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
18601
18602         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
18603         POINTER_SIZE to agree with expr.c.
18604
18605 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
18606
18607         * search.c (lookup_field): Don't report ambiguities if protect is 0,
18608         instead return NULL_TREE.
18609
18610 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
18611
18612         * class.c (finish_struct_1): Call warn_hidden if we want warnings
18613         about overloaded virtual functions.
18614         (warn_hidden): New routine to warn of virtual functions that are
18615         hidden by other virtual functions, that are not overridden.
18616         (get_basefndecls): New routine, used by warn_hidden.
18617         (mark_overriders): New routine, used by warn_hidden.
18618         * search.c (get_matching_virtual): Remove old warning that just
18619         isn't very useful.
18620
18621 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18622
18623         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
18624
18625         * typeck.c (null_ptr_cst_p): Delete unused fn.
18626         (build_function_call_maybe): Delete unused fn.
18627
18628         * expr.c (extract_init): #if 0 the code after unconditional return 0
18629         for now.
18630
18631         Delete old cadillac code.
18632         * edsel.c: Remove file.
18633         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
18634         * Makefile.in (CXX_OBJS): Delete edsel.o.
18635         (edsel.o): Delete rule.
18636         * cp-tree.h (flag_cadillac): Delete var decl.
18637         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
18638         * decl2.c (flag_cadillac): Delete var definition.
18639         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
18640         (grokfield): Delete code depending on flag_cadillac.
18641         (finish_anon_union): Likewise.
18642         * class.c (finish_struct_1): Likewise.
18643         (pushclass): Likewise.
18644         (popclass): Likewise.
18645         (push_lang_context): Likewise.
18646         (pop_lang_context): Likewise.
18647         * decl.c (init_decl_processing): Likewise.
18648         (start_decl): Likewise.
18649         (cp_finish_decl): Likewise.
18650         (xref_tag): Likewise.
18651         (finish_enum): Likewise.
18652         (start_function): Likewise.
18653         (finish_function): Likewise.
18654         (finish_stmt): Likewise.
18655         * lex.c (lang_init): Likewise.
18656         (check_newline): Likewise.
18657
18658         * lex.c (do_pending_inlines): Delete synthesized method kludge.
18659
18660         Delete defunct, ancient garbage collection implementation.
18661         * rtti.c: New file with the RTTI stuff from gc.c.
18662         * gc.c: Removed file (moved the remaining stuff into rtti.c).
18663         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
18664         (rtti.o): New rule, replacing gc.o.
18665         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
18666         * cp-tree.h: Delete gc-related fn decls.
18667         (DECL_GC_OFFSET): Delete macro.
18668         (flag_gc): Delete extern decl.
18669         * decl.c (current_function_obstack_index): Delete var decl.
18670         (current_function_obstack_usage): Delete var decl.
18671         (start_function): Delete clearing of current_function_obstack_index
18672         and current_function_obstack_usage.
18673         (init_decl_processing): Delete code relying on -fgc.
18674         Delete call to init_gc_processing.
18675         (cp_finish_decl): Delete calls to build_static_gc_entry and
18676         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
18677         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
18678         and to expand_expr of a __gc_main call.
18679         (maybe_gc_cleanup): Delete var decl.
18680         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
18681         * decl2.c (flag_gc): Delete var decl.
18682         (lang_f_options): Delete offering of -fgc.
18683         (lang_decode_option): Delete -fgc and -fno-gc handling.
18684         (get_temp_regvar): Delete gc code.
18685         * init.c (build_new): Delete gc code.
18686         * lex.c (init_lex): Delete checking of flag_gc.
18687
18688         * typeck.c (convert_arguments): Delete gc code.
18689         (build_component_addr): Delete -fgc warning.
18690         (build_modify_expr): Delete gc code.
18691
18692         * decl2.c (build_push_scope): Delete fn.
18693         * cp-tree.h (build_push_scope): Delete decl.
18694
18695         * search.c (clear_search_slots): Delete fn.
18696         * cp-tree.h (clear_search_slots): Delete decl.
18697
18698         * search.c (tree_needs_constructor_p): Delete fn.
18699         * cp-tree.h (tree_needs_constructor_p): Delete decl.
18700
18701         * tree.c (id_cmp): Delete fn.
18702
18703         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
18704         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
18705
18706         * tree.c (decl_value_member): Delete fn.
18707         * cp-tree.h (decl_value_member): Delete decl.
18708
18709         * tree.c (list_hash_lookup_or_cons): Delete fn.
18710         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
18711
18712         * method.c (cplus_exception_name): Delete fn.
18713         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
18714
18715         * spew.c (shift_tokens): Delete fn.
18716
18717 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18718
18719         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
18720         to cp_finish_decl.
18721         * parse.y: Likewise.
18722
18723 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18724
18725         * tree.c (build_cplus_staticfn_type): Delete function definition;
18726         never used.
18727         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
18728
18729         * tree.c (virtual_member): Delete function definition; never used.
18730         * cp-tree.h (virtual_member): Delete decl.
18731
18732 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
18733
18734         * typeck.c (build_component_ref): Handle getting vbase pointers
18735         out of complex multiple inheritance better.
18736
18737 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
18738
18739         * typeck.c (build_object_ref): Make sure we use the real type, not
18740         any reference type.
18741
18742 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
18743
18744         * tree.c (build_exception_variant): Don't create new types if we
18745         don't have to, also build new types on the right obstack.
18746
18747 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18748
18749         * decl.c (store_bindings): Split out from push_to_top_level.
18750         (push_to_top_level): Call it for b->type_shadowed on class binding
18751         levels.
18752
18753 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
18754
18755         * search.c (expand_upcast_fixups): Fix so that offsets stored in
18756         vbase_offsets are always right.  Fixes a problem where virtual base
18757         upcasting and downcasting could be wrong during conversions on this
18758         during virtual function dispatch at ctor/dtor time when dynamic
18759         vtable fixups for deltas are needed.  This only sounds easier than
18760         it is.  :-)
18761         (fixup_virtual_upcast_offsets): Change to reflect new calling
18762         convention for expand_upcast_fixups.
18763
18764 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18765
18766         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
18767         check that it's usable as the bitfield width.
18768
18769 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18770
18771         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
18772         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
18773         only ever used for functions in it.
18774
18775 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18776
18777         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
18778         (nested_type): Likewise.
18779         (nested_name_specifier): Use lastiddecl.
18780
18781         * decl.c (grokdeclarator): Adjust accordingly.
18782         * init.c (expand_member_init): Likewise.
18783         * parse.y (base_class): Likewise.
18784         * typeck2.c (build_functional_cast): Likewise.
18785
18786         * typeck2.c (build_functional_cast): Fill in name after we've
18787         checked for non-aggr type.
18788
18789 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
18790
18791         * decl2.c (warn_pointer_arith): Default to on.
18792
18793 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18794
18795         * lex.c (is_rid): New function.
18796         * decl.c (grokdeclarator): Diagnose reserved words used as
18797         declarator-ids.
18798
18799 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
18800
18801         * tree.c (get_decl_list): Don't lose cv-quals.
18802
18803         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
18804         typespecs used as declarator-ids.
18805
18806 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
18807
18808         * decl.c (poplevel): When poping a level, don't give a warning for
18809         any subblocks that already exist.
18810
18811 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18812
18813         * typeck.c (build_object_ref): Finish what I started.
18814
18815         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
18816
18817         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
18818
18819         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
18820         scope.
18821
18822 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18823
18824         * decl.c (xref_tag): Handle passing a type in directly.
18825
18826         * parse.y (qualified_type_name): Pull out the type.
18827         (nested_type): Likewise.
18828         Take types directly instead of as identifiers.
18829         * call.c (build_scoped_method_call): Take types directly instead of
18830         as identifiers.
18831         * decl.c (xref_basetypes): Likewise.
18832         * init.c (expand_member_init): Likewise.
18833         (build_member_call): Likewise.
18834         (build_offset_ref): Likewise.
18835         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
18836         * method.c (do_build_assign_ref): Likewise.
18837         * decl.c (grokdeclarator): Handle a type appearing as the
18838         declarator-id for constructors.
18839         * method.c (do_build_copy_constructor): current_base_init_list now
18840         uses the types directly, not their names.
18841         * init.c (sort_base_init): Likewise.
18842         (expand_member_init): Likewise.
18843         * init.c (is_aggr_type): New function, like is_aggr_typedef.
18844
18845 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
18846
18847         * tree.c (layout_basetypes): Call build_lang_field_decl instead
18848         of build_lang_decl if first arg is a FIELD_DECL.
18849
18850 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18851
18852         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
18853         non-empty.
18854         * except.c (expand_start_catch_block): Set TREE_USED to avoid
18855         warnings about the catch handler.
18856
18857 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
18858
18859         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
18860         expand_target_expr.
18861
18862 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18863
18864         Fix access control to use trees rather than integers.
18865         * class.c (access_{default, public, protected, private,
18866         default_virtual, public_virtual, private_virtual}_node): Add
18867         definitions.
18868         (init_class_processing): Do creation of those nodes.
18869         * cp-tree.h (access_type): Delete enum decl.
18870         (access_{default, public, protected, private, default_virtual,
18871         public_virtual, private_virtual}_node): Add decls.
18872         (compute_access): Change return type.
18873         * search.c (compute_access): Have tree return type, instead of enum.
18874         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
18875         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
18876         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
18877         * parse.y (VISSPEC): Make ttype rather than itype.
18878         (base_class_access_list): Likewise.
18879         * *.[cy]: Change all refs of `access_public' to `access_public_node',
18880         etc.
18881         * call.c (build_method_call): Make ACCESS be a tree.
18882         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
18883         * cvt.c (convert_to_aggr): Likewise.
18884         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
18885         Likewise.
18886         * method.c (hack_identifier): Likewise.
18887         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
18888
18889 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
18890
18891         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
18892         frontend, and make it more consistent with respect to
18893         warn_pointer_arith.
18894
18895 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
18896
18897         * decl.c (pushdecl): Check for duplicate parameter names.
18898
18899 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
18900
18901         * decl.c (expand_static_init): Call assemble_external for atexit.
18902
18903 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
18904
18905         * except.c (do_unwind): Remove some generated dead code.
18906         (eh_outer_context): New routine, factor out some common code from
18907         expand_builtin_throw and end_eh_unwinder.  Add code to do return
18908         address masking for the PA.
18909         (expand_builtin_throw): Use eh_outer_context instead of open coding
18910         it here.
18911         (end_eh_unwinder): Likewise.
18912
18913 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
18914
18915         * except.c (expand_throw): Call assemble_external for __empty, if we
18916         use it.
18917
18918 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
18919
18920         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18921         NORMAL_RETURN_ADDR_OFFSET.
18922         (end_eh_unwinder): Likewise.
18923
18924 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
18925
18926         * gc.c (build_dynamic_cast): Make sure we don't cast away const
18927         when dealing with references, and make sure we handle dynamic
18928         casting to a cv qualified reference.
18929
18930 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
18931
18932         * except.c (struct eh_context): New structure top hold eh context
18933         information.
18934         (push_eh_context): New routine.
18935         (pop_eh_context): Likewise.
18936         * decl.c (push_cp_function_context): Use them.
18937         (pop_cp_function_context): Likewise.
18938
18939 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
18940
18941         * decl2.c (finish_file): Also prune uninteresting functions in the
18942         inline emission loop.
18943
18944 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
18945
18946         * sig.c (build_signature_table_constructor): Mark functions
18947         in the signature as referenced.
18948
18949 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
18950
18951         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18952         the inline emission stuff.
18953
18954 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
18955
18956         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18957         weak symbols.
18958         * lang-options.h: Add -f{no-,}weak.
18959         * decl.c (init_decl_processing): If the target does not support weak
18960         symbols, don't use them.
18961         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18962
18963 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
18964
18965         * init.c (expand_member_init): warning for base init after members.
18966
18967 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
18968
18969         * cvt.c (build_expr_type_conversion): Don't convert to a reference
18970         type.
18971
18972 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
18973
18974         * method.c (report_type_mismatch): Improve wording for volatile
18975         mismatches.
18976
18977 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
18978
18979         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18980         expand_assignment, as the later doesn't handle things that have
18981         copy constructors well.  The compiler would do bitwise copying,
18982         instead of ctor calling in some cases.
18983
18984 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
18985
18986         * g++.c (my_strerror): Return "cannot access" if errno is 0.
18987         (pfatal_with_name, perror_exec): Don't assume that
18988         the returned value from my_strerror contains no '%'s.
18989         (concat): Remove.
18990         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18991
18992 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
18993
18994         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
18995         TYPE_METHODS/TREE_CHAIN mean what they used to.
18996         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
18997         instead of TYPE_METHODS.
18998         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
18999         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
19000         * cp-tree.h (CLASSTYPE_METHODS): Lose.
19001         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
19002         TYPE_METHODS.
19003         (struct lang_decl): Lose next_method field.
19004         (DECL_NEXT_METHOD): Lose.
19005         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
19006         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
19007         anymore.
19008         (finish_struct_methods): Don't mess with the TREE_CHAINs in
19009         fn_fields.
19010
19011         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
19012         vector.
19013
19014         * call.c (build_method_call): Synthesize here even when not inlining.
19015         * typeck.c (build_function_call_real): Likewise.
19016
19017 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
19018
19019         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
19020         == DBX_DEBUG, call dbxout_start_new_source_file and
19021         dbxout_resume_previous_source_file when appropriate.
19022
19023 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
19024
19025         * except.c (start_anon_func): Push to the top level.
19026         (end_anon_func): Pop from the top level.
19027
19028 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
19029
19030         * cp-tree.h (build_cleanup): New routine to build cleanups.
19031         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
19032         call at ctor time and use atexit to run it later.
19033         * decl2.c (build_cleanup): New routine, taken from finish_file.
19034         (finish_file): Use build_cleanup instead, and don't put function
19035         local statics in global dtor list.
19036
19037 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
19038
19039         * except.c (expand_throw): Ensure that we have cleanups, if we try
19040         and expand cleanups.
19041
19042 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
19043
19044         * except.c (expand_throw): Add logic to manage dynamic cleanups for
19045         the EH object.
19046         (expand_end_catch_block): Use the magic of expand_goto, instead of
19047         emit_jump so that we get the cleanup for any catch clause parameter
19048         and the cleanup for the exception object.  Update to reflect label
19049         changes.
19050         (push_eh_cleanup): New routine to register a cleanup for an
19051         exception object.
19052         (empty_fndecl): Used to default cleanup actions to
19053         nothing.
19054         (init_exception_processing): Setup empty_fndecl.  Setup
19055         saved_cleanup.
19056         (expand_start_catch_block): Update to reflect label changes.  Call
19057         push_eh_object to register the cleanup for the EH object.
19058         (start_anon_func): New routine to start building lambda expressions
19059         from trees.
19060         (end_anon_func): New routine to end them.
19061         (struct labelNode): Change so that we can use tree labels, or rtx
19062         labels.
19063         (saved_cleanup): Object to check for dynamic cleanups for the
19064         exception handling object.
19065         (push_label_entry): Change so that we can use tree labels, or rtx
19066         labels.
19067         (pop_label_entry): Likewise.
19068         (top_label_entry): Likewise.
19069         (expand_start_all_catch): Use tree label instead of rtx label, so
19070         that we can get the magic of expand_goto.
19071         (expand_end_all_catch): Update to reflect label changes.
19072
19073         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
19074         use UNSAVE_EXPRs.
19075         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
19076         building_cleanup logic, as we now use UNSAVE_EXPRs.
19077         * cp-tree.h (unsave_expr): Declare it.
19078         * decl.c (building_cleanup): Remove.
19079         (maybe_build_cleanup): Remove building_cleanup logic, and use
19080         UNSAVE_EXPR instead.
19081
19082 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
19083
19084         * gc.c (build_t_desc): Update error message to say <typeinfo>.
19085
19086 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19087
19088         * decl.c (pushdecl): Only warn about shadowing a local variable if
19089         warn_shadow is true.
19090
19091 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
19092
19093         * typeck.c (build_binary_op_nodefault): Added warning about
19094         comparisons between different enum types with -Wall, unless
19095         -fenum-int-equiv set.
19096
19097 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
19098
19099         * class.c (finish_struct_1): Skip down to the inner type in
19100         multidimensional arrays.  Ensures ctors will be made for types that
19101         need constructing.
19102
19103 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
19104
19105         * decl.c (last_dtor_insn): New to track the last compiler generated
19106         insn in a dtor.
19107         (store_parm_decls): Set it.
19108         (finish_function): Use it to see if the dtor is empty.  Avoid doing
19109         vtable setup all the time, if we can.
19110         (struct cp_function): Add last_dtor_insn.
19111         (push_cp_function_context): Save it.
19112         (pop_cp_function_context): Restore it.
19113
19114 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
19115
19116         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
19117         warnings.
19118
19119 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
19120
19121         * typeck.c (expand_target_expr): Make sure targets get put into the
19122         current temp_slot_level, so that the free_temp_slots call will reuse
19123         them.
19124
19125 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
19126
19127         * class.c (finish_struct_1): Delay delta fixups for virtual bases
19128         until after we have done the hard virtuals, to avoid a bogus `every
19129         virtual function must have a unique final overrider' for virtual
19130         functions that are only overridden by hard virtuals.
19131
19132 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19133
19134         * pt.c (do_function_instantiation): Don't try to find a file-scope
19135         template for a member function.
19136
19137 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
19138
19139         * g++.c (main): Add handling of -nodefaultlibs.
19140
19141 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
19142
19143         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
19144         distinguish between direct bindings of reference variables, and
19145         indirect bindings of reference variables.
19146         * cvt.c (build_up_reference): Use it.
19147         * typeck.c (convert_arguments): Use it to indicate this is an
19148         indirect binding.
19149         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
19150         as they are unused.
19151         (expand_static_init): Likewise.
19152         (cplus_expand_expr_stmt): Likewise.
19153         * decl2.c (finish_file): Likewise.
19154         * init.c (perform_member_init): Likewise.
19155         (emit_base_init): Likewise.
19156         (expand_aggr_vbase_init_1): Likewise.
19157
19158 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19159
19160         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
19161         get a DECL_LANG_SPECIFIC node.
19162         * cp-tree.h (lang_decl_flags): Add new member `level'.
19163         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
19164         decl_flags level member.
19165
19166 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19167
19168         * call.c (build_method_call): Make sure instance has a
19169         TYPE_LANG_SPECIFIC node before we dive into it.
19170
19171 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
19172
19173         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
19174
19175 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
19176
19177         * decl.c (duplicate_decls): When smashing decls, smash staticness in
19178         the usual way.
19179
19180 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
19181
19182         * decl.c (poplevel): Handle the merging of subblocks of cleanups
19183         when finishing blocks that have already been created (usually due to
19184         the fixup goto code).  Fixes bad debugging information.
19185
19186 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
19187
19188         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
19189         that's not a list of overloaded functions.
19190
19191 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19192
19193         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
19194         before trying to use DECL_ABSTRACT_VIRTUAL_P.
19195
19196 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
19197
19198         * decl2.c (mark_used): New function for hooking into setting of
19199         TREE_USED on decls.
19200         * call.c (build_method_call): Use it.
19201         * class.c (instantiate_type): Likewise.
19202         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
19203         for all like-named functions.
19204         * method.c (hack_identifier): Likewise.
19205         (emit_thunk): Don't call assemble_external.
19206         (make_thunk): Create thunk as a FUNCTION_DECL so that it
19207         gets the right mode and ENCODE_SECTION_INFO works.
19208
19209         * parse.y: Use mark_used.  Pass operator names to do_identifier.
19210         * lex.c (do_identifier): Handle operator names.
19211
19212         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
19213
19214 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19215
19216         * errfn.c: Include stdio.h.
19217         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
19218
19219 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
19220
19221         * typeck2.c (digest_init): Always convert initializers to the
19222         right type.
19223
19224 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
19225
19226         * init.c (member_init_ok_or_else): Don't allow member initializers
19227         for indirect members, as it is invalid.
19228
19229 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19230
19231         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
19232
19233 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
19234
19235         * parse.y (for.init.statement): Catch compound statements inside for
19236         initializations, if we're being pedantic.
19237
19238 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
19239
19240         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
19241         looking for.
19242
19243 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
19244
19245         * error.c (dump_expr): Don't core dump when a boolean expression is
19246         used as a default argument.
19247
19248 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19249
19250         * class.c (finish_struct_bits): Check aggregate_value_p instead of
19251         RETURN_IN_MEMORY.
19252
19253 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
19254
19255         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
19256         BLKmode type that would otherwise be returned in registers.
19257
19258 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19259
19260         * g++.c (WITHLIBC): New macro.
19261         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
19262         saw_libc and pass it at the end if it was set.
19263
19264 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19265
19266         * parse.y (fn.def1): Call split_specs_attrs in
19267         declmods notype_declarator case.