OSDN Git Service

* decl.c (initialize_local_var): Handle static variables here.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
2
3         * decl.c (initialize_local_var): Handle static variables here.
4         (cp_finish_decl): Tweak handling of function-scope static
5         variables.
6         * semantics.c (expand_stmt): Handle DECL_STMTs for static
7         variables.
8
9         * method.c (emit_thunk): Don't crash when -fsyntax-only.
10
11         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
12         global_dtor_p.  Add init_priority.
13         (DECL_ACCESS): Adjust accordingly.
14         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
15         (GLOBAL_INIT_PRIORITY): Likewise.
16         * decl.c (lang_mark_tree): Adjust accordingly.
17         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
18         and GLOBAL_INIT_PRIORITY.
19         * dump.c (dequeue_and_dump): Print them.
20         * ir.texi: Document them.
21
22         * decl2.c (struct priority_info_s): Remove initialization_sequence
23         and destruction_sequence.
24         (start_static_storage_duration_function): Return the body of the
25         function.  Convert for function-at-a-time mode.
26         (generate_inits_for_priority): Remove.
27         (finish_static_storage_duration_function): Change prototype.
28         Adjust for function-at-a-time mode.
29         (do_static_initialization): Likewise.
30         (do_static_destruction): Likewise.
31         (do_static_initialization_and_destruction): Remove.
32         (start_static_initialization_or_destruction): New function.
33         (finish_static_initialization_or_destruction): Likewise.
34         (get_priority_info): Don't manipulation initialization_sequence or
35         destruction_sequence.
36         (prune_vars_needing_no_initialization): New function.
37         (write_out_vars): Likewise.
38         (finish_file): Use the various new functions instead of the old.
39         
40 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
41
42         * cp-tree.h (warn_float_equal): Declare.
43         * decl2.c (warn_float_equal): Define.
44         (lang_decode_option): Recognize -W[no-]float-equal.
45         * typeck.c (build_binary_op_nodefault): Conditionally warn
46         about equality tests of floating point types.
47
48 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
49
50         Support normal type_info-based EH mechanisms with -fno-rtti.
51         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
52         (build_eh_type_type_ref): Likewise.
53         (build_eh_type): Remove.
54         (expand_throw): Call build_eh_type_type, not build_eh_type.
55         * decl2.c (import_export_decl): Don't associate the tinfo fn with
56         the vtable if -fno-rtti.
57         * decl.c (init_decl_processing): Always init_rtti_processing.
58
59         * rtti.c (get_typeid): Don't complain about -fno-rtti.
60
61         * class.c (class_cache_obstack, class_obstack): Remove.
62         (init_class_processing): Don't initialize class_obstack.
63         (push_cache_obstack): Remove.
64         (pushclass): Don't call it.
65         * cp-tree.h: Remove prototype for push_cache_obstack.
66         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
67         (pushlevel_class): Don't push_decl_level.
68         (poplevel_class): Don't pop_stack_level.
69         (push_class_level_binding): Don't push_cache_obstack.
70         (init_decl_processing): Don't intialize decl_obstack.
71         * search.c (push_class_decls): Don't push_cache_obstack.
72         * tree.c (list_hash_add): Put hash node on permanent_obstack.
73         (hash_tree_cons): Don't mess with obstacks.
74         (print_lang_statistics): Don't print stats for class_obstack and
75         decl_obstack.
76
77 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
78
79         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
80         * ir.texi: Document DECL_EXTERNAL.
81
82         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
83         * ir.texi: Document THUNK_DECLs.
84
85         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
86         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
87         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
88         * error.c (dump_template_bindings): Remove unused parameter.
89         Handle multiple levels of template parameters.
90         (dump_template_decl): Use `parms', not `args', for template
91         parameters.  Fix thinko.
92         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
93         flags to dump_template_bindings.
94         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
95         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
96         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
97         (tsubst_copy): Clarify variable name.
98         (most_general_template): Robustify.
99         
100 1999-09-29  Nathan Sidwell  <nathan@acm.org>
101
102         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
103         to change primary template rendering.
104
105 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
106
107         * cp-tree.h (UPT_TEMPLATE): Remove.
108         (UPT_PARMS): Likewise.
109         (DECL_NEEDED_P): New macro.
110         * decl2.c (finish_vtable_vardecl): Use it.
111         (finish_objects): Don't crash with -fsyntax-only.
112         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
113         -fsyntax-only.
114         * pt.c (tsubst_friend_function): Remove FIXME that talks about
115         obstacks.
116         (tsubst_expr): Correct handling of function try-blocks.
117         * semantics.c: Include flags.h.
118         (expand_body): Don't do RTL generation if -fsyntax-only.
119         * Makefile.in (semantics.o): Depends on flags.h.
120         
121 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
122
123         * pt.c (most_general_template): Adjust declaration.
124
125         * cp-tree.h: (most_general_template): Declare.
126
127         * error.c (dump_template_value): Rename to ...
128         (dump_template_argument): This.
129         (dump_template_argument_list): New function.
130         (dump_type): Use it.
131         (dump_template_parameter): New function.
132         (dump_template_decl): Use it.
133         (dump_template_bindings): New function.
134         (dump_function_decl): Use it. Pretty print function template
135         instantiations.
136
137 1999-09-28  Nathan Sidwell  <nathan@acm.org>
138
139         * decl.c (grokdeclarator): Distinguish parameter context for
140         diagnostics. Tidy up missing type diagnostic.
141         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
142
143 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
144
145         * ir.texi: Improve documentation for TARGET_EXPR.
146
147 1999-09-27  Nathan Sidwell  <nathan@acm.org>
148
149         Augment stringification of trees.
150         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
151         (fndecl_as_string, type_as_string_real, args_as_string,
152         code_as_string, language_as_string, parm_as_string,
153         op_as_string, assop_as_string, cv_as_string): Remove.
154         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
155         (context_as_string): Declare new function.
156         * error.c (cp_printers): Move definition.
157         (OB_UNPUT): Remove.
158         (OB_END_TEMPLATE_ID): Adjust.
159         (interesting_scope_p): Remove.
160         (dump_scope): New static function.
161         (dump_qualifiers): Adjust prototype, reimplement.
162         (dump_template_value): Use tree_string_flags.
163         (dump_type_real): Move back to dump_type.
164         (dump_type): Adjust prototype. Use tree_string_flags.
165         (dump_aggr_type): Likewise. Use dump_template_parms.
166         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
167         Return pad flag.
168         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
169         (dump_simple_decl): Likewise.
170         (dump_decl): Likewise. Use dump_template_decl.
171         (dump_template_decl): New static function broken out of dump_decl.
172         (dump_function_decl): Adjust prototype. Use tree_string_flags.
173         (dump_parameters): Likewise. Prefix space.
174         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
175         (dump_function_name): Likewise. Use dump_template_parms.
176         (dump_template_parms): New static function broken out of
177         dump_function_name.
178         (dump_expr_list): Adjust prototype. Use tree_string_flags.
179         (dump_expr): Likewise.
180         (fndecl_as_string): Removed
181         (type_as_string_real): Removed
182         (dump_binary_op): Adjust prototype. Use tree_string_flags.
183         (dump_unary_op): Likewise.
184         (type_as_string): Likewise.
185         (expr_as_string): Likewise.
186         (decl_as_string): Likewise.
187         (context_as_string): New function.
188         (lang_decl_name): Adjust.
189         (decl_to_string): New static print callback.
190         (expr_to_string): Likewise.
191         (fndecl_to_string): Likewise.
192         (code_as_string): Renamed to ...
193         (code_to_string): ... here. Adjust.
194         (language_as_string): Renamed to ...
195         (language_to_string): ... here. Adjust.
196         (parm_as_string): Renamed to ...
197         (parm_to_string): ... here.
198         (op_as_string): Renamed to ...
199         (op_to_string): ... here.
200         (assop_as_string): Renamed to ...
201         (assop_to_string): ... here.
202         (type_to_string): New static print callback.
203         (args_as_string): Renamed to ...
204         (args_to_string): ... here. Adjust.
205         (cv_as_string): Renamed to ...
206         (cv_to_string): ... here. Adjust.
207         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
208         (print_template_context): Likewise.
209
210 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
211
212         * cp-tree.h (expand_throw): Remove prototype.
213         * except.c (expand_throw): Make it static.  Use tree-generation
214         functions, rather than RTL-generation functions.
215         (build_throw): Use it.
216         * expr.c: Include except.h.
217         (cplus_expand_expr): Don't call expand_throw here.
218         * Makefile.in (expr.o): Depend on except.h.
219         * ir.texi: Update documentation for THROW_EXPR.
220         
221         * decl.c (start_function): Set x_dont_save_pending_sizes rather
222         than calling get_pending_sizes.
223         * init.c (build_new): Don't save and restore
224         immediate_size_expand; instead, assert that it has the expected
225         value already.
226
227 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
228
229         * lex.c (compiler_error): Add missing call to va_end().
230
231 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
232
233         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
234         * ir.texi: Document RESULT_DECL and DECL_RESULT.
235
236         * cp-tree.h (check_return_expr): New function.
237         * decl.c (finish_constructor_body): New function.
238         (pushdecl): Put global friend functions in namespace binding
239         level, not the class binding level.
240         (finish_destructor_body): Make sure the dtor_label is always
241         defined.  Fix typo in comment.
242         (finish_function): Move generation of constructor-termination code
243         to semantic-analysis time.  Move generation of implicit `main'
244         return value to semantic-analysis time.
245         * semantics.c (finish_return_stmt): Generate goto's to
246         ctor_label/dtor_label here.  Use check_return_expr to do semantic
247         analysis on the returned expression.
248         * typeck.c (maybe_warn_about_returning_address_of_local): New
249         function split out from c_expand_return.
250         (check_return_expr): Likewise.
251         (c_expand_return): Just generate the RTL for the return.
252         
253 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
254
255         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
256         (cleanup_type): Likewise.
257         (search_tree): Change prototype.
258         * decl.c (local_variable_p): Adjust for new interface to
259         search_tree.
260         (check_default_argument): Likewise.
261         * error.c (dump_expr): Handle INIT_EXPR.
262         * except.c (expand_throw): Don't make cleanup_type a local static.
263         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
264         * init.c (build_new): Call build_new_1 directly, rather than
265         building a NEW_EXPR.
266         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
267         processing file-scope initializers.
268         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
269         * tree.c: Include splay-tree.h
270         (no_linkage_helper): Adjust for new interface to search_tree.
271         (search_tree): Pass around pointers to tree nodes, rather than the
272         nodes themselves.  Handle VEC_INIT_EXPR.
273         (no_linkage_check): Adjust for new interface to search_tree.
274         (mapcar): Handle VEC_INIT_EXPR.
275         (target_remap): New variable.
276         (bot_manip): Use it.
277         (bot_replace): New function.
278         (break_out_target_exprs): Use it to remap all variables used in a
279         default argument expression.
280         * typeck.c (build_modify_expr): Don't crash when outside a
281         function and presented with an INIT_EXPR assignment
282         * Makefile.in (tree.o): Depend on splay-tree.h.
283
284 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
285
286         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
287         DECL_BUILT_IN.
288         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
289         callers changed.
290         Set the builtin's DECL_BUILT_IN_CLASS.
291
292 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
293
294         * decl.c (pushdecl): Don't make local declarations of extern
295         variables give the variable a DECL_CONTEXT for the function.
296         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
297         Don't accidentally make RTL for local declarations.
298         (emit_local_var): Handle declarations with asm-specifiers here.
299         
300 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
301
302         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
303         STMT_IS_FULL_EXPR_P.
304
305         * cp-tree.h (language_function): Add cannot_inline.
306         * decl.c (start_function): Restore current_function_cannot_inline
307         from the saved value.
308         (save_function_data): Save current_function_cannot_inline.
309         * decl2.c (start_objects): Change prototype.  Build the function
310         in function-at-a-time mode.
311         (finish_objects): Likewise.
312         (generate_ctor_or_dtor_function): Adjust accordingly.
313         
314         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
315         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
316         Don't call expand_anon_union_decl here
317         * semantics.c (exapnd_stmt): Call it here, instead.
318         * typeck.c (mark_addressable): Addressed variables are implicitly
319         used.
320         
321 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
322
323         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
324         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
325         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
326         * cp-tree.h: Add tree checking macros to various tree access
327         macros. 
328         * ptree.c (print_lang_decl): Test for function or variable
329         before accessing template info.
330
331 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
332
333         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
334         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
335         * decl2.c (lang_f_options): Add -fshort-wchar.
336         * cp-tree.h: Declare flag_short_wchar.
337         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
338         int' for wchar_t.
339
340 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
341
342         * ir.texi: Fix formatting errors and typos.
343
344 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
345
346         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
347
348         * decl.c (pushdecl): Do create a binding for extern "C" functions,
349         but not for their DECL_ASSEMBLER_NAMEs.
350         (lookup_name_current_level): Fix formatting.
351         (xref_tag): Likewise.
352         * decl2.c (start_objects): Mark static constructors and
353         destructors as used.
354
355 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
356
357         * decl.c (define_case_label): Don't crash if we're not in a switch.
358
359         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
360         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
361         for unsupported flags.
362
363 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
364
365         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
366         Accept and warn about -fthis-is-variable.
367
368 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
369
370         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
371         CLEANUP_STMT, and SCOPE_STMT.
372
373         * decl2.c (lang_decode_option): Adjust, in the wake of recent
374         changes to option processing.
375
376 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
377
378         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
379         function pointer from pmfs with no object given.
380         (convert_for_assignment): Do not return error when converting
381         pmfs.
382
383 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
384
385         * lex.c (internal_filename): New variable.
386         (INTERNAL_FILENAME): New macro.
387         (init_parse): Allocate internal_filename and mark as root.  Use it
388         instead of a string constant.
389
390 1999-09-21  Nathan Sidwell  <nathan@acm.org>
391
392         Reimplement dynamic cast and catch matching.
393         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
394         * search.c (dynamic_cast_base_recurse): New function.
395         (get_dynamic_cast_base_type): New function for dynamic cast.
396         * rtti.c (build_dynamic_cast_1): Determine source and target
397         class relationship. Call __dynamic_cast_2.
398         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
399         (__user_type_info::dyncast): New dynamic cast dispatcher.
400         (__user_type_info::sub_kind): New nested enumeration.
401         (__user_type_info::contained_p): sub_kind predicate.
402         (__user_type_info::contained_public_p): Likewise.
403         (__user_type_info::contained_nonpublic_p): Likewise.
404         (__user_type_info::contained_nonvirtual_p: Likewise.
405         (__user_type_info::upcast_result): New nested struct.
406         (__user_type_info::dyncast_result): New nested struct.
407         (*::do_upcast): New catch function.
408         (*::do_dyncast): New dynamic cast function.
409         (__user_type_info::find_public_subobj): New dynamic cast
410         helper dispatcher.
411         (*::do_find_public_subobj): New dynamic cast helper function.
412         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
413         (__user_type_info::dyncast): Define dynamic cast dispatcher.
414         (*::do_upcast): Define catch function.
415         (*::do_dyncast): Define dynamic cast function.
416         (*::do_find_public_subobj): Define dynamic cast helper function.
417         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
418         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
419         (__dynamic_cast_2): New dynamic cast runtime.
420
421 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
422
423         * cp-tree.h (finish_stmt_expr): Change prototype.
424         * expr.c (cplus_expand_expr): Adjust call accordingly.
425         * init.c (finish_init_stmts): Likewise.
426         * parse.y (primary): Likewise.
427         * pt.c (tsubst_copy): Likewise.
428         * semantics.c (finish_stmt_expr): Don't take two parameters.
429         Don't remove generated BLOCKs from the block-tree.
430
431         Remove support for assigning to `this'.
432         * NEWS: Note that fact.
433         * class.c (build_vbase_path): Don't check flag_this_is_variable.
434         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
435         (language_function): Remove assigns_this, just_assigned_this, and
436         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
437         (base_init_expr): Remove.
438         (current_vcalls_possible_p): New macro.
439         (vtbls_set_up_p): Likewise.
440         (emit_base_init): Change prototype.
441         * decl.c (finish_destructor_body): New function, split out from
442         finish_function.
443         (current_function_assigns_this): Remove.
444         (current_function_just_assigned_this): Likewise.
445         (start_function): Don't set them.
446         (finish_function): Don't check them.  Don't emit
447         base-initialization code here.  Generate code for destructors when
448         doing semantic analysis.
449         (finish_stmt): Don't check current_function_just_assigned_this.
450         * decl2.c (lang_f_options): Remove this-is-variable.
451         (lang_decode_option): Likewise.
452         (grokclassfn): Don't check flag_this_is_variable.
453         * init.c (emit_base_init): Return the expression generated.
454         (construct_virtual_bases): Don't push/pop obstacks.  Fix
455         typo.
456         (build_new_1): Don't check flag_this_is_variable.
457         (get_temp_regvar): Don't set DECL_REGISTER.
458         (build_vec_init): Don't call use_variable.
459         * lang-options.h: Remove "-fthis-is-variable" and
460         "-fno-this-is-variable".
461         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
462         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
463         expand_expr_stmt.
464         * semantics.c (finish_expr_stmt_real): Rename to ...
465         (finish_expr_stmt): This.  Remove assigned_this parameter.
466         (begin_if_stmt): Call do_pushlevel before starting the statement.
467         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
468         blocks.
469         (setup_vtbl_ptr): Emit initialization code for bases and members
470         at semantic-analysis time.  Emit code to initialize vtables in
471         destructors here.
472         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
473         Don't handle CTOR_INITIALIZER any more.
474         * typeck.c (build_modify_expr): Don't check for assignments to
475         this.
476         (c_expand_return): Don't suggest assigning to `this'.
477         
478         * Makefile.in (decl.o): Depend on RTL_H.
479         (decl2.o): Likewise.
480         (class.o): Likewise.
481         (call.o): Likewise.
482         (method.o): Likewise.
483         (search.o): Likewise.
484         (tree.o): Likewise.
485         (pt.o): Likewise.
486
487         * decl.c (duplicate_decls): When a builtin function is redeclared
488         as static, make sure it is mangled correctly.
489
490         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
491         detail about the statement-tree.
492         
493 1999-09-20  Nathan Sidwell  <nathan@acm.org>
494
495         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
496
497 1999-09-20  Nick Clifton  <nickc@cygnus.com>
498
499         * decl2.c (lang_decode_option): Extend comment.
500
501 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
502
503         * typeck.c: Include "tm_p.h".
504
505 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
506
507         * ir.texi: New file.
508
509 1999-09-19  Paul Burchard <burchard@pobox.com>
510
511         * semantics.c (expand_stmt): Initialize return value.
512
513 1999-09-18  Paul Burchard <burchard@pobox.com>
514
515         * gxxint.texi: G++ now implements namespaces.
516         
517 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
518
519         * decl.c (pop_label): Don't warn about unused labels more than
520         once.
521         * semantics.c (finish_goto_stmt): Always marked used labels as
522         used.
523
524         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
525         even when the declaration is external.
526         (cp_finish_decl): Adjust call to layout_var_decl.
527         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
528
529 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
530
531         * typeck.c (get_member_function_from_ptrfunc): Always consider
532         virtuality inside member pointer.
533
534 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
535
536         Turn on function-at-a-time processing.  
537         * cp-tree.h (doing_semantic_analysis_p): New macro.
538         (SF_DEFAULT): Define to zero, not SF_EXPAND.
539         (start_handler_parms): Change prototype.
540         (expand_start_catch_block): Likewise.
541         (expand_end_catch_block): Likewise.
542         (expand_start_eh_spec): Likewise.
543         (expand_end_eh_spec): Declare.
544         (finish_handler_parms): Change prototype.
545         (begin_catch_block): Declare.
546         (finish_handler): Change prototype.
547         (do_pushlevel): Declare.
548         (do_poplevel): Likewise.  
549         * decl.c (pushlevel): Don't create
550         binding levels when not doing semantic analysis.
551         (poplevel): Don't pop them.
552         (pushdecl): Assert that we are never called when not doing
553         semantic analysis.
554         (pushdecl_top_level): Use push_to_top_level.
555         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
556         label when expanding.
557         (cp_finish_decl): Only inject for-scope variables when doing
558         semantic analysis.  Add comments.
559         (start_handler_parms): Return the handler parm.
560         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
561         already set.  Reinitialize from saved function data if available.
562         Don't pushlevel when not doing semantic analysis.
563         (store_parm_decls): Only generate RTL when expanding.  Only
564         pushdecl when doing semantic analysis.  Set
565         current_eh_spec_try_block if appropriate.
566         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
567         Combine common code.  Don't poplevel when not doing semantic
568         analysis.
569         (push_cp_function_context): Don't expand functions without an
570         explicit call to expand_body.
571         (mark_lang_function): Make eh_spec_try_block and
572         x_scope_stmt_stack.  
573         * except.c (expand_end_eh_spec): Don't
574         declare.
575         (process_start_catch_block): Likewise.
576         (push_eh_cleanup): Use finish_decl_cleanup.
577         (initialize_handler_parm): New function.
578         (expand_start_catch_block): Use it.
579         (expand_end_catch_block): Use tree-generation functions, not
580         RTL-generation functions.
581         (expand_start_eh_spec): Likewise.
582         (expand_end_eh_spec): Likewise.
583         (expand_exception_blocks): Simplify.
584         (start_anon_func): Use do_pushlevel.
585         (end_anon_func): Use do_poplvel.  Call expand_body for the
586         function.  
587         * expr.c (do_case): Don't call define_case_label.  
588         * init.c (create_temporary_var): Set DECL_CONTEXT for local
589         variables.  
590         * method.c (emit_thunk): Call expand_body for the
591         thunk.
592         (sythesize_method): Likewise.  
593         * parse.y (handler_args): Give it ttype.
594         (eat_saved_input): Call expand_body.
595         (base_init): Use do_pushlevel.
596         (pending_inline): Call expand_body.
597         (handler): Adjust calls to finish_handler_parms and
598         finish_handler.
599         (handler_args): Don't call expand_start_catch_block.  Return the
600         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
601         * parse.c: Regenerated.
602         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
603         * semantics.c (do_pushlevel): Give it external linkage.  Build
604         SCOPE_STMTs.
605         (do_poplevel): Likewise.
606         (finish_case_label): Call define_case_label when doing semantic
607         analysis.
608         (finish_goto_stmt): Create RTL for labels.
609         (finish_function_try_block): Set in_function_try_handler
610         unconditionally.
611         (finish_function_handler_sequence): Unset it.
612         (finish_handler_parms): Use expand_start_catch_block even when
613         building a statement-tree.
614         (begin_catch_block): New function.
615         (finish_handler): Move a little RTL-generation logic here.
616         (finish_decl_cleanup): Allow cleanups for empty declarations.
617         (finish_named_return_value): Don't pushdecl when not doing
618         semantic analysis.
619         (expand_stmt): Don't do semantic analysis for variable
620         declarations.  Handle START_CATCH_STMT.  Call expand_label
621         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
622         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
623         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
624         RETURN_INIT and function try blocks.
625         
626         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
627         x_scope_stmt_stack.  Add x_in_charge_parm.
628         (current_eh_spec_try_block): New macro.
629         (current_scope_stmt_stack): Likewise.
630         (current_in_charge_parm): Likewise.
631         * decl.c (start_function): Initialize current_in_charge_parm.
632         (finish_function): Use current_in_charge_parm rather than looking
633         up __in_chrg.
634         * search.c (expand_indirect_vtbls_init): Likewise.
635
636         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
637         (TRY_BLOCK): Likewise.
638         (HANDLER): Likewise.
639         (START_CATCH_STMT): New tree node.
640         (SCOPE_STMT): Likewise.
641         * cp-tree.h (SCOPE_BEGIN_P): New macro.
642         (SCOPE_NULLIFIED_P): Likewise.
643         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
644         (struct lang_decl): Add saved_language_function.
645         (DECL_PENDING_INLINE_INFO): Adjust documentation.
646         (DECL_PENDING_INLINE_P): New macro.
647         (TYPE_TI_ARGS): Fix typo in comment.
648         (DECL_SAVED_TREE): Add to documentation.
649         (DECL_SAVED_FUNCTION_DATA): New macro.
650         (START_CATCH_TYPE): Likewise.
651         (SCOPE_END_P): New macro.
652         (declare_parm_level): Don't declare.
653         * decl.c (mark_lang_function): New function, split out from
654         mark_cp_function_context.
655         (save_function_data): New function.
656         (declare_parm_level): Remove.
657         (finish_function): Use save_function_data to squirrel away
658         important stuff for later use.
659         (mark_cp_function_context): Use mark_function_data.
660         (lang_mark_tree): Likewise.
661         * lex.c (begin_definition_of_inclass_inline): Set
662         DECL_PENDING_INLINE_P.
663         (store_pending_inline): Clear it.
664         * pt.c (tsubst_decl): Likewise.
665
666 1999-09-17  Nathan Sidwell  <nathan@acm.org>
667
668         * call.c (perform_implicit_conversion): Deal with error_mark_node.
669
670 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
671
672         * decl.c (warn_extern_redeclared_static): Don't get confused by
673         static member functions.
674         (duplicate_decls): Merge DECL_THIS_STATIC.
675
676         * decl.c (expand_static_init): Make sure assignments to local
677         statics actually occur.
678
679 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
680
681         * cp-tree.h (poplevel_class): Declare.
682         * class.c (popclass): Use poplevel_class, not poplevel.
683         * decl.c (poplevel_class): Don't make it static.  Don't return a
684         value.
685         (poplevel): Don't call poplevel_class; abort in a class
686         binding level is seen.
687         * semantics.c (finish_translation_unit): Use pop_everything.
688         * parse.y (member_init): Allow errors.
689         (pending_inline): Call finish_function.
690         * parse.c: Regenerated.
691         * Makefile.in (CONFLICTS): Adjust.
692
693 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
694         
695         * error.c: Reduce code duplication.
696         (dump_template_value): New function.
697         (dump_type_real): Use it.
698         (dump_decl): Likewise.
699         (dump_function_name): Likewise.
700         (dump_function_decl): Don't be too talkative about function return
701         type variety.
702
703 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
704
705         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
706
707         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
708
709 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
710
711         * decl2.c (finish_file): Also call check_global_declarations for
712         the pending_statics list.
713
714 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
715
716         * lex.c (cp_pragma_implementation): Allow #pragma implementation
717         in header files.
718
719 1999-09-15  Richard Henderson  <rth@cygnus.com>
720
721         * lex.c (mark_impl_file_chain): Follow the next chain.
722
723 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
724
725         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
726         problems with extern "C" functions redeclared as static.
727         (duplicate_decls): When a builtin is redeclared static, make the
728         new function have internal linkage.
729         
730 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
731
732         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
733         * pt.c (tsubst_copy): Likewise.
734         * tree.c (search_tree): Likewise.
735         (mapcar): Likewise.
736
737 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
738
739         * typeck2.c (ack): Don't declare progname.
740
741 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
742
743         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
744         filenames with ggc_alloc_string.
745
746 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
747
748         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
749         TARGET_EXPR.
750         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
751         the TARGET_EXPR.
752         * cvt.c (build_up_reference): Likewise.
753         * tree.c (build_cplus_new): Likewise.
754         (get_target_expr): Likewise.
755         
756 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
757
758         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
759
760 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
761
762         * cp-tree.h (build_target_expr): New function.
763         * call.c (build_conditional_expr): Use build_target_expr.
764         (convert_like): Likewise.
765         (build_over_call): Likewise.
766         * cvt.c (build_up_reference): Likewise.
767         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
768         (destroy_local_var): Here.
769         (build_target_expr): New function.
770         * tree.c (build_cplus_new): Use it.
771         (get_target_expr): Likewise.
772
773 1999-09-13  Nathan Sidwell  <nathan@acm.org>
774
775         * typeck.c (expr_sizeof): Don't decay arrays and functions.
776         Remove misleading comment.
777         (build_compound_expr): Don't decay arrays.
778
779 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
780
781         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
782         class rvalues again.
783
784 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
785
786         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
787
788         * g++spec.c: Include gcc.h.
789         (lang_specific_driver): Constify a char*.  Call xcalloc, not
790         xmalloc/bzero.  All calls to the function pointer parameter now
791         explicitly call `fatal'.
792
793 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
794
795         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
796         * cvt.c (ocp_convert): Complete the from and destination types.
797         Adjust warning about functions always being `true' in conditionals.
798         * decl.c (duplicate_decls): Don't play funny games with abort.
799         * error.c (dump_expr): Handle OVERLOADs.
800         * spew.c (probe_obstack): Remove.
801         * typeck.c (condition_conversion): Use perform_implicit_conversion.
802         
803 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
804
805         * cp-tree.h (auto_function, define_function): Adjust prototypes.
806         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
807         changed.
808         (auto_function): Likewise, for CODE arg.
809         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
810         (builtin_function): ... here.
811
812 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
813
814         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
815         (init_decl_processing): Don't set TREE_PERMANENT for the
816         error_mark_node.
817         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
818         (grokdeclarator): Likewise.
819         (grokparms): Don't check TREE_PERMANENT when building up lists.
820         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
821         (mark_inline_for_output): Likewise.
822         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
823         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
824         * lex.c (check_newline): Don't check ggc_p; it is always one.
825         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
826         * spew.c (yylex): Don't copy_node or probe_obstacks for
827         non-permanent CONSTANTs and STRINGs.
828         * tree.c (build_cplus_array_type_1): Don't fuss with
829         TREE_PERMANENT on ARRAY_TYPEs.
830         
831         * cp-tree.def (CLEANUP_STMT): New node.
832         * cp-tree.h (language_function): Add name_declared.
833         (current_function_name_declared): New macro.
834         (CLEANUP_DECL): New macro.
835         (CLEANUP_EXPR): Likewise.
836         (emit_local_var): Likewise.
837         (finish_decl_cleanup): New function.
838         * cvt.c (build_up_reference): Simplify.
839         (ocp_convert): Remove dead code.
840         * decl.c (start_decl): Remove call to add_decl_stmt.
841         (grok_reference_init): Adjust, to handle bindings temporaries to
842         references.  Remove dead code.
843         (initialize_local_var): Don't generate RTL for
844         declarations here, or build cleanups here.  Don't fuss with
845         obstacks.  Replace expand_start_target_temps calls with explicit
846         setting of stms_are_full_exprs_p.
847         (destroy_local_var): New function.
848         (emit_local_var): Likewise.
849         (cp_finish_decl): Use them, as appropriate.
850         (start_function): Announce template functions.
851         (store_parm_decls): Don't call declare_function_name here.
852         (finish_stmt): Don't start emit base-initialization code when just
853         building the statement-tree.
854         * init.c (create_temporary_var): Move add_decl_stmt call ...
855         (get_temp_regvar): Here.
856         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
857         cp_finish_decl would expect.  Don't call add_decl_stmt.
858         * semantics.c (begin_compound_stmt): Call declare_function_name,
859         if appropriate.
860         (finish_decl_cleanup): New function.
861         (expand_stmt): Use emit_local_var to output variables.          
862         (expand_body): Set current_funtion_name_declared.
863         
864 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
865
866         * cp-tree.h (finish_cleanup_try_block): New function.
867         * semantics.c (finish_cleanup_try_block): Add comment.
868
869 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
870
871         * cp-tree.h: Delete declarations for all tree nodes now moved to
872         global_trees.
873         * decl.c: Delete their definitions.
874         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
875         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
876         provide defaults.
877         (init_decl_processing): Call build_common_tree_nodes and
878         build_common_tree_nodes_2 instead of building their nodes here.
879         Don't add gc roots for them.
880
881 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
882
883         * cp-tree.h (language_function): Rename expanding_p to
884         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
885         (expanding_p): Adjust accordingly.
886         (TREE_VIA_PRIVATE): Fix typo in comment.
887         (DECL_REFERENCE_SLOT): Remove.
888         (SET_DECL_REFERENCE_SLOT): Likewise.
889         * decl.c (named_label_uses): Adjust. Remove chicken comment.
890         (push_overloaded_decl): Don't truncate the chain of bindings when
891         adding an overloaded function.
892         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
893         (initialize_local_var): Fix typo in comment.
894         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
895         * decl2.c (start_objects): Make the fact that we are expanding
896         the generated function right away explicit.
897         (start_static_storage_duration_function): Likewise.
898         (finish_file): Fix typo in comment.
899         * init.c (build_vec_init): Correct bugs in handling cleanups.
900         * semantics.c (maybe_convert_cond): New function.
901         (FINISH_COND): Always store the condition, even if there's
902         a declaration.
903         (finish_if_stmt_cond): Use maybe_convert_cond.
904         (finish_while_stmt_cond): Likewise.
905         (finish_do_stmt): Likewise.
906         (finish_for_cond): Likewise.
907         (expand_cond): Adjust.
908         
909         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
910         * init.c (perform_member_init): Remove obstack machinations.
911         (expand_cleanup_for_base): Likewise.
912         (finish_init_stmts): Mark the statement-expression as used.
913         * method.c (emit_thunk): Use tree-generating functions, not
914         RTL.
915         (do_build_copy_constructor): Likewise.
916         (do_build_assign_ref): Likewise.
917         (synthesize_method): Likewise.  Keep track of line numbers.
918         * pt.c (tsubst_expr): Handle various kinds of try blocks.
919         * semantics.c (expand_stmts): Remove.
920         (begin_function_try_block): Set FN_TRY_BLOCK_P.
921         (finish_function_try_block): Be careful rechaining 
922         function try blocks.
923         (expand_stmt): Loop through all the statements at a given level.
924         (exapnd_body): Be careful with line-numbers here too.  Prepare for
925         being called directly from the parser.
926
927         * cp-tree.h (finish_function): Adjust prototype.
928         * decl.c (finish_function): Return the function compiled.
929         * pt.c (instantiate_decl): Don't play games with obstacks.
930         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
931         (search_tree): Likewise.
932         * typeck.c: Fix typo in comment.
933         * typeck2.c (store_init_value): Add comment.
934
935         * cp-tree.h (CPTI_ATEXIT): New macro.
936         (atexit_node): Likewise.
937         * decl.c (destroy_local_static): New function, broken out from ...
938         (expand_static_init): Here.
939
940         * rtti.c (get_tinfo_var): These should always be global
941         (expand_si_desc): Use tree, not RTL, functions to generate code.
942         (expand_class_desc): Likewise.
943         (expand_ptr_desc): Likewise.
944         (expand_attr_desc): Likewise.
945         (expand_generic_desc): Likewise.
946         (synthesize_tinfo_fn): Likewise.
947
948 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
949
950         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
951         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
952         RECHAIN_STMTS. 
953         (RECHAIN_STMST_FROM_CHAIN): Likewise.
954
955         * parse.y (simple_stmt): Fix typo in last change.
956
957         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
958         (STMT_IS_FULL_EXPR_P): Likewise.
959         (STMT_LINENO_FOR_FN_P): Likewise.
960         (prep_stmt): New function.
961         (building_stmt_tree): Tweak for safety.
962         * pt.c (tsubst_expr): Use prep_stmt throughout.
963         (add_tree): Move it to semantics.c
964         * semantics.c (add_tree): Move it here.
965         (finish_expr_stmt_real): New function.
966         (finish_expr_stmt): Use it.
967         (finish_if_stmt_cond): Use FINISH_COND.
968         (finish_while_stmt_cond): Likewise.
969         (finish_for_cond): Likewise.
970         (finish_stmt_tree): Tweak line-number handling.
971         (prep_stmt): New function.
972         (expand_stmt): Use it.
973         
974         * cp-tree.h (begin_switch_stmt): Adjust prototype.
975         (finish_switch_cond): Likewise.
976         * parse.y (simple_stmt): Adjust accordingly.
977         * parse.c: Regenerated.
978         * pt.c (tsubst_expr): Adjust accordingly.
979         * semantics.c (expand_cond): New function.
980         (FINISH_COND): New macro.
981         (begin_switch_stmt): Build the SWITCH_STMT here.
982         (finish_switch_stmt_cond): Not here.
983         (expand_stmt): Adjust calls to begin_switch_stmt and
984         finish_switch_cond.  Use expand_cond throughout.
985
986         * dump.c (dequeue_and_dump): Dump types for constants.
987         Describe DECL_ARG_TYPE more intuitively.
988         Handle ARRAY_REF.
989
990         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
991         (lang_cleanup_tree): Remove.
992         * lex.c (make_lang_type): Use ggc_alloc to allocate
993         TYPE_LANG_SPECIFIC.
994
995         Reorganize per-function data.
996         * cp-tree.h (saved_scope): Add function_decl, bindings.
997         (language_function): Rename binding_level to bindings.
998         (cp_function_chain): Use the current_function, not the
999         outer_function_chain.
1000         (current_class_ptr): Make it work, even when there's no 
1001         current function.
1002         (current_class_ref): Likewise.
1003         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
1004         macros.
1005         (clear_temp_name): Remove.
1006         * decl.c (check_function_type): New function, broken out from
1007         start_function.
1008         (current_binding_level): Adjust definition.
1009         (pushlevel): Simplify.
1010         (poplevel): Don't use named_label_uses when we're outside
1011         a function scope.
1012         (mark_saved_scope): Mark function_decl and bindings.
1013         (maybe_push_to_top_level): Don't unconditionally push a new
1014         function context.  Save bindings and the current_function_decl.
1015         Don't clear named_labels.
1016         (pop_from_top_level): Pop function context if appropriate.
1017         (init_decl_processing): Set init_lang_status and free_lang_status,
1018         rather than save_lang_status and restore_lang_status.
1019         (start_function): Take SF_* flags.  Don't clear per-function data.
1020         Reorder and simplify to use new per-function data code.  Add
1021         asserts.
1022         (store_parm_decls): Don't call init_function_start here.
1023         (finish_function): Adjust for new handling of per-function data.
1024         (push_cp_function_context): Simplify.
1025         (mark_cp_function_context): Change binding_level to bindings.
1026         * decl2.c (clear_temp_name): Remove.
1027         (start_objects): Use SF flags to start_function.
1028         (start_static_storage_duration_function): Likewise.
1029         * except.c (start_anon_func): Remove redundant calls to 
1030         push_function_context_to.  Use SF flags to start function.
1031         (end_anon_func): Remove redundant call to pop_function_context
1032         from.
1033         * lex.c (reinit_parse_for_function): Don't initialize per-function 
1034         data.
1035         * method.c (emit_thunk): Clear current_function after calling
1036         assemble_end_function.  Use SF flags for start_function.
1037         (synthesize_method): Use SF flags for start_function.
1038         * parse.c: Regenerated.
1039         * parse.y (fn.defpen): Likewise.
1040         (pending_inline): Clear current_function, even if something goes
1041         wrong.
1042         * pt.c (instantiate_decl): Use SF flags to start_function.
1043         Don't save and restore expanding_p.
1044         (add_tree): Handle the case where we are outside any function.
1045         (end_tree): Likewise.
1046         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
1047         * semantics.c (begin_function_definition): Likewise.
1048         (expand_body): Likewise.
1049         
1050 1999-09-09  Nathan Sidwell  <nathan@acm.org>
1051
1052         * cp-tree.h (convert_to_void): Prototype new function.
1053         (require_complete_type_in_void): Remove prototype.
1054         * cvt.c (convert_to_void): New function.
1055         (ocp_convert): Use convert_to_void.
1056         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
1057         expressions.
1058         * typeck.c (require_complete_type_in_void): Remove function.
1059         (build_compound_expr): Use convert_to_void.
1060         (build_static_cast): Likewise.
1061         (build_c_cast): Likewise.
1062         * semantics.c (finish_expr_stmt): Do not decay full expressions.
1063         
1064         * typeck.c (build_x_compound_expr): Add FIXME.
1065
1066 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1067
1068         * cp-tree.h (scratch_tree_cons): Remove.
1069         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
1070         and perm_tree_cons with plain tree_cons.
1071         * class.c: Likewise.
1072         * decl.c: Likewise.
1073         * decl2.c: Likewise.
1074         * except.c: Likewise.
1075         * expr.c: Likewise.
1076         * init.c: Likewise.
1077         * lex.c: Likewise.
1078         * method.c: Likewise.
1079         * parse.y: Likewise.
1080         * pt.c: Likewise.
1081         * repo.c: Likewise.
1082         * rtti.c: Likewise.
1083         * search.c: Likewise.
1084         * typeck.c: Likewise.
1085         * parse.c: Regenerated.
1086         * tree.c (build_srcloc): Simplify.
1087         
1088 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1089
1090         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1091         Remove next.
1092         (LANG_DECL_PERMANENT): Remove.
1093         * decl.c (duplicate_decls): Don't mess about with obstacks trying
1094         to free memory.
1095         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1096         * lex.c (free_lang_decl_chain): Remove.
1097         (build_lang_decl): Don't use obstacks.
1098         (retrofit_lang_decl): Likewise.
1099         (copy_lang_decl): Likewise.
1100
1101         * cp-tree.h (saved_scope): Remove old_binding_level and 
1102         function_decl.  Tidy up.
1103         * decl.c (mark_saved_scope): Don't set them.
1104         (maybe_push_to_top_level): Clear memory.
1105
1106         * decl.c (layout_var_decl): Change prototype.  Don't complete
1107         types for external objects.
1108         (check_initializer): Likewise.  Tidy.
1109         (initialize_local_var): Complete types here.
1110         (cp_finish_decl): Not here.  Reorganize a little.
1111         (grokvardecl): Don't complete types here.
1112
1113         * decl.c (start_function): Clear last_dtor_insn and
1114         last_parm_cleanup_insn. 
1115         (push_cp_function_context): Just copy over a little of
1116         the old context, not all of it.
1117
1118         * cp-tree.h (copy_to_permanent): Remove.
1119         (permanent_p): Likewise.
1120         * decl.c (building_typename_type): Don't use copy_to_permanent.
1121         (start_decl): Likewise.
1122         (grok_reference_init): Likewise.
1123         (cp_finish_decl): Likewise.
1124         * init.c (build_new_1): Don't use mapcar.
1125         (build_vec_delete_1): Don't use copy_to_permanent.
1126         (build_vec_init): Likewise.
1127         * parse.y (primary): Likewise.
1128         * parse.c: Regenerated.
1129         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1130         (lookup_template_class): Likewise.
1131         (tsubst_friend_function): Likewise.
1132         (instantiate_class_template): Likewise.
1133         (tsubst_decl): Likewise.
1134         (tsubst): Likewise.
1135         (instantiate_template): Likewise.
1136         (unify): Likewise.
1137         * rtti.c (get_tinfo_fn): Likewise.
1138         (build_dynamic_cast): Likewise.
1139         * semantics.c (finish_if_stmt_cond): Likewise.
1140         (finish_while_stmt_cond): Likewise.
1141         (finish_do_stmt): Likewise.
1142         (finish_for_cond): Likewise.
1143         (finish_for_expr): Likewise.
1144         (finish_cleanup): Likewise.
1145         (add_decl_stmt): Likewise.
1146         (finish_named_return_value): Likewise.
1147         (finish_qualified_call_expr): Likewise.
1148         * tree.c (perm_manip): Remove.
1149         (build_exception_variant): Don't use copy_to_permanent.
1150         (permanent_p): Remove.
1151         (copy_to_permament): Remove.
1152         (build_min_nt): Don't use copy_to_permanent.
1153         (build_min): Likewise.
1154         (min_tree_cons): Likewise.
1155         * typeckc.c (build_static_cast): Likewise.
1156         (build_reinterpret_cast): Likewise.
1157         (build_const_cast): Likewise.
1158         
1159 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1160
1161         * decl.c (ggc_p): Set it to 1.
1162         (mark_saved_scope): Add prototype.
1163
1164 1999-09-07  Richard Henderson  <rth@cygnus.com>
1165
1166         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1167         * typeck.c (self_promoting_args_p): Delete.
1168
1169 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
1170
1171         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1172         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1173
1174 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1175
1176         * Makefile.in (tree.o): Depend on ggc.h.
1177         * class.c (make_method_vec): Remove.
1178         (free_method_vec): Likewise.
1179         (free_method_vecs): Remove.
1180         (add_method): Don't use them.
1181         * cp-tree.def (PTRMEM_CST): Make it longer.
1182         (TEMPLATE_PARM_INDEX): Make it shorter.
1183         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1184         (template_parm_index): Remove RTL field.
1185         (ptrmem_cst): Add RTL field.
1186         (finish_function): Removed parameter.
1187         (process_next_inline): Change prototype.
1188         (init_cplus_unsave): Rename to init_tree.
1189         (binding_init): Remove.
1190         * decl.c (free_binding_nodes): Remove.
1191         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
1192         (pop_binding): Don't use free_binding_nodes.
1193         (free_binding_vecs): Remove.
1194         (store_bindings): Don't use them.
1195         (pop_from_top_level): Likewise.
1196         (lookup_namespace_name): Simplify.
1197         (build_typename_type): Don't use obstack_free.
1198         (unqualified_namespace_lookup): Simplify.
1199         (lookup_name_real): Simplify.
1200         (start_function): Remove comment about leaks.
1201         (finish_function): Removed nested parameter.  Call
1202         expand_end_bindings even when building_stmt_tree.
1203         Call ggc_push_context and ggc_pop_context around
1204         rest_of_compilation, if necessary.
1205         (mark_cp_function_context): Handle a NULL language-context.
1206         (lang_mark_false_label_stack): Fix typo.
1207         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
1208         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
1209         pointer to method types.
1210         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
1211         * decl2.c (finish_objects): Adjust call to finish_function.
1212         (finish_static_store_duration_function): Likewise.
1213         (do_nonmember_using_decl): Remove call to binding_init.
1214         * except.c (end_anon_func): Adjust call to finish_function.
1215         * lex.c (mark_impl_file_chain): New function.
1216         (init_parse): Call init_tree, not init_cplus_unsave.
1217         Add GC roots.
1218         (cp_pramga_interface): Use xmalloc, not permalloc.
1219         (cp_pragma_implementation): Likewise.
1220         (begin_definition_of_inclass_inline): Simplify.
1221         (process_next_inline): Adjust prototype.
1222         (do_scoped_id): Don't call binding_init.
1223         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
1224         * method.c (emit_thunk): Adjust call to finish_function.
1225         (synthesize_method): Likewise.
1226         * parse.y (%union): Add a new `pi' variant.
1227         (PRE_PARSED_FUNCTION_DECL): Use it.
1228         (fn.defpen): Likewise.
1229         (fndef): Adjust call to finish_function.
1230         * pt.c (instantiate_decl): Likewise.
1231         * rtti.c (syntheisze_tinfo_fn): Likewise.
1232         * semantics.c (expand_body): Likewise.
1233         * tree.c: Include ggc.h.
1234         (mark_list_hash): New function.
1235         (binding_init): Remove.
1236         (init_cplus_unsave): Rename to ...
1237         (init_tree): This.  Add GC roots.
1238         
1239 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
1240
1241         Get ready for garbage collection.
1242         * Makefile.in (CXX_TREE_H): Add varray.h
1243         (lex.o): Depend on ggc.h.
1244         (decl.o): Likewise.
1245         (decl2.o): Likewise.
1246         (method.o): Likewise.
1247         (search.o): Likewise.
1248         (pt.o): Likewise.
1249         (repo.o): Likewise.
1250         * class.c: Include ggc.h.
1251         (current_class_name): Remove.
1252         (current_class_type): Likewise.
1253         (current_access_specifier): Likewise.
1254         (previous_class_type): Likewise.
1255         (previous_class_values): Likewise.
1256         (class_cache_firstobj): Likewise.
1257         (current_lang_base): Likewise.
1258         (current_lang_stack): Likewise.
1259         (current_lang_stacksize): Likewise.
1260         (lang_name_c): Likewise.
1261         (lang_name_cplusplus): Likewise.
1262         (lang_name_java): Likewise.
1263         (current_lang_name): Likewise.
1264         (base_layout_decl): Likewise.
1265         (access_default_node): Likewise.
1266         (access_public_node): Likewise.
1267         (access_protected_node): Likewise.
1268         (access_private_node): Likewise.
1269         (access_default_virtual_node): Likewise.
1270         (access_public_virtual_node): Likewise.
1271         (access_protected_virtual_node): Likewise.
1272         (access_private_virtual_node): Likewise.
1273         (signed_zero_node): Likewise.
1274         (init_class_processing): Don't build base_layout_decl.
1275         (push_lang_context): Adjust now that current_lang_base is a varray.
1276         (pop_lang_context): Likewise.
1277         * cp-tree.h: Include varray.h.
1278         (cp_global_trees): Add access_default, access_public,
1279         access_protected, access_private, access_default_virtual,
1280         access_public_virtual, access_protected_virtual,
1281         access_private_virtual, ctor_identifier, delta2_identifier, 
1282         delta_identifier, dtor_identifier, in_charge_identifier,
1283         index_identifier, nelts_identifier, this_identifier,
1284         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
1285         lang_name_c, lang_name_cplusplus, lang_name_java,
1286         empty_except_spec, null, jclass, minus_one, terminate.
1287         (saved_scope): Move here from decl.c.  Define globals in terms of
1288         saved_scope: current_namespace, current_class_name,
1289         current_class_type, current_access_specifier, current_lang_stack,
1290         current_lang_base, current_lang_name, current_function_parms,
1291         current_template_parms, processing_template_decl,
1292         processing_specialization, processing_explicit_instantiation,
1293         previous_class_type, previous_class_values, class_cache_firstobj.
1294         (scope_chain): New variable.
1295         (init_pt): New function.
1296         * decl.c (current_namespace): Remove.
1297         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1298         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1299         (delta_identifier, delta2_identifier): Likewise.
1300         (pfn_or_delta2_identifier, tag_identifier): Likewise
1301         (vt_off_identifier, empty_except_spec, null_node): Likewise.
1302         (current_function_parms, current_lang_base): Remove.
1303         (current_lang_stack, previous_class_values): Remove.
1304         (class_binding_level): Macroize.
1305         (saved_scope): Remove.
1306         (current_saved_scope): Rename to scope_chain.
1307         (mark_saved_scope): Adjust for new scope structure.
1308         (maybe_push_to_top_level): Likewise.
1309         (pop_from_top_level): Likewise.
1310         (duplicate_decls): Adjust now that current_lang_base is a varray.
1311         (build_typename_type): Call ggc_add_tree_hash_table_root.
1312         (init_decl_processing): Call init_pt.  Call push_to_top_level to
1313         set up globals.  Add GC roots.
1314         (xref_basetypes): Adjust now that current_lang_base is a varray.
1315         * decl.h (this_identifier): Remove.
1316         (in_charge_identifier): Likewise.
1317         * decl2.c: Don't include varray.h.
1318         (current_namespace): Remove.
1319         (init_decl2): Add GC roots.
1320         * except.c (Terminate): Remove. 
1321         (init_exception_processing): Use terminate_node instead.
1322         (build_terminate_handler): Likewise.
1323         * init.c (nc_nelts_field_id): Remove.
1324         (minus_one): Likewise.
1325         (init_init_processing): Use minus_one_node and nelts_identifier
1326         instead.  Add GC roots.
1327         (jclass_node): Remove.
1328         (build_new_1): Use nelts_identifier.
1329         (build_vec_init): Likewise.
1330         (build_vec_delete): Likewise.
1331         * lex.c: Include ggc.h.
1332         (defarg_fn): Move declaration early.
1333         (defarg_parms): Likewise.
1334         (init_parse): Add GC roots.
1335         (handle_cp_pragma): Remove redundant declaration of
1336         pending_vtables.
1337         * method.c: Include ggc.h.
1338         (btypelist): Make it a varray.  All uses changed.
1339         (ktypelist): Likewise.
1340         (init_method): Add GC roots.
1341         * pt.c: Don't include varray.h.  Include ggc.h.
1342         (current_template_parms): Remove.
1343         (processing_template_decl): Likewise.
1344         (processing_specialization): Likewise.
1345         (processing_explicit_instantiation): Likewise.
1346         (init_pt): New function.
1347         * repo.c: Include ggc.h.
1348         (init_repo): Add GC roots.
1349         * search.c: Don't include varray.h.
1350         (_vptr_name): Remove.
1351         (lookup_field_1): Use vtpr_identifier instead.
1352         (expand_indirect_vtbls_init): Remove redundant declaration of
1353         in_charge_identifier.
1354         (init_search_processing): Use vptr_identifier.
1355         
1356 1999-09-05  Richard Henderson  <rth@cygnus.com>
1357             Bernd Schmidt <bernds@cygnus.co.uk>
1358             Mark Mitchell  <mark@codesourcery.com>
1359
1360         * Makefile.in (parse.o): Depend on ggc.h.
1361         (decl2.o): Depend on ggc.h.
1362         (init.o): Depend on ggc.h.
1363         * cp-tree.h (init_decl2): Declare.
1364         (cp_parse_init): Likewise.
1365         * decl.c (ggc_p): Define to zero.
1366         (mark_saved_scope): New function.
1367         (init_decl_processing): Call cp_parse_init, and cp_decl2.
1368         Register GC roots.
1369         (expand_static_init): Add GC roots.
1370         * decl2.c: Include ggc.h.
1371         (init_decl2): New function.
1372         * init.c: Include ggc.h.
1373         (init_init_processing): Add GC roots.
1374         * parse.y: Include ggc.h.
1375         (cp_parse_init): New function.
1376         
1377 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
1378
1379         * decl.c (init_decl_processing): Set mark_lang_status.
1380         (lang_mark_false_label_stack): Adjust prototype.
1381         * decl2.c (grok_function_init): Remove extraneous declaration of
1382         abort_fndecl.
1383
1384         * Make-lang.in (cc1plus): Remove dependency on GGC.
1385         * Makefile.in (OBJS): Don't mention ggc-simple.o.
1386         (OBJDEPS): Don't mention ggc-simple.o.
1387
1388         * Make-lang.in (cc1plus): Depend on $(GGC).
1389         * Makefile.in (OBJS): Add ggc-simple.o.
1390         (OBJDEPS): Likewise.
1391         * cp-tree.h (language_function): Rename members to `x_' versions;
1392         we now have x_named_labels, x_ctor_label, x_dtor_label,
1393         x_base_init_list, x_member_init_list, x_base_init_expr,
1394         x_current_class_ptr, x_current_class_ref, x_last_tree,
1395         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1396         x_result_rtx. 
1397         (dtor_label, ctor_label, current_base_init_list,
1398         current_member_init_list, base_init_expr, current_class_ptr,
1399         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1400         * decl.c: Include ggc.h.
1401         (last_dtor_insn): Adjust to use x_ names.
1402         (last_parm_cleanup_insn): Likewise.
1403         (original_result_rtx): Likewise.
1404         (named_labels): Likewise.
1405         (mark_binding_level): New function.
1406         (mark_cp_function_context): Likewise.
1407         (mark_false_label_stack): Likewise.
1408         (lang_mark_tree): Likewise.
1409         (lang_cleanup_tree): Likewise.
1410         
1411 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
1412
1413         * Makefile.in (CXX_TREE_H): Include function.h.
1414         (decl.o): Don't depend on function.h.
1415         (decl2.o): Likewise.
1416         (typeck.o): Likewise.
1417         (init.o): Likewise.
1418         (method.o): Likewise.
1419         * cp-tree.h: Include function.h.
1420         (cp_function): Rename to language_function.  Remove next.
1421         (cp_function_chain): Make it a macro, not a variable.
1422         (push_cp_function_context): Don't declare.
1423         (pop_cp_function_context): Likewise.
1424         * decl.c: Don't include function.h.
1425         (push_cp_function_context): Make it static.  Make it suitable for
1426         a save_lang_status callback.
1427         (pop_cp_function_context): Likewise.
1428         (maybe_push_to_top_level): Call push_function_context_to, not
1429         push_cp_function_context.
1430         (pop_from_top_level): Call pop_function_context_from, not
1431         pop_cp_function_context.
1432         (init_decl_processing):  Set save_lang_status and
1433         restore_lang_status.  Call push_function_context_to, not
1434         push_cp_function_context.
1435         (cp_function_chain): Remove.
1436         * decl2.c: Don't include function.h.
1437         * except.c: Don't include function.h.
1438         (start_anon_func): Call push_function_context_to, not
1439         push_cp_function_context.
1440         (end_anon_func):  Call pop_function_context_from, not
1441         pop_cp_function_context.
1442         * init.c: Don't include function.h.
1443         * lex.c (begin_definition_of_inclass_inline): Call
1444         push_function_context_to, not push_cp_function_context. 
1445         (process_next_inline):  Call pop_function_context_from, not
1446         pop_cp_function_context.
1447         * method.c: Don't include function.h.
1448         (synthesize_method): Call push_function_context_to, not
1449         push_cp_function_context.  Call pop_function_context_from, not
1450         pop_cp_function_context.
1451         * typeck.c: Don't include function.h.
1452         
1453         * decl.c (expand_static_init): Tweak handling of static
1454         initializations for objects without constructors.
1455
1456 1999-09-03  Nathan Sidwell  <nathan@acm.org>
1457
1458         * typeck.c (build_indirect_ref): Reject dereference of pointer to
1459         void.
1460
1461 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
1462
1463         * cp-tree.h (cp_function): Move here, from decl.c.
1464         (cp_function_chain): Declare.
1465         (dtor_label): New macro, instead of variable.
1466         (ctor_label): Likewise.
1467         (current_base_init_list): Likewise.
1468         (current_member_init_list): Likewise.
1469         (base_init_expr): Likewise.
1470         (current_class_ptr): Likewise.
1471         (current_class_ref): Likewise.
1472         (last_tree): Likewise.
1473         (last_expr_type): Likewise.
1474         (current_function_returns_value): Likewise.
1475         (current_function_returns_null): Likewise.
1476         (current_function_just_assigned_this): Likewise.
1477         (current_function_parms_stored): Likewise.
1478         (temp_name_counter): Likewise.
1479         (static_labelno): Likewise.
1480         (expanding_p): Likewise.
1481         (stmts_are_full_exprs_p): Likewise.
1482         (in_function_try_handler): Likewise.
1483         (lang_type): Remove nested type_flags.  All uses changed.
1484         * call.c (ctor_label): Remove.
1485         (dtor_label): Likewise.
1486         * class.c (current_class_ptr): Remove.
1487         (current_class_ref): Likewise.
1488         * decl.c (static_labelno): Remove.
1489         (dtor_label): Likewise.
1490         (last_dtor_insn): New macro, instead of variable.
1491         (last_parm_cleanup_insn): Likewise.
1492         (original_result_rtx): Likewise.
1493         (in_function_try_handler): Remove.
1494         (named_label_uses): New macro, instead of variable.
1495         (named_labels): Likewise.
1496         (current_function_returns_value): Remove.
1497         (current_function_returns_null): Likewise.
1498         (current_function_assigns_this): New macro, instead of variable.
1499         (current_function_just_assigned_this): Likewise.
1500         (current_binding_level): Likewise.
1501         (init_decl_processing): Call push_cp_function_context.
1502         (cp_function): Move to cp-tree.h
1503         (cp_function_chain): Make it global.
1504         (temp_name_counter): Remove.
1505         (push_cp_function_context): Simplify.
1506         (pop_cp_function_context): Likewise.
1507         * decl2.c (temp_name_counter): Remove.
1508         * init_c (current_base_init_list): Likewise.
1509         (current_member_init_list): Likewise.
1510         (base_init_expr): Likewise.
1511         * method.c (static_labelno): Likewise.
1512         * pt.c (last_tree): Likewise.
1513         * semantics.c (expanding_p): Likewise.
1514         (stmts_are_full_exprs_p): Likewise.
1515         (last_expr_type): Likewise.
1516         * typeck.c (dtor_label): Likewise.
1517         (ctor_label): Likewise.
1518         
1519 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
1520
1521         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
1522         (arg_assoc_class): Use arg_assoc_template_arg for template
1523         arguments. 
1524         (arg_assoc): Likewise.
1525         * pt.c (mangle_class_name_for_template): Allow member template
1526         template arguments.
1527
1528 1999-09-02  Nathan Sidwell  <nathan@acm.org>
1529
1530         * call.c (build_conditional_expr): Warn on enum mismatches.
1531         (convert_arg_to_ellipsis): Move non-pod check to after
1532         conversion.
1533
1534 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1535
1536         * gxx.gperf (hash, is_reserved_word): Add prototypes.
1537
1538         * init.c (build_vec_init): Initialize variable `try_block'.
1539
1540         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1541         Likewise for bzero/memset.
1542         (token_getch, token_put_back): Add static prototypes.  Remove
1543         `inline' from the definitions.
1544         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1545
1546 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
1547
1548         * cp-tree.h (lang_type): Move align into type_flags.
1549         (CLASSTYPE_ALIGN): Adjust accordingly.
1550         * call.c (direct_reference_binding): Remove misleading comment.
1551
1552 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1553
1554         * parse.y (language_string): Constify.
1555
1556 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1557
1558         * repo.c (getpwd): Don't prototype.
1559         * xref.c (getpwd): Likewise
1560
1561 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1562
1563         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1564         Remove hacks for stuff which now comes from libiberty.
1565
1566 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
1567
1568         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1569
1570 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
1571
1572         * cp-tree.h (begin_init_stmts): Declare.
1573         (finish_init_stmts): Likewise.
1574         * cvt.c (build_up_reference): Wrap the declaration of a temporary
1575         in a statement-expression so that we will see it when expanding
1576         tree structure later.
1577         * init.c (begin_init_stmts): Don't make it static.
1578         (finish_init_stmts): Likewise.
1579
1580         * cp-tree.h (start_handler_parms): New function.
1581         (expand_start_catch_block): Take only one parameter.
1582         (start_handler_parms): New function.
1583         * decl.c (start_handler_parms): Define it.
1584         * except.c (process_start_catch_block): Take only one parameter.
1585         Don't call grokdeclarator here.
1586         (expand_start_catch_block): Don't call grokdeclarator here,
1587         either.
1588         * parse.y (handler_args): Adjust call to
1589         expand_start_catch_block.  Use start_handler_parms.
1590         * pt.c (push_template_decl_real): Make permanent lists have
1591         permanent elements.
1592         (tsubst_expr): Adjust calls to expand_start_catch_block
1593         appropriately.
1594         * semantics.c (expand_stmt): Likewise.
1595         
1596 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
1597
1598         * pt.c (push_template_decl_real): Use template declaration from
1599         class type if it exists.
1600
1601 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
1602
1603         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1604         (maybe_inject_for_scope_var): Declare it.
1605         (initialize_local_var): Likewise.
1606         * decl.c (maybe_inject_for_scope_var): Make it global.
1607         (initialize_local_var): Likewise.  Move cleanup handling here,
1608         from cp_finish_decl.
1609         (make_rtl_for_nonlocal_decl): Use
1610         push_obstacks_nochange/pop_obstacks, rather than
1611         end_temporary_allocation/resume_temporary_allocation.
1612         (cp_finish_decl): Try to complete the type of a variable when it
1613         is declared.  Move cleanup-handling to initialize_local_var.
1614         (expand_static_init): Use tree-building code, rather than
1615         RTL-building code.
1616         * decl2.c (get_temp_name): Assert non-initializedness of
1617         temporaries.
1618         * init.c (create_temporary_var): Move RTL-assigning code to ...
1619         (get_temp_regvar): Here.
1620         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
1621         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
1622         call initialize_local_var to generate initialization code.
1623         
1624 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1625
1626         * cp-tree.h (fndecl_as_string, type_as_string,
1627         type_as_string_real, args_as_string, decl_as_string,
1628         expr_as_string, code_as_string, language_as_string,
1629         parm_as_string, op_as_string, assop_as_string, cv_as_string,
1630         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1631
1632         * errfn.c (cp_printer): Likewise.
1633
1634         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1635         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1636         cp_file_of, code_as_string, language_as_string, parm_as_string,
1637         op_as_string, assop_as_string, args_as_string, cv_as_string):
1638         Likewise.
1639
1640         * tree.c (lang_printable_name): Likewise.
1641
1642 1999-08-28  Richard Henderson  <rth@cygnus.com>
1643
1644         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1645
1646 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
1647
1648         * cp-tree.h (strip_array_types): New function.
1649         * decl.c (maybe_deduce_size_from_array_init): New function, split
1650         out from cp_finish_decl.
1651         (layout_var_decl): Likewise.
1652         (maybe_commonize_var): Likewise.
1653         (maybe_inject_for_scope_var): Likewise.
1654         (initialize_local_var): Likewise.
1655         (build_cleanup_on_safe_obstack): Likewise.
1656         (check_initializer): Likewise.
1657         (make_rtl_for_nonlocal_decl): Likewise.
1658         (cp_finish_decl): Use them.
1659         * typeck.c (strip_array_types): New function.
1660         
1661         * cp-tree.def (LABEL_STMT): New tree node.
1662         * cp-tree.h (LABEL_STMT_LABEL): New macro.
1663         (shadow_label): Remove.
1664         (declare_local_label): New function.
1665         (finish_label_decl): Likewise.
1666         * decl.c (make_label_decl): New function, split out from
1667         lookup_label.
1668         (shadowed_labels): Remove.
1669         (binding_level): Add shadowed_labels.
1670         (clear_binding_level): Remove.
1671         (push_binding_level): Just bzero the new binding level.
1672         (pushlevel): Fix indentation.
1673         (pop_label): New function.
1674         (pop_labels): Likewise, split out from poplevel.
1675         (poplevel): Pop local labels.  Use pop_labels.
1676         (maybe_push_to_top_level): Don't clear shadowed_labels.
1677         (lookup_label): Use make_label_decl.
1678         (shadow_label): Remove.
1679         (declare_local_label): New function.
1680         (define_label): Simplify.
1681         (start_function): Don't clear shadowed_labels.
1682         (cp_function): Remove shadowed_labels.
1683         (push_cp_function_context): Don't save shadowed_labels.
1684         (pop_cp_function_context): Don't restore it.
1685         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1686         * parse.y (label_decl): Use finish_label_decl.
1687         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1688         declarations.
1689         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1690         building_stmt_tree.
1691         (finish_label_decl): New function.
1692         (expand_stmt): Handle LABEL_STMTs and local label declarations.
1693         
1694 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
1695
1696         * decl.c (lookup_label): Build labels on the permanent obstack
1697         when building statement trees.  Don't build RTL for labels when
1698         building statement trees.
1699         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1700         building statement trees.
1701         (finish_label_stmt): Likewise.
1702         (expand_stmt): Adjust accordingly.
1703         * pt.c (tsubst_expr); Likewise.
1704         (do_decl_instantiation): Robustify.
1705         
1706         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1707         * tree.c (build_cplus_new): Set it.
1708         * expr.c (cplus_expand_expr): Use it.
1709         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1710         
1711         * decl.c (store_parm_decls): Reset immediate_size_expand.
1712         (finish_function): Likewise.
1713         
1714         * tree.c (cplus_unsave_expr_now): Don't return a value.
1715
1716         * semantics.c (do_poplevel): Always initialize the return value.
1717
1718 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
1719
1720         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1721         * tree.h (cplus_unsave_expr_now) : Same.
1722
1723 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1724
1725         * decl.c (grokdeclarator): Amend comment.
1726         * except.c (expand_start_catch_block): Call push_template_decl for
1727         catch-block parameters.
1728         * method.c (synthesize_method): Build an empty compound statement
1729         for the body of a constructor.
1730
1731 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
1732
1733         * tree.c (cp_build_qualified_type_real): If we're asking for the
1734         same quals we already have, just return.
1735
1736 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1737
1738         * cp-tree.def (SUBOBJECT): New tree node.
1739         * cp-tree.h (CLEANUP_P): New macro.
1740         (SUBOBJECT_CLEANUP): Likewise.
1741         (keep_next_level): Add parameter.
1742         (get_temp_regvar): Don't declare.
1743         (emit_base_init): Remove parameter.
1744         (expand_aggr_init): Rename to build_aggr_init.
1745         (expand_vec_init): Rename to build_vec_init.
1746         (do_pushlevel): Remove.
1747         (do_poplevel): Likewise.
1748         (finish_cleanup): New function.
1749         (finish_subobject): Likewise.
1750         (stmts_are_full_exprs_p): New variable.
1751         * decl.c (keep_next_level): Add parameter.
1752         (cp_finish_decl): Use build_aggr_init, not
1753         expand_aggr_init.  Use finish_expr_stmt to expand the code.
1754         (expand_static_init): Use tree-generating, not RTL-generating,
1755         functions to handle the initialization.
1756         (start_function): Remove dead code.  Always have a momentary
1757         obstack inside the function, even before hitting the first curly
1758         brace.
1759         (cplus_expand_expr_stmt): Move calls to
1760         expand_{start,end}_target_temps into semantics.c.
1761         (cp_function): Add stmts_are_full_exprs_p.
1762         (push_cp_function_context): Save it.
1763         (pop_cp_function_context): Restore it.
1764         * decl2.c (get_temp_regvar): Move to init.c.
1765         (do_static_initialization): Use build_{aggr,vec}_init.
1766         (do_static_destruction): Fix typo in comment.
1767         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1768         * except.c (expand_throw): Use create_temporary_var.
1769         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1770         * init.c (expand_vec_init_try_block): Remove.
1771         (expand_vec_init_catch_clause): Likewise.
1772         (get_temp_regvar): New function.
1773         (begin_init_stmts): Likewise.
1774         (finish_init_stmts): Likewise.
1775         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
1776         structure here.
1777         (emit_base_init): Likewise.  Remove unused parameter.
1778         (expand_virtual_init): Likewise.
1779         (expand_cleanup_for_base): Use finish_subobject.
1780         (expand_aggr_vbase_init_1): Simplify.
1781         (construct_virtual_bases): Use tree-generating functions to build
1782         up initialization.
1783         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
1784         (expand_default_init): Likewise.
1785         (expand_aggr_init_1): Likewise.
1786         (expand_vec_init): Rename to build_vec_init.
1787         * method.c (do_build_copy_constructor): Use tree-generating
1788         functions.  Don't call clear_last_expr.
1789         (do_build_assign_ref): Likewise.
1790         (synthesize_method): Call clear_last_expr here.
1791         * parse.y (base_init): Don't call clear_last_expr here.
1792         (nodecls): Likewise.
1793         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1794         * semantics.c (do_pushlevel): Move to here.
1795         (do_poplevel): Likewise.
1796         (stmts_are_full_exprs_p): New variable.
1797         (finish_expr_stmt): Handle logic for temoprary cleanup here.
1798         (finish_for_stmt): Use finish_expr_stmt.
1799         (finish_cleanup): New function.
1800         (finish_function_try_block): Fix indentation.
1801         (finish_subobject): New function.
1802         (setup_vtbl_ptr): Call keep_next_level here.
1803         (finish_stmt_expr): Handle a block with no scope inside the
1804         statement-expression.
1805         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
1806         SUBOBJECT.
1807         * tree.c (search_tree): Handle INIT_EXPR.
1808         (mapcar): Likewise.
1809         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1810         * typeck2.c (store_init_value): Change expand_aggr_init to
1811         build_aggr_init in comment.
1812         
1813 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1814
1815         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1816
1817 1999-08-25  Nathan Sidwell  <nathan@acm.org>
1818
1819         * decl2.c (handle_class_head): Be graceful about additional
1820         scope qualifiers. Adjust comments to reflect reality.
1821
1822 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
1823
1824         * call.c (build_conditional_expr): Fix typo.
1825         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1826         lvalue before trying to mess with the sides.
1827
1828         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1829
1830 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
1831
1832         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1833
1834 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
1835
1836         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1837         Return arbitrary pointer or NULL.
1838         (check_eh_spec): Call __throw_type_match_rtti_2.
1839         * tinfo.h (*::dcast): Return int.  Add valp parm.
1840         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
1841         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1842         (__throw_type_match_rtti): Now just a wrapper.
1843
1844         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1845         (init_exception_processing): Don't initialize them.
1846
1847 1999-08-23  Paul Burchard <burchard@pobox.com>
1848
1849         * decl.c (check_default_argument): Fix typo.
1850
1851 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
1852
1853         * cp-tree.def (STMT_EXPR): Fix typo in node name.
1854
1855         * dump.c (dump_next_stmt): New function.
1856         (dequeue_and_dump): Use it.
1857         
1858         * pt.c (tsubst_copy): Make sure to initialize return value for a
1859         STMT_EXPR, even when processing_template_decl.
1860         * semantics.c (finish_stmt_expr): A statement-expression whose
1861         last statement is not an expression-statement has type `void'.  
1862         
1863 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
1864
1865         * semantics.c (finish_stmt_expr): Fix typo in comment.
1866         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1867         (mapcar): Likewise.
1868         * init.c (build_vec_delete_1): Make the children of a permanent
1869         BIND_EXPR permanent.
1870         * pt.c (register_specialization): Don't register a specialization
1871         more than once.
1872         
1873 1999-08-18  Andrew Haley  <aph@cygnus.com>
1874
1875         * method.c (process_overload_item): Call build_mangled_C9x_name ()
1876         for all integer parameter types larger than long long.
1877
1878 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1879
1880         * pt.c (redeclare_class_template): Merge default template
1881         arguments in both directions.
1882
1883         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
1884         compiler_error message.
1885
1886 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
1887
1888         * cp-tree.h: Declare flag_use_repository.
1889         * pt.c (do_decl_instantiation): Don't complain about duplicate
1890         instantiation with -frepo.
1891         (do_type_instantiation): Likewise.
1892
1893         * pt.c (push_template_decl_real): Complain about everything
1894         that isn't a valid template.
1895
1896         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1897         affect inlines.
1898
1899 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1900
1901         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1902         * decl2.c (build_expr_from_tree): Handle it.
1903         * error.c (dump_expr): Likewise.
1904         * pt.c (for_each_template_parm): Likewise.
1905         (tsubst_copy): Likewise.
1906         * tree.c (search_tree): Likewise.
1907         * semantics.c (finish_pseudo_destructor_call): Create it.
1908         
1909 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
1910
1911         * search.c (setup_class_bindings): Robustify.
1912         * typeck.c (common_type): Use same_type_p, not pointer equality,
1913         to compare types.
1914
1915         * cp-tree.h (build_lang_field_decl): Remove.
1916         * class.c (build_vtable): Replace calls to build_lang_field_decl
1917         with build_lang_decl.
1918         (prepare_fresh_vtable): Likewise.
1919         (finish_struct_1): Likewise.
1920         (init_class_processing): Likewise.
1921         * decl.c (push_using_decl): Likewise.
1922         (init_decl_processsing): Likewise.
1923         (grokvardecl): Likewise.
1924         (build_ptrmemfunc_type): Likewise.
1925         (grokdeclarator): Likewise.
1926         (build_enumerator): Likewise.
1927         * decl2.c (grok_x_components): Likewise.
1928         (do_class_using_decl): Likewise.
1929         * except.c (call_eh_info): Likewise.
1930         * init.c (init_init_processing): Likewise.
1931         * rtti.c (expand_class_decl): Likewise.
1932         * tree.c (build_base_fields): Likewise.
1933         (build_vbase_pointer_fields): Likewise.
1934         * lex.c (build_lang_decl): Build declarations on the permanent
1935         obstack if we're building statmeent trees.
1936         (retrofit_lang_decl): Handle both the full lang_decl and also the
1937         smaller lang_decl_flags here.
1938         (build_lang_field_decl): Remove.
1939         * pt.c (push_template_decl_real): Issue errors for variable
1940         declarations that are not static members.
1941
1942 1999-08-18  Richard Henderson  <rth@cygnus.com>
1943
1944         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1945         (mapcar): Likewise.
1946
1947 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1948
1949         * cp-tree.h (back_end_hook): New variable.
1950         * decl2.c (back_end_hook): Define it.
1951         (finish_file): If it's non-NULL, call it.
1952
1953         * decl.c (add_decl_to_level): New function.
1954         (push_local_binding): Use it.
1955         (find_binding): Fix typo in comment.
1956         (pushdecl): Use add_decl_to_level.  Put templates on the
1957         corresponding namespace-scope binding levels.
1958         * dump.c (dequeue_and_dump): Print the specializations of a
1959         template.
1960         * pt.c (push_template_decl_real): Don't push a template multiple
1961         times.
1962
1963 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1964
1965         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1966         (CALL_DECLARATOR_QUALS): Likewise.
1967         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1968         * decl.c (grokdeclarator): Adjust to use them.
1969         * decl2.c (grokfield): Likewise.
1970         (reparse_absdcl_as_casts): Likewise.
1971         * lex.c (make_call_declarator): Likewise.
1972         (set_quals_and_spec): Likewise.
1973         * pt.c (tsubst): Likewise.
1974         * tree.c (mapcar): Remove special hack to handle third operand of
1975         a CALL_EXPR.
1976
1977 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
1978
1979         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1980         * class.c (build_vtable): Use build_lang_field_decl to build the
1981         VAR_DECLs for vtables.
1982         (prepare_fresh_vtable): Likewise.
1983         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1984         CAN_HAVE_FULL_LANG_DECL_P.
1985         (push_using_decl): Use build_lang_decl to build USING_DECLs.
1986         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1987         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1988         (build_lang_field_decl): Likewise.
1989         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1990         to copy.
1991         
1992         * cp-tree.def (STMT_EXPR): New tree node.
1993         * cp-tree.h (STMT_EXPR_STMT): New macro.
1994         (store_return_init): Change prototype.
1995         (finish_named_return_value): New function.
1996         (expand_stmt): Likewise.
1997         (expand_body): Likewise.
1998         (begin_stmt_tree): Likewise.
1999         (finish_stmt_tree): Likewise.
2000         (expanding_p): New variable.
2001         (last_expr_type): Likewise.
2002         (building_stmt_tree): New macro.
2003         * decl.c (start_function): Use building_stmt_tree, not
2004         processing_template_decl, where appropriate.
2005         (store_parm_decls): Likewise.
2006         (store_return_init): Move most of the body to semantics.c.
2007         (finish_function): Use building_stmt_tree.
2008         (finish_stmt): Clear last_expr_type here.
2009         (cp_function): Add expanding_p, last_tree, last_expr_type.
2010         (push_cp_function_context): Save them.
2011         (pop_cp_function_context): Restore them.
2012         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
2013         * error.c (dump_expr): Handle STMT_EXPR.
2014         * except.c (expand_start_catch_block): Use building_stmt_tree.
2015         Use add_decl_stmt.
2016         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
2017         (do_case): Move add_tree call to semantics.c.
2018         * parse.y (return_init): Use finish_named_return_value.
2019         (for.init.statement): Use finish_expr_stmt.
2020         * parse.c: Regenerated.
2021         * pt.c (do_pushlevel): Move to semantics.c.
2022         (do_poplevel): Likewise.
2023         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
2024         (tsubst_expr): Don't expand all the way to RTL here.  Handle
2025         RETURN_INIT and CTOR_INITIALIZER.
2026         (instantiate_decl): Call expand_body after tsubst'ing into
2027         DECL_SAVED_TREE.
2028         * semantics.c (expand_stmts): New function.
2029         (expanding_p): New variable.
2030         (last_expr_type): Likewise.
2031         (finish_expr_stmt): Use building_stmt_tree.
2032         (begin_if_stmt): Likewise.
2033         (finish_if_stmt_cond): Likewise.
2034         (finish_then_clause): Likewise.
2035         (begin_else_clause): Likewise.
2036         (finish_else_clause): Likewise.
2037         (begin_while_stmt): Likewise.
2038         (finish_while_stmt_cond): Likewise.
2039         (finish_while_stmt): Likewise.
2040         (finish_do_body): Likewise.
2041         (finish_do_stmt): Likewise.
2042         (finish_return_stmt): Likewise.
2043         (begin_for_stmt): Likewise.
2044         (fnish_for_init_stmt): Likewise.
2045         (finish_for_cond): Likewise.
2046         (finish_for_expr): Likewise.
2047         (finish_for_stmt): Likewise.
2048         (finish_break_stmt): Likewise.
2049         (finish_continue_stmt): Likewise.
2050         (finish_switch_cond): Likewise.
2051         (finish_switch_stmt): Likewise.
2052         (finish_case_label): Call add_tree here if necessary.
2053         (finish_goto_statement): Use building_stmt_tree.
2054         (begin_try_block): Likewise.
2055         (begin_function_try_block): Likewise.
2056         (finish_try_block): Likewise.
2057         (finish_function_try_block): Likewise.
2058         (finish_handler_sequence): Likewise.
2059         (finish_function_handler_sequence): Likewise.
2060         (begin_handler): Likewise.
2061         (finish_handler_parms): Likewise.
2062         (finish_handler): Likewise.
2063         (begin_compound_stmt): Likewise.
2064         (finish_compound_stmt): Likewise.
2065         (finish_asm_stmt): Likewise.
2066         (finish_label_stmt): Likewise.
2067         (finish_named_return_value): New function.
2068         (setup_vtbl_ptr): Moved here from decl2.c.
2069         (do_pushlevel): Moved here from pt.c.
2070         (do_poplevel): Likewise.
2071         (begin_stmt_expr): Use building_stmt_tree.
2072         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
2073         when building_stmt_tree.
2074         (begin_stmt_tree): New function.
2075         (finish_stmt_tree): Likewise.
2076         (expand_stmt): Likewise.
2077         (expand_body): Likewise.
2078         * tree.c (build_cplus_method_type): Make sure the argument types
2079         end up on the same obstack as the METHOD_TYPE.
2080         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2081         THROW_EXPR, STMT_EXPR.
2082         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
2083         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
2084         sorry, if an unsupported node is encountered.
2085         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2086         (c_expand_return): Don't call add_tree here.
2087         
2088 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
2089
2090         * pt.c (check_default_tmpl_args): Don't check in local scopes.
2091         (tsubst_decl): Make sure the declaration is on a saveable
2092         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2093         variable.
2094         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2095         
2096 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
2097
2098         Speed up Koenig lookup.
2099         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
2100         to return namespaces we've looked at.
2101         * decl2.c (lookup_using_namespace): Likewise.
2102         (add_function): Don't call ovl_member.
2103         (lookup_arg_dependent): Initialize k.namespaces to the list of 
2104         namespaces seen in unqualified lookup.
2105         * call.c (equal_functions): Move here from tree.c.
2106         (joust): Use it to handle duplicate candidates.
2107         * tree.c (ovl_member): Use ==.
2108
2109 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2110
2111         * cp-tree.def (DECL_STMT): Make it smaller.
2112         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2113         (lang_decl): ... here.  Add next.
2114         (DECL_SAVED_TREE): Adjust accordingly.
2115         (DECL_IMPLICIT_TYPEDEF_P): New macro.
2116         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2117         (DECL_STMT_DECL): Likewise.
2118         (create_implicit_typedef): New function.
2119         (maybe_push_decl): Likewise.
2120         (tsubst_default_argument): New function.
2121         (at_function_scope_p): Likewise.
2122         (add_decl_stmt): Likewise.
2123         (push_permanent_obstack): Likewise.
2124         * call.c (convert_default_arg): Use tsubst_default_argument.
2125         * class.c (add_method): Use push_permanent_obstack.
2126         (build_self_reference): Create a TEMPLATE_DECL for the
2127         self-reference, if necessary.
2128         * decl.c (pseudo_global_level_p): Only look at the current binding
2129         level.
2130         (push_binding): Use push_permanent_obstack.
2131         (create_implicit_typedef): New function.
2132         (pushtag): Use it.
2133         (duplicate_decls): Use push_permanent_obstack.
2134         (maybe_push_decl): New function.
2135         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
2136         (start_decl_1): Remove dead code.
2137         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
2138         pseudo_global_level_p.
2139         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2140         template.
2141         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
2142         pseudo_global_level_p.
2143         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2144         a template.
2145         (get_sentry): Use push_permanent_obstack.
2146         * dump.c (dequeue_and_dump): Enable DECL_STMT.
2147         * except.c (call_eh_info): Use push_permanent_obstack.
2148         (build_eh_type_ref): Likewise.
2149         (do_pop_exception): Likewise.
2150         (expand_eh_spec): Likewise.
2151         (alloc_eh_object): Likewise.
2152         (expand_throw): Likewise.
2153         * init.c (build_java_class_ref): Likewise.
2154         * lex.c (get_time_identifier): Likewise.
2155         (free_lang_decl_chain): Correct type.
2156         (retrofit_lang_decl): Adjust accordingly.
2157         (build_lang_field_decl): Likewise.
2158         * lex.h (free_lang_decl_chain): Likewise.
2159         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2160         * parse.c: Regenerated.
2161         * pt.c (tsubst_default_arguments): New function.
2162         (retrieve_local_specialization): Likewise.
2163         (register_local_specialization): Likewise.
2164         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
2165         pseudo_global_level_p to determine whether or not a template is
2166         primary.
2167         (lookup_template_class): Likewise.  Use create_implicit_typedef.
2168         (instantiate_class_template): Call tsubst_default_arguments for
2169         member functions, if appropriate.
2170         (tsubst_default_argument): New function.
2171         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
2172         * search.c (at_function_scope_p): New function.
2173         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2174         (finish_label_stmt): Likewise.
2175         (add_decl_stmt): New function.
2176         (begin_class_definition): Likewise.
2177         (finish_typeof): Likewise.
2178         * tree.c (copy_template_template_parm): Likewise.
2179         (copy_to_permanent): Likewise.
2180         (push_permanent_obstack): Define.
2181         (mark_addressable): Use it.
2182         * typeck.c (mark_addressable): Likewise.
2183         
2184 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
2185
2186         * cp-tree.h (init_cplus_unsave): New.
2187         (cplus_unsave_expr_now): New.
2188         * lex.c (init_parse): Call init_cplus_unsave.
2189         * tree.c (init_cplus_unsave): New.
2190         (cplus_unsave_expr_now): New.
2191
2192 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2193
2194         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
2195         decl_constant_value to simplify array bounds.
2196
2197 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
2198
2199         * lang-options.h: Add -fms-extensions.
2200         * cp-tree.h: Declare flag_ms_extensions.
2201         * decl2.c: Define it.
2202         * class.c (instantiate_type): Don't complain about taking the address
2203         of a bound member function if -fms-extensions.
2204         * typeck.c (build_unary_op): Likewise.
2205         * decl.c (grokdeclarator): Or about implicit int.
2206         * init.c (resolve_offset_ref): Or about implicit '&'.
2207
2208 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
2209
2210         * cp-tree.h (minimal_parse_mode): Remove.
2211         (finish_label_stmt): New function.
2212         * decl.c (saved_scope): Remove minimal parse mode.
2213         (maybe_push_to_top_level): Don't save it.
2214         (pop_from_top_level): Don't restore it.
2215         (define_label): Split out template-handling code to semantics.c.
2216         (start_decl): Don't use minimal_parse_mode.
2217         (cp_finish_decl): Likewise.
2218         (start_function): Don't increment it.
2219         (store_return_init): Don't use it.
2220         (finish_function): Don't decrement it.
2221         * parse.y (label_colon): Use finish_label_stmt throughout.
2222         * parse.c: Regenerated.
2223         * pt.c (minimal_parse_mode): Don't define it.
2224         (tsubst_expr): Use finish_label_stmt.
2225         * semantics.c (finish_label_stmt): New function.
2226
2227         * dump.c (queue): Be careful when computing bitmasks.
2228         (dequeue_and_dump): Describe binfos as binfos, not as
2229         vectors.
2230         
2231         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
2232         throughout.     
2233         * parse.c: Regenerated.
2234         
2235         * Make-lang.in (CXX_SRCS): Remove sig.c.
2236         * Makefile.in (CXX_OBJS): Remove sig.o.
2237         (sig.o): Remove.
2238         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
2239         (CPTI_SIGNATURE_TYPE): Likewise.
2240         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
2241         (opaque_type_node): Likewise.
2242         (signature_type_node): Likewise.
2243         (sigtable_entry_type): Likewise.
2244         (flag_handle_signatures): Likewise.
2245         (lang_type): Remove is_signature, is_signature_pointer,
2246         is_signature_reference, has_opaque_typedecls,
2247         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
2248         signature_pointer_to, signature_reference_to.
2249         (IS_SIGNATURE): Remove.
2250         (SET_SIGNATURE): Remove.
2251         (CLEAR_SIGNATURE): Remove.
2252         (IS_SIGNATURE_POINTER): Remove.
2253         (IS_SIGNATURE_REFERENCE): Remove.
2254         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
2255         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
2256         (CLASSTYPE_SIGNATURE): Remove.
2257         (SIGNATURE_TYPE): Remove.
2258         (SIGNATURE_METHOD_VEC): Remove.
2259         (SIGNATURE_POINTER_TO): Remove.
2260         (SIGNATURE_REFERENCE_TO): Remove.
2261         (lang_decl_flags): Remove is_default_implementation.  Rename
2262         memfunc_pointer_to to saved_tree.
2263         (IS_DEFAULT_IMPLEMENTATION): Remove.
2264         (DECL_MEMFUNC_POINTER_TO): Remove.
2265         (DECL_MEMFUNC_POINTING_TO): Remove.
2266         (DECL_SAVED_TREE): Adjust definition.
2267         (tag_types): Remove signature_type_node.
2268         (SIGNATURE_FIELD_NAME): Remove.
2269         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
2270         (SIGNATURE_OPTR_NAME): Likewise.
2271         (SIGNATURE_SPTR_NAME): Likewise.
2272         (SIGNATURE_POINTER_NAME): Likewise.
2273         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
2274         (SIGNATURE_REFERENCE_NAME): Likewise.
2275         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
2276         (SIGTABLE_PTR_TYPE): Likewise.
2277         (SIGTABLE_NAME_FORMAT): Likewise.
2278         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
2279         (SIGTABLE_TAG_NAME): Likewise.
2280         (SIGTABLE_VB_OFF_NAME): Likewise.
2281         (SIGTABLE_VT_OFF_NAME): Likewise.
2282         (finish_base_specifiers): Change prototype.
2283         (build_signature_pointer_type): Remove.
2284         (build_signature_reference_type): Remove.
2285         (build_signature_pointer_constructor): Remove.
2286         (build_signature_method_call): Remove.
2287         (build_optr_ref): Likewise.
2288         (append_signature_fields): Likewise.
2289         (signature_error): Likewise.
2290         * call.c (build_this): Remove signature support.
2291         (build_over_call): Likewise.
2292         (build_new_method_call): Likewise.
2293         * class.c (add_implicitly_declared_members): Likewise.
2294         (finish_struct_1): Likewise.
2295         (finish_struct): Likewise.
2296         * cvt.c (cp_convert_to_pointer): Likewise.
2297         (convert_to_pointer_force): Likewise.
2298         (ocp_convert): Likewise.
2299         * decl.c (sigtable_decl_p): Remove.
2300         (init_decl_processing): Remove support for signatures.
2301         (cp_finish_decl): Likewise.
2302         (grokdeclarator): Likewise.
2303         (grokparms): Likewise.
2304         (xref_tag): Likewise.
2305         (start_function): Likewise.
2306         (start_method): Likewise.
2307         * decl2.c (finish_sigtable_vardecl): Remove.
2308         (flag_handle_signatures): Remove.
2309         (lang_f_options): Remove handle-signatures.
2310         (grokfield): Remove support for signatures.
2311         (grokbitfield): Likewise.
2312         (finish_file): Likewise.
2313         (reparse_absdcl_as_casts): Likewise.
2314         * error.c (dump_type_real): Likewise.
2315         (dump_function_decl): Likewise.
2316         * friend.c (make_friend_class): Likewise.
2317         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2318         * hash.h: Regenerated.
2319         * init.c (build_new_1): Remove support for signatures.
2320         * lang-options.h: Remove -fhandle-signatures,
2321         -fno-handle-signatures. 
2322         * lex.c (init_parse): Remove support for signatures.
2323         (yyprint): Likewise.
2324         * lex.h (rid): Remove RID_SIGNATURE.
2325         * method.c (build_decl_overload_real): Remove support for
2326         signatures. 
2327         (hack_identifier): Likewise.
2328         * parse.y (base_class): Likewise.
2329         (base_class.1): Likewise.
2330         (access_specifier): Likewise.
2331         * search.c (lookup_member): Likewise.
2332         * semantics.c (finish_qualified_object_call_expr): Likewise.
2333         (finish_template_type_parm): Likewise.
2334         (begin_class_definition): Likewise.
2335         (finish_base_specifier): Likewise.
2336         * sig.c: Remove.
2337         * tree.c (build_cplus_method_type): Remove support for signatures.
2338         * typeck.c (require_complete_type): Likewise.
2339         (c_sizeof): Likewise.
2340         (c_alignof): Likewise.
2341         (build_object_ref): Likewise.
2342         (build_component_ref): Likewise.
2343         (build_indirect_ref): Likewise.
2344         (build_c_cast): Likewise.
2345         (build_modify_expr): Likewise.
2346         (convert_for_initialization): Likewise.
2347         * typeck2.c (signature_error): Remove.
2348         (store_init_value): Remove support for signatures.
2349         (digest_init): Likewise.
2350         (build_x_arrow): Likewise.
2351         (build_functional_cast): Likewise.
2352         * xref.c (GNU_xref_decl): Likewise.
2353         
2354 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2355
2356         * lex.c (do_identifier): Remove unnecessary lookup of class field.
2357
2358 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2359
2360         * decl2.c (set_decl_namespace): Do not complain about non-matching
2361         decls if processing a template.
2362
2363 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
2364
2365         * decl.c (build_ptrmemfunc_type): Handle qualified
2366         pointer-to-member types here.
2367         * tree.c (cp_build_qualified_type_real): Simplify handling here.
2368
2369 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2370
2371         * lex.c (lang_identify): Likewise.
2372
2373 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
2374
2375         * Makefile.in: Update dependencies.
2376         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2377         NULL_RTX.
2378         * decl.c: Include "function.h"
2379         (cleanup_label, return_label): Delete declarations.
2380         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2381         (finish_function): Rename last_parm_insn variable to
2382         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
2383         * decl2.c: Include "function.h".
2384         (rtl_expr_chain): Delete declaration.
2385         * method.c: Include "function.h"
2386         * tree.c (build_vbase_pointer_fields): Don't initialize
2387         DECL_SAVED_INSNS with NULL_RTX.
2388         * typeck.c: Include "function.h"
2389
2390 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
2391
2392         * semantics.c (begin_function_try_block, finish_function_try_block,
2393         finish_function_handler_sequence): New fns.
2394         * parse.y (function_try_block): Use them.
2395         * pt.c (instantiate_decl): Likewise.
2396
2397         * cp-tree.h: Declare in_function_try_handler.
2398         * decl.c: Define it.
2399         (start_function): Clear it.
2400         (struct cp_function, push_cp_function_context): Save it.
2401         (pop_cp_function_context): Restore it.
2402         * parse.y (function_try_block): Set and clear it.
2403         * except.c (expand_end_catch_block): Rethrow if we reach the end
2404         of a function-try-block handler in a ctor or dtor.
2405         * typeck.c (c_expand_return): Complain about returning from a
2406         function-try-block handler of a ctor.
2407
2408         * parse.y (function_try_block): Call end_protect_partials
2409         before expand_start_all_catch.
2410
2411 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
2412
2413         * decl.c (struct binding_level): Add eh_region field.
2414         (push_binding_level): Set it.
2415         (define_label): Complain about jumping into an EH block.
2416
2417         * ptree.c (print_lang_type): Print the real type of a PMF.
2418         Print what exceptions a fn type throws.
2419
2420 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2421
2422         * class.c (count_fields, add_fields_to_vec): Add static prototype.
2423
2424         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2425         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2426         char*.
2427
2428         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2429         Constify a char*.
2430
2431         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2432         char*.
2433
2434         * dump.c (queue_and_dump_index, dump_int, dump_string,
2435         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2436         a char*.
2437         (dump_stmt): Add static prototype.
2438
2439         * errfn.c (cp_thing): Constify a char*.
2440
2441         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2442         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2443         dump_expr): Constify a char*.
2444
2445         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2446         read_line_number): Add static prototype.
2447         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2448         (real_yylex): Move label `letter' into the scope where it is used.
2449
2450         * method.c (build_mangled_template_parm_index, build_overload_int,
2451         build_decl_overload_real, get_id_2): Constify a char*.
2452
2453         * search.c (check_final_overrider): Make static.
2454
2455         * typeck.c (composite_pointer_type): Constify a char*.
2456
2457 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2458
2459         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2460         we're looking at a class.
2461
2462         * decl.c (lookup_name_real): Set the complain flag if we're
2463         looking for a namespace member.
2464
2465         * lex.c (real_yylex): We can have a number with no digits.
2466
2467         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2468
2469         * search.c (binfo_from_vbase): New fn.
2470         * cp-tree.h: Declare it.
2471         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2472         from pointer to member of virtual base.  
2473         * typeck.c (get_delta_difference): Likewise.
2474
2475 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
2476
2477         * pt.c (tsubst): Use build_index_type to build in-template array
2478         index type.  Fixes g++.oliva/dwarf1.C.
2479         * decl.c (grokdeclarator): Likewise, just for consistency, as it
2480         doesn't seem to trigger the bug without it.
2481
2482 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2483
2484         * typeck2.c (add_exception_specifier): Use complete_type.
2485
2486 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
2487
2488         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2489         (dump_binary_op): Bulletproof.
2490         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2491         * tree.c (search_tree): Don't enumerate all the nodes of classes
2492         `1', `2', and `<'; handle them generically.  Don't be sorry about
2493         "unrecognized tree codes"; just abort.
2494         (no_linkage_check): Don't do linkage checks for templates.
2495         
2496         * tree.c (cp_build_qualified_type_real): Handle
2497         pointer-to-member-function types correctly.
2498
2499 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
2500
2501         * decl.c (pushdecl): Only give an error for shadowing a parm 
2502         from *this* function.
2503
2504 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
2505
2506         * typeck2.c: Update URLs and mail addresses.
2507
2508 1999-08-04  Nathan Sidwell  <nathan@acm.org>
2509
2510         * cp-tree.h (empty_except_spec): New global var.
2511         (compexcepttypes): Remove prototype.
2512         (comp_except_specs): Prototype new global function.
2513         (add_exception_specifier): Prototype new global function.
2514         * decl.c (empty_except_spec): Define new global var.
2515         (duplicate_decls): Use comp_except_specs, reword error message.
2516         (init_decl_processing): Initialize empty_except_spec.
2517         Adjust build_exception_variant calls.
2518         * parse.y (exception_specification_opt): Use empty_except_spec.
2519         (ansi_raise_identifier): Call check_for_new_type.
2520         (ansi_raise_identifiers): Use add_exception_specifier.
2521         * pt.c (tsubst): Use add_exception_specifier to build exception
2522         specifier.
2523         * search.c (check_final_overrider): New static function, broken
2524         out of get_matching_virtual. Check throw specifiers, reword
2525         diagnostics.
2526         (get_matching_virtual): Use check_final_overrider.
2527         * tree.c (build_exception_variant): Use comp_except_specs.
2528         * typeck.c (compexcepttypes): Remove.
2529         (comp_except_types): New static function, helper for
2530         comp_except_specs. Compare two types as exception specifiers.
2531         (comp_except_specs): New global function, compare two exception
2532         specifiers.
2533         (comptypes): Adjust for comp_except_specs.
2534         * typeck2.c (add_exception_specifier): New global function.
2535         
2536         * class.c (check_for_override): Reword error message.
2537
2538 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2539
2540         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2541         * cp-tree.h (struct lang_type): Added non_pod_class flag.
2542         (CLASSTYPE_NON_POD_P): New macro to access it.
2543         * class.c (finish_struct_1): Determine non-PODness.
2544         Check for arrays of pointers (-Weffc++).
2545         Remove array inspection duplicated code.
2546         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2547         Use CLASSTYPE_NON_POD_P.
2548
2549 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2550
2551         * class.c (duplicate_tag_error): Preserve template information.
2552
2553 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2554
2555         * decl.c (start_enum): Show location of previous definition.
2556         * parse.y (enumlist_opt): New reduction.
2557         (structsp): Simplify enum rules to use enumlist_opt.
2558
2559 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2560
2561         * lex.c (yyprint): Handle PFUNCNAME.
2562
2563         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2564         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2565
2566 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
2567
2568         * decl.c (start_decl): Set attributes before duplicate_decls call.
2569
2570 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2571
2572         * Make-lang.in (CXX_SRCS): Add dump.c.
2573         * Makefile.in (CXX_OBJS): Add dump.o.
2574         (dump.o): New target.
2575         * cp-tree.h (DECL_CONV_FN_P): Document.
2576         (DECL_OVERLOADED_OPERATOR_P): New function.
2577         (TYPE_PTRMEM_CLASS_TYPE): New macro.
2578         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2579         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2580         (ASM_VOLATILE_P): New macro.
2581         (STMT_LINENO): Likewise.
2582         (cp_namespace_decls): New function.
2583         (dump_node_to_file): New function.
2584         * decl.c (cp_namespace_decls): New function.
2585         (walk_namespaces_r): Use it.
2586         (wrapup_globals_for_namespace): Likewise.
2587         * decl2.c (flag_dump_translation_unit): New variable.
2588         (lang_decode_option): Handle -fdump-translation-unit.
2589         (finish_file): If flag_dump_translation_unit is set, dump the
2590         translation unit.
2591         * dump.c: New file.
2592         * lang-options.h: Add -fdump-translation-unit.
2593         * pt.c (tsubst_template_parms): Robustify.
2594         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2595         (tsubst_expr): Use STMT_LINENO.
2596         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
2597         for invalid cv-qualifiers even while building templates.
2598         
2599 1999-08-02  Richard Henderson  <rth@cygnus.com>
2600
2601         * call.c: Include defaults.h instead of expr.h.
2602         * decl.c: Likewise.
2603         * pt.c: Likewise.
2604         * typeck.c: Include defaults.h.
2605
2606 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2607
2608         * lex.c (errorcount, sorrycount): Don't declare.
2609         * repo.c (errorcount, sorrycount): Likewise.
2610         * typeck2.c (errorcount, sorrycount): Likewise.
2611
2612 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
2613
2614         * call.c (convert_default_arg, build_over_call): Change all uses of
2615         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2616         Ensure expr.h is included.
2617         * decl.c (grokparams): Ditto.
2618         * pt.c (tsubst_decl): Ditto.
2619         * typeck.c (convert_arguments): Ditto.
2620
2621 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
2622
2623         * class.c (mark_overriders): Fix order of args to overrides.
2624         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
2625         functions with the same name.
2626
2627 1999-08-02  Richard Henderson  <rth@cygnus.com>
2628
2629         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2630
2631 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
2632
2633         * call.c (build_conditional_expr): Fix typo in comment.
2634
2635 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
2636
2637         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2638         case_stack; use in_control_zone_p.
2639         * typeck.c (c_expand_return): Likewise.
2640
2641 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
2642
2643         * except.c (catch_clauses): Delete declaration.
2644
2645 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
2646
2647         * call.c (build_conditional_expr): Call convert_from_reference to
2648         avoid reference/non-reference type confusion.  Fix typo.
2649
2650 1999-07-30  Richard Henderson  <rth@cygnus.com>
2651
2652         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2653         * cp-tree.h (initializer_constant_valid_p): Remove.
2654
2655 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
2656
2657         * call.c (conditional_conversion): Don't build BASE_CONVs for
2658         conversions between things that have the same type.
2659         (build_conditional_expr): Tweak.
2660         (convert_like): Some BASE_CONVs really do require the generation
2661         of code.
2662         
2663         * init.c (perform_member_init): Don't go through build_modify_expr
2664         for simple initializations.
2665
2666 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
2667
2668         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2669         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2670         virtual functions and MI.  Simplify.
2671
2672         * method.c: Remove prototype for largest_union_member.
2673         * pt.c (determine_specialization): Fix uninitialized warning.
2674         * lex.c (real_yylex): Likewise.
2675
2676 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
2677
2678         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2679         here too.
2680
2681         * cp-tree.h (BINFO_VIRTUALS): Document new format.
2682         * class.c (modify_one_vtable): Change prototype accordingly.
2683         (modify_all_vtables): Likewise.
2684         (modify_all_direct_vtables): Likewise.
2685         (modify_all_indirect_vtables): Likewise.
2686         (build_vtable_entry_for_fn): New function.
2687         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2688         (modify_vtable_entry): Likewise.
2689         (add_virtual_function): Likewise.
2690         (build_vtbl_initializer): New function.
2691         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2692         (fixup_vtable_deltas1): Likewise.
2693         (fixup_vtable_deltas): Likewise.
2694         (override_one_vtable): Likewise.
2695         (finish_struct_1): Likewise.
2696
2697         * error.c (dump_expr): Likewise.
2698         * search.c (get_abstract_virtuals_1): Likewise.
2699         (get_abstract_virtuals): Likewise.
2700         (expand_upcast_fixups): Likewise.
2701         * tree.c (debug_binfo): Likewise.
2702         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2703         __pure_virtual here.
2704         
2705 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2706
2707         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2708         as per 1999-07-26 change.
2709
2710         * typeck.c (c_sizeof): Don't allow non-static data members.
2711         (expr_sizeof): Likewise.
2712
2713 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
2714
2715         * input.c (feed_input): Only touch lineno and input_filename
2716         if !USE_CPPLIB.  Save the old values before setting the new ones.
2717
2718         * input.c (feed_input): Add file, line parms.
2719         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2720         (real_yylex): Check linemode before input_redirected().
2721
2722         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2723         from op new to warning.
2724
2725 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2726
2727         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2728         * call.c: All uses changed.
2729         * typeck.c: Likewise.
2730
2731 1999-07-26  Nathan Sidwell  <nathan@acm.org>
2732
2733         * exception.cc (__cplus_type_matcher): Match __eh_matcher
2734         prototype.
2735
2736 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2737
2738         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2739         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2740         (strip_top_quals): Declare.
2741         (ncp_convert): Likewise.
2742         (type_after_usual_arithmetic_converions): Likewise.
2743         (composite_pointer_type): Likewise.
2744         * call.c (strip_top_quals): Don't make it static.
2745         (promoted_arithmetic_type_p): New function.
2746         (conditional_conversion): Likewise.
2747         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2748         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
2749         for converting a type to itself.
2750         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2751         (implicit_conversion): Make sure the from and to types are
2752         complete.
2753         (add_builtin_candidate): Correct handling of ?: operator.
2754         (add_builtin_candidates): Improve documentation.
2755         (build_conditional_expr): New function.
2756         (can_convert): Implement in terms of can_convert_arg.
2757         (ncp_convert): New function.
2758         * typeck.c (type_after_usual_arithmetic_conversions): New
2759         function, split out from common_type.
2760         (composite_pointer_type): New function, split out from
2761         build_conditional_expr.
2762         (common_type): Use type_after_usual_arithmetic_conversions.
2763         Remove redundant attribute merging.
2764         (comptypes): Tidy.  Handle COMPLEX_TYPE.
2765         (build_binary_op_nodefault): Use null_ptr_cst_p.
2766         (build_conditional_expr): Remove.
2767         (convert_for_assignment): Use new conversion functions.
2768         
2769         * cp-tree.h (abstract_virtuals_error): Change declaration.
2770         * typeck2.c (abstract_virtuals_error): Check to see if an error
2771         ocurred, and return a boolean value accordingly.
2772         (build_functional_cast): Adjust accordingly.
2773         * class.c (finish_struct_1): Likewise.
2774         * cvt.c (ocp_convert): Likewise.
2775         * decl.c (cp_finish_decl): Likewise.
2776         (grokparams): Likewise.
2777         (grok_op_properties): Likewise.
2778         (start_function): Likewise.
2779         * init.c (build_new_1): Likewise.
2780
2781         * pt.c (unify): Don't get confused by pointers-to-member functions.
2782
2783         * search.c (build_cplus_new): Robustify.
2784         
2785 1999-07-24  Richard Henderson  <rth@cygnus.com>
2786
2787         * gxx.gperf (__builtin_va_arg): New.
2788         * parse.y (VA_ARG): New token.
2789         (unary_expr): Recognize it.
2790
2791 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
2792
2793         * g++FAQ.texi: Deleted per Joe Buck's request.
2794         * Makefile.in: Corresponding changes.
2795
2796 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
2797
2798         * lex.c: Sync with C frontend.
2799         (whitespace_cr): New fn.
2800         (skip_white_space): Use it.
2801         (init_parse): Reorder.
2802         (yyprint): Support CONSTANT.
2803         (pragma_getc, pragma_ungetc): Bring back.
2804         (read_line_number): Change in_system_header directly.
2805         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2806         (parse_float): Update to C version.
2807         (yylex): Handle '$' under the letter case.
2808         Remove looking_for_typename handling.
2809         Support hex floating point constants.
2810         Follow C's lead for choosing type of integer constants.
2811         Rearrange stuff to match C frontend.
2812         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2813         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2814
2815 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
2816
2817         * call.c (reference_binding): Tweak.
2818         (mayble_handle_implicit_object): Use direct_reference_binding to
2819         create the right implicit conversion sequence.
2820
2821 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
2822
2823         * pt.c (convert_nontype_argument): Don't call decl_constant_value
2824         if we're converting to a reference type.
2825
2826         * call.c (NEED_TEMPORARY_P): New macro.
2827         (standard_conversion): Set it, for derived-to-base conversions.
2828         (reference_related_p): New function.
2829         (reference_compatible_p): Likewise.
2830         (convert_class_to_reference): Likewise.
2831         (direct_reference_binding): Likewise.
2832         (reference_binding): Rework for standards-compliance.
2833         (convert_like): Adjust accordingly.
2834         (maybe_handle_ref_bind): Simplify; the right conversion sequences
2835         are now built up in reference_binding.
2836         (initialize_reference): New function.
2837         * cp-tree.h (ICS_USER_FLAG): Document.
2838         (ICS_THIS_FLAG): Likewise.
2839         (ICS_BAD_FLAG): Likewise.
2840         (NEED_TEMPORARY_P): Likewise.
2841         (cp_lvalue_kind): New type.
2842         (real_lvalue_p): Return it.
2843         * error.c (dump_expr): Provide more accurate representation for
2844         AGGR_INIT_EXPRs.
2845         * init.c (expand_default_init): Do not try to perform implicit
2846         conversions for a brace-enclosed initializer.
2847         * search.c (lookup_conversions): Document.
2848         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
2849         appropriately.
2850         (real_lvalue_p): Adjust accordingly.
2851         (lvalue_p): Likewise.
2852         (build_cplus_new): Don't allow the creation of an abstract class.
2853         * typeck.c (convert_for_initialization): Use initialize_reference.
2854         
2855 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
2856
2857         * lex.c (real_yylex) : Correct the test for overflow when lexing
2858         integer literals.
2859
2860 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
2861
2862         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2863         not DECL_BUILT_IN, to determine if a function is internally declared.
2864         (duplicate_decls): Likewise.  Improve handling of builtins.
2865         (push_overloaded_decl): Remove special handling of builtins.
2866
2867         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2868
2869         * decl.c (grokdeclarator): Pull out decl_constant_value in
2870         templates, too.
2871
2872         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2873         * cp-tree.h, pt.c, semantics.c: Adjust.
2874         * method.c (largest_union_member): Remove.
2875
2876         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2877
2878         * lex.c (token_getch, token_put_back): New fns.
2879         (real_yylex): Use them.
2880
2881         * lex.c (lang_init): Generalize.
2882         (lang_init_options): Tell cpplib this is C++.
2883         (nextchar): Remove.  Replace uses with put_back.
2884         (skip_white_space): Handle linemode here.  Optimize for cpplib.
2885         (extend_token_buffer_to): New fn.
2886         (extend_token_buffer): Use it.
2887         (read_line_number, check_newline): Just deal with tokens.
2888         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
2889         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2890         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2891         * parse.y (PAREN_STAR_PAREN): Remove.
2892         * input.c: Don't use the putback machinery with cpplib.
2893         (sub_getch): Fold back into getch.
2894         (getch): Don't handle linemode here.
2895         (feed_input): Unget any text in the token buffer.
2896
2897         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2898         nextyychar, nextyylval): Remove.
2899
2900 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
2901             Jason Merrill  <jason@yorick.cygnus.com>
2902
2903         * lex.c (indent_level): New variable.
2904         (init_parse): Set cpp_token to CPP_DIRECTIVE.
2905         (consume_string): Make this smart about USE_CPPLIB.
2906         (yyungetc): Use put_back function.
2907         (pragma_getc, pragma_ungetc): Functions deleted.
2908         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2909         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2910         pragma_ungetc.
2911         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2912         Also, clean up cases where we redundantly set token_buffer[0].
2913         (read_line_number): New fn.
2914         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2915         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2916         (sub_getch): Conditionalize out code that's not appropriate if
2917         USE_CPPLIB.
2918         (put_back): Rewrite in case USE_CPPLIB is defined.
2919         (input_redirected): Ditto.
2920
2921 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2922
2923         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2924         c_global_trees and accessor macros defined in c-common.h.
2925         (cp_tree_index): New enumeration.
2926         (cp_global_trees): Declare new array.  Add accessor macros for it, and
2927         delete declarations of tree nodes replaced by it.
2928         (builtin_function): Delete macro, add declaration for new function.
2929         Include c-common.h.
2930         * decl.c: Delete definitions for tree nodes that were replaced by
2931         cp_global_trees and c_global_trees.
2932         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2933         to generate the common builtins here.
2934         (builtin_function): New function.
2935         * decl2.c (abort_fndecl): Delete declaration.
2936         * except.c (expand_builtin_return_address): Delete declaration.
2937         (builtin_return_address_fndecl): Delete variable.
2938         (const_ptr_type_node): Delete declaration.
2939         * lex.c (cons_up_default_function): Delete declaration of
2940         void_list_node.
2941         * parse.y (void_list_node): Delete declaration.
2942         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2943         Delete variables.
2944         (const_string_type_node): Delete declaration.
2945         * search.c (abort_fndecl): Delete declaration.
2946         * Makefile.in: Update dependencies.
2947
2948 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
2949
2950         * pt.c (check_default_tmpl_args): Move test for missing default
2951         arguments here, from ...
2952         (end_template_parm_list): Here.
2953
2954 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
2955
2956         * decl.c (lookup_nested_type): Remove.
2957         (pushtag): Don't call it.
2958
2959 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
2960
2961         * Makefile.in (INTERFACE): Bump to 2.
2962
2963 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
2964         
2965         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2966         instructions to gcc.gnu.org.  Removed e-mail address.
2967
2968 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
2969
2970         * pt.c (determine_specialization): Tighten error-checking.
2971         (end_template_parm_list): Likewise.
2972
2973 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
2974
2975         * pt.c (check_default_tmpl_args): Handle friends defined in the
2976         class just like member functions defined in the class.
2977
2978 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2979             Jason Merrill  <jason@yorick.cygnus.com>
2980
2981         * cp-tree.h (struct lang_decl): Added field for storing sorted
2982         FIELD_DECLs (used in TYPE_DECLs).
2983         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2984         (DECL_SORTED_FIELDS): New macro.
2985         * class.c (method_name_cmp): New function.
2986         (finish_struct_methods): Modified to support sorting and searching
2987         methods.
2988         (finish_struct_anon): Changed code in inner loop to use ELT rather 
2989         than UELT (which required an extra indirection for every reference).
2990         (field_decl_cmp): New function to support sorting FIELD_DECLs.
2991         (finish_struct_1): Sort fields.
2992         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2993         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2994         Also, switch to using array indexing rather than a changing pointer.
2995         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2996         DECL_SORTED_FIELDS.
2997
2998 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
2999
3000         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
3001         casts in system headers or extern "C" blocks.
3002
3003         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
3004         errors to pedwarn.
3005
3006 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
3007
3008         * decl2.c (write_virtuals): Deleted declaration.
3009         * cp-tree.h (write_virtuals): Deleted extern declaration.
3010         * class.c (finish_struct_1): Removed #if 0'd code that mentions
3011         write_virtuals.
3012         * semantics.c (begin_class_definition): Rewrite code to not depend
3013         on write_virtuals.
3014
3015         * lex.c (cp_pragma_interface): New function.
3016         (cp_pragma_implementation): Likewise.
3017         (handle_cp_pragma): Call them.
3018
3019         * typeck.c (comptypes): Simplify C code in look_hard.
3020
3021         * xref.c (PALLOC): Use xcalloc, not calloc.
3022         (SALLOC): Use xmalloc, not malloc.
3023
3024         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
3025
3026         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
3027         is NO_DEBUG.
3028
3029         * decl.c (duplicate_decls): If a redeclaration doesn't match the
3030         initial declaration, then don't save the inline info and by all
3031         means don't mark the function as a builtin function.
3032
3033         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
3034         CURRENT_CLASS_TYPE is 0.
3035
3036         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
3037         NULL_TREE.
3038
3039         * ptree.c (print_lang_type): Added vtable-needs-writing.
3040
3041 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
3042
3043         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
3044
3045 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
3046
3047         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3048         Merged into c-common.
3049
3050 1999-07-05  Dave Brolley  <brolley@cygnus.com>
3051
3052         * lex.c (errorcount): Declare it.
3053         (finish_parse): Update errorcount for when using CPPLIB.
3054
3055 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
3056
3057         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
3058         parameters.
3059         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
3060         * decl.c (push_class_binding): Use it.
3061         (lookup_name_real): Likewise.
3062
3063 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
3064
3065         * cp-tree.h (widest_integer_literal_type_node,
3066         widest_unsigned_literal_type) : New.
3067         * decl.c (widest_integer_literal_type_node,
3068         widest_unsigned_literal_type) : New.
3069         (init_decl_processing): Handle/use the two new types.
3070         * lex.c (real_yylex): Same.
3071         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3072         Same. 
3073
3074 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
3075
3076         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3077         to anonymous cv-qualified types.
3078
3079 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
3080
3081         * lex.c (real_yylex) : Change integer literal overflow handling to
3082         be like c-lex.c.
3083
3084         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3085
3086 1999-06-28  Richard Henderson  <rth@cygnus.com>
3087
3088         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3089
3090 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
3091
3092         * error.c (dump_type_real): Handle TREE_LIST again.
3093
3094         * typeck.c (comp_target_parms): Don't complain about 
3095         converting from () to (...) if !flag_strict_prototype.
3096
3097         * decl.c (grokdeclarator): Update the names of all variants when
3098         de-anonymizing.
3099
3100 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
3101
3102         * init.c (expand_aggr_vbase_init): Rename to
3103         construct_virtual_bases.  Conditionalize construction here, 
3104         rather than ...
3105         (emit_base_init): Here.
3106
3107 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
3108
3109         * semantics.c (finish_asm_statement): Apply decay conversions to
3110         input operands.
3111
3112         * decl.c (expand_static_init): When building an anonymous function
3113         for use with atexit, compute its body before and after entering
3114         the function.
3115
3116         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3117         EXIT_EXPR.
3118         
3119 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
3120
3121         * init.c (expand_aggr_vbase_init): Add flag parameter.
3122         (build_partial_cleanup_for): Remove, inlining into ..
3123         (expand_cleanup_for_base): ... here.  Take flag parameter.
3124         (emit_base_init): Pass the in_chrg parameter to
3125         emit_aggr_vbase_init. 
3126         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3127         
3128 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
3129
3130         * decl2.c (import_export_decl): Use same_type_p, rather than
3131         relying on pointer-equality for types.
3132
3133         * method.c (do_build_copy_constructor): Simplify.
3134
3135         * call.c (build_method_call): Remove bogus code for two-argument
3136         delete.
3137         * init.c (build_new_1): Expand on comment, and remove dead code.
3138
3139         * init.c (expand_cleanup_for_base): New function, split out
3140         from ...
3141         (emit_base_init): Here.
3142         (expand_aggr_vbase_init): Use it.
3143
3144 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
3145
3146         * cp-tree.h (class_cache_firstobj): Declare.
3147         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3148         * class.c (permanent_obstack): Remove declaration.
3149         (class_cache_firstobj): Make it global.
3150         (add_method): Don't use permanent_obstack directly.
3151         (pushclass): Only free the class_cache_obstack if we know how far
3152         back to free it.
3153         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3154         * decl.c: Remove dead comment.
3155         (saved_scope): Add class_cache_firstobj.
3156         (push_to_top_level): Save it.
3157         (pop_from_top_level): Restore it.
3158         (push_class_level_binding): Use push_cache_obstack, not
3159         maybe_push_cache_obstack.
3160         * search.c (push_class_decls): Likewise.
3161         
3162 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3163
3164         * pt.c (tsubst_friend_function): Push into namespace of friend
3165         function before pushdecl'ing it.
3166
3167 1999-06-14  Nathan Sidwell  <nathan@acm.org>
3168
3169         * call.c (build_new_op): Remove REF_BIND from all operands.
3170
3171 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
3172
3173         * init.c (build_new_1): Look up operator delete even if there was
3174         no explicit new placement.
3175
3176 1999-06-08  Nathan Sidwell  <nathan@acm.org>
3177
3178         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3179         of ...
3180         (build_throw): ... here. Call it.
3181         (process_start_catch_block): Call it.
3182
3183 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
3184
3185         * search.c (convert_pointer_to_single_level): Reimplement without
3186         using get_binfo.
3187
3188 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
3189
3190         * method.c (is_back_referenceable_type): Back-reference bools when
3191         not squangling.
3192
3193 1999-06-07  Dave Brolley  <brolley@cygnus.com>
3194
3195         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
3196         * input.c (putback_buffer): New structure type.
3197         (putback): Replaces putback_char member.
3198         (putback): Replaces putback_char static variable.
3199         (feed_input): Use putback.
3200         (end_input): Use putback.
3201         (sub_getch): Use putback.
3202         (put_back): Use putback.
3203
3204 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
3205
3206         * decl.c (grokdeclarator): Fix typo in last change.
3207
3208 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
3209
3210         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
3211         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
3212
3213 1999-06-04  Nathan Sidwell  <nathan@acm.org>
3214
3215         * except.c (build_throw): Check throw expression validity.
3216
3217 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
3218
3219         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
3220         just because flag_signed_bitfields is false.
3221
3222 1999-06-03  Nathan Sidwell  <nathan@acm.org>
3223
3224         * semantics.c (begin_class_definition): Update the struct's
3225         location here ...
3226         * class.c (finish_struct): ... rather than here.
3227
3228         * decl.c (make_typename_type): Don't rely on uninitialized
3229         variable.
3230
3231 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3232
3233         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
3234
3235 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
3236
3237         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
3238         and friends rather than messing with current_obstack directly.
3239         (cp_build_qualified_type_real): Rework ARRAY_TYPE
3240         allocation to match practice throughout the rest of the 
3241         compiler.
3242
3243 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
3244
3245         * lex.c (make_lang_type): Create TYPE_BINFO for
3246         TEMPLATE_TYPE_PARMs just like for non-template types.
3247
3248         * decl.c (start_decl): Move checks on initialization to ...
3249         (cp_finish_decl): Here.  Tidy formatting slightly.
3250
3251 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3252
3253         * decl.c (add_binding): Don't complain about a redeclaration of a
3254         semantically identical typedef in a local scope.
3255
3256 1999-05-28  Nathan Sidwell  <nathan@acm.org>
3257
3258         * decl.c (complete_array_type): Allocate off same obstack. Fix
3259         DO_DEFAULT comment to match reality.
3260
3261         * friend.c (make_friend_class): Fix diagnostic typo.
3262
3263 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3264
3265         * decl.c (lookup_namespace_name): Handle getting a
3266         TEMPLATE_ID_EXPR.
3267         (expand_static_init): Don't call pushdecl for implicitly declared
3268         `atexit' used to register destructors.
3269
3270 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
3271
3272         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
3273         intialize a vtable.
3274
3275         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
3276         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
3277         by combining TEMPLATE_INFO and LEVEL into a single union.
3278         (DECL_TEMPLATE_INFO): Reformat.
3279         (DECL_SAVED_TREE): Document.
3280         (DECL_TEMPLATE_INJECT): Remove.
3281         * class.c (finish_struct): Remove code to deal with
3282         DECL_TEMPLATE_INJECT. 
3283
3284         * decl.c (maybe_process_template_type_declaration): Handle all new
3285         types in templates uniformly.
3286         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
3287         DECL_CONTEXT.
3288         * pt.c (lookup_template_class): Inject template instantiations of
3289         forward-declarations.
3290         (instantiate_class_template): Remove code processing
3291         DECL_TEMPLATE_INJECT.
3292         
3293         * pt.c (lookup_template_class): Tweak lookup to find member
3294         templates.
3295
3296         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3297         ASM_CV_QUAL.
3298         * semantics.c (finish_asm_stmt): Make strings permanent if they're
3299         used in a template.
3300         
3301 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
3302
3303         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3304         parts of pointer to data member types.
3305
3306 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
3307
3308         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3309         and then make it look like `abort'.  Just use `abort' instead.
3310         
3311         * typeck.c (build_static_cast): Don't allow static_casts that cast
3312         away constness.
3313         (casts_away_constness_r): New function.
3314         (casts_away_constness): Likewise.
3315
3316         * decl.c (lookup_tag): Remove code no longer needed after
3317         name-lookup improvements.
3318         * decl2.c (handle_class_head): Make error-recovery more robust.
3319         * friend.c (make_friend_class): Reject templated typename types.
3320         * lex.c (is_global): A template parameter isn't global.
3321         * parse.y (class_head): Robustify.
3322         * parse.c: Regenerated.
3323         
3324 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
3325
3326         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3327         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
3328         
3329         * cp-tree.h (push_nested_namespace): Declare.
3330         (pop_nested_namespace): Likewise.
3331         * decl.c (push_nested_namespace): New function.
3332         (pop_nested_namespace): Likewise.
3333         * pt.c (instantiate_class_template): Use them.
3334
3335         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3336
3337         * cp-tree.h (cplus_expand_constant): Declare.
3338         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3339         converted from one pointer-to-object type to another.
3340         * expr.c (cplus_expand_constant): Don't make it static.
3341         * typeck.c (build_component_ref): Don't crash when presented with
3342         a component which is a TEMPLATE_DECL.
3343         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
3344         cast from a pointer-to-member constant to its own type does not
3345         result in a valid non-type template argument.
3346
3347 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
3348             Nathan Sidwell  <nathan@acm.org>
3349         
3350         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3351         * cp-tree.h: Fix typo in documentation on pointers-to-members.
3352         (cp_build_qualified_type): Make it a macro.
3353         (cp_build_qualified_type_real): Declare.
3354         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
3355         problem with template parameters and restrict-qualification.
3356         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3357         * hash.h: Regenerated.
3358         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3359         the enumeration.
3360         (NORID): Remove definition.
3361         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3362         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
3363         (fn_type_unification): Check that the function type resulting from
3364         the deduction is legal.
3365         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3366         (unify): Use cp_build_qualified_type_real.
3367         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3368         (cp_build_qualified_type): Rename to ...
3369         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3370         and modify appropriately.
3371         
3372         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3373         reveal optimization opportunities.
3374
3375         * pt.c (tsubst): Don't issue error messages when we're not
3376         complaining, even if we see a qualified function type.
3377         (check_cv_quals_for_unify): Don't allow a qualified function
3378         type.
3379
3380 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3381
3382         * class.c (instantiate_type): Downgrade errors for object-dependent
3383         memfn refs to pedwarn.
3384
3385 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3386
3387         * decl.c (grokdeclarator): Don't treat [] as indicating a
3388         zero-sized array in a typedef.
3389
3390         * call.c (build_object_call): Don't look at DECL_NAME for a type.
3391         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3392         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3393
3394         * pt.c (for_each_template_parm): Rework to match documentation.
3395         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3396
3397 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3398
3399         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3400
3401         * class.c (finish_base_struct): Allow non-COM bases for COM classes
3402         except at the leftmost position.
3403         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3404         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3405         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3406
3407         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3408         (build_cplus_new): Make sure that what we return is of the right type.
3409
3410 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3411
3412         * cp-tree.h (make_ptrmem_cst): New function.
3413         * expr.c (cplus_expand_constant): Split out from ...
3414         (cplus_expand_expr): Here.  Use cplus_expand_constant.
3415         (init_cplus_expand): Set lang_expand_constant.
3416         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3417
3418         * tree.c (make_ptrmem_cst): Define.
3419         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3420         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3421
3422 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3423
3424         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3425
3426         * decl2.c (start_static_storage_duration_function): Fix comment.
3427         (finish_file): Create static storage duration functions lazily.
3428
3429 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3430
3431         Implement anonymous structs.
3432         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3433         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3434         * class.c (finish_struct_1): Remove redundant check for anon struct.
3435         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3436         (check_tag_decl): Check for anonymous struct here.
3437         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3438         * init.c (sort_member_init, emit_base_init): Handle getting fields
3439         as well as names in current_member_init_list.
3440         (perform_member_init): Handle getting an anon aggr.
3441         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3442         (do_build_copy_constructor): Likewise.
3443
3444 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3445
3446         * tree.c (cp_build_qualified_type): Don't allow qualified function
3447         types.
3448
3449 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
3450
3451         * gxxint.texi: Fix typo.
3452
3453 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3454
3455         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3456         * class.c (finish_struct_1): Use CLASS_TYPE_P.
3457         * ptree.c (print_lang_type): Likewise.
3458         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3459         IS_AGGR_TYPE_CODE.
3460         * typeck2.c (digest_init): Likewise.
3461
3462 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
3463
3464         * call.c (joust): Compare the types of the conv ops, not the
3465         target types of the conversions.
3466
3467 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3468
3469         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3470         was not given.
3471
3472 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
3473
3474         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3475         * decl.c (grokfndecl): Don't allow inline declarations of friend
3476         template specializations, or friend template specializations with
3477         default arguments.
3478         * pt.c (tsubst): Handle substitution into array types that does
3479         not yield a fixed upper bound, even when not processing a
3480         template.
3481         (tsubst_copy): Deal with the fact that the second operand to a
3482         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3483         * search.c (marked_pushdecls_p): Don't descend into
3484         TEMPLATE_TYPE_PARMs and the like.
3485         (unmarked_pushdecls_p): Likewise.
3486         
3487         * call.c (build_over_call): Don't throw away
3488         initializations/copies of empty classes; use MODIFY_EXPR and
3489         INIT_EXPR as for non-empty classes.
3490         * class.c (finish_struct_1): Put the padding byte for an empty
3491         class on the TYPE_NONCOPIED_PARTS list for the class.
3492
3493 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3494
3495         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3496         indicate a reference to a field that is a qualified name.
3497
3498 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
3499
3500         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3501         ASM_OUTPUT_CONSTRUCTOR.
3502
3503         * friend.c (do_friend): Add attrlist arg.  Remove support for
3504         getting a non-decl as 'decl'.
3505         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
3506         rtl.
3507         (grokdeclarator): Adjust.
3508         * cp-tree.h: Adjust.
3509
3510 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3511
3512         * cp-tree.h (permanent_p): New function.
3513         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3514         possibly complex tree node.
3515         * tree.c (mapcar): Adjust comments, and follow coding standards in
3516         conditional.
3517         (permanent_p): New function.
3518
3519 1999-05-13  Per Bothner  <bothner@cygnus.com>
3520
3521         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
3522         primitive Java types, if we actually see `extern "Java"'.
3523
3524 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3525
3526         * lang-specs.h: Pass -$ to the preprocessor.
3527
3528 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
3529
3530         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3531         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3532         (resolve_offset_ref): Don't handle a raw baselink.
3533         * cvt.c (build_expr_type_conversion): Likewise.
3534         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3535         convert_for_initialization): Likewise.
3536         * class.c (instantiate_type): Handle seeing a baselink under an
3537         OFFSET_REF.
3538         * error.c (dump_expr): Likewise.        
3539         * pt.c (for_each_template_parm): Likewise.
3540         (resolve_overloaded_unification): Likewise.
3541         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3542         * typeck.c (expr_sizeof): Also complain about other permutations
3543         of overloaded functions.
3544
3545 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
3546
3547         * init.c (resolve_offset_ref): Don't return a raw method.
3548         Use BASELINK_P.
3549         * typeck.c (decay_conversion): Don't handle a raw method.
3550         Resolve all OFFSET_REFs.
3551         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3552         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
3553         same_type_p for pmf bits.  Don't use build_binary_op to compare
3554         raw pointers to methods.
3555         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3556         to decide when to call resolve_offset_ref.
3557         (build_c_cast, convert_for_initialization): Likewise.
3558         * cvt.c (build_expr_type_conversion): Likewise.
3559
3560 1999-05-06  Nathan Sidwell  <nathan@acm.org>
3561
3562         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3563
3564 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
3565
3566         * decl2.c (start_objects): Don't let static constructors and
3567         destructors get inlined.
3568
3569         * parse.y (nested_name_specifier): Make sure ordinary types are
3570         complete, just like template types.
3571         * parse.c: Regenerated.
3572
3573         * pt.c (check_explicit_specialization): Improve error messages.
3574
3575 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3576
3577         * typeck.c (string_conv_p): Use same_type_p to check whether we
3578         try to convert between char and wchar_t.
3579
3580 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
3581
3582         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3583         lookup to error_mark_node here.
3584         (lookup_member): Revise documentation.  Add comments.  Don't set
3585         the TREE_TYPE to error_mark_node here, and don't build up an extra
3586         TREE_LIST for ambiguous lookups.
3587         (setup_class_bindings): Adjust accordingly.
3588         (push_class_decls): Revise out-of-date comments.
3589         
3590         * typeck.c (build_const_cast): Tighten checks for legality.
3591
3592 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3593
3594         * init.c (build_member_call): Lookup names coming from
3595         namespace-scoped LOOKUP_EXPR.
3596
3597 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
3598
3599         * gxxint.texi: Add documentation for 'I'.
3600
3601 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3602
3603         * tinfo.cc (operator==): Qualify type_info with std::.
3604
3605 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
3606
3607         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
3608         (DECL_COMDAT): Remove definition.
3609
3610 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
3611
3612         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3613         change.
3614
3615 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
3616
3617         * class.c (build_vtable): Use build_lang_decl when building
3618         vtables, not just build_decl.
3619         (prepare_fresh_vtable): Likewise.
3620         * decl.c (wrapup_globals_for_namespace): Mark vtables as
3621         DECL_EXTERNAL when calling wrapup_global_declarations.
3622         * decl2.c (priority_info_s): Add initializations_p and
3623         destructions_p members.
3624         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3625         when deciding what vtables to write out.
3626         (ssdf_decls): New variable.
3627         (ssdf_decls_used): Likewise.
3628         (start_static_storage_duration_function): Deal with being called
3629         multiple times.  Avoid inlining this function.
3630         (generate_inits_for_priority): Deal with reuse of priority map.
3631         (get_priority_info): Clear initializations_p and destructions_p.
3632         (do_static_initialization): Tweak comment.
3633         (do_static_destruction): Likewise.  Fix condition on sentries for
3634         destruction.
3635         (generate_ctor_or_dtor_function): Call all of the static storage
3636         duration functions.
3637         (generate_ctor_or_dtor_function_for_priority): Check
3638         initializations_p and destructions_p to see what priorities need
3639         initialization functions.
3640         (finish_file): Rework to generate multiple static storage duration
3641         functions, rather than just one.
3642
3643         * typeck.c (build_const_cast): Tweak last change to handle
3644         templates correctly.
3645
3646         * typeck.c (build_const_cast): Disallow use of const_cast to
3647         anything but a pointer or reference type.
3648
3649 1999-04-30  Nathan Sidwell  <nathan@acm.org>
3650
3651         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3652         signature type.
3653
3654 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
3655
3656         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3657         (finish_file): Indent comments properly.
3658
3659 1999-04-29  Richard Henderson  <rth@cygnus.com>
3660
3661         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3662         (do_static_destruction): Likewise.
3663
3664 1999-04-29  Nathan Sidwell  <nathan@acm.org>
3665
3666         * cp-tree.h (TYPE_NOTHROW_P): New macro.
3667         * decl2.c (delete_sanity): Warn on deleting void *.
3668         * init.c (build_new_1): Use TYPE_NOTHROW_P.
3669         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3670         throwing operator new.
3671
3672 1999-04-28  Nathan Sidwell  <nathan@acm.org>
3673
3674         * cp-tree.h (build_component_addr): Remove prototype.
3675         * typeck.c (build_component_addr): Make static. Remove MSG
3676         argument.
3677         (build_component_addr): Remove MSG parameter, clean up
3678         comment.
3679         (build_x_function_call): Use cp_error.
3680         (build_unary_op): Adjust call of build_component_addr.
3681
3682 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
3683
3684         * pt.c (tsubst_friend_class): Check for NULL.
3685
3686 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
3687
3688         * search.c (binfo_for_vtable): Initialize bfvi.var.
3689
3690 1999-04-27  Nathan Sidwell  <nathan@acm.org>
3691
3692         * rtti.c (build_x_typeid): Check rtti is enabled.
3693
3694 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
3695
3696         * search.c (is_subobject_of_p): Make sure we're looking at the
3697         right baseclasses.
3698
3699 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
3700
3701         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3702
3703 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
3704
3705         * decl2.c (finish_file): Tweak handling of extern inlines so that
3706         they are not unnecessarily put out.
3707
3708         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3709         such as base classes.
3710
3711 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
3712
3713         * tree.c (build_exception_variant): Fix typo: use the chain of U,
3714         not trying V, while cycling through U.
3715
3716 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
3717
3718         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3719         preserves_first_arg.  Enlarge dummy accordingly.
3720         (DECL_TINFO_FN_P): New macro.
3721         (SET_DECL_TINFO_FN_P): Likeiwse.
3722         (DECL_RETURNS_FIRST_ARG): Remove.
3723         (DECL_PRESERVES_THIS): Likewise.
3724         (DECL_INIT_PRIORITY): New macro.
3725         (finish_struct_1): Change prototype.
3726         (cat_namespace_levels): Remove prototype.
3727         (vtable_decl_p): New prototype.
3728         (vtype_decl_p): Likewise.
3729         (sigtable_decl_p): Likewise.
3730         (walk_globals_pred): New typedef.
3731         (walk_globals_fn): Likewise.
3732         (walk_globals): New prototype.
3733         (walk_namespaces_fn): New typedef.
3734         (walk_namespaces): New prototype.
3735         (wrapup_globals_for_namespace): Likewise.
3736         (walk_vtables): Remove prototype.
3737         (walk_sigtables): Likewise.
3738         (instantiate_pending_templates): New prototype.
3739         * class.c (finish_struct_1): Don't return a value.
3740         * decl.h (pending_statics): Remove declaration.
3741         * decl.c (walk_namespaces_r): New function.
3742         (walk_globals_r): Likewise.
3743         (vtable_decl_p): Likewise.
3744         (vtype_decl_p): Likewise.
3745         (sigtable_decl_p): Likewise.
3746         (walk_namespaces): Likewise.
3747         (walk_globals_data): New type.
3748         (walk_globals): New function.
3749         (wrapup_globals_for_namespace): Likewise.
3750         (expand_static_init): Remove assertion.  Remove redundancy in
3751         conditional.  Don't put static data members in static_aggregates
3752         Tidy.
3753         (finish_function): Remove redundancy in conditional.  Don't set
3754         DECL_RETURNS_FIRST_ARG.
3755         (cat_namespace_levels): Remove.
3756         * decl2.c: Include splay-tree.h and varray.h.
3757         (priority_info_s): New structure.
3758         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
3759         conventions.
3760         (prune_vtable_vardecl): Likewise.
3761         (finish_sigtable_vardecl): Likewise.
3762         (setup_initp): Remove.
3763         (do_dtors): Remove.
3764         (do_ctors): Remove.
3765         (start_static_storage_duration_function): New function.
3766         (generate_inits_for_priority): Likewise.
3767         (finish_static_storage_duration_function): Likewise.
3768         (get_priority_info): Likewise.
3769         (do_static_initialization): Likewise.
3770         (do_static_destruction): Likewise.
3771         (do_static_initialization_and_destruction): Likewise.
3772         (generate_ctor_or_dtor_function): Likewise.
3773         (generate_ctor_and_dtor_functions_for_priority): Likewise.
3774         (pending_statics): Make it a varray.
3775         (pending_statics_used): New variable.
3776         (saved_inlines): Make it a varray.
3777         (saved_inlines_used): New variable.
3778         (finish_static_data_member): Change method of updating
3779         pending_statics.
3780         (mark_inline_for_output): Remove #if 0'd code.  Change method of
3781         updating saved_inlines.
3782         (walk_vtables): Remove.
3783         (walk_sigtables): Likewise.
3784         (import_export_decl): Use DECL_TINFO_FN_P.
3785         (pending_templates): Remove declaration.
3786         (maybe_templates): Likewise.
3787         (static_aggregates_initp): Likewise.
3788         (setup_initp): Likewise.
3789         (finish_objects): Simplify.
3790         (INITIALIZE_P_IDENTIFIER): New macro.
3791         (PRIORITY_IDENTIFIER): New macro.
3792         (SSDF_IDENTIFIER): New macro.
3793         (initialize_p_decl): New variable.
3794         (priority_decl): Likewise.
3795         (ssdf_decl): Likewise.
3796         (priority_info_map): Likewise.
3797         (finish_file): Recode output of static intializers and other
3798         file-scope finalization tasks.
3799         * error.c (OB_END_TEMPLATE_ID): New macro.
3800         (dump_type_real): Use it.
3801         (dump_decl): Likewise.
3802         (dump_function_name): Likewise.
3803         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3804         interface.
3805         (check_newline): Use walk_globals, not walk_vtables.
3806         * pt.c (pending_tempalte_expansions): Remove.
3807         (set_vardecl_interface_info): Likewise.
3808         (pending_templates): Make static.
3809         (maybe_templates): Likewise.
3810         (instantiate_class_template): Adjust call to finish_struct_1.
3811         (instantiate_pending_templates): New function.
3812         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3813         * tree.c (static_aggregates_initp): Remove.
3814         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3815         instead.
3816         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3817
3818         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3819         with the RTL code RETURN.
3820         * hash.h: Regenerated.
3821         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3822         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3823         * parse.c: Regenerated.
3824         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
3825         it.
3826         (inline_parm_levels): New variable.
3827         (inline_parm_levels_used): Likewise.
3828         (maybe_begin_member_template_processing): Update them.
3829         (maybe_end_member_template_processing): Use them, rather than
3830         guessing how many levels to pop.
3831
3832         * decl.c (make_typename_type): Tighten error-checking.
3833
3834 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
3835
3836         * cp-tree.h (build_binary_op): Remove unneeded parameter.
3837         * class.c (build_vrable_entry_ref): Adjust call to
3838         build_binary_op.
3839         * decl.c (expand_static_init): Likewise.
3840         (grokdeclarator): Likewise.
3841         (finish_function): Likewise.
3842         * decl2.c (delete_sanity): Likewise.
3843         (do_dtors): Likewise.
3844         (do_ctors): Likewise.
3845         * error.c (dump_type_suffix): Likewise.
3846         * expr.c (cplus_expand_expr): Likewise.
3847         * init.c (resolve_offset_ref): Likewise.
3848         (build_new): Likewise.
3849         (build_new_1): Likewise.
3850         (build_vec_delete_1): Likewise.
3851         (expand_vec_init_catch_clause): Likewise.
3852         (build_delete): Likewise.
3853         * pt.c (tsubst): Likewise.
3854         * rtti.c (synthesize_tinfo_fn): Likewise.
3855         * search.c (expand_upcast_fixups): Likewise.
3856         (expand_direct_vtbls_init): Likewise.
3857         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3858         (build_binary_op_nodefault): Likewise.
3859         (point_int_sum): Likewise.
3860         (pointer_diff): Likewise.
3861         (build_unary_op): Likewise.
3862         (build_modify_expr): Likewise.
3863         (get_delta_difference): Likewise.
3864         (build_ptrmemfunc): Likewise.
3865         (expand_ptrmemfunc_cst): Likewise.
3866
3867 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
3868
3869         * decl.c (grokfndecl): Always call cplus_decl_attributes.
3870         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3871
3872 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
3873
3874         * cp-tree.h (finish_static_data_member_decl): New function.
3875         * decl2.c (finish_static_data_member_decl): Split out from ...
3876         (grokfield): Here.
3877         * pt.c (instantiate_class_template): Use it here instead of
3878         trying to fake it.
3879         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3880         finish_static_data_member_decl will do that.  Explicit set
3881         DECL_EXTERNAL to match non-template processing.
3882
3883 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
3884
3885         * cp-tree.h (finish_class_definition): Add parameter.
3886         * parse.y (structsp): Use it.  Don't call pop_scope here.
3887         * parse.c: Regenerated.
3888         * semantics.c (finish_class_definition): Pop it here.
3889
3890 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
3891
3892         * decl.c (xref_tag): Revise handling of nested template
3893         declarations.
3894         * pt.c (check_explicit_specialization): Tweak handling of friend
3895         templates in template classes.
3896         (tsubst_friend_class): Handle friend declarations for nested
3897         member template classes.
3898
3899 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
3900
3901         * class.c (finish_struct): Remove unused variable.
3902         (pushclass): Likewise.
3903         (invalidate_class_lookup_cache): Likewise.
3904         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3905         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3906         doesn't get obliterated.
3907         (make_typename_type): Handle template classes correctly.
3908
3909         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3910         (storetags): Declare.
3911         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3912         (pushclass): Likewise.  Use storetags to install tag declarations,
3913         not pushtag.
3914         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3915         * decl.c (storetags): Make it global.
3916         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3917         implicit typename declaration.
3918         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
3919         * method.c (hack_identifier): Likewise.
3920         * search.c (lookup_member): Likewise.
3921
3922         * decl.c (warn_about_implicit_typename_lookup): New function.
3923         (lookup_name_real): Use it.  Rework handling of implicit typename
3924         extension.
3925
3926 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
3927
3928         * cp-tree.h (lookup_nested_field): Remove.
3929         * class.c (push_nested_class): Handle UNION_TYPEs.
3930         (pop_nested_class): Likewise.
3931         * decl.c (lookup_name_real): Don't call lookup_nested_field.
3932         (start_decl): Use push_nested_class, not just pushclass.
3933         (cp_finish_decl): Use pop_nested_class, not just popclass.
3934         * search.c (lookup_nested_field): Remove.
3935
3936         * cp-tree.h (lang_type): Add documentation.
3937         * decl2.c (handle_class_head): Create template declarations here,
3938         as appropriate.
3939         * parse.y (class_head): Return whether or not we entered a new
3940         scope, as well as the type named.
3941         (named_class_head): Likewise.
3942         (named_complex_class_head_sans_basetype): Likewise.
3943         (structsp): Adjust accordingly.  Pop scope when required.
3944         * parse.c: Regenerated.
3945         * pt.c (check_default_tmpl_args): Robustify.
3946         (redeclare_class_template): Likewise.
3947         (instantiate_class_template): An instantiation of an
3948         anonymous union is itself an anonymous union.
3949         * semantics.c (begin_class_definition): Don't create template
3950         declarations here.
3951
3952 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
3953
3954         * parse.y (after_type_declarator_intern): New nonterminal.
3955         (after_type_declarator): Use it.
3956         (direct_after_type_declarator): Likewise.  Move above
3957         nonnested_type to fix reduce/reduce conflict resolution.
3958         (declmods): Reducing from just 'attributes' has EMPTY precedence.
3959         * Makefile.in (CONFLICTS): Update.
3960
3961         * decl.c (define_label): Downgrade error for jumping over a
3962         non-POD decl to pedwarn.
3963
3964 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
3965
3966         * cp-tree.h (popclass): Change declaration.
3967         (pop_nested_class): Likewise.
3968         (poplevel_class): Remove declaration.
3969         * call.c (convert_default_argument): Pass no arguments to
3970         popclass.
3971         * class.c (finish_struct_1): Likewise.
3972         (finish_struct): Likewise.
3973         (popclass): Remove argument.  Simplify code accordingly.
3974         (pop_nested_class): Likewise.
3975         * decl.c (poplevel_class): Declare it here, and make it static.
3976         (poplevel): Handle class scopes.
3977         (poplevel_class): Don't take an rgument.  Simplify.
3978         (pop_everything): Pass no arguments to pop_nested_class.
3979         (cp_finish_decl): Pass no arguments to popclass.
3980         (grokdeclarator): Pass no arguments to pop_nested_class.
3981         (finish_function): Likewise.
3982         * decl2.c (grokfield): Likewise.
3983         (pop_scope): Pass no arguments to popclass.
3984         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3985         * pt.c (instantiate_class_template): Move call to pushclass, and
3986         document.  Pass no arguments to popclass.
3987         (regenerate_decl_from_template): Likewise.
3988
3989 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
3990
3991         * typeck.c (build_unary_op): Handle taking the address of a unique
3992         bound non-static member function.
3993
3994 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3995
3996         * lang-options.h (-Wdeprecated): New flag.
3997         * decl2.c (warn_deprecated): New flag.
3998         (lang_decode_option): Deprecated this-is-variable,
3999         external-templates, alt-external-templates.
4000         Support -Wdeprecated.
4001         * errfn.c (cp_deprecated): New function.
4002
4003 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
4004
4005         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
4006         of the decls themselves.
4007
4008         * pt.c (tsubst_function_type): Copy attributes over.
4009
4010         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
4011         and com_interface.
4012         * cp-tree.h: Add prototype.
4013         * decl.c (init_decl_processing): Set valid_lang_attribute.
4014
4015 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
4016
4017         * class.c (finish_struct_1): Look at the const-ness of the field's
4018         type, not the TREE_READONLY-ness of the declaration.
4019         * method.c (synthesize_method): Likewise.
4020         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
4021         creating new declarations.
4022
4023 1999-04-13  Mike Stump  <mrs@wrs.com>
4024
4025         * decl2.c (import_export_decl): Because vtables always reference
4026         virtual functions, even if they are inlined, don't allow
4027         -fno-implement-inlines to not emit them, instead, emit them with
4028         the vtable.
4029         * decl.c (start_function): Likewise.
4030
4031 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
4032
4033         * cp-tree.h (struct lang_type): Add com_interface.
4034         (CLASSTYPE_COM_INTERFACE): New macro.
4035         * class.c (set_rtti_entry): COM interface classes have no RTTI
4036         entries in their vtables; adjust.
4037         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
4038         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
4039         finish_struct_1): Likewise.
4040         * decl2.c (mark_vtable_entries): Likewise.
4041         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
4042         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
4043         expand_upcast_fixups): Likewise.
4044         * tree.c (debug_binfo): Likewise.
4045
4046         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
4047         * typeck.c (comptypes): If we get it, ignore attributes.
4048         * class.c (instantiate_type): Use BASELINK_P.  Change complain
4049         parameter to flags; 2 means ignore attributes.
4050         * call.c (build_op_delete_call): Pass it.
4051
4052         * decl.c (xref_tag): Only complain once about using a typedef-name
4053         with 'struct'.  Downgrade to pedwarn.
4054
4055         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
4056
4057         * parse.y (absdcl_intern): New nonterminal.
4058         (absdcl, direct_abstract_declarator): Use it.
4059
4060         * pt.c (lookup_template_class): Look through implict typename.
4061
4062 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
4063
4064         * friend.c (add_friend): Deal gracefully with error_mark_node.
4065         * method.c (build_overload_value): Handle pointers-to-members as
4066         template parameters.
4067
4068         * decl.c (push_binding): Fix typo in comment.
4069
4070 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
4071
4072         * error.c (dump_type_real): If a typename is a template-id, put
4073         out the template arguments.
4074         (dump_expr): Handle TEMPLATE_ID_EXPR.
4075         * pt.c (lookup_template_class): Now that full arguments are
4076         available everywhere, remove code that tried to guess them.
4077
4078 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
4079
4080         * decl.c (make_typename_type): Complain if we don't find a type
4081         when trying to make a typename type for a non-template type.
4082
4083 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
4084
4085         * decl.c (start_decl): Pass attributes to grokdeclarator.
4086         (grokdeclarator): Handle attributes on constructor-syntax
4087         initializers.
4088
4089 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
4090
4091         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
4092         don't have types.
4093
4094         * search.c (template_self_reference_p): Tweak.
4095
4096 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
4097
4098         * init.c (build_offset_ref): Don't build yet another weird data
4099         structure to describe overloaded functions.
4100
4101 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
4102
4103         * cp-tree.h (BASELINK_P): New macro.
4104         (SET_BASELINK_P): Likewise.
4105         * init.c (build_member_call): Remove needless assignment in if
4106         statement.
4107         * search.c (lookup_field_r): Fix handling when we are looking
4108         specifically for a type; these are not hidden by functions and
4109         variables.
4110         (lookup_member): Use SET_BASELINK_P.
4111         * tree.c (is_overloaded_fn): Use BASELINK_P.
4112         (really_overloaed_fn): Likewise.
4113         (get_first_fn): Likewise.
4114
4115 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
4116
4117         * decl.c (lookup_name_current_level): Tweak, and improve
4118         documentation.
4119
4120         * class.c (maybe_fixup_vptrs): Remove declaration.
4121         (build_class_init_list): Likewise.
4122         * decl.c (pushdecl_class_level): Call check_template_shadow here
4123         ...
4124         (push_class_level_binding): ... not here.
4125         * search.c (dfs_push_type_decls): Only avoid
4126         template-self-reference TYPE_DECLs if they are from base classes.
4127
4128 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
4129
4130         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
4131         nodes.  Tidy.
4132
4133 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
4134
4135         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
4136         (finish_struct_1): Don't call build_class_init_list.
4137
4138 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
4139
4140         * tinfo.h (__class_type_info): Fix illegal declaration.
4141
4142         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
4143         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
4144         (IDENTIFIER_CLASS_VALUE): Improve documentation.
4145         (is_properly_derived_from): Declare.
4146         (invalidate_class_lookup_cache): Likewise.
4147         (maybe_maybe_note_name_used_in_class): Likewise.
4148         (note_name_declared_in_class): Likewise.
4149         (push_using_decl): Remove duplicate declaration.
4150         (id_in_current_class): Remove declaration.
4151         (push_class_binding): Change prototype.
4152         (clear_identitifer_class_values): Declare.
4153         * call.c (is_properly_derived_from): Make it global.
4154         (build_new_function_call): Be careful about updating candidates.
4155         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
4156         asked to make illegal calls.
4157         * class.c: Include splay-tree.h.
4158         (class_stack_node): Add names_used slot.
4159         (check_member_decl_is_same_in_complete_scope): Remove.
4160         (add_method): Fix comment.  Push the declaration into class
4161         scope.
4162         (finish_struct_1): When popping the class, pop the bindings too.
4163         Remove check for data member/function member conflict.
4164         (finish_struct): Remove calls to
4165         check_member_decl_is_same_in_complete_scope.  Change calls to
4166         popclass.
4167         (pushclass): Clear names_used in the class stack entry.
4168         Use invalidate_class_lookup_cache to remove cached entries, rather
4169         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
4170         before entering a new class.  Remove dead code.  Don't mess with
4171         current_function_decl when pushing declarations.
4172         (invalidate_class_lookup_cache): New function, split out from ...
4173         (popclass): Here.  Clean up names_used on our way out.
4174         (instantiate_type): Adjust.
4175         (build_self_reference): Don't push the declaration here.
4176         (maybe_note_name_used_in_class): New function.
4177         (note_name_declared_in_class): Likewise.
4178         * decl.c (add_binding): Change prototype.
4179         (find_class_binding_level): New function.
4180         (innermost_nonclass_level): Likewise.
4181         (current_binding_level): Update documentation.
4182         (inner_binding_level): Remove.  Replace with current_binding_level
4183         throughout.
4184         (push_binding_level): Remove special handling of
4185         class_binding_level.
4186         (pop_binding_level): Likewise.  Use find_class_binding_level.
4187         (suspend_binding_level): Likewise.
4188         (global_bindings_p): Use innermost_nonclass_level.
4189         (toplevel_bindings_p): Likewise.
4190         (namespace_bindings_p): Likewise.
4191         (pseudo_global_level_p): Likewise.
4192         (push_binding): Clear INHERITED_VALUE_BINDING_P.
4193         (add_binding): Check for illegal multiple declarations.  Return a
4194         value indicating whether or not the new binding was legal.
4195         (push_local_binding): Skip over class binding levels.  Check
4196         return value from add_binding.
4197         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
4198         note_name_declared_in_class.
4199         (pushlevel_class): Remove "fake out the rest of the compiler"
4200         code.
4201         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
4202         (clear_identifier_class_values): New function.
4203         (pop_from_top_level): Use it.
4204         (pop_everything): Tweak.
4205         (maybe_process_template_type_declaration): Don't push the
4206         declaration for the template here.
4207         (pushtag): Don't push tag declarations into class scope here.
4208         (pushdecl): Apply DeMorgan's law for readability.
4209         (pushdecl_class_level): Remove special-case code for
4210         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
4211         (push_class_level_bindng): Deal with inherited bindings.
4212         (lookup_name_real): Remove special-case code for
4213         TYPE_BEING_DEFINED, and some implicit typename magic.
4214         (grokdeclarator): Handle COMPONENT_REF for a template function.
4215         (build_enumerator): Don't call pushdecl_class_level here.
4216         (id_in_current_class): Remove.
4217         * decl2.c (grokfield): Don't call pushdecl_class_level or
4218         check_template_shadow.
4219         * errfn.c (cp_file_of): Don't declare.
4220         (cp_line_of): Likewise.
4221         * error.c (dump_decl): Handle an OVERLOAD.
4222         (cp_file_of): Likewise.
4223         (cp_line_of): Likewise.
4224         * init.c (build_member_call): Handle a COMPONENT_REF.
4225         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
4226         pushdecl_class_level.
4227         * method.c (hack_identifier): Build COMPONENT_REFs for references
4228         to member templates as well as member functions.  Remove dead
4229         code.
4230         * parse.y (left_curly): Remove.
4231         (nonnested_type): Call maybe_note_name_used_in_class, not
4232         pushdecl_class_level.
4233         * parse.c: Regenerated.
4234         (nested_name_specifier_1): Likewise.
4235         * pt.c (check_explicit_specialization): Adjust, for robustness.
4236         (check_template_shadow): Handle OVERLOADs.
4237         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
4238         TEMPLATE_DECL, if appropriate.
4239         * search.c (envelope_add_decl): Remove.
4240         (dfs_pushdecls): Likewise.
4241         (dfs_compress_decls): Likewise.
4242         (dfs_push_decls): New function.
4243         (dfs_push_type_decls): Likewise.
4244         (setup_class_bindings): Likewise.
4245         (template_self_reference_p): Likewise.
4246         (lookup_field_r): Use it.
4247         (looup_member): Remove old comment.  Deal with ambiguity.
4248         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
4249         and remove envelope processing.
4250         * semantics.c (begin_class_definition): Let pushclass push
4251         declarations for base classes.
4252         (finish_member_declaration): Push declarations into class scope.
4253         * typeck.c (build_component_ref): Just put an OVERLOAD into the
4254         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
4255         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
4256         * Makefile.in (class.o): Depend on splay-tree.h.
4257
4258 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
4259
4260         * cvt.c (convert_pointer_to_real): Use same_type_p.
4261         * typeck.c (comp_target_types): Use same_type_p.
4262
4263 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
4264
4265         * semantics.c (begin_inline_definitions,
4266         finish_inline_definitions): Rename from finish_default_args and
4267         begin_inline_definitions, respectively, to something that isn't a
4268         total lie.  :)
4269         * parse.y (structsp): Adjust.
4270
4271         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
4272         (list_hash_lookup): Likewise.
4273         (hash_tree_chain): Adjust.
4274         * pt.c (tsubst): Adjust.
4275         (tsubst_arg_types): Use plain hash_tree_cons.
4276         * cp-tree.h (hash_tree_cons_simple): Lose.
4277         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
4278
4279 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4280
4281         * Makefile.in (hash.h): Generate using gperf language 'C', not
4282         'KR-C', so gperf uses the `const' keyword on strings.
4283
4284         * gxx.gperf (resword): Const-ify a char*.
4285
4286 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
4287
4288         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
4289         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
4290         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
4291         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
4292         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
4293         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
4294         tree.c: Adjust.
4295
4296 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
4297
4298         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
4299
4300 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
4301
4302         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
4303
4304 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
4305
4306         * cp-tree.h (add_friend): Declare.
4307         (add_friends): Likewise.
4308         * friend.c (add_friend): Make it global.  Don't add to
4309         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
4310         (add_friends): Make it global.
4311         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
4312         befriending class is a template.
4313         * parse.y (component_decl_1): Fix typo in comment.
4314         * parse.c: Regenerated.
4315         * pt.c (instantiate_class_template): Use add_friend and
4316         add_friends rather that duplicating some of their functionality
4317         here.
4318
4319 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
4320
4321         * call.c (build_field_call): Unify 'this' and non-'this' cases.
4322
4323         * typeck.c (build_indirect_ref): Check for 'this' sooner.
4324
4325 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4326
4327         * call.c (op_error): Const-ify a char*.
4328         (add_candidate, source_type, add_warning): Add static prototype.
4329         (print_z_candidates): Const-ify a char*.
4330
4331         * class.c (resolve_address_of_overloaded_function,
4332         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
4333         (get_vtable_name, finish_struct_1): Const-ify a char*.
4334
4335         * cvt.c (convert_to_reference): Likewise.
4336
4337         * decl.c (redeclaration_error_message, record_builtin_type,
4338         record_unknown_type, member_function_or_else, bad_specifiers):
4339         Likewise.
4340         (find_binding, select_decl, unqualified_namespace_lookup,
4341         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
4342         Add static prototype.
4343         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
4344         implicitly_declare, record_builtin_java_type, define_function,
4345         grok_op_properties, tag_name): Const-ify a char*.
4346
4347         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
4348         (define_function, finish_builtin_type): Const-ify a char*.
4349         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
4350         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
4351         (file_name_nondirectory): Const-ify a char*.
4352         (init_filename_times): Don't prototype.
4353         (compiler_error): Prototype.
4354         (yyerror, init_repo): Const-ify a char*.
4355         (build_srcloc): Don't prototype.
4356         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
4357         Const-ify a char*.
4358         (warn_for_assignment): Don't prototype.
4359         (convert_for_initialization, readonly_error, check_for_new_type,
4360         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
4361         Const-ify a char*.
4362
4363         * decl2.c (acceptable_java_type, output_vtable_inherit,
4364         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
4365         merge_functions, decl_namespace, validate_nonmember_using_decl,
4366         do_nonmember_using_decl): Add static prototype.
4367         (lang_f_options): Const-ify a char*.
4368         (finish_builtin_type): Likewise.
4369         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4370         prototype.
4371
4372         * errfn.c: Include cp-tree.h.
4373         (cp_thing): Add static prototype.
4374         (compiler_error): Don't protoptype.
4375         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4376         passing it to `cp_thing'.
4377
4378         * error.c (interesting_scope_p): Add static prototype.
4379
4380         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4381         a char*.
4382
4383         * init.c (compiler_error): Don't prototype.
4384         (member_init_ok_or_else): Const-ify a char*.
4385         (build_java_class_ref): Add static prototype.
4386
4387         * lex.c (compiler_error): Don't prototype.
4388         (get_time_identifier, interface_strcmp, extend_token_buffer,
4389         handle_cp_pragma): Const-ify a char*.
4390         (is_global, init_filename_times): Add static prototype.
4391         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4392         (compiler_error): Change from fixed args to variable args.
4393         (yyerror): Const-ify a char*.
4394
4395         * parse.y (cond_stmt_keyword): Const-ify a char*.
4396         (parse_decl): Add static prototype.
4397
4398         * pt.c (template_args_equal, print_template_context): Likewise.
4399         (print_candidates, check_default_tmpl_args): Const-ify a char*.
4400         (instantiate_class_template): Likewise.
4401
4402         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4403
4404         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4405         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4406
4407         * search.c (lookup_field_info, lookup_member): Likewise.
4408         (lookup_member): Cast the first argument of `bzero' to a PTR.
4409
4410         * sig.c (compiler_error): Don't prototype.
4411         (build_signature_pointer_or_reference_nam): Const-ify a char*.
4412         (get_sigtable_name, build_member_function_pointer): Likewise.
4413
4414         * tree.c (compiler_error): Don't prototype.
4415         (no_linkage_helper, build_srcloc): Add static prototype.
4416         (build_vbase_pointer_fields): Const-ify a char*.
4417         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4418
4419         * typeck.c (compiler_error): Don't prototype.
4420         (convert_for_assignment): Const-ify a char*.
4421         (comp_cv_target_types): Add static prototype.
4422         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4423         build_component_addr, build_unary_op, convert_for_initialization):
4424         Const-ify a char*.
4425
4426         * typeck2.c (ack): Add static prototype and change from fixed args
4427         to variable args.
4428         (readonly_error, check_for_new_type): Const-ify a char*.
4429
4430         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4431         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4432         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
4433         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4434         gen_assign, GNU_xref_member): Const-ify a char*.
4435
4436 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4437
4438         * gxxint.texi: Remove old discussion on copying virtual bases.
4439
4440 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
4441
4442         * Make-lang.in: Remove all references to g++.o/g++.c.
4443         Link g++ from gcc.o.
4444
4445 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4446
4447         * decl2.c (comdat_linkage): Treat vtables like functions.
4448
4449 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
4450
4451         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4452
4453 1999-03-25  Nathan Sidwell  <nathan@acm.org>
4454
4455         * decl.c (init_decl_processing): Add `signed' type as a synonym
4456         for `int'.
4457
4458 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4459
4460         * typeck.c (common_type): Handle cv-qual unification for pointers
4461         to members.
4462
4463         * decl.c (unqualified_namespace_lookup): Return error_mark_node
4464         on error.
4465         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4466         * lex.c (do_identifier): If we got error_mark_node, call
4467         lookup_name again.
4468
4469 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4470
4471         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4472         classes.
4473
4474 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
4475
4476         * decl.c (lookup_name_real): Do nested field lookup regardless of
4477         TYPE_BEING_DEFINED.
4478
4479 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
4480
4481         * cp-tree.h (lang_type): Remove has_assignment and
4482         has_real_assignment.  Add befriending_classes.
4483         (TYPE_HAS_ASSIGNMENT): Remove.
4484         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4485         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4486         (lang_decl): Document.
4487         (DECL_BEFRIENDING_CLASSES): New macro.
4488         (FRIEND_NAME): Move declaration to more obvious location.
4489         (FRIEND_DECLS): Likewise.
4490         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4491         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4492         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4493         (grok_op_properties): Likewise.
4494         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4495         (add_friend): Likewise.  Don't do weird things with assignment
4496         operators.  Update DECL_BEFRIENDING_CLASSES.
4497         (add_friends): Don't do weird things with assignment operators.
4498         (make_friend_class): Likewise.  Update
4499         CLASSTYPE_BEFRIENDING_CLASSES.
4500         * pt.c (instantiate_class_template): Don't set
4501         TYPE_HAS_ASSIGNMENT.
4502         (tsubst_copy): Substitute the TREE_TYPE for more unary
4503         expressions.
4504         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4505         * search.c (protected_accessible_p): New function.
4506         (friend_accessible_p): Likewise.
4507         (accessible_p): Use them.
4508
4509 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4510
4511         * pt.c (convert_nontype_argument): Don't create things that aren't
4512         PTRMEM_CSTs when applying a qualification conversion to a
4513         PTRMEM_CST.
4514
4515 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4516
4517         * Makefile.in (OBJS): Don't mention hash.o.
4518         (OBJDEPS): Likewise.
4519
4520 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
4521
4522         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4523         * decl.c (expand_static_init): Make sure we don't add any after
4524         then.
4525
4526         * decl.c (cp_finish_decl): Move intelligence about handling
4527         DECL_COMDAT for variables from here...
4528         * decl2.c (comdat_linkage): ...to here.
4529         (maybe_make_one_only): Tweak.
4530         (import_export_decl): Call comdat_linkage for variables, too.
4531         (finish_file): Handle template statics properly.
4532
4533 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
4534
4535         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4536         Document internals of pointer-to-member-functions.
4537         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4538         (PFN_FROM_PTRMEMFUNC): Likewise.
4539         (build_type_conversion): Remove unused parameter.
4540         (build_ptrmemfunc1): Declare.
4541         (expand_ptrmemfunc_cst): New function.
4542         (delta2_from_ptrmemfunc): Likewise.
4543         (pfn_from_ptrmemfunc): Likewise.
4544         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4545         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
4546         (convert_to_reference): Remove unused parameter to
4547         build_type_conversion.
4548         (ocp_convert): Likewise.
4549         (build_user_type_conversion): Likewise.
4550         * error.c (dump_expr): Handle NULL pointer-to-member functions.
4551         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4552         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4553         open when handling pointer-to-member functions.
4554         * pt.c (convert_nontype_argument): Clean up error messages.  Be
4555         more stringent with pointers-to-members.
4556         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
4557         (build_unary_op): Tidy ever-so-slightly.
4558         (build_conditional_expr): Remove extra parameter to
4559         build_type_conversion.
4560         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4561         we're using.
4562         (expand_ptrmemfunc_cst): Define.
4563         (delta2_from_ptrmemfunc): Likewise.
4564         (pfn_from_ptrmemfunc): Likewise.
4565
4566 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
4567
4568         * init.c (build_member_call): Handle template-id expressions
4569         correctly.
4570         * typeck.c (build_x_function_call): Likewise.
4571
4572 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
4573
4574         * friend.c (make_friend_class): Avoid core dump when
4575         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4576
4577 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
4578
4579         * decl.c (start_function): Suppress normal linkage heuristics
4580         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4581
4582 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
4583
4584         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4585         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4586
4587 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4588
4589         * parse.y (named_complex_class_head_sans_basetype):
4590         Do not push a scope for error_mark_node.
4591         (maybe_base_class_list): Likewise.
4592
4593         * decl.c (start_decl): Check for error_mark_node as a type.
4594         Detected by g++.brendan/array-refs.C.
4595         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
4596         (maybe_build_cleanup_1): Likewise.  Detected by
4597         g++.jason/incomplete1.C.
4598
4599         * tree.c (build_dummy_object): Use void_zero_node instead of the
4600         error_mark_node.
4601         (is_dummy_object): Check for such a node.
4602         Detected by g++.bob/inherit1.C
4603
4604 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
4605
4606         * method.c (old_backref_index): Split out...
4607         (flush_repeats): From here.  Rename back from try_old_backref.
4608         (build_mangled_name): Put back some old-style repeat handling.
4609
4610 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4611
4612         * lex.c: Don't include setjmp.h.
4613         (parse_float): New static function.
4614         (pf_args): New struct.
4615         (real_yylex): Use them in call to `do_float_handler'.
4616
4617 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
4618
4619         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
4620         * tree.c (layout_basetypes): Not here.
4621         * search.c (dfs_search): Remove; no longer used.
4622
4623 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4624
4625         * decl2.c (validate_nonmember_using_decl): Issue sensible
4626         error-messages on bogus qualifiers.
4627
4628 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
4629
4630         * call.c (add_function_candidate): Fix uninitialized variable.
4631
4632         * Makefile.in (search.o): Add dependency on varray.h.
4633
4634 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
4635
4636         * decl.c (duplicate_decls): Use same_type_p.
4637         * method.c (try_old_backref): Renamed from flush_repeats.  Use
4638         same_type_p.  Don't try to handle repeats.  Return success.
4639         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
4640         calls from old-style code, too.
4641         (check_ktype): Use same_type_p.
4642         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
4643         (build_qualified_name): Simplify logic.
4644         (process_overload_item): Strip typedefs and quals at the top.
4645         (build_mangled_name_for_type_with_Gcode): Remove call to
4646         type_canonical_variant.
4647         (build_mangled_name): Likewise.  Remove support for old-style
4648         repeats, which have been disabled since 2.7.2.  Don't mess with
4649         TREE_USED.
4650         (build_decl_overload_real): Don't mess with TREE_USED.
4651
4652 1999-03-13  Nathan Sidwell  <nathan@acm.org>
4653
4654         * error.c (cp_printers): Add 'F' escape character.
4655         (dump_type_real): Remove TREE_LIST (fnargs) printing.
4656         Functionality moved to dump_parameters.
4657         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
4658         (dump_function_decl): Extend meaning of V parameter.  Use
4659         dump_parameters and dump_exception_spec.
4660         (dump_parameters): New static function.
4661         (dump_exception_spec): New static function.
4662         (fndecl_as_string): Change argument semantics.  Use
4663         dump_function_decl directly.
4664
4665         * sig.c (build_signature_table_constructor): Use cp_error.
4666
4667 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4668
4669         * semantics.c (finish_switch_cond): Handle error cases gracefully.
4670         Detected by g++.law/enum5.C.
4671
4672         * typeck.c (build_modify_expr): Check for errors after resolving
4673         offsets.  Detected by g++.brendan/static1.C.
4674
4675         * decl.c (complete_array_type): Ignore initial_value if it is an
4676         error.  Detected by g++.benjamin/17930.C.
4677
4678         * typeck2.c (process_init_constructor): Return error if one argument
4679         is in error.  Detected by g++.benjamin/13478.C.
4680
4681 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4682
4683         * decl.c (select_decl): Allow class templates when we need types.
4684         * decl2.c (ambiguous_decl): Likewise.
4685
4686 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4687
4688         * lex.c (do_identifier): Correct call to enforce_access.
4689         * search.c (accessible_p): Tweak comment.
4690
4691 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
4692
4693         * semantics.c (begin_class_definition): Call build_self_reference.
4694         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
4695
4696         * search.c (assert_canonical_unmarked): Fix typo in prototype.
4697
4698         * search.c (dfs_canonical_queue): New function.
4699         (dfs_assert_unmarked_p): Likewise.
4700         (assert_canonical_unmarked): Likewise.
4701         (access_in_type): Use it.
4702         (accessible_p): Likewise.  Walk the whole tree when umarking.
4703
4704         * sig.c (build_signature_table_constructor): Use accessible_p
4705         instead of compute_access.
4706
4707 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4708
4709         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
4710
4711 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
4712
4713         * cp-tree.h (flag_access_control): Declare.
4714         (TREE_VIA_PPUBLIC): Document.
4715         (DECL_NONSTATIC_MEMBER_P): New macro.
4716         (enforce_access): Return an indication of whether or not access
4717         was permitted.
4718         (build_self_reference): Change prototype.
4719         (compute_access): Replace with ...
4720         (accessible_p): New function.
4721         (dfs_walk): Change prototype.
4722         (dfs_unmark): Likewise.
4723         (markedp): Likewise.
4724         * call.c (enforce_access): Use accessible_p.
4725         * class.c (build_self_reference): Insert the declaration into the
4726         list of members for this type, and make it public.
4727         * decl.c (xref_basetypes): Avoid ill-timed recursion.
4728         * init.c (build_offset_ref): Use lookup_member, not three separate
4729         name-lookups.  Call enforce_access rather than checking for
4730         illegal accesses here.
4731         (resolve_offset_ref): Likewise.
4732         * lex.c (do_identifier): Likewise.
4733         * method.c (hack_identifier): Likewise.
4734         * parse.y (self_reference): Remove.
4735         (opt_component_decl_list): Don't use it.
4736         * parse.c: Regenerated.
4737         * pt.c (print_candidates): Generalize to handle lists of
4738         overloaded functions.
4739         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
4740         not set.
4741         (get_template_base): Use new calling convention for dfs_walk.
4742         * search.c: Include varray.h.  Add prototypes.
4743         (dfs_walk): Accept a data pointer to pass to the work functions.
4744         All callers changed.  All work functions changed.
4745         (breadth_first_search): Rename to bfs_walk, and make consistent
4746         with dfs_walk.
4747         (dfs_walk_real): New function.
4748         (canonical_binfo): New function.
4749         (context_for_name_lookup): Likewise.
4750         (shared_marked_p): Likewise.
4751         (shared_unmarked_p): Likewise.
4752         (lokup_field_queue_p): Likewise.
4753         (lookup_field_r): Generalize to handle both functions and fields.
4754         (lookup_field): Just call lookup_member.
4755         (lookup_fnfields): Likewise.
4756         (lookup_member): Move body of lookup_field here and generalize.
4757         (dfs_accessible_queue_p): Likewise.
4758         (dfs_accessible_p): Likewise.
4759         (dfs_access_in_type): Likewise.
4760         (access_in_type): Likewise.
4761         (compute_access): Remove, and replace with ...
4762         (accessible_p): New function.
4763         (vbase_types): Remove.
4764         (vbase_decl_ptr_intermediate): Likewise.
4765         (vbase_decl_ptr): Likewise.
4766         (vbase_init_result): Likewise.
4767         (closed_envelopes): Likewise.
4768         (bvtable): Likewise.
4769
4770 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4771
4772         * call.c (add_function_candidate): Check for proper number of args
4773         before checking the validity of those args.
4774
4775 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
4776
4777         * cp-tree.h (struct lang_type): Add anon_union field.
4778         (ANON_UNION_TYPE_P): Use it instead of examining type.
4779         (SET_ANON_UNION_TYPE_P): New macro.
4780         * decl.c (check_tag_decl): Use it.
4781
4782         * search.c (compute_access): Handle non-type contexts earlier, and
4783         handle NULL_TREE.
4784
4785         * tree.c (build_exception_variant): Use copy_to_permanent.
4786
4787         * decl2.c (setup_initp): Give statics with no priority the default
4788         priority here.
4789         (do_dtors, do_ctors, finish_file): Remove special handling of
4790         non-prioritized statics.
4791
4792 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
4793
4794         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
4795         * decl.c (make_typename_type): Don't issue an error if an
4796         immediate lookup fails; it migt be resolved later.
4797         * friend.c (is_friend): Add comment.
4798         * search.c (breadth_first_search): Add POSTFN and DATA
4799         parameters.  Tidy.  All callers changed.
4800         (lookup_field_queue_p): New function.
4801         (lookup_field_r): Likewise.
4802         (lookup_field_post): Likewise.
4803         (lookup_field): Use them, via breadth_first_search, instead of
4804         duplicating logic.
4805         (compute_access): Robustify.
4806         (lookup_fnfield_info): New structure.
4807
4808 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
4809
4810         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4811
4812 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
4813
4814         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
4815         cc happy.
4816
4817         * decl2.c (import_export_class): Also return if
4818         CLASSTYPE_INTERFACE_ONLY is set.
4819
4820 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4821
4822         * decl.c (push_overloaded_decl): Only overwrite the old binding if
4823         there was one.
4824         * decl2.c (do_local_using_decl): Fix loop termination.
4825
4826 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
4827
4828         * cp-tree.h (determine_specialization): Don't declare.
4829         * pt.c (determine_specialization): Make it static.  Eliminate
4830         complain parameter.  Note that decl is always non-NULL now, and
4831         simplify accordingly.
4832
4833         * decl.c (maybe_push_to_top_level): Always call
4834         push_cp_function_context.
4835         (pop_from_top_level): Always call pop_cp_function_context.
4836
4837 1999-02-26  Nathan Sidwell  <nathan@acm.org>
4838
4839         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
4840         diagnostics.
4841         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
4842         * init.c (build_new_1): Extra arg to complete_type_or_else.
4843         (build_delete): Likewise.
4844         * typeck.c (require_complete_type): Likewise.
4845         (pointer_int_sum): Likewise.
4846         (pointer_diff): Likewise.
4847         (build_component_ref): Likewise.
4848
4849         * typeck2.c (incomplete_type_error): Always use cp_error.
4850         Show declaration of undefined type, if appropriate.
4851         Deal with UNKNOWN_TYPE nodes.
4852
4853         * typeck.c (require_complete_type): Use TYPE_SIZE as
4854         size_zero_node to mean incomplete type.
4855         (require_complete_type_in_void): New function.
4856         (build_compound_expr): Call complete_type_in_void for LHS.
4857         (build_c_cast): Call complete_type_in_void for void cast.
4858         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
4859         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
4860         require_complete_type_in_void.  Call it.
4861         * cp-tree.h (require_complete_type_in_void): Prototype new function.
4862
4863         * typeck.c (convert_arguments): Use alternative format for
4864         function decls.  Don't require_complete_type here.  Simplify
4865         diagnostic printing.
4866         (convert_for_initialization): Don't require_complete_type on RHS yet.
4867         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
4868
4869         * call.c (build_over_call): Cope with qualified void return type.
4870         * semantics.c (finish_call_expr): Likewise.
4871         * typeck.c (build_function_call_real): Likewise.
4872         (c_expand_return): Likewise.
4873         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
4874
4875         * call.c (print_z_candidates): Use alternate print format, to be
4876         consistent with (pt.c) print_candidates.
4877         * method.c (hack_identifier): List candidate members.
4878         * search.c (lookup_field): Build ambiguous list, and show it, if
4879         ambiguous.
4880
4881 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
4882
4883         * typeck.c (decay_conversion): Don't confuse constant array
4884         variables with their initializers.
4885
4886         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
4887         merging decls.
4888         * pt.c (regenerate_decl_from_template): Tweak for clarity.
4889         (instantiate_decl): Mark a decl instantiated before regenerating
4890         it to avoid recursion.
4891         * tree.c (mapcar): Don't call decl_constant_value unless we know
4892         something is TREE_READONLY_DECL_P.
4893
4894         * class.c (check_for_override): Don't stop checking when we find
4895         the first overridden function.  Delete #if 0'd code.
4896         * search.c (get_matching_virtual): Likewise.
4897
4898 1999-02-25  Richard Henderson  <rth@cygnus.com>
4899
4900         * lang-specs.h: Define __FAST_MATH__ when appropriate.
4901
4902 1999-02-24  Mike Stump  <mrs@wrs.com>
4903
4904         * typeck.c (convert_for_assignment): Allow boolean integral constant
4905         expressions to convert to null pointer.
4906
4907 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4908
4909         * decl.c (lookup_namespace_name): Resolve namespace aliases.
4910
4911         * class.c (push_nested_class): Allow namespaces.
4912
4913         * decl2.c (set_decl_namespace): Add friendp parameter.
4914         * decl.c (grokfndecl): Pass it.
4915         (grokvardecl): Likewise.
4916         * cp-tree.h: Change declaration.
4917
4918 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
4919
4920         * pt.c (tsubst): Allow an array of explicit size zero.
4921
4922 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
4923
4924         * errfn.c: Change varargs code to look like toplev.c.
4925
4926         * method.c (process_modifiers): Don't prepend 'U' for char or
4927         wchar_t.
4928
4929 1999-02-20  Craig Burley  <craig@jcb-sc.com>
4930
4931         * Make-lang.in (cplib2.ready): Don't consider updating
4932         cplib2 stuff if the current directory isn't writable, as
4933         it won't work (such as during a `make install').
4934
4935 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
4936
4937         * decl2.c (start_objects): Make file scope constructors and
4938         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4939         ASM_OUTPUT_DESTRUCTOR are defined.
4940
4941 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
4942
4943         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4944         (fn_type_unification): Adjust prototype.
4945         (lookup_fnfields_1): Declare.
4946         * call.c (add_template_candidate_real): Adjust call to
4947         fn_type_unification.
4948         * class.c (add_method): Don't allow duplicate declarations of
4949         constructors or destructors.
4950         (resolve_address_of_overloaded_function): Remove unused variable.
4951         Adjust call to fn_type_unification.
4952         * decl.c (grokfndecl): Be more robust in the face of illegal
4953         specializations.
4954         * decl2.c (check_classfn): Remove hokey handling of member
4955         templates.
4956         * pt.c (determine_specialization): Improve comments.  Adjust to
4957         handle template argument deduction as per the standard.
4958         (check_explicit_specialization): Fix comment spacing.  Handle
4959         type-conversion operators correctly.  Improve error-recovery.
4960         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4961         (get_bindings_real): Simplify handling of static members.
4962         * search.c (lookup_fnfields_1): Make it have external linkage.
4963         * typeck.c (compparms): Fix comment.
4964         (build_unary_op): Don't try to figure out which template
4965         specialization is being referred to when when the address-of
4966         operator is used with a template function.
4967
4968 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4969
4970         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4971         keyword to match an analogous change at the top level.
4972
4973         * tree.c (lvalue_or_else): Likewise.
4974
4975 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
4976
4977         * decl.c (xref_basetypes): Comment.
4978         * pt.c (instantiate_class_template): Use xref_basetypes.
4979
4980 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
4981
4982         * cp-tree.h (tsubst): Change prototype.
4983         (tsubst_expr): Likewise.
4984         (tsubst_copy): Likewise.
4985         (type_unification): Remove prototype.
4986         * call.c (convert_default_arg): Adjust call to tsubst_expr.
4987         * class.c (resolve_address_of_overloaded_function): Just use
4988         fn_type_unification.
4989         * decl.c (grokdeclarator): Adjust call to tsubst.
4990         * method.c (build_template_parm_names): Likewise.
4991         * pt.c (GTB_VIA_VIRTUAL): New macro.
4992         (GTB_IGNORE_TYPE): Likewise.
4993         (resolve_overloaded_unification): Add `complain' parameter.
4994         (try_one_overload): Likewise.
4995         (tsubst_template_arg_vector): Likewise.
4996         (tsubst_template_parms): Likewise.
4997         (tsubst_aggr_type): Likewise.
4998         (tsubst_arg_types): Likewise.
4999         (tsubst_call_declarator_parms): Likewise.
5000         (unify): Remove explicit_mask.
5001         (type_unification_real): Likewise.
5002         (get_template_base_recursive): Likewise.
5003         (coerce_template_template_parms): Provide prototype.
5004         (tsubst_function_type): Likewise.
5005         (try_class_unification): New function.
5006         All callers changed to use new complain parameter.
5007         (get_template_base): Use try_class_unification.
5008         (unify): Adjust handling of classes derived from template types.
5009         (fn_type_unification): Substitute explicit arguments before
5010         unification.
5011
5012 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5013
5014         * decl.c (pushdecl): Remove dead code.
5015
5016 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
5017
5018         * decl2.c (finish_objects): Fix code I missed in previous change.
5019
5020 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
5021
5022         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
5023         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
5024
5025         * pt.c (maybe_process_partial_specialization): Complain about
5026         'template <>' on non-specialization.
5027
5028 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
5029
5030         * decl.c (grokdeclarator): Catch wierd declarators.
5031         * decl2.c (finish_file): Don't abort because of namespace parsing
5032         failure.
5033         (check_decl_namespace): Remove.
5034
5035 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
5036
5037         * cp-tree.h (get_template_base): Don't declare.
5038         (dfs_walk): Declare.
5039         (dfs_unmark): Likewise.
5040         (markedp): Likewise.
5041         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
5042         targs to get_template_base.
5043         (get_template_base_recursive): Move here from search.c.  Check to
5044         see that the base found can be instantiated to form the desired
5045         type.
5046         (get_template_base): Likewise.
5047         (get_class_bindings): Simplify.
5048         * search.c (get_template_base_recursive): Move to pt.c.
5049         (get_template_base): Likewise.
5050         (markedp): Make it global.
5051         (dfs_walk): Likewise.
5052         (dfs_unmark): Likewise.
5053
5054 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
5055
5056         * pt.c (maybe_process_partial_specialization): Complain about
5057         specialization in wrong namespace.
5058         * tree.c (decl_namespace_context): New fn.
5059
5060 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5061
5062         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
5063         * pt.c (coerce_template_template_parms): Handle nested
5064         template template parameters.
5065
5066 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
5067
5068         * typeck2.c: Update email addresses.
5069
5070 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5071
5072         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
5073         turned off.
5074
5075 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
5076
5077         * lex.c (retrofit_lang_decl): Split out...
5078         (build_lang_decl): From here.
5079         * decl.c (pushdecl): Call it for functions generated by the middle
5080         end that don't have DECL_LANG_SPECIFIC.
5081         * cp-tree.h: Declare it.
5082
5083         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
5084         (start_objects, finish_objects): Only use special
5085         init_priority code if the user specified a priority.
5086         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
5087         objects.
5088
5089 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
5090
5091         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
5092         mkstemp.o.  Get them from libiberty now.
5093         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
5094
5095 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5096
5097         * decl2.c (lang_decode_option): Use read_integral_parameter.
5098
5099 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
5100
5101         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
5102         before calling complete_type_or_else.
5103
5104 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5105
5106         * input.c (inline): Don't define, its handled by system.h.
5107
5108 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
5109
5110         * decl2.c: Don't define flag_no_ident here.  Don't process
5111         -f(no-)ident here.
5112         * cp-tree.h: Don't declare flag_no_ident here.
5113         * lang-specs.h: Map -Qn to -fno-ident.
5114
5115 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
5116
5117         * cp-tree.h (struct tree_binding): Replace scope field with a union.
5118         (BINDING_SCOPE): Adjust.
5119         * decl.c (BINDING_LEVEL): Adjust.
5120
5121 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
5122
5123         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
5124         member constants.
5125
5126         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
5127         a ctor initializer.
5128
5129         * tree.c (equal_functions): Fix name in prototype.
5130
5131         * decl.c (push_local_binding): Add FLAGS argument.
5132         (pushdecl, push_overloaded_decl): Pass it.
5133         * decl2.c (do_local_using_decl): Likewise.
5134         * cp-tree.h: Adjust prototype.
5135         * decl.c (poplevel): Fix logic.
5136
5137         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
5138         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
5139         (cat_namespace_levels): Don't loop forever.
5140
5141 1999-01-25  Richard Henderson  <rth@cygnus.com>
5142
5143         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
5144
5145 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
5146
5147         * class.c (resolve_address_of_overloaded_function): Mark the
5148         chosen function used.
5149
5150         * call.c (build_call): Make sure that a function coming in has
5151         been marked used already.
5152         * decl.c (expand_static_init): Call mark_used instead of
5153         assemble_external.
5154         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
5155         alloc_eh_object, expand_throw): Likewise.
5156         * init.c (build_builtin_delete_call): Likewise.
5157         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
5158         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5159         expand_generic_desc): Likewise.
5160
5161 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5162
5163         * tree.c (equal_functions): New function.
5164         (ovl_member): Call it.
5165
5166 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5167
5168         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
5169
5170 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5171
5172         * decl.c (decls_match): Return 1 if old and new are identical.
5173         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
5174
5175 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5176
5177         * decl.c (start_function): Make member functions one_only on windows.
5178         * decl2.c (import_export_decl): Likewise.
5179
5180         * decl.c (grokdeclarator): Don't complain about implicit int in
5181         a system header.  Change same-name field check to not complain in
5182         a system header instead of within extern "C".
5183
5184 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5185
5186         * cp-tree.h (PUSH_GLOBAL): New macro.
5187         (PUSH_LOCAL): Likewise.
5188         (PUSH_USING): Likewise.
5189         (namespace_bindings_p): Declare.
5190         (push_overloaded_decl): Likewise.
5191         * decl.c (push_overloaded_decl): Don't make it static.  Check for
5192         illegal declarations after using declarations here.
5193         (namespace_bindings_p): Likewise.
5194         (duplicate_decls): Don't consider declarations from different
5195         namespaces to be the same.
5196         (pushdecl): Use symbolic PUSH_ constants in calls to
5197         push_overloaded_decl.
5198         (push_overloaded_decl_1): Likewise.
5199         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
5200         (do_nonmember_using_decl): Check for illegal using declarations
5201         after ordinary declarations here.
5202         (do_local_using_decl): Call pushdecl to insert declarations.
5203
5204 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
5205
5206         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
5207
5208 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5209
5210         * tree.c (build_cplus_array_type_1): Don't call build_array_type
5211         for types involving template parameters.
5212
5213         * cp-tree.h (PARM_DECL_EXPR): Delete.
5214         (convert_default_arg): Change prototype.
5215         (check_default_argument): Declare.
5216         (search_tree): Likewise.
5217         * call.c (convert_default_arg): Take the function to which the
5218         default argument belongs as a parameter, and do any necessary
5219         instantiation here, instead of ...
5220         (build_over_call): Here.
5221         * decl.c (local_variable_p): New function.
5222         (check_default_argument): Likewise, split out and tidied from ...
5223         (grokparms): Here.
5224         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
5225         * pt.c (tsubst_call_declarator_parms): New function.
5226         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
5227         with CALL_EXPRs, rather than trying to be clever.
5228         (tsubst): Use tsubst_call_declarator_parms.
5229         * tree.c (search_tree): Don't make it static.
5230         * typeck.c (convert_arguments): Use new interface to
5231         convert_default_arg.
5232
5233 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
5234
5235         * error.c (dump_function_decl): Don't print the argument types for
5236         a function when the verbosity level is negative.
5237
5238         * call.c (build_over_call): Check format attributes at call-time.
5239
5240         * pt.c (tsubst_copy): Fix comment.
5241         (unify): Don't allow unification with variable-sized arrays.
5242
5243         * semantics.c (finish_stmt_expr): When processing a template make
5244         the BIND_EXPR long-lived.
5245
5246 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
5247
5248         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
5249         (import_export_vtable): Not here.
5250
5251 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5252
5253         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
5254         non-static member function.
5255
5256 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5257
5258         * class.c (instantiate_type): Only diagnose illegal address of member
5259         function if complaining.
5260
5261         * decl.c (lookup_name_real): Remove duplicate code.
5262
5263 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5264
5265         * tree.c (copy_template_template_parm): Use permanent_obstack.
5266
5267 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5268
5269         * pt.c (unify): Remove restrictions on deduction of argument
5270         of template template parameters.
5271
5272 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5273
5274         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
5275
5276         * class.c (resolve_address_of_overloaded_function): Show list of
5277         all candidates, when none of them match.
5278
5279 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
5280
5281         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
5282         definition of 'casting away const' in reinterpret_cast<>.
5283
5284 1999-01-18  Graham  <grahams@rcp.co.uk>
5285
5286         * cvt.c: Add include for decl.h, remove extern for
5287         static_aggregates which is now provided by decl.h.
5288
5289         * Makefile.in (cvt.o): Add dependency for decl.h and missing
5290         dependencies for convert.h and flags.h.
5291
5292 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5293
5294         * decl2.c (do_dtors): Set current location to that of the
5295         decl, for sensible diagnostics and debugging.
5296         (check_classfn): Issue `incomplete type' error, if
5297         class is not defined.
5298
5299 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5300
5301         * cp-tree.h: Add prototype for bound_pmf_p.
5302
5303 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5304             Manfred Hollstein <manfred@s-direktnet.de>
5305
5306         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
5307         -Wreturn-type.
5308
5309 1999-01-16  Nathan Sidwell  <nathan@acm.org>
5310
5311         * cp-tree.h (struct lang_type): Added has_mutable flag.
5312         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
5313         (TYPE_HAS_MUTABLE_P): New macro to read it.
5314         (cp_has_mutable_p): Prototype for new function.
5315         * class.c (finish_struct_1): Set has_mutable from members.
5316         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
5317         it contains a mutable.
5318         * typeck.c (cp_has_mutable_p): New function.
5319
5320 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
5321
5322         * pt.c (process_template_parm): Ignore top-level qualifiers on
5323         non-type parameters.
5324
5325         * decl.c (start_function): Use current_function_parms in the call
5326         to require_complete_type_for_parms, not the probably empty
5327         DECL_ARGUMENTS.
5328
5329 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
5330
5331         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
5332
5333         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
5334         that we don't suppress the other copies.
5335         * lex.c (handle_cp_pragma): Likewise.
5336
5337 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
5338
5339         * decl.c (grokdeclarator): Undo 1998-12-14 change.
5340         * tree.c (build_cplus_array_type_1): Likewise.
5341         * pt.c (instantiate_class_template): Remove misleading comment.
5342         (tsubst_aggr_type): Substitute if there are template parameters,
5343         regardless of whether or not they use template arguments.
5344         (unify): Likewise, but for unification.
5345
5346 1999-01-12  Richard Henderson  <rth@cygnus.com>
5347
5348         * cp-tree.h (flag_permissive): Declare extern.
5349
5350 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
5351
5352         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
5353         here.
5354         (lang_type): Add is_partial_instantiation.  Decrease width of
5355         dummy.
5356         (PARTIAL_INSTANTIATION_P): New macro.
5357         (OPERATOR_TYPENAME_P): Remove.
5358         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
5359         OPERATOR_TYPENAME_P.
5360         (grok_op_properties): Likewise.
5361         * friend.c (do_friend): Handle friends that are member functions
5362         correctly.
5363         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
5364         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
5365         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
5366         any more partial instantiation than is absolutely necessary for
5367         implicit typename.  Set PARTIAL_INSTANTIATION_P.
5368         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5369         * semantics.c (begin_class_definition): Handle partial
5370         specializations of a type that was previously partially
5371         instantiated.
5372
5373 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
5374
5375         * g++spec.c (LIBSTDCXX): Provide default definition.
5376         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5377
5378 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5379
5380         * Make-lang.in (g++.o): Depend on prefix.h.
5381
5382 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
5383
5384         * tree.c (bound_pmf_p): New fn.
5385         * typeck.c (build_c_cast): Use it.
5386
5387         * decl.c (grok_op_properties): Use same_type_p.
5388
5389 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5390
5391         * Makefile.in (cvt.o): Depend on toplev.h.
5392
5393         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5394
5395         * cvt.c: Include toplev.h.
5396
5397         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5398         definitions.
5399
5400         * init.c (expand_vec_init): Initialize variable `itype'.
5401
5402         * lex.c (yyerror): Cast the argument passed to a ctype function to
5403         an unsigned char.
5404
5405         * method.c (build_mangled_C9x_name): Wrap prototype and definition
5406         in "HOST_BITS_PER_WIDE_INT >= 64".
5407
5408         * typeck.c (build_binary_op): Mark parameter `convert_p' with
5409         ATTRIBUTE_UNUSED.
5410
5411 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
5412
5413         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5414         * tree.c (build_exception_variant): Don't crash on empty throw
5415         specs.
5416
5417 1998-12-18  DJ Delorie  <dj@cygnus.com>
5418
5419         * cvt.c (convert_to_reference): Check for both error_mark_node
5420         and NULL_NODE after call to convert_for_initialization.
5421
5422 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
5423
5424         * error.c (interesting_scope_p): New fn.
5425         (dump_simple_decl): Use it.
5426         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5427         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5428
5429 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
5430
5431         * class.c (resolve_address_of_overloaded_function): Do conversion
5432         to correct type here, rather than ...
5433         (instantiate_type): Here.
5434
5435         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5436         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5437         (decl_template_parm_p): Remove.
5438         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5439         parameter.
5440         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5441         * pt.c (push_inline_template_parms_recursive): Set it.
5442         (decl_template_parm_p): Remove.
5443         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5444         (process_template_parm): Set it.
5445
5446 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
5447
5448         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5449         if configured with cpplib.
5450
5451 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
5452
5453         * decl.c (poplevel): Make sure ns_binding is initialized.
5454
5455         * decl.c (finish_function): Undo inadvertent change in previous
5456         patch.
5457
5458 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
5459
5460         * class.c (pushclass): Tweak handling of class-level bindings.
5461         (resolve_address_of_overloaded_function): Update pointer-to-member
5462         handling.
5463         (instantiate_type): Likewise.
5464         * cvt.c (cp_convert_to_pointer): Likewise.
5465         * decl.c (pop_binding): Take the DECL to pop, not just the name.
5466         Deal with `struct stat' hack.
5467         (binding_level): Add to documentation.
5468         (push_binding): Clear BINDING_TYPE.
5469         (add_binding): New function.
5470         (push_local_binding): Use it.
5471         (push_class_binding): Likewise.
5472         (poplevel): Adjust calls to pop_binding.
5473         (poplevel_class): Likewise.
5474         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5475         declarations to current binding level.
5476         (push_class_level_binding): Likewise.
5477         (push_overloaded_decl): Adjust handling of OVERLOADs in local
5478         bindings.
5479         (lookup_namespace_name): Don't crash when confronted with a
5480         TEMPLATE_DECL.
5481         (lookup_name_real): Do `struct stat' hack in local binding
5482         contexts.
5483         (build_ptrmemfunc_type): Adjust documentation.
5484         (grokdeclarator): Don't avoid building real array types when
5485         processing templates unless really necessary.
5486         (finish_method): Adjust calls to pop_binding.
5487         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5488         not reparse_decl_as_expr.
5489         (build_expr_from_tree): Deal with a template-id as the function to
5490         call in a METHOD_CALL_EXPR.
5491         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5492         (maybe_adjust_types_For_deduction): Don't do peculiar things with
5493         METHOD_TYPEs here.
5494         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
5495         pointer-to-member types where necessary.
5496         * tree.c (build_cplus_array_type_1): Don't avoid building real
5497         array types when processing templates unless really necessary.
5498         (build_exception_variant): Compare the exception lists correctly.
5499
5500 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
5501
5502         * cp-tree.def (CPLUS_BINDING): Update documentation.
5503         * cp-tree.h (LOCAL_BINDING_P): New macro.
5504         (lang_identifier): Rename local_value to bindings.
5505         (tree_binding): Make `scope' of type `void*', not `tree'.
5506         (BINDING_SCOPE): Update documentation.
5507         (IDENTIFIER_LOCAL_VALUE): Remove.
5508         (IDENTIFIER_CLASS_VALUE): Document.
5509         (IDENTIFIER_BINDING): New macro.
5510         (IDENTIFIER_VALUE): Likewise.
5511         (TIME_IDENTIFIER_TIME): Likewise.
5512         (TIME_IDENTIFIER_FILEINFO): Likewise.
5513         (IMPLICIT_TYPENAME_P): Likewise.
5514         (set_identifier_local_value): Remove.
5515         (push_local_binding): New function.
5516         (push_class_binding): Likewise.
5517         * class.c (pushclass): Update comments; use push_class_binding.
5518         * decl.c (set_identifier_local_value_with_scope): Remove.
5519         (set_identifier_local_value): Likewise.
5520         (push_binding): New function.
5521         (pop_binding): Likewise.
5522         (binding_level): Update documentation.  Remove shadowed.
5523         (BINDING_LEVEL): New macro.
5524         (free_binding_nodes): New variable.
5525         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
5526         BLOCK_VARs when doing for-scope extension.  Remove effectively
5527         dead code.
5528         (pushlevel_class): Tweak formatting.
5529         (poplevel_class): Adjust for new name-lookup scheme.
5530         (print_binding_level): Likewise.
5531         (store_bindings): Likewise.
5532         (pushdecl): Likewise.
5533         (pushdecl_class_level): Likewise.
5534         (push_class_level_binding): Likewise.
5535         (push_overloaded_decl): Update comments.  Adjust for new
5536         name-lookup scheme.
5537         (lookup_name_real): Likewise.
5538         (lookup_name_current_level): Likewise.
5539         (cp_finish_decl): Likewise.
5540         (require_complete_types_for_parms): Likewise.  Remove misleading
5541         #if 0'd code.
5542         (grok_parms): Likewise.  Don't call
5543         require_complete_types_for_parms here.
5544         (grok_ctor_properties): Don't treat templates as copy
5545         constructors.
5546         (grop_op_properties): Or as assignment operators.
5547         (start_function): Document.  Adjust for new name-lookup scheme.
5548         (finish_function): Likewise.
5549         * decl2.c (do_local_using_decl): Use push_local_binding.
5550         * lex.c (begin_definition_of_inclass_inline): New function, split
5551         out from ...
5552         (do_pending_inlines): Here, and ...
5553         (process_next_inline): Here.
5554         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5555         (init_filename_times): Likewise.
5556         (extract_interface_info): Likewise.
5557         (ste_typedecl_interface_info): Likewise.
5558         (check_newline): Likewise.
5559         (dump_time_statistics): Likewise.
5560         (handle_cp_pragma): Likewise.
5561         (do_identifier): Adjust for new name-lookup scheme.
5562         * parse.y (function_try_block): Return ctor_initializer_opt value.
5563         (fndef): Use it.
5564         (fn.defpen): Pass appropriate values to start_function.
5565         (pending_inline): Use functor_try_block value, and pass
5566         appropriate values to finish_function.
5567         * pt.c (is_member_template): Update documentation; remove handling
5568         of FUNCTION_DECLs.  As per name, this function should deal only in
5569         TEMPLATE_DECLs.
5570         (decl_template_parm_p): Change name of olddecl parameter to decl.
5571         (check_template_shadow): Adjust for new name-lookup scheme.
5572         (lookup_template_class): Likewise.
5573         (tsubst_decl): Tweak so as not to confuse member templates with
5574         copy constructors and assignment operators.
5575         (unify): Handle UNION_TYPEs.
5576         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5577         (lang_print_xnode): Adjust for new name-lookup scheme.
5578         * typeck.c (mark_addressable): Likewise.
5579         (c_expand_return): Likewise.
5580
5581 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
5582
5583         * decl.c (grokdeclarator): Allow field with same name as class
5584         in extern "C".
5585
5586         * decl.c (lookup_name_real): Don't limit field lookup to types.
5587         * class.c (check_member_decl_is_same_in_complete_scope): No error
5588         if icv and x are the same.
5589         * lex.c (do_identifier): Tweak error message.
5590
5591 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5592
5593         * decl.c (start_enum): Use push_obstacks, not
5594         end_temporary_allocation.
5595         (finish_enum): Call pop_obstacks.
5596
5597 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5598
5599         * class.c (instantiate_type): Return error_mark_node rather than
5600         junk.
5601
5602 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5603
5604         * cp-tree.h (most_specialized_instantiation): New function.
5605         (print_candidates): Likewise.
5606         * class.c (validate_lhs): Remove.
5607         (resolve_address_of_overloaded_function): New function, split out
5608         and then substantially reworked, from ...
5609         (instantiate_type): Use it.  Simplify.
5610         * cvt.c (convert_to_reference): Complain when caller has indicated
5611         that's the right thing to do.  Don't crash if instantiate_type
5612         fails.
5613         * pt.c: Substitute `parameters' for `paramters' throughout.
5614         (print_candidates): Don't make it static.
5615         (most_specialized_instantiation): Split out from ...
5616         (most_specialized): Here.
5617
5618 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
5619
5620         * lex.c (lang_init_options): Initialize cpplib.
5621         * decl2.c (parse_options,cpp_initialized): Removed.
5622         (lang_decode_option): Move initialization of cpplib to
5623         lang_init_options.
5624
5625 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5626
5627         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
5628         well as the TYPE_DECL, when a typedef name is assigned to a
5629         previously anonymous type.
5630
5631 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
5632
5633         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
5634         __cp_eh_info for getting the eh info pointer.  Add table_index to
5635         field list.
5636         (push_eh_cleanup): Don't increment 'handlers' data field.
5637         (process_start_catch_block): Don't set the 'caught' field.
5638
5639         * cp/exception.cc (CP_EH_INFO): New macro for getting the
5640         exception info pointer within library routines.
5641         (__cp_eh_info): Use CP_EH_INFO.
5642         (__start_cp_handler): Get exception info pointer, set caught field,
5643         and increment the handlers field.  Avoids this being done by handlers.
5644         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
5645         (uncaught_exception): Use CP_EH_INFO macro.
5646
5647 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
5648
5649         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
5650
5651 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
5652
5653         * lex.c (check_newline): Add support for \ as `natural'
5654         characters in file names in #line to be consistent with #include
5655         handling.  We support escape processing in the # 1 "..." version of
5656         the command.  See also support in cp/lex.c.
5657
5658 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5659
5660         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
5661         structure.
5662
5663 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
5664
5665         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
5666
5667         * error.c (dump_simple_decl): Also print namespace context.
5668         (dump_function_decl): Likewise.
5669
5670         * decl2.c (ambiguous_decl): Don't print old value if it's
5671         error_mark_node.
5672
5673         * decl.c (lookup_name_real): Fix handling of local types shadowed
5674         by a non-type decl.  Remove obsolete code.
5675         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
5676
5677         * lang-options.h: Add -fpermissive.
5678         * decl2.c: Likewise.
5679         * cp-tree.h: Add flag_permissive.
5680         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
5681         were specified, set flag_pedantic_errors.
5682         * call.c (build_over_call): Turn dropped qualifier messages
5683         back into pedwarns.
5684         * cvt.c (convert_to_reference): Likewise.
5685         * typeck.c (convert_for_assignment): Likewise.
5686
5687 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
5688
5689         * decl2.c (coerce_new_type): Use same_type_p.
5690         (coerce_delete_type): Likewise.
5691
5692         * call.c (check_dtor_name): Return 1, not error_mark_node.
5693
5694 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
5695
5696         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
5697         if MULTIPLE_SYMBOL_SPACES.
5698
5699         * pt.c (check_template_shadow): New fn.
5700         * decl2.c (grokfield): Use it.
5701         * decl.c (pushdecl): Likewise.
5702         (pushdecl_class_level): Likewise.
5703         (start_method): Likewise.
5704         (xref_tag): Don't try to use 't' if we're defining.
5705
5706         * call.c (check_dtor_name): Just return an error_mark_node.
5707         * pt.c (lookup_template_class): Complain about using non-template here.
5708         * parse.y (apparent_template_type): Not here.
5709
5710         * pt.c (check_explicit_specialization): Complain about specialization
5711         with C linkage.
5712
5713         * lang-options.h: Add -f{no-,}implicit-inline-templates.
5714
5715         * pt.c (convert_nontype_argument): Don't assume that any integer
5716         argument is intended to be a constant-expression.
5717
5718 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
5719
5720         * class.c (handle_using_decl): Fix comment.  Don't lookup
5721         constructors in base classes.
5722         (validate_lhs): Fix typo in comment.
5723         * search.c (lookup_field_1): Don't return a USING_DECL.
5724
5725         * cp-tree.h (DECL_ACCESS): Improve documentation.
5726
5727         * decl.c (expand_static_init): Don't set the initialization-done
5728         flag until the initialization is done.
5729
5730 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
5731
5732         * decl2.c (validate_nonmember_using_decl): Complain about using
5733         declarations for class members.
5734
5735 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
5736
5737         * typeck2.c (process_init_constructor): Use same_type_p.
5738
5739         * decl.c (check_tag_decl): Don't warn about null decl inside a
5740         class.
5741
5742         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
5743         UNIFY_ALLOW_NONE.
5744         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
5745         (resolve_overloaded_unification): Strip baselinks.
5746
5747 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5748
5749         * g++spec.c: Don't prototype xmalloc.
5750
5751 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
5752
5753         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
5754
5755         * decl.c (check_tag_decl): Do complain about null friend decl at
5756         file scope.
5757
5758 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5759
5760         * lex.c (make_lang_type): Clear the whole struct lang_type, not
5761         only the first multiple of sizeof (int).
5762
5763 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5764
5765         * decl.c (start_decl): An explicit specialization of a static data
5766         member is only a definition if it has an initializer.
5767
5768         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
5769         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
5770         cp_finish_decl.
5771         * init.c (expand_default_init): Check for DIRECT_BIND instead of
5772         DECL_ARTIFICIAL.
5773
5774         * call.c (build_over_call): Use build_decl.
5775
5776         * except.c (expand_throw): Just use convert, not
5777         build_reinterpret_cast.
5778
5779         * lex.c (handle_generic_pragma): Use token_buffer.
5780
5781         * decl.c (check_tag_decl): Don't complain about null friend decl.
5782
5783 1998-11-24  Dave Pitts  <dpitts@cozx.com>
5784
5785         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
5786         first position.
5787         * lex.c (check_newline): Use ISALPHA.
5788         (readescape): Use ISGRAPH.
5789         (yyerror): Use ISGRAPH.
5790
5791 1998-11-24  Nathan Sidwell  <nathan@acm.org>
5792
5793         * search.c (get_abstract_virtuals): Do not use initial
5794         CLASSTYPE_ABSTRACT_VIRTUALS.
5795         * typeck2.c (abstract_virtuals_error): Show location of abstract
5796         declaration.
5797         * call.c (build_new_method_call): Use
5798         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
5799         * class.c (finish_struct_bits): Don't bother working out whether
5800         get_abstract_virtuals will do anything, just do it.
5801
5802 1998-11-24  Graham  <grahams@rcp.co.uk>
5803
5804         * typeck.c (build_component_ref): Remove unused statement.
5805
5806 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5807
5808         * class.c (add_method): Catch invalid overloads.
5809
5810         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
5811         * search.c (lookup_conversions): Handle getting real OVERLOADs.
5812         (add_conversions): Likewise.  Revert last change.
5813         * call.c (add_conv_candidate): Pass totype to add_candidate instead
5814         of fn.  Don't add a new candidate if the last one was for the same
5815         type.
5816         (print_z_candidates): Handle getting a type as a function.
5817         (joust): If we got two conversion candidates to the same type,
5818         just pick one.
5819         (build_object_call): Lose 'templates'.
5820         (build_user_type_conversion_1): Handle getting real OVERLOADs.
5821
5822 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5823
5824         * typeck2.c (process_init_constructor): If there are elements
5825         that don't have initializers and they need to have constructors
5826         run, supply them with initializers.
5827
5828         * class.c (finish_struct_1): A class with a 0-width bitfield is
5829         still empty.
5830
5831 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
5832
5833         * pt.c (instantiate_class_template): Don't try to figure out what
5834         specialization to use for a partial instantiation.  Correct
5835         typos in a couple of comments.  Avoid calling uses_template_parms
5836         multiple times.
5837
5838 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
5839
5840         * method.c (process_overload_item): Add call to
5841         build_mangled_C9x_name for intTI_type_nodes.
5842         (build_mangled_C9x_name): Add prototype, define.
5843         * decl.c (init_decl_processing): Add names for
5844         TImode_type_node.
5845
5846 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5847
5848         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
5849
5850         * class.c (finish_struct_1): Set things up for 0-width bitfields
5851         like we do for others.
5852
5853         * decl.c (check_tag_decl): New fn.
5854         (shadow_tag): Split out from here.
5855         * decl2.c (grok_x_components): Call it.
5856
5857 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
5858
5859         * decl.c: Lose warn_about_return_type.
5860         (grokdeclarator): Always complain about implicit int, except for
5861         `main () { ... }'.
5862
5863         * decl.c (tag_name): New fn.
5864         (xref_tag): Complain about using typedef-name after class-key.
5865
5866         * init.c (expand_vec_init): Also keep going if from_array.
5867
5868         * tree.c (is_overloaded_fn): Also handle the output of
5869         build_offset_ref.
5870
5871         * decl.c (grokdeclarator): Use constructor_name when comparing
5872         field name against enclosing class.
5873         * class.c (finish_struct_anon): Likewise.
5874
5875 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
5876
5877         * decl.c (poplevel): Remove code to handle KEEP == 2.
5878         (finish_function): Don't confuse BLOCK-order when
5879         processing a destructor.
5880
5881 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5882
5883         * decl.c (require_complete_types_for_parms): Call layout_decl
5884         after we've completed the type.
5885
5886 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5887
5888         * decl2.c (validate_nonmember_using_decl): Allow using templates
5889         from the global namespace.
5890
5891 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5892
5893         Handle specifying template args to member function templates.
5894         * tree.c (build_overload): Always create an OVERLOAD for a template.
5895         * search.c (add_conversions): Handle finding an OVERLOAD.
5896         * decl2.c (check_classfn): Likewise.
5897         * lex.c (identifier_type): See through a baselink.
5898         * parse.y (do_id): Don't call do_identifier if we got a baselink.
5899         * class.c (instantiate_type, case TREE_LIST): Recurse.
5900
5901         * decl.c (grokdeclarator): Allow a boolean constant for array
5902         bounds, odd as that sounds.
5903
5904         * pt.c (unify): Be more strict about non-type parms, except for
5905         array bounds.
5906         (UNIFY_ALLOW_INTEGER): New macro.
5907
5908 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
5909
5910         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
5911
5912 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
5913
5914         * semantics.c (begin_class_definition): Call
5915         maybe_process_partial_specialization before push_template_decl.
5916         Don't call push_template_decl for a specialization.
5917         * search.c (lookup_field): Do return a member template class.
5918         * decl2.c (handle_class_head): Handle member template classes.
5919
5920         * decl.c (grokdeclarator): A parm type need not be complete.
5921
5922         * pt.c (convert_nontype_argument): Fix thinko.
5923
5924 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5925
5926         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5927         (global_delete_fndecl): New variable.
5928         * decl.c (global_delete_fndecl): Define it.
5929         (init_decl_processing): Set it.
5930         * init.c (build_builtin_delete_call): Use it.
5931         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5932         nodes.
5933
5934 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5935
5936         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5937         type.
5938
5939         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5940         * call.c (build_object_call): Also support references to functions.
5941         * typeck.c (convert_for_initialization): Don't decay a function
5942         if the target is a reference to function.
5943
5944         * search.c (add_conversions): Get all the overloads from a class.
5945
5946         * decl.c (grok_ctor_properties): Complain about any constructor
5947         that will take a single arg of the class type by value.
5948
5949         * typeck2.c (build_functional_cast): Can't create objects of
5950         abstract classes this way.
5951         * cvt.c (ocp_convert): Likewise.
5952
5953         * decl.c (grokfndecl): Member functions of local classes are not
5954         public.
5955
5956 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5957
5958         * Make-lang.in (cc1plus): Add dependency on hash.o.
5959
5960 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5961
5962         * search.c (get_abstract_virtuals): Complain about virtuals with
5963         no final overrider.
5964         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5965         with no final overrider.
5966         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5967         on virtuals with no final overrider.
5968
5969         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5970
5971         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5972         after layout_type.
5973
5974         * friend.c (do_friend): Don't set_mangled_name_for_decl.
5975
5976         * class.c (finish_struct_anon): Complain about non-fields.
5977         * decl2.c (build_anon_union_vars): Likewise.
5978
5979         * decl.c (grokdeclarator): Normal data members can't have the same
5980         name as the class, either.
5981         * class.c (finish_struct_anon): Neither can members of an
5982         anonymous union.
5983
5984 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
5985
5986         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5987         (TYPE_BINFO): Likewise.
5988         (IS_AGGR_TYPE): Tweak.
5989         (SET_IS_AGGR_TYPE): New macro.
5990         (CLASS_TYPE_P): Tweak.
5991         (lang_type): Group mark bitfields together.  Remove linenum.
5992         (CLASSTYPE_SOURCE_LINE): Remove macro.
5993         (CLASSTYPE_MARKED_N): New macro.
5994         (SET_CLASSTYPE_MARKED_N): Likewise.
5995         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5996         (CLASS_TYPE_MARKED_*): Use them.
5997         (SET_CLASSTYPE_MARKED_*): Likewise.
5998         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5999         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6000         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
6001         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
6002         * class.c (class_cache_obstack): New variable.
6003         (class_cache_firstobj): Likewise.
6004         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
6005         (pushclass): Free the cache, when appropriate.
6006         (popclass): Tidy.
6007         (maybe_push_cache_obstack): Use class_cache_obstack.
6008         * decl.c (include hash.h).
6009         (typename_hash): New function.
6010         (typename_compare): Likewise.
6011         (build_typename_type): Check the hash table to avoid creating
6012         duplicates.
6013         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
6014         (grokdeclarator): Use CLASS_TYPE_P.
6015         (xref_basetypes): Likewise.
6016         (start_function): Likewise.  Don't put current_class_ref on the
6017         permanent obstack.
6018         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
6019         and TYPE_TI_ARGS.
6020         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
6021         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
6022         fields for types other than class types.  Do clear TYPE_ALIAS_SET
6023         for types other than class types, though.
6024         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
6025         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6026         * pt.c (process_template_parm): Don't set
6027         CLASSTYPE_GOT_SEMICOLON.
6028         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6029         Coerce arguments on the momentary obstack.
6030         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6031         (instantiate_class_template): Calculate template arguments on the
6032         momentary obstack.  Tidy.
6033         (tsubst_template_arg_vector): Use make_temp_vec.
6034         (tsubst_aggr_type): Put template arguments on the momentary
6035         obstack.
6036         (tsubst_decl): Likewise.
6037         (tsubst): Copy the array bounds index to the permanent obstack
6038         before building index types.  Use new macros.
6039         (unify): Use new macros.
6040         (do_type_instantiation): Likewise.
6041         * search.c (lookup_fnfields_1): Use new macros.
6042         (dfs_pushdecls): Build envelopes on the cache obstack.
6043         (dfs_compress_decls): Use new macros.
6044         (push_class_decls): Build on the cache obstack.
6045         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
6046         * sign.c (build_signature_pointer_or_reference_type): Use
6047         SET_IS_AGGR_TYPE.
6048         * tree.c (make_binfo): Check CLASS_TYPE_P.
6049         (copy_template_template_parm): Adjust.
6050         (make_temp_vec): Use push_expression_obstack.
6051         * typeck.c (complete_type): Use new macros.
6052         (comptypes): Likewise.
6053
6054 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
6055
6056         * pt.c (tsubst): Add diagnostics for invalid array, reference
6057         and pointer to member types.
6058
6059 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6060
6061         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
6062
6063         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
6064         Simplify.
6065
6066         * parse.y (structsp): Fix cut-and-paste error.
6067
6068         * init.c (build_new): Complain about non-integral size.
6069
6070         * parse.y (unary_expr): Complain about defining types in sizeof.
6071
6072         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
6073
6074         * rtti.c (build_x_typeid): Complain about typeid without
6075         including <typeinfo>.
6076         (get_typeid): Likewise.  Complain about typeid of incomplete type.
6077         (get_tinfo_fn_dynamic): Likewise.
6078         (get_typeid_1): Not static anymore.
6079         * except.c (build_eh_type_type): Use get_typeid_1.
6080
6081         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
6082         ambiguous or private bases.  Fix warning for reference cast.
6083
6084 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
6085
6086         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
6087         * decl.c (duplicate_decls): Remove special-case code to deal with
6088         template friends, and just do the obvious thing.
6089         * pt.c (register_specialization): Tweak for clarity, and also to
6090         clear DECL_INITIAL for an instantiation before it is merged with a
6091         specialization.
6092         (check_explicit_specialization): Fix indentation.
6093         (tsubst_friend_function): Handle both definitions in friend
6094         declaration and outside friend declarations.
6095         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
6096         (regenerate_decl_from_template): Tweak accordingly.
6097         (instantiate_decl): Likewise.
6098
6099 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6100
6101         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
6102         member function reference to error.
6103         * cvt.c (ocp_convert): Complain about converting an overloaded
6104         function to void.
6105
6106         * init.c (build_offset_ref): Just return a lone static member
6107         function.
6108
6109         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
6110         not internal ones.
6111
6112         * typeck.c (build_binary_op_nodefault): Improve error handling.
6113
6114         * decl.c (grokfndecl): Complain about making 'main' a template.
6115
6116         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
6117
6118         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
6119         TYPE_DECL in a template.
6120
6121 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
6122
6123         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
6124
6125         * decl.c (struct cp_function): Add named_label_uses.
6126         (push_cp_function_context): Save it.
6127         (pop_cp_function_context): Restore it.
6128         (define_label): Also complain about jumping into the scope of
6129         non-POD objects that don't have constructors.
6130         * tree.c (pod_type_p): New fn.
6131
6132         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
6133         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
6134         (get_tinfo_fn): Not here.
6135         * repo.c (repo_get_id): Abort if we get called for an incomplete
6136         type.
6137
6138 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
6139
6140         * except.c (expand_throw): Make sure first argument to
6141         __cp_push_exception is of type `void*' to avoid spurious error
6142         messages.
6143
6144 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
6145
6146         * pt.c (try_one_overload): Take orig_targs again.  Only check for
6147         mismatches against them; we don't care what a previous call found.
6148         (resolve_overloaded_unification): Adjust.
6149
6150         * search.c (lookup_field): Don't return anything for a non-type
6151         field from a dependent type.
6152         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
6153         in an array declarator.
6154         (start_decl): Push into the class before looking for the field.
6155
6156 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
6157
6158         * method.c (build_overload_value): Handle REFERENCE_TYPE.
6159
6160 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6161
6162         * decl.c (grokdeclarator): Allow namespace-scoped members if they
6163         are friends.
6164
6165 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
6166
6167         * pt.c (tsubst_decl): Don't mess with the global value of an
6168         un-mangled DECL_ASSEMBLER_NAME.
6169
6170 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
6171
6172         * decl.c (init_decl_processing): Remove CYGWIN conditional
6173         since CYGWIN is now able to deal with trapping signals.
6174
6175 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6176
6177         * cp-tree.h: Don't include gansidecl.h.
6178         * exception.cc: Include gansidecl.h (since we don't include config.h)
6179         * g++spec.c: Don't include gansidecl.h.
6180
6181 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
6182
6183         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
6184         size of dummy.
6185         (DECL_DEFINED_IN_CLASS_P): New macro.
6186         (TEMPLATE_PARMS_FOR_INLINE): Document.
6187         (check_static_variable_definition): New function.
6188         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
6189         appropriate.
6190         (check_static_variable_definition): Split out from ...
6191         (grokdeclarator): Here.
6192         * pt.c (check_default_tmpl_args): New function, split out from ...
6193         (push_template_decl_real): Here.
6194         (instantiate_template): Fix comment.
6195
6196 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
6197
6198         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
6199         (CP_TYPE_VOLATILE_P): Likewise.
6200         (CP_TYPE_RESTRICT_P): Likewise.
6201
6202 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
6203
6204         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
6205
6206 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
6207
6208         * class.c (instantiate_type): Be more helpful.
6209
6210         * decl2.c (import_export_decl): Call import_export_class.
6211
6212         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
6213         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
6214         * pt.c (tsubst_copy): Likewise.
6215
6216 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
6217
6218         * init.c (expand_vec_init): Fix off-by-one error.
6219
6220 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
6221
6222         * parse.y (apparent_template_type): New type.
6223         (named_complex_class_head_sans_basetype): Use it.
6224         * Makefile.in (CONFLICTS): One new conflict.
6225         * parse.c: Regenerated.
6226
6227 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
6228
6229         * cp-tree.h (COMPARE_STRICT): New macro.
6230         (COMPARE_BASE): Likewise.
6231         (COMPARE_RELAXED): Likewise.
6232         (COMPARE_REDECLARATION): Likewise.
6233         (same_type_p): Likewise.
6234         (same_or_base_type_p): Likewise.
6235         * call.c (standard_conversion): Use them, in place of comptypes
6236         with numeric arguments.
6237         (reference_binding): Likewise.
6238         (convert_like): Likewise.
6239         (build_over_call): Likewise.
6240         (is_subseq): Likewise.
6241         (is_properly_derived_from): Likewise.
6242         (compare_ics): Likewise.
6243         (joust): Likewise.
6244         * class.c (delete_duplicate_fields_1): Likewise.
6245         (resolves_to_fixed_type_p): Likewise.
6246         (instantiate_type): Likewise.  Remove #if 0'd code.
6247         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
6248         (pushdecl): Likewise.
6249         (lookup_name_real): Likewise.
6250         (grokdeclarator): Likewise.  Check for illegal array declarations.
6251         (grokparms): Likewise.
6252         (grok_op_properties): Likewise.
6253         * decl2.c (check_classfn): Likewise.
6254         * friend.c (is_friend): Likewise.
6255         (make_friend_class): Likewise.
6256         * init.c (expand_aggr_init): Likewise.
6257         (expand_vec_init): Likewise.
6258         * pt.c (is_member_template_class): Remove declaration.
6259         (is_specialization_of): Use COMPARE_* and new macros.
6260         (comp_template_parms): Likewise.
6261         (convert_nontype_argument): Likewise.
6262         (coerce_template_template_parms): Likewise.
6263         (template_args_equal): Likewise.
6264         (lookup_template_class): Likewise.
6265         (type_unification_real): Likewise.
6266         (unify): Likewise.
6267         (get_bindings_real): Likewise.
6268         * search.c (covariant_return_p): Likewise.
6269         (get_matching_virtual): Likewise.
6270         * sig.c (match_method_types): Likewise.
6271         * tree.c (vec_binfo_member): Likewise.
6272         (cp_tree_equal): Likewise.
6273         * typeck.c (common_type): Likewise.
6274         (comp_array_types): Likewise.  Get issues involving unknown array
6275         bounds right.
6276         (comptypes): Update comments.  Use new flags.
6277         (comp_target_types): Use new macros.
6278         (compparms): Likewise.
6279         (comp_target_parms): Likewise.
6280         (string_conv_p): Likewise.
6281         (build_component_ref): Likewise.
6282         (build_indirect_ref): Likewise.
6283         (build_conditional_expr): Likewise.
6284         (build_static_cast): Likewise.
6285         (build_reinterpret_cast): Likewise.
6286         (build_const_cast): Likewise.
6287         (build_modify_expr): Likewise.
6288         (convert_for_assignment): Likewise.
6289         (comp_ptr_ttypes_real): Likewise.
6290         (ptr_reasonably_similar): Likewise.
6291         (comp_ptr_ttypes_const): Likewise.
6292
6293 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
6294
6295         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
6296
6297 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
6298
6299         * decl2.c (delete_sanity): Pass integer_zero_node, not
6300         integer_two_node, to build_vec_delete.
6301         * init.c (build_array_eh_cleanup): Remove.
6302         (expand_vec_init_try_block): New function.
6303         (expand_vec_init_catch_clause): Likewise.
6304         (build_vec_delete_1): Don't deal with case that auto_delete_vec
6305         might be integer_two_node anymore.
6306         (expand_vec_init): Rework for initialization-correctness and
6307         exception-correctness.
6308         * typeck2.c (process_init_constructor): Make mutual exclusivity
6309         of cases more obvious.
6310
6311 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
6312
6313         * decl.c (lookup_name_real): OK, only warn if not lexing.
6314         Simplify suggested fix.
6315
6316         * cp-tree.h (IDENTIFIER_MARKED): New macro.
6317         * search.c (lookup_conversions): Use breadth_first_search.
6318         (add_conversions): Avoid adding two conversions to the same type.
6319         (breadth_first_search): Work with base binfos, rather
6320         than binfos and base indices.
6321         (get_virtual_destructor): Adjust.
6322         (tree_has_any_destructor_p): Adjust.
6323         (get_matching_virtual): Adjust.
6324
6325         * pt.c (push_template_decl_real): Generalize check for incorrect
6326         number of template parms.
6327         (is_member_template_class): #if 0.
6328
6329 1998-10-29  Richard Henderson  <rth@cygnus.com>
6330
6331         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
6332         last.
6333
6334 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6335
6336         * lex.c: Call check_newline from lang_init always.  After
6337         calling cpp_start_read, set yy_cur and yy_lim to read from the
6338         cpplib token buffer.
6339
6340 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
6341
6342         * class.c (instantiate_type): Don't consider templates for a normal
6343         match.
6344
6345         * class.c (finish_struct_1): Don't complain about non-copy
6346         assignment ops in union members.
6347
6348         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
6349         (prepare_fresh_vtable): Likewise.
6350         (finish_struct_1): Don't call import_export_class.
6351         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
6352         (finish_prevtable_vardecl): Lose.
6353         (finish_file): Don't call it.
6354         * pt.c (instantiate_class_template): Likewise.
6355         * cp-tree.h: Remove it.
6356
6357         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
6358         * decl.c (finish_function): Not here.
6359         (start_function): Do set DECL_INITIAL.
6360
6361         * pt.c (push_template_decl_real): Complain about default template
6362         args for enclosing classes.
6363
6364         * call.c (add_function_candidate): Treat conversion functions
6365         as coming from the argument's class.
6366         * cp-tree.h (DECL_CONV_FN_P): New fn.
6367         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6368         * class.c (add_method): Use DECL_CONV_FN_P.
6369         * decl2.c (check_classfn): Likewise.
6370         * error.c (dump_function_name): Likewise.
6371         (dump_function_decl): Likewise.
6372         * pt.c (fn_type_unification): Likewise.
6373         * search.c (add_conversions): Likewise.
6374
6375 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6376
6377         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6378         * method.c (hack_identifier): Also check for using RESULT_DECL
6379         from outer context.
6380
6381 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
6382
6383         * decl.c (grokdeclarator): Use type_quals, rather than constp,
6384         consistently.
6385
6386 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6387
6388         * call.c (standard_conversion): instantiate_type here.
6389         (reference_binding): And here.
6390         (implicit_conversion): Not here.
6391         (build_op_delete_call): No need to cons up an OVERLOAD.
6392         * cvt.c (cp_convert_to_pointer): instantiate_type here.
6393         (convert_to_reference): And here.
6394         * decl.c (grok_reference_init): Not here.
6395         (grokparms): Or here.
6396         * typeck2.c (digest_init): Or here.
6397         * typeck.c (decay_conversion): Take the address of overloaded
6398         functions, too.
6399         (require_instantiated_type): Lose.
6400         (convert_arguments): Don't handle unknown types here.
6401         (build_c_cast): Likewise.
6402         (build_binary_op): Gut.
6403         (build_conditional_expr): Don't require_instantiated_type.
6404         (build_modify_expr): Likewise.
6405         (build_static_cast): Don't instantiate_type.
6406         (build_reinterpret_cast): Likewise.
6407         (build_const_cast): Likewise.
6408         (convert_for_initialization): Likewise.
6409         (build_ptrmemfunc): Use type_unknown_p.
6410         (convert_for_assignment): Also do default_conversion on overloaded
6411         functions.  Hand them off to ocp_convert.
6412
6413 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
6414
6415         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6416         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
6417
6418         * class.c (finish_struct_1): Use build_cplus_array_type to build
6419         array types.
6420         * decl.c (init_decl_processing): Likewise.
6421         * except.c (expand_end_eh_spec): Likewise.
6422         * search.c (expand_upcast_fixups): Simplify very slightly.
6423
6424 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6425
6426         * decl.c (grokdeclarator): Complain about a variable using
6427         constructor syntax coming back null from start_decl.
6428
6429         * friend.c (make_friend_class): Complain about trying to make
6430         a non-class type a friend.
6431
6432         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6433         (start_function): Not here.
6434
6435 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
6436
6437         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6438
6439 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6440
6441         * typeck2.c (process_init_constructor): Only skip anonymous fields
6442         if they are bitfields.
6443
6444         * cp-tree.def (TYPEOF_TYPE): New code.
6445         * error.c (dump_type_real): Handle it.
6446         * pt.c (tsubst): Likewise.
6447         * tree.c (search_tree): Likewise.
6448         * semantics.c (finish_typeof): New fn.
6449         * parse.y (typespec): Use it.
6450         * cp-tree.h: Declare it.
6451
6452 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
6453
6454         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6455
6456 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6457
6458         * typeck.c (convert_arguments): Don't handle pmf references
6459         specially.
6460
6461         * init.c (build_member_call): Don't try to convert to the base type
6462         if it's ambiguous or pedantic.
6463
6464         * typeck2.c (check_for_new_type): Only depend on pedantic for
6465         C-style casts.
6466
6467 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
6468
6469         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6470         non-converting constructors.
6471
6472 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6473
6474         * gxxint.texi: Correct documentation for n, N, Q, and B.
6475
6476 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6477
6478         * parse.y (condition): Convert VAR_DECL from reference to indirect
6479         reference.
6480
6481 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
6482
6483         * exception.cc (__cp_pop_exception): Free the original exception
6484         value, not the potentially coerced one.
6485
6486 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
6487
6488         * Makefile.in (hash.h): Run gperf when necessary.
6489
6490         * cp-tree.h (CP_TYPE_READONLY): Remove.
6491         (CP_TYPE_VOLATILE): Likewise.
6492         (CP_TYPE_QUALS): New macro.
6493         (CP_TYPE_CONST_P): Likewise.
6494         (CP_TYPE_VOLATILE_P): Likewise.
6495         (CP_TYPE_RESTRICT_P): Likewise.
6496         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6497         (cp_build_type_variant): Rename to ...
6498         (cp_build_qualified_type): New function.
6499         (c_apply_type_quals_to_decl): Declare.
6500         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6501         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6502         (cp_type_qual_from_rid): New function.
6503         (compparms): Remove unused parameter.  All callers changed.
6504         (cp_type_quals): New function.
6505         (at_least_as_qualified_p): Likewise.
6506         (more_qualified_p): Likewise.
6507
6508         * call.c (standard_conversion): Replace calls to
6509         cp_build_type_variant with cp_build_qualified_type.  Use
6510         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6511         compare them.  Use CP_TYPE_* macros to check qualifiers.
6512         (reference_binding): Likewise.
6513         (implicit_conversion): Likewise.
6514         (add_builtin_candidates): Likewise.
6515         (build_over_call): Likewise.
6516         * class.c (overrides): Compare all qualifiers, not just `const',
6517         on method declarations.
6518         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6519         (convert_pointer_to_real): Likewise.
6520         (type_promotes_to): Likewise.
6521         * decl.c (check_for_uninitialized_const_var): New function.
6522         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6523         (cp_finish_decl): Use check_for_uninitialized_const_var.
6524         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
6525         handle `restrict'.
6526         (grok_ctor_properties): Likewise.
6527         (grok_op_properties): Likewise.
6528         (start_function): Likewise.
6529         (rever_static_member_fn): Likewise.
6530         * decl2.c (grok_method_quals): Likewise.
6531         (grokfield): Likewise.
6532         * error.c (dump_readonly_or_volatile): Rename to ...
6533         (dump_qualifiers): New function.  Handle `restrict'.
6534         (dump_type_real): Use it.
6535         (dump_aggr_type): Likewise.
6536         (dump_type_prefix): Likewise.
6537         (dump_type_suffix): Likewise.
6538         (dump_function_decl): Likewise.
6539         (cv_as_string): Likewise.
6540         * gxx.gperf: Add __restrict and __restrict__.
6541         * gxxint.texi: Document `u' as used for `__restrict', and a few
6542         other previously undocumented codes.
6543         * hash.h: Regenerated.
6544         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6545         (build_member_call): Likewise.
6546         (build_new_1): Likewise.
6547         * lex.c (init_parse): Add entry for RID_RESTRICT.
6548         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6549         (cp_type_qual_from_rid): Define.
6550         * lex.h (enum rid): Add RID_RESTRICT.
6551         * method.c (process_modifiers): Deal with `restrict'.
6552         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6553         * parse.c: Regenerated.
6554         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6555         (tsubst_aggr_type): Likewise.
6556         (tsubst): Likewise.
6557         (check_cv_quals_for_unify): Likewise.
6558         (unify): Likewise.
6559         * rtti.c (init_rtti_processing): Likewise.
6560         (build_headof): Likewise.
6561         (get_tinfo_var): Likewise.
6562         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
6563         (expand_class_desc): Likewise.
6564         (expand_attr_desc): Likewise.
6565         (synthesize_tinfo_fn): Likewise.
6566         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
6567         (get_matching_virtual): Likewise.
6568         (expand_upcast_fixups): Likewise.
6569         * sig.c (build_signature_pointer_or_reference_name): Take
6570         type_quals, not constp and volatilep.
6571         (build_signature_pointer_or_reference_type): Likewise.
6572         (match_method_types): More CP_TYPE_QUALS conversion, etc.
6573         (build_signature_pointer_constructor): Likewise.
6574         (build_signature_method_call): Likewise.
6575         * tree.c (build_cplus_array_type): Likewise.
6576         (cp_build_type_variant): Rename to ...
6577         (cp_build_qualified_type): New function.  Deal with `__restrict'.
6578         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6579         (build_exception_variant): Likewise.
6580         (mapcar): Likewise.
6581         * typeck.c (qualif_type): Likewise.
6582         (common_type): Likewise.
6583         (comptypes): Likewise.
6584         (comp_cv_target_types): Likewise.
6585         (at_least_as_qualified_p): Define.
6586         (more_qualified_p): Likewise.
6587         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6588         (compparms): Likewise.
6589         (inline_conversion): Likewise.
6590         (string_conv_p): Likewise.
6591         (build_component_ref): Likewise.
6592         (build_indirect_ref): Likewise.
6593         (build_array_ref): Likewise.
6594         (build_unary_op): Likewise.
6595         (build_conditional_expr): Likewise.
6596         (build_static_cast): Likewise.
6597         (build_c_cast): Likewise.
6598         (build_modify_expr): Likewise.
6599         (convert_For_assignment): Likewise.
6600         (comp_ptr_ttypes_real): Likewise.
6601         (cp_type_quals): New function.
6602
6603 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
6604
6605         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6606         (CP_TYPE_VOLATILE): Likewise.
6607         * decl.c (grokdeclarator): Use them.
6608         * tree.c (canonical_type_variant): Likewise.
6609
6610 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6611
6612         * parse.y (named_class_head): Push into class while parsing the
6613         base class list.
6614         * decl2.c (push_scope, pop_scope): New functions.
6615         * cp-tree.h: Declare them.
6616         * init.c (build_new_1): Delay cleanup until end of full expression.
6617
6618 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
6619
6620         * typeck.c (build_component_ref): Use of a type here is an error.
6621
6622 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
6623
6624         Revamp references to member functions.
6625         * method.c (hack_identifier): Call build_component_ref for a
6626         reference to a member function.
6627         * typeck.c (build_component_ref): Only return a single function
6628         if it's static.  Otherwise, return a COMPONENT_REF.
6629         (build_x_function_call): Handle a COMPONENT_REF.
6630         (build_unary_op): Handle all unknown-type things.
6631         * decl2.c (arg_assoc): Handle COMPONENT_REF.
6632         * class.c (instantiate_type): Complain if the function we get is a
6633         nonstatic member function.  Remove code for finding "compatible"
6634         functions.
6635         * pt.c (tsubst_copy): Handle NOP_EXPR.
6636         * tree.c (build_dummy_object): New fn.
6637         (maybe_dummy_object): New fn.
6638         (is_dummy_object): New fn.
6639         * cp-tree.h: Declare them.
6640         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
6641         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
6642         * init.c (build_member_call): Use maybe_dummy_object and
6643         is_dummy_object.
6644         (build_offset_ref): Use maybe_dummy_object.
6645         (resolve_offset_ref): Use is_dummy_object.
6646         * typeck.c (build_x_function_call): Call build_dummy_object.
6647         (unary_complex_lvalue): Call is_dummy_object.
6648
6649         * typeck.c (build_component_addr): Make sure field is a field.
6650
6651         * call.c (build_new_op): Delete obsolete code.
6652
6653         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
6654
6655 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6656
6657         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
6658         std if std is ignored.
6659
6660 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6661
6662         * decl.c (grokvardecl): Fix thinko.
6663
6664         * decl.c (grokdeclarator): Embedded attrs bind to the right,
6665         not the left.
6666
6667         * parse.y (fn.def2): Fix 'attrs' format.
6668
6669 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6670
6671         * Makefile.in (CONFLICTS): Update.
6672         * parse.y (expr_or_declarator_intern): New rule.
6673         (expr_or_declarator, direct_notype_declarator, primary,
6674         functional_cast): Use it.
6675         (notype_declarator_intern): New rule.
6676         (notype_declarator, complex_notype_declarator): Use it.
6677
6678 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
6679
6680         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
6681         (grokvardecl): Likewise.
6682
6683 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6684
6685         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
6686         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
6687
6688         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
6689
6690         * pt.c (process_partial_specialization): Cast 1st argument of
6691         `bzero' to (PTR).
6692
6693         * tree.c (build_base_fields): Cast `base_align' to (int) when
6694         comparing against one.
6695
6696 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6697
6698         * decl.c (lookup_name_real): Handle template parameters for member
6699         templates where said parameters have the same name as the
6700         surrounding class.
6701
6702         * decl.c (expand_static_init): Build cleanups before entering the
6703         anonymous function used to do them to avoid access-checking
6704         confusion.
6705
6706         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
6707         accidentally removed by previous change, and make DECL_RTL here.
6708         * class.c (add_method): Don't make DECL_RTL here.
6709
6710         * pt.c (for_each_template_parm): Don't examine uninstantiated
6711         default arguments.
6712
6713 1998-10-16  Dave Brolley  <brolley@cygnus.com>
6714
6715         * lex.c (real_yylex): Fix unaligned access of wchar_t.
6716
6717 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6718
6719         * class.c (add_method): Fix documentation to reflect previous
6720         changes.  Check for duplicate method declarations here.
6721         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
6722         correctly; such things never match.
6723         (grokfndecl): Don't look for duplicate methods here.
6724         * decl2.c (check_classfn): Don't assume names are mangled.
6725         Don't add bogus member function declarations to a class before the
6726         class type is complete.
6727         (grokfield): Reformat error message.
6728         * method.c (set_mangled_name_for_decl): Don't mangle names while
6729         processing_template_decl.
6730
6731 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
6732
6733         * typeck.c (build_indirect_ref): Complain about a pointer to data
6734         member, too.
6735         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
6736         data member.
6737         * init.c (resolve_offset_ref): Don't undo the above.
6738
6739         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
6740         (struct lang_decl_flags): Add `bitfield'.
6741         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
6742         DECL_BIT_FIELD.
6743         * decl2.c (grokbitfield, grok_alignof): Likewise.
6744         * init.c (build_offset_ref): Likewise.
6745         * typeck.c (build_component_addr, expr_sizeof): Likewise.
6746         * cvt.c (build_up_reference): Don't crash if taking the address
6747         returns error_mark_node.
6748
6749         * decl.c (grokfndecl): Also check ctype when checking for ::main().
6750
6751 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
6752
6753         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
6754         Do mangling here.
6755         (grokdeclarator): Instead of here.
6756         * friend.c (do_friend): Lose special handling of ::main and
6757         __builtin_*.
6758         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
6759
6760         * spew.c (yylex): Clear looking_for_typename if we got
6761         'enum { ... };'.
6762
6763 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
6764
6765         * class.c (maybe_warn_about_overly_private_class): Improve error
6766         messages for class with only private constructors.
6767
6768         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
6769         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
6770         (build_typename_type): New function.
6771         * decl.c (build_typename_type): Broken out from ...
6772         (make_typename_type): Use it.
6773         * search.c (lookup_field): Likewise.
6774
6775 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6776
6777         * pt.c (convert_nontype_argument): Check against type_referred_to.
6778         * decl.c (grokvardecl): Check for declarator name before building
6779         DECL_ASSEMBLER_NAME.
6780
6781 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
6782
6783         * pt.c (lookup_template_class): Add comment.
6784         (instantiate_class_template): Don't mark the _TYPE node for
6785         member class templates as an instantiation.
6786
6787 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
6788
6789         * decl.c (grokfndecl): Fix my thinko.
6790
6791 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
6792
6793         * tinfo2.cc (fast_compare): Remove.
6794         (before): Just use strcmp.
6795         * tinfo.cc (operator==): Just use strcmp.
6796
6797 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
6798
6799         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
6800         declarations.
6801
6802 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
6803
6804         * cp-tree.h (specializations_of_same_template_p): Remove.
6805         * search.c (get_template_base): Don't use it.
6806         (get_template_base_recursive): Likewise.
6807         * pt.c (specializations_of_same_template_p): Remove.
6808         (unify): Don't use it.
6809         (lookup_template_class): Find the correct parent when setting
6810         CLASSTYPE_TI_TEMPLATE.
6811
6812 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6813
6814         * tinfo.cc (operator==): Always compare names.
6815
6816 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
6817
6818         * decl.c (start_function): Fix cut-and-paste error.
6819
6820 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6821
6822         * inc/typeinfo: Add #pragma interface.
6823         (operator!=): Just call operator==.
6824         * tinfo.cc: Add #pragma implementation.
6825         (operator==): Move from inc/typeinfo and tinfo2.cc.
6826         Check __COMMON_UNRELIABLE instead of _WIN32.
6827
6828         * typeck2.c (my_friendly_abort): Add URL.
6829
6830 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6831
6832         * decl.c (start_method): Added extra parameter for attributes.
6833         * cp-tree.h (start_method): Update prototype.
6834         * parse.y (fn.def2): Update start_method parameter list.
6835
6836 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
6837
6838         * cp-tree.h (specializations_of_same_template_p): Declare.
6839         * pt.c (specializations_of_same_template_p): New function.
6840         (unify): Use it.
6841         * search.c (get_template_base): Use it.
6842         (get_template_base_recursive): Likewise.
6843
6844 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
6845
6846         * decl2.c (start_objects): Add new variable `joiner' and
6847         initialize it properly.
6848
6849 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
6850
6851         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
6852         change to vtable types.
6853
6854         * cvt.c (ocp_convert): Avoid infinite recursion caused by
6855         1998-10-03 change.
6856
6857 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
6858
6859         * pt.c (resolve_overloaded_unification): New fn.
6860         (try_one_overload): Likewise.
6861         (unify): Don't fail on unknown type.
6862         (type_unification_real): Likewise.  Use resolve_overloaded_unification
6863         to handle an overloaded argument.
6864         (template_args_equal): Split out...
6865         (comp_template_args): From here.
6866         (determine_specialization): Also allow a template with more
6867         parms than were explicitly specified.
6868         * cp-tree.h: Add template_args_equal.
6869         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
6870
6871 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
6872
6873         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
6874         change.
6875
6876 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
6877
6878         * typeck.c (unsigned_type): Only return TItype nodes when
6879         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6880         (signed_type): Likewise.
6881         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
6882         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6883         (init_decl_processing): Only create TItype nodes when
6884         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6885         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
6886         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6887
6888 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6889
6890         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
6891         (gxx.gperf): Update comments describing invocation flags.
6892         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
6893
6894 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
6895
6896         * class.c (finish_struct_1): Add commentary on previous change.
6897
6898         * cp-tree.h (vtbl_ptr_type_node): New variable.
6899         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
6900         already of the right type.
6901         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
6902         Simplify code to grow vtable.
6903         * decl.c (vtbl_ptr_type_node): Define.
6904         (init_decl_processing): Initialize it.
6905
6906 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
6907
6908         * cp-tree.def (PTRMEM_CST): New tree node.
6909         * cp-tree.h (ptrmem_cst): New type.
6910         (lang_type): Remove local_typedecls.
6911         (dummy): Increase to 12 bits from 11.
6912         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
6913         (PTRMEM_CST_CLASS): New macro.
6914         (PTRMEM_CST_MEMBER): Likewise.
6915         (current_access_specifier): New variable.
6916         (current_class_type): Remove duplicate declaration.
6917         (finish_struct): Change prototype.
6918         (unreverse_member_declarations): New function.
6919         (pushdecl_class_level): Change prototype.
6920         (grok_enum_decls): Remove.
6921         (fixup_anonymous_union): New function.
6922         (grok_x_components): Change prototype.
6923         (tsubst_chain): Remove.
6924         (finish_member_template_decl): Likewise.
6925         (check_explicit_specialization): Fix indentation.
6926         (finish_class_definition): Change prototype.
6927         (finish_member_class_template): Likewise.
6928         (finish_member_declaration): New function.
6929         (check_multiple_declarators): Likewise.
6930         * class.c (class_stack_node_t): New type.
6931         (current_class_base): Remove.
6932         (current_class_stack): Change type.
6933         (current_access_specifier): New variable.
6934         (grow_method): Remove.
6935         (check_member_decl_is_same_in_complete_scope): Break out from
6936         finish_struct.
6937         (make_method_vec): New function.
6938         (free_method_vec): Likewise.
6939         (add_implicitly_declared_members): Break out from finish_struct_1.
6940         (free_method_vecs): New variable.
6941         (add_method): Rework for direct use from parser.
6942         (handle_using_decl): Watch for NULL_TREE while iterating through
6943         CLASSTYPE_METHOD_VEC.
6944         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6945         just do some error-checking.
6946         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6947         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
6948         (finish_struct): Change prototype.  Simplify; fields and methods
6949         are already set up at this point.
6950         (init_class_processing): Set up current_class_stack.
6951         (pushclass): Save current_access_specifier.
6952         (popclass): Restore it.
6953         (currently_open_class): Simplify.
6954         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6955         * decl.c (saved_scope): Add access_specifier.
6956         (maybe_push_to_top_level): Save it.
6957         (pop_from_top_level): Restore it.
6958         (maybe_process_template_type_declaration): Use
6959         finish_member_declaration.
6960         (pushtag): Likewise.
6961         (pushdecl_class_level): Don't return a value.
6962         (fixup_anonymous_union): Break out from grok_x_components.
6963         (shadow_tag): Use it.
6964         (xref_tag): Complain about using an elaborated type specifier to
6965         reference a template type parameter or typedef name.
6966         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6967         (current_local_enum): Remove.
6968         (build_enumerator): Call finish_member_declaration.
6969         (grok_enum_decls): Remove.
6970         * decl2.c (grok_x_components): Simplify.
6971         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6972         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6973         (merge_functions): Add to comment.
6974         (arg_assoc_type): Prototype.
6975         (arg_assoc): Pass as many arguments as there are parameters.
6976         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
6977         OFFSET_REF.
6978         * expr.c (cpls_expand_expr): Remove dead code.  Handle
6979         PTRMEM_CST.
6980         * friend.c (do_friend): Lookup friends when in nested classes.
6981         Change comments.
6982         * init.c (build_offset_ref): Do lookup even for classes that are
6983         only partially defined.
6984         (decl_constant_value): Remove dead code.
6985         * method.c (build_overload_value): Remove hack where by TYPE was
6986         not a TYPE.  Handle PTRMEM_CST.
6987         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6988         should go.
6989         * parse.y (components, notype_components, component_decl,
6990         component_decl_1, component_declarator, component_declarator0):
6991         Now all are itype rather than ttype.  Rework to add members to
6992         classes on the fly.
6993         (typesqpecqual_reserved): Use check_multiple_declarators.
6994         (structsp): Update class to finish_class_definition.
6995         (do_xref_defn): Unsplit into named_class_head.
6996         (access_specifier): Set current_access_specifier.
6997         * pt.c (set_current_access_from_decl): New function.
6998         (finish_member_template_decl): Don't take the parameters.
6999         (comp_template_args): Make more robust.
7000         (lookup_template_class): Don't use current_local_enum.
7001         (for_each_template_parm): Handle PTRMEM_CST.
7002         (instantiate_class_template): Use set_current_access_from_decl,
7003         finish_member_declaration and unreverse_member_declarations.  Set
7004         lineno/input_filename before generating implicit member functions.
7005         (type_unification_real): Don't assume back-unification happens
7006         only for the last argument.
7007         (regenerate_decl_from_template): Call pushclass a bit earlier.
7008         (tsubst_chain): Remove.
7009         (tsubst_enum): Use set_current_access_from_decl.
7010         (set_mangled_name_for_template_decl): Fix indentation.
7011         * search.c (lookup_fnfields_1): Change iteration through
7012         CLASSTYPE_METHOD_VEC.
7013         (dfs_pushdecls): Likewise.
7014         (dfs_compress_decls): Likewise.
7015         (add_conversions): Likewise.
7016         * semantics.c (finish_class_definition): Don't take components.
7017         Change call to finish_struct.
7018         (finish_member_declaration): New function.
7019         (finish_member_class_template): Don't take template parameters.
7020         Change call to grok_x_components.  Call finish_member_template_decl.
7021         (check_multiple_declarators): New function.
7022         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
7023         a passed in fieldlist.
7024         * tree.c (search_tree): Handle PTRMEM_CST.
7025         (mapcar): Likewise.
7026         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
7027         INTEGER_CSTs, for pointer-to-data members.
7028
7029         * call.c (resolve_args): Resolve template specializations, if
7030         possible.
7031
7032 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7033
7034         * Makefile.in (spew.o): Depend on toplev.h.
7035
7036         * call.c (compare_ics): Initialize variables `deref_from_type2',
7037         `deref_to_type1' and `deref_to_type2'.
7038
7039         * except.c (get_eh_type): Hide prototype and definition.
7040         (process_start_catch_block_old): Remove unused static prototype.
7041
7042         * pt.c (tsubst_decl): Initialize variable `argvec'.
7043
7044         * spew.c: Include toplev.h.
7045
7046 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
7047
7048         * pt.c (instantiate_decl): Do save and restore file position.
7049
7050 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7051
7052         * method.c (build_decl_overload_real): Clear
7053         numeric_output_need_bar after __.
7054
7055 1998-10-05  Nathan Sidwell  <nathan@acm.org>
7056
7057         * call.c (build_new_method_call): Issue 'incomplete type' error,
7058         if class is not defined.
7059
7060 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7061
7062         * call.c (build_object_call): Move declaration of variable
7063         `fn' into the scope where it is used.  Don't access variable
7064         `fn' when it is uninitialized, instead use `fns'.
7065
7066 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7067
7068         * errfn.c (cp_thing): Print buf as a string not as a printf format
7069         to avoid problems with the operator%.  Consequently, `%%' sequences
7070         in format are copied as `%' in buf.
7071
7072 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
7073
7074         * pt.c (pop_tinst_level): Call extract_interface_info.
7075         (instantiate_decl): Don't save and restore file position.
7076
7077         * decl.c (cp_finish_decl): Make statics in extern inlines and
7078         templates common, if possible and the target doesn't support weak
7079         symbols.
7080
7081         * decl.c (grokdeclarator): Remove redundant calls to
7082         build_type_variant and some duplicated code.
7083         * sig.c (build_signature_reference_type): Only take the type parm.
7084         (build_signature_pointer_type): Likewise.
7085         * tree.c (build_cplus_method_type): Adjust.
7086         * cp-tree.h: Update.
7087
7088 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
7089
7090         * call.c (build_over_call): Make pedwarns about dropped qualifiers
7091         into full-fledged errors.
7092         * cvt.c (convert_to_reference): Likewise.
7093         * typeck.c (convert_for_assignment): Likewise.
7094
7095         * search.c (expand_upcast_vtables): In addition to unsetting
7096         TREE_READONLY, remove top-level const type qualifier.
7097
7098 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
7099
7100         * class.c (current_class_ptr, current_class_ref): Clarify
7101         documentation.
7102         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
7103         NOP type conversions.
7104         * decl.c (decls_match): Use comptypes directly; ignore
7105         qualifiers on the DECL.
7106         (duplicate_decls): Remove qualifier checks on DECL.
7107         (grokdeclarator): Make the type built up include top-level
7108         qualifiers.
7109         * decl2.c (do_dtors): Fix spelling error.
7110         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
7111         when printing type information.
7112         * init.c (build_new_1): Add documentation.  Deal with the fact
7113         that type of allocated memory now contains qualifiers.
7114         * lex.c (is_global): Improve error-recovery.
7115         * sig.c (build_member_function_pointer): Don't cast away const
7116         on fields of sigtable_entry_type.
7117         * tree.c (lvalue_type): Don't look at top-level qualifiers on
7118         expressions.
7119         * typeck.c (decay_conversion): Likewise.
7120         (build_component_ref): Make sure the type of the COMPONENT_REF
7121         contains top-level qualifiers, as appropriate.  Improve
7122         error-handling.
7123         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
7124         (build_array_ref): Likewise.
7125         (build_unary_op): Improve error-recovery.
7126         (unary_complex_lvalue): Make taking the address a bound member
7127         function an error, not a sorry.
7128         (build_conditional_expr): Look at the type qualifiers, not the
7129         qualifiers on the expression itself.
7130
7131 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
7132
7133         * decl2.c (merge_functions): Remove duplicates.
7134
7135         * decl2.c: Add -f{no-,}implicit-inline-templates.
7136         (import_export_decl): Check it.
7137
7138         * decl.c (lookup_name_real): Template parms also take precedence
7139         over implicit typename.  Only warn if yylex.
7140
7141         * typeck.c (build_conditional_expr): Only fold if ifexp is an
7142         INTEGER_CST.
7143
7144         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
7145         instead of linkage.
7146
7147 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
7148
7149         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
7150         * class.c (build_vbase_pointer): Use it.
7151         * rtti.c (expand_class_desc): Likewise.
7152         * tree.c (build_vbase_pointer_fields): Likewise.
7153
7154 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
7155
7156         * decl.c (start_decl): Add invocation of
7157         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7158         (start_function): Add invocation of
7159         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7160
7161         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
7162         HANDLE_GENERIC_PRAGMAS.
7163
7164 1998-09-28  Anthony Green  <green@cygnus.com>
7165
7166         * semantics.c (finish_asm_stmt): Always permit volatile asms.
7167
7168 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
7169
7170         * decl.c (grokdeclarator): Tighten checks for invalid
7171         destructors.  Improve error-messages and error-recovery.
7172         * decl2.c (check_classfn): Don't assume that mangled destructor
7173         names contain type information.
7174
7175 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
7176
7177         * search.c (get_base_distance): Remove assert.
7178
7179         * decl2.c (build_anon_union_vars): Don't process a field with no
7180         name.
7181         (finish_anon_union): Also complain about local anon unions with no
7182         members.
7183
7184 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7185
7186         * decl.c (lookup_namespace_name): If the name is a namespace,
7187         return it immediately.
7188
7189 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7190
7191         * cp-tree.h (define_case_label): Remove unused parameter.
7192         (check_java_method): Likewise.
7193         (grokclassfn): Likewise.
7194         (expand_aggr_init): Likewise.
7195         (build_x_delete): Likewise.
7196         (maybe_end_member_template_processing): Likewise.
7197         (unshare_base_binfos): Add prototype.
7198         (string_conv_p): Likewise.
7199         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
7200
7201         * cvt.c (build_up_reference): Remove unused parameter
7202         `checkconst', all callers changed.
7203         (build_type_conversion): Mark parameter `code' with
7204         ATTRIBUTE_UNUSED.
7205         (build_expr_type_conversion): Initialize variable `conv'.
7206
7207         * decl.c (push_namespace): Initialize variable `d'.
7208         (define_case_label): Remove unused parameter `decl', all callers
7209         changed.
7210
7211         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
7212         `argc' with ATTRIBUTE_UNUSED.
7213         (grokclassfn): Remove unused parameter `cname', all callers
7214         changed.
7215         (check_java_method): Likewise for parameter `ctype'.
7216         (copy_assignment_arg_p): Mark parameter `virtualp' with
7217         ATTRIBUTE_UNUSED.
7218         (finish_prevtable_vardecl): Likewise for parameter `prev'.
7219
7220         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
7221
7222         * init.c (expand_aggr_init_1): Remove unused parameter
7223         `alias_this', all callers changed.
7224         (expand_aggr_init): Likewise.
7225         (expand_default_init): Likewise.
7226         (build_new_1): Initialize variable `susp'.
7227         (build_x_delete): Remove unused parameter `type', all callers
7228         changed.
7229
7230         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
7231         ATTRIBUTE_UNUSED.
7232         (readescape): Use (unsigned) value in shift.
7233         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
7234         comparing to a signed quantity.
7235
7236         * pt.c (maybe_end_member_template_processing): Remove unused
7237         parameter `decl', all callers changed.
7238         (check_explicit_specialization): Add braces around empty body in
7239         an else-statement.
7240         (current_template_args): Initialize variable `args'.
7241         (lookup_template_class): Likewise for variable `prev_local_enum'.
7242         (tsubst_decl): Likewise for variable `r'.
7243         (set_mangled_name_for_template_decl): Initialize variable
7244         `context'.
7245
7246         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
7247         Likewise for variable `i'.
7248         (yylex): Initialize variable `trrr'.
7249
7250         * typeck.c (compparms): Mark variable `strict' with
7251         ATTRIBUTE_UNUSED.
7252
7253         * xref.c (simplify_type): Cast argument of ctype function to
7254         `unsigned char'.
7255
7256 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
7257
7258         * cp-tree.h (language_lvalue_valid): Remove.
7259         * decl.c (grokdeclarator): Don't disallow references to functions.
7260         * tree.c (lvalue_p_1): New function, combining duplicated
7261         code from ...
7262         (lvalue_p): Use it.
7263         (real_lvalue_p): Likewise.
7264         * typeck.c (language_lvalue_valid): Remove.
7265         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
7266         they don't have TREE_READONLY set.
7267         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
7268
7269 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7270
7271         * spew.c (yylex): Give diagnostic.
7272         * hash.h (is_reserved_word): Add export.
7273         * gxx.gperf: Likewise.
7274         * lex.h (rid): Add RID_EXPORT.
7275         * lex.c (init_parse): Likewise.
7276
7277 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7278
7279         * friend.c (do_friend): Make warning a full sentence.
7280
7281 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7282
7283         * parse.y (component_decl_list): Improve error-recovery.
7284
7285 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7286
7287         * decl.c (make_typename_type): Move error to point where name
7288         variable can be used by dump_type.
7289
7290 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7291
7292         * decl.c (grokfndecl): Improve error-recovery.
7293         * decl2.c (grokfield): Likewise.
7294         * pt.c (finish_member_template_decl): Likewise.
7295
7296 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7297
7298         * method.c (hack_identifier): Finding multiple members is always
7299         an error.
7300
7301 1998-09-21  Per Bothner  <bothner@cygnus.com>
7302
7303         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
7304
7305 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
7306
7307         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
7308
7309 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
7310
7311         * class.c (maybe_warn_about_overly_private_class): Reformat.
7312
7313 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
7314
7315         * exception.cc (__cplus_type_matcher): Realign some code.
7316
7317 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
7318
7319         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
7320         (tinfo2.o): Likewise.
7321         (exception.o): Likewise.
7322         (new.o): Likewise.
7323         (opnew.o): Likewise.
7324         (opnewnt.o): Likewise.
7325         (opvnew.o): Likewise.
7326         (opvnewnt.o): Likewise.
7327         (opdel.o): Likewise.
7328         (opdelnt.o): Likewise.
7329         (opvdel.o): Likewise.
7330         (opvdelnt.o): Likewise.
7331
7332 1998-09-16  Richard Henderson  <rth@cygnus.com>
7333
7334         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
7335
7336 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
7337
7338         * call.c (build_field_call): Handle static data members too.
7339
7340         * typeck.c (comptypes): When comparing pointer types, check
7341         whether referred types match even in strictest modes.
7342
7343 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
7344
7345         * cp-tree.h: Revert previous change.
7346         (finish_struct_methods): Remove declaration.
7347         * class.c: Revert previous change.
7348         (maybe_warn_about_overly_private_class): New function.
7349         (finish_struct_methods): Declare here, and make static.  Remove
7350         unnecessary parameters.  Tidy slightly.  Use
7351         maybe_warn_about_overly_private_class.
7352         (finish_struct_1): Adjust.  Remove check for private constructors,
7353         now done elsewhere.
7354         (finish_struct): Adjust.
7355
7356 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7357
7358         * except.c (expand_start_catch_block): No need to check for new
7359         exception model.
7360         (process_start_catch_block_old): Deleted.
7361         (process_start_catch_block): Add call to start_decl_1().
7362         (expand_end_catch_block): Add call to end_catch_handler().
7363         * exception.cc (__cplus_type_matcher): Only check the exception
7364         language if there is an exception table.
7365
7366 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7367
7368         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7369         as used to prevent conflicts with virtual function tables.
7370
7371 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
7372
7373         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7374         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7375         * class.c (maybe_class_too_private_p): New function.
7376         (finish_struct_methods): Use it.
7377         (finish_struct_1): Likewise.
7378         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7379         appropriate.
7380
7381         * pt.c (check_specialization_scope): Fix spelling error.
7382         (check_explicit_specialization): Remove code to handle explicit
7383         specializations in class scope; they are now correctly diagnosed
7384         as errors.
7385
7386 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
7387
7388         * decl.c (pushdecl): Don't copy types if the
7389         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7390         type.
7391
7392 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7393
7394         * class.c (get_enclosing_class): New function.
7395         (is_base_of_enclosing_class): Likewise.
7396         * cp-tree.h (get_enclosing_class): Declare.
7397         (is_base_of_enclosing_class): Likewise.
7398         * pt.c (coerce_template_parms): Use them.
7399
7400 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
7401
7402         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7403         null to decide whether to use it.
7404
7405         * error.c (dump_type_real): Handle NAMESPACE_DECL.
7406         * parse.y (base_class.1): Avoid crash on error.
7407
7408 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7409
7410         * decl.c (make_typename_type): If context is a namespace, the code
7411         is in error.
7412
7413 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
7414
7415         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7416
7417 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
7418
7419         * cp-tree.h (anonymous_namespace_name): Declare.
7420         * decl.c: Define it.
7421         (push_namespace): Use anonymous_namespace_name, rather than local
7422         static anon_name.
7423         * error.c (dump_decl): If a namespace is named
7424         anonymous_namespace_name, call it {anonymous}.
7425
7426         * decl.c (grokparms): Distinguish between references and pointers
7427         in error message.
7428
7429 1998-09-08  Richard Henderson  <rth@cygnus.com>
7430             Mark Mitchell  <mark@markmitchell.com>
7431
7432         * pt.c (process_partial_specialization): Consistently allocate
7433         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
7434         tpd.parms, where appropriate.
7435
7436 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
7437
7438         * Makefile.in (INCLUDES): Update after recent toplevel gcc
7439         reorganizations.
7440
7441 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
7442
7443         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7444         * class.c (finish_struct): Remove hackery to deal with explicit
7445         specializations in class scope.
7446         * decl.c (grokfndecl): Improve error-recovery.
7447         * decl2.c (grokfield): Likewise.
7448         * pt.c (check_specialization_scope): New function.
7449         (begin_specialization): Call it.
7450         (process_partial_specialization): New function, split out from
7451         push_template_decl.  Check partial specializations more
7452         stringently.
7453         (push_template_decl): Call it.
7454         (check_explicit_specialization): Don't attempt to handle explicit
7455         specializations in class scope.
7456         (template_parm_data): Document.  Add current_arg and
7457         arg_uses_template_parms.
7458         (mark_template_parm): Set it.
7459         (tsubst_arg_types): Remove unused variable.
7460         * semantics.c (begin_class_definition): Tweak.
7461
7462 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
7463
7464         * inc/typeinfo (type_info::type_info(const char*)): Make
7465         `explicit'.
7466
7467         * cp-tree.h (hash_tree_cons_simple): New macro.
7468         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
7469         (coerce_template_parms): Use make_temp_vec, instead of
7470         make_tree_vec.  Document this behavior.
7471         (lookup_template_class): Likewise.
7472         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7473         Remove dead code (and add assertion to check its deadness).  Fix
7474         bug w.r.t. exception specifications.
7475
7476 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
7477
7478         * decl2.c (import_export_vtable): Always make artificials comdat.
7479         (import_export_decl): Likewise.
7480         * pt.c (mark_decl_instantiated): Likewise.
7481
7482 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7483
7484         * cp-tree.h (finish_globally_qualified_member_call_expr):
7485         Rename to ...
7486         (finish_qualified_call_expr).
7487         * semantics.c: Likewise.
7488         * parse.y (primary): Use it.
7489         * method.c (hack_identifier): Remove redundant code.
7490
7491         * init.c (resolve_offset_ref): Call convert_from_reference to
7492         handle members of reference type.  Improve error recovery.
7493
7494 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
7495
7496         * cp-tree.h: Declare warn_nontemplate_friend.
7497         * decl2.c (lang_decode_option): Set.
7498         * lang-options.h: Add -Wnon-template-friend.
7499         * friend.c (do_friend): Use to toggle non-template function warning.
7500
7501 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7502
7503         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7504         corresponding INTEGER_CSTs when processing_template_decl.
7505         * pt.c (tsubst_enum): Tweak accordingly.
7506
7507 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7508
7509         * decl.c (pushdecl_class_level): Add warning here.
7510         (pushdecl): Tweak.
7511
7512 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
7513
7514         * cvt.c (convert_pointer_to_real): Tidy.
7515         * search.c (get_base_distance_recursive): Simplify.
7516         (get_base_distance): Likewise.
7517
7518         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7519         parms.
7520
7521 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
7522
7523         * lex.c (check_newline):  Call HANDLE_PRAGMA before
7524         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
7525         if unknown pragmas are encountered.
7526         (handle_sysv_pragma): Interpret return code from
7527         handle_pragma_token ().  Return success/failure indication rather
7528         than next unprocessed character.
7529         (pragma_getc): New function: retrieves characters from the
7530         input stream.  Defined when HANDLE_PRAGMA is defined.
7531         (pragma_ungetc): New function: replaces characters back into the
7532         input stream.  Defined when HANDLE_PRAGMA is defined.
7533
7534 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7535
7536         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7537         * class.c (build_vtable_entry_ref): Likewise.
7538
7539 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7540
7541         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7542         * decl2.c (import_export_decl): Likewise.
7543         * pt.c (instantiate_decl): Use it.
7544
7545 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7546
7547         * decl.c (lookup_name_real): Also do implicit typename thing for
7548         artificial TYPE_DECLs.
7549         * search.c (lookup_field): Likewise.
7550         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7551         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7552         (enter_scope_of): Extract type from implicit typename.
7553         (begin_class_definition): Likewise.
7554         * lex.c (identifier_type): Handle implicit typename when checking
7555         for SELFNAME.
7556
7557         * cp-tree.h: Declare flag_strict_prototype.
7558         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7559         -fstrict-prototype.
7560         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7561         specified, set it to the value of pedantic.
7562
7563 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7564
7565         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7566
7567 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
7568
7569         * decl.c (finish_enum): Handle member enums of classes declared in
7570         template functions.
7571
7572         * decl2.c (grok_x_components): Strip attributes before calling
7573         groktypename.
7574
7575 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
7576
7577         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7578         -fenum-int-equivalence and -fno-nonnull-objects.
7579         * class.c (check_for_override): Remove support for -fall-virtual.
7580         (finish_struct_1): Likewise.
7581         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7582         * typeck.c (build_binary_op_nodefault): Likewise.
7583         * cvt.c (ocp_convert): Likewise.
7584         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7585         * class.c (build_vbase_path): Likewise.
7586
7587 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
7588
7589         * Makefile.in (INTERFACE): New, set to 1.
7590
7591 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
7592
7593         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7594         comparing with global_namespace.
7595         (dump_aggr_type): Likewise.
7596
7597         * decl.c (grokfndecl): Issue error on declaration of friend
7598         templates with explicit template arguments.
7599
7600         * pt.c (convert_template_argument): New function, split out
7601         from...
7602         (coerce_template_parms): Here.
7603         (tsubst): Attempt better error-recovery.
7604
7605 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7606
7607         * pt.c (decl_template_parm_p): Add checks for
7608         TEMPLATE_TEMPLATE_PARM.
7609
7610 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7611
7612         * lex.c (do_identifier): Fix thinko in previous change.
7613
7614 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
7615
7616         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
7617         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
7618
7619 1998-08-28  Richard Henderson  <rth@cygnus.com>
7620
7621         Add support for discarding unused virtual functions.
7622         * lang-options.h: Add -fvtable-gc.
7623         * cp-tree.h: Add flag_vtable_gc.
7624         * decl2.c (output_vtable_inherit): New fn.
7625         (finish_vtable_vardecl): Call it.
7626         * class.c (build_vtable_entry_ref): New fn.
7627         (build_vtbl_ref): Call it.
7628
7629 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7630
7631         * cp-tree.h (build_enumerator): Take the enumeration type as a
7632         parameter.
7633         * decl.c (finish_enum): Don't set the TREE_TYPE for the
7634         enumeration constant values if we're processing_template_decls.
7635         Don't set the type for the CONST_DECLs either; that's done in
7636         build_enumerator.
7637         (build_enumerator): Take the enumeration type as a
7638         parameter.
7639         * lex.c (do_identifier): Don't resolve enumeration constants while
7640         processing template declarations, even if they happen to be
7641         TEMPLATE_PARM_INDEXs.
7642
7643         * parse.y (current_enum_type): New variable.
7644         (primary): Don't allow statement-expression in local classes just
7645         as we don't in global classes.
7646         (structsp): Use current_enum_type.
7647         (enum_list): Likewise.
7648         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
7649         finish_enum; they no longer occur.
7650
7651         * cp-tree.h (finish_base_specifier): New function.
7652         * parse.y (base_class): Use it.
7653         * semantics.c (finish_base_specifier): Define it.
7654
7655         * parse.y (structsp): Warn on use of typename outside of template
7656         declarations.
7657
7658 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7659
7660         * lex.c (handle_cp_pragma): Remove #pragma vtable.
7661         * lang-options.h: Remove +e options.
7662         * decl2.c (lang_decode_option): Likewise.
7663         (import_export_vtable): Don't check write_virtuals.
7664         (finish_vtable_vardecl, finish_file): Likewise.
7665         * search.c (dfs_debug_mark): Likewise.
7666         * semantics.c (begin_class_definition): Likewise.
7667         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
7668
7669         * call.c (build_over_call): Check flag_elide_constructors.
7670         * decl2.c: flag_elide_constructors defaults to 1.
7671         * typeck.c (convert_arguments): Remove return_loc parm.
7672         (build_function_call_real): Adjust.
7673
7674         * search.c: Tear out all mi_matrix and memoize code.
7675         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
7676         * lang-options.h: Remove documentation for -fhandle-exceptions,
7677         -fmemoize-lookups and -fsave-memoized.
7678         * cp-tree.h: Lose mi_matrix and memoize support.
7679         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
7680         * class.c: Lose struct class_level.
7681         (pushclass, popclass): Lose memoize support.
7682         * init.c (build_offset_ref): Likewise.
7683
7684         Never change BINFO_INHERITANCE_CHAIN.
7685         * init.c (emit_base_init): Change modification of
7686         BINFO_INHERITANCE_CHAIN to an assert.
7687         * search.c (get_base_distance_recursive): Likewise.
7688         (get_base_distance): Likewise.
7689         (lookup_member): Likewise.
7690         (convert_pointer_to_single_level): Likewise.
7691         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
7692         (lookup_fnfields): Likewise.
7693         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
7694         (unshare_base_binfos): Don't call propagate_binfo_offsets.
7695         (layout_basetypes): Call propagate_binfo_offsets instead of
7696         unshare_base_binfos.
7697         * decl.c (xref_basetypes): Call unshare_base_binfos.
7698         * pt.c (instantiate_class_template): Likewise.
7699         * tree.c (reverse_path): Remove 'copy' parm; always make a
7700         temporary copy.
7701         * class.c (build_vbase_path): Just call it.
7702         * search.c (compute_access): Likewise.  Don't re-reverse.
7703
7704 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7705
7706         * class.c (build_vbase_path): Use reverse_path.
7707         (finish_base_struct): Move warnings for inaccessible bases to
7708         layout_basetypes.
7709         (modify_one_vtable): Remove check of TREE_USED (binfo).
7710         (fixup_vtable_deltas1): Likewise.
7711         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
7712         (xref_tag): Remove binfos parameter.
7713         (make_binfo): Remove chain parameter.
7714         (reverse_path): Add copy parameter.
7715         * decl.c (init_decl_processing): Change calls to xref_tag.
7716         (xref_tag): Remove binfos parameter.
7717         (xref_basetypes): Change calls to make_binfo.
7718         * decl2.c (grok_x_components): Change calls to xref_tag.
7719         (handle_class_head): Likewise.
7720         * friend.c (do_friend): Likewise.
7721         * lex.c (make_lang_type): Change calls to make_binfo.
7722         * parse.y (structsp): Change calls to xref_tag.
7723         (named_complex_class_head_sans_basetype): Likewise.
7724         (named_class_head): Likewise.
7725         * rtti.c (init_rtti_processing): Likewise.
7726         * search.c (compute_access): Change calls to reverse_path.
7727         (dfs_get_vbase_types): Change calls to make_binfo.
7728         (get_vbase_types): Remove dead code.
7729         * tree.c (unshare_base_binfos): Change calls to make_binfo.
7730         (layout_basetypes): Warn here about inaccessible bases.
7731         (make_binfo): Remove chain parameter.
7732         (reverse_path): Add copy parameter.
7733
7734 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7735
7736         * class.c: #if 0 complete_type_p.
7737         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
7738         * method.c (process_overload_item): Likewise.
7739         * typeck.c (comp_target_types): Likewise.
7740
7741         Stop sharing binfos for indirect virtual bases.
7742         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
7743         (layout_basetypes): Likewise.
7744         (unshare_base_binfos): Copy vbases, too.
7745         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
7746         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
7747         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
7748         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
7749         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
7750         reference to BINFO_VIA_PUBLIC.
7751         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
7752         (push_class_decls): Use them.
7753         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
7754         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
7755
7756 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7757
7758         * decl.c (build_enumerator): Set DECL_CONTEXT for the
7759         CONST_DECLs.
7760
7761 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
7762
7763         * cp-tree.h (finish_enum): Change prototype.
7764         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
7765         VALUES parameter.  Don't try to compute mins/maxs if
7766         processing_template_decl.
7767         * parse.y (structsp): Use new calling sequence for finish_enum.
7768         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
7769         (lookup_template_class): Remove unused variables.  Tweak.
7770         Register enums on instantiation list before substituting
7771         enumeration constants.
7772         (tsubst_decl): Remove unused variables.
7773         (regenerate_decl_from_template): Likewise.
7774
7775         * decl.c (duplicate_decls): Don't obliterate the
7776         DECL_TEMPLATE_INFO for a template if we're not replacing it with
7777         anything.
7778
7779         * lex.c (do_identifier): Fix typo in comment.
7780
7781 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7782
7783         * errfn.c: Remove stdarg.h/varargs.h.
7784         * tree.c: Likewise.
7785
7786 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
7787
7788         * pt.c (tsubst_copy): Only do typename overloading on an
7789         IDENTIFIER_NODE that happens to look like a typename if it actually
7790         has a type for us to use.
7791
7792 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7793
7794         * typeck.c (comp_cv_target_types): Split out...
7795         (comp_target_types): From here.  Don't allow cv-qual changes under
7796         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
7797         (build_ptrmemfunc): Pass 1 to nptrs.
7798         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7799
7800 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
7801
7802         * search.c (dependent_base_p): Don't compare a binfo to
7803         current_class_type; use the TREE_TYPE of the binfo instead.
7804
7805         * cp-tree.h (CLASS_TYPE_P): Revise definition.
7806
7807 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7808
7809         * decl.c (duplicate_decls): Don't complain about different
7810         exceptions from an internal decl even if pedantic.
7811
7812         * typeck.c (convert_for_assignment): Converting from pm of vbase
7813         to derived is an error, not a sorry.
7814
7815         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
7816         * class.c (fixed_type_or_null): Rename from
7817         resolves_to_fixed_type_p.  Return the dynamic type of the
7818         expression, if fixed, or null.
7819         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
7820         does not match the static type.
7821         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
7822         resolves_to_fixed_type_p again.
7823
7824 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7825
7826         * pt.c (tsubst_decl): Move special case code for dealing with
7827         tricky friend templates here from ...
7828         (regenerate_decl_from_template): Here.
7829
7830 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7831
7832         * decl.c (start_decl): Remove redundant linkage check.
7833
7834 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
7835
7836         * typeck.c (c_expand_return): Handle the case that valtype
7837         is wider than the functions return type.
7838
7839 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7840
7841         * cp-tree.h (CLASS_TYPE_P): New macro.
7842         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
7843         * pt.c (process_template_parm): Undo previous change.
7844
7845 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
7846
7847         * cp-tree.h: Declare.
7848         * pt.c (decl_template_parm_p): New function.
7849         * decl.c (pushdecl): Check decls for redeclaring template parms.
7850         (xref_tag): Make redeclaration an error, print decl.
7851         * decl2.c (grokfield): Check field_decls for redeclaration as well.
7852
7853 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7854
7855         * parse.y (primary): Fix up the type of string constants.
7856
7857 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7858
7859         * typeck.c (convert_for_initialization): Move check for odd uses
7860         of NULL to avoid duplicate warnings.
7861
7862 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7863
7864         * tree.c (lvalue_type): Fix for arrays.
7865         * typeck.c (string_conv_p): New fn.
7866         (convert_for_assignment): Use it.
7867         (build_unary_op): Use lvalue_type.
7868         * call.c (standard_conversion, convert_like): Use string_conv_p.
7869         (add_function_candidate): Use lvalue_type.
7870         * cvt.c (convert_to_reference): Likewise.
7871         * decl2.c (lang_decode_option): Ignore -traditional.
7872         * decl.c (init_decl_processing): flag_writable_strings inhibits
7873         flag_const_strings.
7874
7875 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
7876
7877         * lang-options.h (lang_options): Add fconst-strings to the list
7878         of valid options.
7879         * decl2.c (lang_f_options, lang_decode_option): Likewise.
7880
7881 1998-08-24  Nathan Sidwell  <nathan@acm.org>
7882
7883         * lex.c (real_yylex): Don't warn about long long constants if
7884         we're allowing long long.
7885
7886 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7887
7888         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
7889         accessing bindings directly.
7890
7891         * search.c (my_tree_cons): Reimplement.
7892
7893         * lang-specs.h: Remove __HONOR_STD.
7894         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
7895
7896 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
7897
7898         * decl.c (grokdeclarator): Complain about in-class initialization
7899         of aggregates and/or references.
7900         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
7901         TEMPLATE_TYPE_PARMs.
7902
7903         * decl2.c (grok_array_decl): Add comment.
7904         (mark_used): Don't instantiate an explicit instantiation.
7905         * friend.c (make_friend_class): Remove bogus comment.  Fix check
7906         for partial specializations.
7907         * pt.c (check_explicit_specialization): Don't
7908         SET_DECL_EXPLICIT_INSTANTIATION here.
7909         (mark_decl_instantiated): Or here.
7910         (do_decl_instantiation): Do it here, instead.  Add checks for
7911         duplicate explicit instantiations, etc.  Tidy.
7912         (do_type_instantiation): Likewise.
7913         (instantiate_decl): Improve comments.  Complain about explicit
7914         instantiations where no definition is available.
7915
7916         * cp-tree.h (ansi_null_node): Remove.
7917         * call.c (build_over_call): Warn about converting NULL to an
7918         arithmetic type.
7919         * cvt.c (build_expr_type_conversion): Likewise.  Use
7920         null_ptr_cst_p instead of expanding it inline.
7921         * decl.c (ansi_null_node): Remove.
7922         (init_decl_processing): Make null_node always have integral type.
7923         * except.c (build_throw): Warn about converting NULL to an
7924         arithmetic type.
7925         * lex.c (init_parse): Remove handling of ansi_null_node.
7926         * pt.c (type_unification_real): Don't convert NULL to void* type.
7927         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7928         (convert_for_assignment): Warn about converting NULL to an
7929         arithmetic type.
7930         (convert_for_initialization): Likewise.
7931
7932 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7933
7934         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7935         * pt.c (coerce_template_parms): Use no_linkage_check.
7936         * decl.c (grokvardecl): Likewise.
7937         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
7938
7939         * method.c (process_overload_item): Remove useless code.
7940
7941 1998-08-20  Per Bothner  <bothner@cygnus.com>
7942
7943         Handle new'ing of Java classes.
7944         * init.c (build_class_classref):  New function.
7945         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
7946         constructor does not return this;  don't need to exception-protect.
7947
7948         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
7949         * decl2.c (acceptable_java_type):  Handle template-derived types.
7950
7951 1998-08-20  Per Bothner  <bothner@cygnus.com>
7952
7953         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
7954
7955 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
7956
7957         * decl.c (duplicate_decls): Always merge the old and new patterns
7958         for templates, regardless of whether or not the new one has
7959         DECL_INITIAL.  Don't throw away specializations.  Merge
7960         DECL_SAVED_TREE.
7961         * pt.c (tsubst_decl): Use the right pattern when calculating the
7962         complete args for a new template instance.
7963         (do_decl_instantiation): Fix typo in comment.
7964         (regenerate_decl_from_template): Deal with tricky friend template
7965         case.
7966         (instantiate_decl): Likewise.
7967
7968 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
7969
7970         * init.c (build_builtin_delete_call): Add missing assemble_external
7971         call.
7972
7973 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7974
7975         * parse.y (notype_unqualified_id): Also accept ~A<int>.
7976
7977 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
7978
7979         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7980         arithmetic.
7981         * except.c (build_throw): Warn when NULL is thrown, even with
7982         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
7983         thrown expression.
7984
7985         * cp-tree.h (ansi_null_node): New variable.
7986         * decl.c (ansi_null_node): New variable.
7987         (init_decl_processing): Initialize its type.
7988         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
7989         for null_node in non-ANSI mode.
7990         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7991         place of null_node to avoid spurious errors.
7992
7993 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
7994
7995         * cp-tree.h (enter_scope_of): New function.
7996         * parse.y (complex_direct_notype_declarator): Use it.
7997         * semantics.c (enter_scope_of): New function.
7998
7999 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
8000
8001         * decl.c (grokparms): No, here.
8002
8003         * decl.c (grokdeclarator): Catch parm with pointer to array of
8004         unknown bound here...
8005         * method.c (process_overload_item): ...not here.
8006
8007         * gxxint.texi: Remove obsolete documentation of overloading code.
8008
8009         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
8010         * class.c (finish_struct_bits): Likewise.
8011
8012         * tree.c (lvalue_type): Fix for arrays.
8013         * typeck.c (build_unary_op): Use lvalue_type.
8014         * call.c (add_function_candidate): Likewise.
8015         * cvt.c (convert_to_reference): Likewise.
8016
8017         * decl2.c (lang_decode_option): Ignore -traditional.
8018
8019         * init.c (build_offset_ref): Don't mess with error_mark_node.
8020         * lex.c (do_scoped_id): Use cp_error.
8021
8022         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
8023
8024 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8025
8026         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
8027
8028 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
8029
8030         * cp-tree.h (set_identifier_local_value): Provide prototype.
8031
8032         * decl2.c (do_namespace_alias): Remove unused variables `binding'
8033         and `old'.
8034
8035 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
8036
8037         * Makefile.in: Rename BBISON to BISON so that it can be properly
8038         inherited from the parent makefile.
8039
8040 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8041
8042         * lang-options.h: Add -finit-priority.
8043         * decl2.c: Likewise.  Check flag_init_priority instead of
8044         USE_INIT_PRIORITY.
8045
8046         * decl2.c (setup_initp): New fn.
8047         (start_objects, finish_objects, do_ctors): Handle init_priority.
8048         (do_dtors, finish_file): Likewise.
8049
8050 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8051
8052         * pt.c (tsubst_copy): Hush warning.
8053
8054         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
8055
8056 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
8057
8058         * pt.c (print_template_context): Don't abort when instantiating a
8059         synthesized method.
8060
8061         * decl.c (grokdeclarator): Issue errors on namespace qualified
8062         declarators in parameter lists or in class scope.
8063
8064 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
8065
8066         * pt.c (check_explicit_specialization): Don't abort on bogus
8067         explicit instantiations.
8068
8069 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
8070
8071         * typeck.c (require_complete_type): Use complete_type_or_else.
8072         (complete_type_or_else): Always return NULL_TREE on failure, as
8073         documented.
8074
8075         * pt.c (tsubst_aggr_type): Prototype.
8076         (tsubst_decl): New function, split out from tsubst.  Set
8077         input_filename and lineno as appropriate.
8078         (pop_tinst_level): Restore the file and line number saved in
8079         push_tinst_level.
8080         (instantiate_class_template): Set input_filename and lineno as
8081         appropriate.
8082         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
8083         context for a TYPENAME_TYPE is complete.
8084
8085         * decl2.c (grokbitfield): Issue errors on bitfields declared with
8086         function type.
8087         (do_dtors): As in do_ctors, pretend to be a member of the same
8088         class as a static data member while generating a call to its
8089         destructor.
8090
8091         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
8092         conversions, even in complex virtual base class hierarchies.
8093
8094 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
8095
8096         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
8097         (TYPE_TEMPLATE_INFO): Likewise.
8098         (SET_TYPE_TEMPLATE_INFO): Likewise.
8099         (ENUM_TI_TEMPLATE): Likewise.
8100         (ENUM_TI_ARGS): Likewise.
8101         (lookup_nested_type_by_name): Remove.
8102         * decl.c (maybe_process_template_type_declaration): Handle enums.
8103         (start_enum): Don't check for primary-template enum declarations
8104         here.
8105         (finish_enum): Clean up, document.  Make sure template enum
8106         constants get the correct type.
8107         (build_enumerator): Copy initializers for template enumerations,
8108         too.
8109         (grok_enum_decls): Document.
8110         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
8111         better.  Build LOOKUP_EXPRs for local variables, even if they are
8112         TREE_PERMANENT.
8113         * pt.c (tsubst_enum): Remove field_chain parameter.
8114         (template_class_depth): Include the depth of surrounding function
8115         contexts.
8116         (push_template_decl): Check for primary-template enum declarations
8117         here.  Deal with enumeration templates.
8118         (lookup_template_class): Likewise.
8119         (for_each_template_parm): Likewise.
8120         (instantiate_class_template): Don't call tsubst_enum directly,
8121         call tsubst instead, to instantiate enums.  Deal with all
8122         field_chain issues here, not in tsubst_enum.
8123         (lookup_nested_type_by_name): Remove.
8124         (tsubst_aggr_type): Revise handling of enumeration types.
8125         (tsubst): Likewise.
8126         (tsubst_copy): Likewise.
8127         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
8128
8129 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
8130
8131         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
8132         uses template parameters.
8133         * method.c (build_template_parm_names): Use the full set of
8134         template arguments for tsubst'ing.
8135         (build_overload_identifier): Pass the full set of template
8136         arguments to build_template_parm_names, not just the
8137         innermost_args.
8138         * pt.c (TMPL_ARGS_DEPTH): Define using
8139         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
8140         (NUM_TMPL_ARGS): New macro.
8141         (add_outermost_template_args): Deal with the case where the outer
8142         args will be completely discarded.
8143         (coerce_template_parms): Use the full set of template arguments
8144         for tsubst'ing.  Simplify.  Add some asserts.  Improve
8145         error messages.
8146         (lookup_template_class): Pass the full set of template arguments
8147         to coerce_template_parms.
8148         (tsubst): Add assertion.
8149         (do_type_instantiation): Don't instantiate member template
8150         classes.
8151
8152         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
8153         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
8154
8155 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
8156
8157         * method.c (set_mangled_name_for_decl): Change return type to void.
8158
8159         * decl.c (lookup_name_real): A namespace-level decl takes priority
8160         over implicit typename.  Avoid doing the same lookup twice.
8161
8162         * search.c (dependent_base_p): New fn.
8163         (dfs_pushdecls, dfs_compress_decls): Use it.
8164
8165         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
8166         virtual functions if the type doesn't have any.
8167
8168 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
8169
8170         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
8171         uses template parameters.
8172
8173 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
8174
8175         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
8176         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
8177         * lex.c (do_identifier): Don't use a second argument, or a type,
8178         when building LOOKUP_EXPRs.
8179         (do_identifier): Likewise.
8180         (do_scoped_id): Likewise.
8181         * method.c (hack_identifier): Improve error message.
8182         * pt.c (lookup_template_function): Don't needlessly call
8183         copy_to_permanent or build_min.
8184         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
8185         necessary.
8186         (do_decl_instantiation): Improve error message.
8187         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
8188         (build_min): Copy the type to the permanent obstack, too.
8189
8190 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
8191
8192         * init.c (init_init_processing): Remove BI* handling.
8193         (build_builtin_call): Remove.
8194         (build_builtin_delete_call): New fn.
8195         (build_delete): Use it.
8196
8197 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
8198
8199         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
8200         (maybe_check_template_type): New function.
8201         * decl.c (maybe_process_template_type_declaration): New function,
8202         split out from pushtag  Call maybe_check_template_type.
8203         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
8204         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8205         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8206         * pt.c (template_class_depth_real): Generalization of ...
8207         (template_class_depth): Use it.
8208         (register_specialization): Use duplicate_decls for duplicate
8209         declarations of specializations.
8210         (maybe_check_template_type): New function.
8211         (push_template_decl_real): Fix comment.
8212         (convert_nontype_argument): Likewise.
8213         (lookup_template_class): Likewise.  Avoid an infinite loop on
8214         erroneous code.
8215         (tsubst_friend_function): Fix comment.
8216         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
8217         an IDENTIFIER_NODE.
8218         * semantics.c (begin_function_definition): Use
8219         reset_specialization to note that template headers don't apply
8220         directly to declarations after the opening curly for a function.
8221
8222 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
8223
8224         * decl.c (push_overloaded_decl): Use current_namespace instead of
8225         DECL_CONTEXT (decl) to determine where we go.
8226
8227         * decl.c (lookup_name_real): Fix typo.
8228
8229 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
8230
8231         * friend.c (is_friend): Be lenient with member functions to deal
8232         with nested friends.
8233
8234 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
8235
8236         * class.c (finish_struct_1): Convert integer_zero_node to
8237         ssizetype before passing it to set_rtti_entry.
8238         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
8239         of any size to a pointer.
8240
8241 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
8242
8243         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
8244         (build_template_decl_overload): Remove.
8245         (set_mangled_name_for_decl): New function.
8246         (innermost_args): Remove is_spec parameter.
8247         (most_specialized, most_specialized_class): Remove declarations.
8248         (lookup_template_class): Add entering_scope parameter.
8249         (maybe_process_partial_specialization): New function.
8250         (finish_template_decl): Likewise.
8251         (finish_template_type): Likewise.
8252         * class.c (finish_struct): Clean up processing of member template
8253         specializations.
8254         * decl.c (pushtag): Fix formatting.
8255         (lookup_tag): Improve handling of pseudo-global levels.
8256         (make_typename_type): Adjust call to lookup_template_class.
8257         (shadow_tag): Use maybe_process_partial_specialization.
8258         (xref_tag): Improve handling of member friends.
8259         (start_function): Call push_nested_class before
8260         push_template_decl.  Don't call push_template_decl for
8261         specializations.
8262         * decl2.c (grok_x_components): Don't call xref_tag for
8263         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
8264         (grokclassfn): Use set_mangled_name_for_decl.
8265         (arg_assoc_class): Adjust call to innermost_args.
8266         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
8267         * error.c (dump_function_name): Improve printing of template
8268         function names.
8269         * friend.c (is_friend): Don't compare types of decls to determine
8270         friendship, unless flag_guiding_decls.
8271         (make_friend_class): Partial specializations cannot be friends.
8272         (do_friend): Use set_mangled_name_for_decl.  Call
8273         push_template_decl_real instead of push_template_decl.
8274         * method.c (build_decl_overload_real): Remove prototype.  Give it
8275         external linkage.
8276         (build_overload_identififer): Adjust call to innermost_args.
8277         (build_template_decl_overload): Remove.
8278         (set_mangled_name_for_decl): New function.
8279         * parse.y (.finish_template_type): New non-terminal.
8280         (template_def): Use finish_template_decl.  Use template_extdef
8281         instead of extdef.
8282         (template_extdef, template_datadef): New non-terminals, containing
8283         only those rules for things which can be templates.
8284         (datadef): Tidy.
8285         (template_type, self_template_type): Use .finish_template_type.
8286         (named_class_head): Use maybe_process_partial_specialization.
8287         * pt.c (mangle_class_name_for_template): Remove context parameter.
8288         (get_class_bindings): Remove outer_args parameter.
8289         (complete_template_args): Remove.
8290         (add_outermost_template_args): New function.
8291         (register_specialization): Return the specialization.
8292         (unregister_specialization): New function.
8293         (tsubst_template_parms): Likewise.
8294         (most_specialized, most_specialized_class): Prototype here as
8295         static.
8296         (original_template): Rename to most_general_template.
8297         (tsubst_template_parms): New function.
8298         (set_mangled_name_for_template_decl): Likewise.
8299         (TMPL_ARGS_DEPTH): New macro.
8300         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
8301         (TMPL_ARGS_LEVEL): New macro.
8302         (SET_TMPL_ARGS_LEVEL): Likewise.
8303         (TMPL_ARG): Likewise.
8304         (SET_TMPL_ARG): Likewise.
8305         (TMPL_ARGS_DEPTH): Likewise.
8306         (finish_member_template_decl): Use finish_template_decl.
8307         (maybe_process_partial_specialization): New function, split out
8308         from tsubst.
8309         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
8310         (maybe_begin_member_template_processing): Use new macros.
8311         (is_member_template): Likewise.
8312         (is_member_template_class): Likewise.
8313         (add_to_template_args): Likewise.  Deal with multiple levels of
8314         args.
8315         (maybe_process_partial_specialization): New function.
8316         (retrieve_specialization): Add consistency check.
8317         (determine_specialization): Return full argument list.
8318         (check_explicit_specialization): Tweak friend handling.  Use full
8319         argument lists.  Simplify.
8320         (current_template_args): Use new macros.
8321         (push_template_decl_real): Change ill-named mainargs to specargs.
8322         Check that a partial specialization actually specializes at least
8323         one parameter.   Improve friend handling.  Modify for full
8324         template arguments.
8325         (classtype_mangled_name): Don't mangle the names of
8326         specializations.
8327         (lookup_template_class): Add entering_scope parameter.  Use it to
8328         avoid finding a template type when an instantiation is required.
8329         Simplify.  Use full template arguments.
8330         (tsubst_friend_function): Use unregister_specialization.  Use new
8331         macros.  Use full template arguments.
8332         (tsubst_friend_class): Substitute, using tsubst_template_parms,
8333         into the template parameters before passing them to
8334         redeclare_class_template.
8335         (instantiate_class_template): Simplify.  Use full template
8336         arguments.  Adjust calls to get_class_bindings.  Use
8337         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
8338         (innermost_args): Use new macros.
8339         (tsubst_aggr_type): New function, split out from tsubst.
8340         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
8341         conventions for lookup_template_class.  Refine handling of partial
8342         instantiations.   Remove calls to complete_template_args.
8343         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
8344         and set_mangled_name_for_template_decl.
8345         (tsubst_copy): Use tsubst_aggr_type.
8346         (instantiate_template): Use full template arguments.
8347         (more_specialized): Improve formatting.
8348         (more_specialized_class): Adjust calls to get_class_bindings.
8349         (get_bindings_real): Don't call complete_template_args.
8350         (most_specialized): Don't overwrite input; create a new list.
8351         (most_specialized_class): Use most_general_template.
8352         (regenerate_decl_from_template): Use unregister_specialization.
8353         Use full template arguments.
8354         (instantiate_decl): Use full template arguments.
8355         (set_mangled_name_for_template_decl): New function.
8356         * semantics.c (begin_class_definition): Use
8357         maybe_process_partial_specialization.
8358         (finish_member_class_template): New function.
8359         (finish_template_decl): Likewise.
8360         (finish_template_type): Likewise.
8361         (typeck.c): Don't crash after issuing a compiler_error.
8362         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
8363
8364 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
8365
8366         * typeck2.c (build_functional_cast): Handle default-initialization.
8367
8368         * call.c (build_over_call): Pass 1 to popclass.
8369
8370         * parse.y (direct_notype_declarator): Add precedence declaration
8371         to notype_unqualified_id case.
8372         * Makefile.in (EXPECT): Adjust.
8373
8374         * tree.c (ovl_member): Fix for single function in OVL.
8375
8376 1998-07-27  Dave Brolley  <brolley@cygnus.com>
8377
8378         * c-lex.c (yylex): Fix boundary conditions in character literal and
8379         string literal loops.
8380
8381 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
8382
8383         * decl.c (lookup_name_real): OK, do return the from_obj value
8384         unless got_object depends on template parms.
8385
8386         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8387
8388         * pt.c (coerce_template_parms): Also complain about local enums.
8389
8390         * cp-tree.h: Add prototype for set_identifier_local_value.
8391         * decl.c (set_identifier_local_value_with_scope): Make static,
8392         prototype.
8393         * search.c (covariant_return_p): Likewise.
8394         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8395
8396         * call.c (build_method_call): Only pull out the type of a destructor
8397         if it's a template type parm.
8398         * decl.c (lookup_name_real): Never return the from_obj value.
8399
8400 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8401
8402         * except.c (process_start_catch_block_old): Call start_decl_1 for
8403         catch parm.
8404         * decl.c (start_decl_1): Avoid duplicate error.
8405
8406         * init.c (expand_default_init): Only perform the initialization if
8407         it will do something.
8408
8409 1998-07-23  H.J. Lu  (hjl@gnu.org)
8410
8411         * parse.y (base_class): Check for invalid base class.
8412
8413 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8414
8415         * decl2.c (import_export_template): Fold in...
8416         (import_export_class): ...to here.  Handle dllimport/export.
8417
8418         * class.c (build_vtable): Pass at_eof to import_export_vtable.
8419         (prepare_fresh_vtable): Likewise.
8420         * decl2.c (import_export_class): Split out...
8421         (finish_prevtable_vardecl): From here.
8422         * class.c (finish_struct_1): Call import_export_class if at_eof.
8423
8424         * decl.c (start_function): #if 0 mysterious code I wrote and have
8425         forgotten why.
8426         * rtti.c (get_tinfo_fn): If this is for a class type, set
8427         DECL_CONTEXT.
8428
8429 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
8430
8431         * inc/exception: Change terminate and unexpected to ().
8432
8433         * parse.y (named_class_head_sans_basetype_defn): A
8434         named_class_head_sans_basetype followed by '{' or ':' is a defn.
8435
8436 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
8437
8438         * tree.c (canonical_type_variant): New fn to handle arrays.
8439         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8440         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
8441         * method.c (process_overload_item): Use build_overload_value for
8442         arrays.
8443
8444 1998-07-20  Dave Brolley  <brolley@cygnus.com>
8445
8446         * lex.c (mbchar.h): #include it.
8447         (GET_ENVIRONMENT): New macro.
8448         (init_parse): Set character set based on LANG environment variable.
8449         (real_yylex): Handle multibyte characters in character literals.
8450         (real_yylex): Handle multibyte characters in string literals.
8451
8452 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
8453
8454         * lex.c (do_identifier): Look for class value even if we don't
8455         have a global value.  Do implicit declaration if parsing is 2.
8456         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8457         lookup.
8458
8459 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
8460
8461         * decl.c (pushtag): Revert previous change.
8462         * pt.c (lookup_template_class): Don't put out debugging
8463         information for types that use template parameters.
8464
8465         * decl.c (pushtag): Don't put out debugging information for
8466         compiler-generated typedefs.
8467
8468         * error.c (dump_type_real): Don't crash when presented with
8469         intQI_type_node or the like.
8470
8471         * semantics.c (finish_translation_unit): Fix spelling error in
8472         comment.
8473
8474 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
8475
8476         * decl.c (lookup_name_real): Pull out single function here.
8477         (select_decl): Not here.
8478         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8479
8480         * decl.c (qualify_lookup): Tweak again.
8481
8482         * pt.c (lookup_template_class): Don't mess with the context of the
8483         instantiation.
8484         * decl2.c (current_decl_namespace): Remove special handling for
8485         templates.
8486
8487         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8488         a member template specialization.
8489
8490         * tree.c (ovl_member): Use decls_match to compare functions.
8491         * decl.c (decls_match): Check the context of a function.
8492
8493         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8494         in Koenig lookup support rules.
8495         * semantics.c (finish_call_expr): Handle the new cases.
8496
8497         * typeck.c (build_x_function_call): Handle overloaded methods.
8498
8499         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8500
8501 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8502
8503         * semantics.c (finish_object_call_expr): Revert previous change.
8504         * call.c (build_new_method_call): Likewise.  Instead, convert
8505         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8506
8507 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8508
8509         * decl.c (qualify_lookup): Handle templates.
8510
8511         * decl2.c (do_using_directive): Don't pass ancestor.
8512         * decl.c (push_using_directive): Calculate ancestor.
8513
8514         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8515         * decl.c (pushdecl): Move type shadowing handling from here...
8516         (duplicate_decls): ...to here.
8517         * decl.c (set_identifier_local_value_with_scope): New fn.
8518         (pushdecl): Use it.
8519         (set_identifier_local_value, lookup_type_current_level): New fns.
8520         * decl2.c (do_local_using_decl): Handle types and binding level
8521         stuff properly.
8522
8523         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8524         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8525         (lookup_namespace_name): Likewise.
8526         * typeck.c (build_unary_op): Not here anymore.
8527
8528         * decl2.c (do_class_using_decl): Make sure we get an identifier.
8529         * class.c (handle_using_decl): Ignore TYPE_DECLs.
8530
8531         * decl.c (qualify_lookup): New fn.
8532         (lookup_name_real): Use it.
8533
8534 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8535
8536         * decl2.c (add_using_namespace): When directly using a namespace
8537         that was indirect before, promote it.
8538
8539         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8540         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8541         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8542         * decl.c (select_decl): Replace two flag parameters by one.
8543         (unqualified_namespace_lookup): Likewise, pass flag.
8544         (lookup_flags): New function.
8545         (lookup_name_real): Compute flags, pass them.
8546         (lookup_namespace_name): Call with zero-flag.
8547         * decl2.c (ambiguous_decl): Add flag parameter, complain only
8548         according to flags.
8549         (lookup_using_namespace, qualified_lookup_using_namespace):
8550         Add flag parameter, pass them through.
8551         * lex.c (do_scoped_id): Call with zero-flag.
8552
8553 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8554
8555         * typeck.c (convert_for_assignment): Use comptypes.
8556
8557 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8558
8559         * semantics.c (finish_object_call_expr): Move test for the
8560         function called being a TYPE_DECL to ...
8561         * call.c (build_new_method_call): Here.
8562
8563 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8564
8565         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8566         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8567
8568         * lex.c (looking_for_typename): Don't initialize.
8569
8570         * decl2.c (ambiguous_decl): Clarify error message.
8571
8572         * decl.c (push_using_directive): Iterate over namespaces used
8573         indirectly.
8574
8575 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8576
8577         * decl2.c (add_using_namespace): Iterate over namespaces used
8578         indirectly.
8579
8580         * decl.c (lookup_name_real): Accept namespace aliases as locals.
8581         (cat_namespace_levels): Ignore aliases.
8582         (duplicate_decls): Ignore duplicate aliases.
8583         * decl2.c (do_namespace_alias): Process block level namespace
8584         aliases.  Store alias with pushdecl.  Remove odr errors.
8585         * parse.y (namespace_alias): New non-terminal.
8586         (extdef): Use it.
8587
8588 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8589
8590         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8591         Handle TEMPLATE_TYPE_PARM.
8592         (arg_assoc): Rewrite.
8593
8594         * pt.c (complete_template_args): Don't look at the context unless
8595         we have to.
8596
8597         * method.c (build_decl_overload_real): Fix namespace handling.
8598
8599         * typeck.c (build_unary_op): Extract a lone function from an
8600         OVERLOAD.
8601
8602         * call.c (build_scoped_method_call): Handle getting a namespace
8603         for basetype in a destructor call.
8604         (check_dtor_name): Handle enums.
8605
8606         * parse.y (using_directive): New nonterminal.
8607         (extdef, simple_stmt): Use it.
8608
8609 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8610
8611         * decl2.c (add_function): Move error message ...
8612         (arg_assoc_namespace): ... from here.
8613
8614 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8615
8616         * parse.y (namespace_qualifier): Fix multiple level handling.
8617         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
8618         (arg_assoc): Don't skip the first argument of a function.
8619
8620 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
8621
8622         * search.c (my_tree_cons): Clean up.
8623
8624 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8625
8626         * call.c (joust): Don't warn about "confusing" conversions to the
8627         same type.
8628
8629 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8630
8631         * class.c (push_nested_class): Complain about namespaces.
8632         * decl.c (start_decl): Enter the object's namespace.
8633         (cp_finish_decl): Leave it.
8634         (grokdeclarator): Likewise.
8635         * decl2.c (check_decl_namespace): New function.
8636         (finish_file): Call it.
8637         * parse.y (complex_direct_notype_declarator): Set complexity
8638         of namespace-qualified ids to -1, enter the namespace.
8639
8640         * method.c (build_template_decl_overload): Expect _DECL as first
8641         parameter.  Put context temporarily into current_namespace.
8642         * pt.c (check_explicit_specialization): Change caller.
8643         (tsubst): Likewise.
8644
8645         * init.c (build_offset_ref): Call mark_used and
8646         convert_from_reference for namespace members.
8647
8648 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8649
8650         * search.c (my_tree_cons): The bitfield is at index 2.
8651
8652 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
8653
8654         * lang-options.h: Format changed to work with new --help support
8655         in gcc/toplev.c
8656
8657 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8658
8659         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
8660         Do Koenig lookup in CALL_EXPR.
8661         (arg_assoc): Handle error_mark.
8662         * lex.c (is_global): New function.
8663         (do_identifier): Expect arguments for Koenig lookup.
8664         * parse.y (primary): Add rules for calls of unqualified function calls.
8665         (do_id): Change call of do_identifier.
8666         * pt.c (finish_stmt_expr): Likewise.
8667         * semantics.c (finish_id_expr): Likewise.
8668         (finish_call_expr): Add integer parameter to indicate
8669         argument-dependent lookup.
8670
8671         * decl.c (struct binding_level): New field using_directives.
8672         (push_using_decl): Not sorry anymore.
8673         (push_using_directive): New function.
8674         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
8675         (unqualified_namespace_lookup): New function, code from ...
8676         (lookup_name_real): ... here.
8677         * decl2.c (lookup_using_namespace): Pass using list instead of
8678         initial scope.
8679         (validate_nonmember_using_decl): New function.
8680         (do_nonmember_using_decl): New function.
8681         (do_toplevel_using_decl): Use them.
8682         (do_local_using_decl): New function.
8683         (do_using_directive): Support block-level directives.
8684         * parse.y (simple_stmt): Support using declarations and
8685         directives.
8686         (namespace_qualifier, namespace_using_decl): New non-terminals.
8687
8688         * xref.c (classname): New function.
8689         (GNU_xref_hier): Change class and base parameters to tree.
8690         * decl.c (xref_baseypes): Change caller.
8691         * friend.c (make_friend_class): Likewise.
8692
8693 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8694
8695         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
8696         comparison.
8697
8698         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
8699         template template parameter, record its use.
8700         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
8701         its template arguments if exists.
8702
8703         * pt.c (coerce_template_template_parms): New function equivalent
8704         to coerce_template_parms when IS_TMPL_PARM is true.
8705         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
8706         all callers changed.
8707
8708         (coerce_template_parms): Access ARGLIST properly when creating a
8709         new vector.  Only accept implicit TYPE_DECL as valid argument for
8710         a template template parameter when it is a base class of
8711         current_class_type.  Don't display error message when COMPLAIN is
8712         false.
8713
8714 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
8715
8716         * repo.c (get_base_filename): Use file_name_nondirectory.
8717         (open_repo_file): Likewise.
8718         * cp-tree.h (file_name_nondirectory): Add prototype.
8719
8720 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
8721
8722         * friend.c (do_friend): Pull the identifier out of declarator.
8723         Use cp_error and friends.
8724         * decl2.c (qualified_lookup_using_namespace): Fix call to
8725         purpose_member.
8726         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
8727         (grokvardecl): Use DECL_CLASS_SCOPE_P.
8728         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
8729         * class.c (warn_hidden): Fix for OVERLOAD.
8730         From grahams@rcp.co.uk:
8731         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
8732         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
8733
8734 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
8735
8736         * g++.1 (-traditional): Remove duplicated documentation.
8737
8738 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
8739
8740         * method.c (flush_repeats): Add nrepeats parameter.
8741         (issue_nrepeats): Likewise.
8742         (is_back_referenceable_type): New function.  Don't back-reference
8743         TEMPLATE_TYPE_PARMs as well as simple types like integers.
8744         (build_mangled_name_for_type): Likewise.
8745         (build_mangled_name_for_type_with_Gcode): Likewise.
8746         (lasttype): Remove.
8747         (nrepeats): Likewise.
8748         (Nrepeats): Likewise.
8749         (start_squangling): Don't clear the variables removed above.
8750         (end_squangling): Likewise.
8751         (flush_repeats): Tidy.  Use nrepeats parameter rather than
8752         Nrepeats global.
8753         (issue_nrepeats): Likewise, but with nrepeats global.  Use
8754         is_backreferenceable_type.
8755         (build_overload_nested_name): Tidy.  Add comment.  Use
8756         build_mangled_name_for_type.
8757         (build_underscore_int): Comment.
8758         (build_overload_scope_ref): Use build_mangled_name_for_type.
8759         (build_overload_int): Likewise.
8760         (build_template_template_parm_names): Tidy.
8761         (build_template_parm_names): Use build_mangled_name_for_type.
8762         (build_overload_identifier): Add comments.
8763         (build_mangled_name_for_type_with_Gcode): Split out from
8764         build_mangled_name.
8765         (build_mangled_name_for_type): Use it.
8766         (build_mangled_name): Rework to use build_mangled_name_for_type
8767         and to not use global nrepeats/Nrepeats.  Tidy.
8768         (process_modifiers): Tidy.
8769         (check_btype): Use is_backreferenceable_type.  Add comment.
8770         Rename `node' to `type'.
8771         (process_overload_item): Set numeric_output_need_bar here.
8772         Use build_mangled_name_for_type.  Tidy.
8773         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
8774         build_mangled_name_for_type.
8775
8776         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
8777         for TYPE_DECLs.
8778
8779 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
8780
8781         * cp-tree.h (warn_long_long): Define.
8782         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
8783         warning "ANSI C++ does not support `long long'".
8784         * decl2.c (warn_long_long): Define.
8785         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
8786
8787 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
8788
8789         * decl.c (xref_tag): Handle attributes between 'class' and name.
8790         * parse.y (aggr): Likewise.
8791         * semantics.c (finish_class_definition): Likewise.
8792         * Makefile.in (EXPECTED): Adjust.
8793
8794         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
8795         * decl2.c: Define them.
8796         (lang_decode_option): Handle them.
8797         * lang-options.h: Add -foptional-diags.
8798         * class.c (finish_struct): Don't complain about multiple meanings of
8799         name if -fno-optional-diags.
8800         * decl.c (pushdecl_class_level): Likewise.
8801         * lex.c (real_yylex): Check warn_multichar.
8802
8803 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
8804
8805         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
8806
8807         * tree.c (make_binfo): Fix length.
8808
8809 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
8810
8811         * decl2.c (lang_decode_option): Remove warn_template_debugging.
8812         * lang-options.h: Likewise.
8813
8814 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8815
8816         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
8817         (process_start_catch_block): Likewise for variables
8818         `false_label_rtx', `call_rtx' and `return_value_rtx'.
8819
8820 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
8821
8822         * tree.c (build_srcloc): Make sure we allocate this node on the
8823         permanent obstack.
8824
8825 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
8826
8827         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
8828         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
8829         (lang_specific_driver): Only add -lm automatically if need_math is
8830         nonzero.
8831
8832 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
8833
8834         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
8835
8836 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8837
8838         * Makefile.in (EXPR_H): New dependency variable.
8839         (decl2.o): Depend on $(EXPR_H).
8840         (typeck.o): Likewise.
8841         (init.o): Likewise.
8842         (expr.o): Likewise.
8843
8844 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
8845
8846         * decl.c (start_enum): Put local enums on permanent_obstack.
8847
8848 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
8849
8850         * cp-tree.h (c_get_alias_set): Declare.
8851         * decl.c (init_decl_processing): Set lang_get_alias_set.
8852
8853 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
8854
8855         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
8856         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
8857         flag for all function decls which are in the exception table.
8858         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
8859         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
8860         code is emitted for any referenced rtti function.
8861
8862 1998-06-25  Dave Brolley  <brolley@cygnus.com>
8863
8864         * lang-specs.h: Use new | syntax to eliminate
8865         string concatenation.
8866
8867 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
8868
8869         * cp-tree.h (CP_DECL_CONTEXT): New macro.
8870         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
8871         * method.c (build_overload_nested_name): Likewise.
8872         * sig.c (build_signature_pointer_or_reference_type): Don't set
8873         DECL_CONTEXT.
8874
8875 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8876
8877         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
8878         * cp-tree.h (FROB_CONTEXT): New macro.
8879         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
8880         * decl.c (namespace_binding): Replace NULL_TREE with
8881         global_namespace.
8882         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
8883         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
8884         Likewise.
8885         * decl.c (pushtag): Use FROB_CONTEXT.
8886         (pushdecl, make_typename_type, define_function, grokdeclarator):
8887         Likewise.
8888         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
8889         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
8890         Likewise.
8891         * decl2.c (decl_namespace): Return global_namespace if no context.
8892         * method.c (build_overload_nested_name): Expect null as context.
8893         * pt.c (mangle_class_name_for_template): Do nothing for null
8894         contexts.
8895         (lookup_template_class): Allow for null id_context.
8896
8897 1998-06-25  Richard Henderson  <rth@cygnus.com>
8898
8899         * method.c (emit_thunk): Set current_function_is_thunk for the
8900         ASM_OUTPUT_MI_THUNK case as well.
8901
8902 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8903
8904         * exception.cc (__cplus_type_matcher): Get a match_info pointer
8905         instead of an exception table entry as a parameter.
8906
8907 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8908
8909         * parse.y (function_try_block): Don't call start_catch_handler.
8910         * except.c (call_eh_info): Remove coerced field from declaration.
8911         (build_eh_type_type_ref): New function to create an address of a
8912         rtti function for the new style exception tables.
8913         (expand_start_catch_block): Split function, this contains the
8914         common part.
8915         (process_start_catch_block_old): New function to perform the rest
8916         of expand_start_catch_block under old style exceptions.
8917         (process_start_catch_block_old): New function to perform the rest
8918         of expand_start_catch_block under new style exceptions.
8919         (expand_end_catch_block): Only pop the false label off the stack under
8920         the old style of exceptions.
8921         * semantics.c (finish_try_block): Don't call start_catch_handler.
8922         * exception.cc (struct cp_eh_info): Add original_value field.
8923         (__cplus_type_matcher): Perform type matching on the original exception
8924         value, and if we have a match, set the current value.
8925         (__cp_push_exception): Set the original exception value.
8926
8927 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
8928
8929         * call.c (joust): Fix confusing conversion warning.
8930
8931         * call.c (build_op_delete_call): Add placement parm.  Check
8932         LOOKUP_SPECULATIVELY.
8933         * cp-tree.h, decl2.c, init.c: Adjust.
8934         * decl.c (finish_function): Use it.
8935
8936         * pt.c (tsubst): Diagnose creating void fields or variables.
8937
8938 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8939
8940         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8941
8942         * cp-tree.h (check_dtor_name): Add prototype.
8943
8944         * init.c (expand_member_init): Remove unused variables
8945         `ptr_type_node', `parm' and `rval'.
8946
8947         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8948         in call to fprintf.
8949         (lang_print_xnode): Likewise.
8950
8951         * typeck2.c (enum_name_string): Cast argument to sprintf to long
8952         and use %ld specifier.
8953
8954         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8955         specifier in call to fprintf.
8956         (GNU_xref_member): Cast argument to sprintf to int.
8957
8958 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
8959
8960         * typeck2.c (pop_init_level): Warn about implicit zero initialization
8961         of struct members.
8962
8963 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8964
8965         * cp-tree.h: Prototype function `check_java_method'.
8966
8967 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8968
8969         * class.c (finish_struct): Make conflicting use of id a pedwarn.
8970         * decl.c (pushdecl_class_level): Likewise.
8971
8972 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8973
8974         * pt.c (convert_nontype_argument): Issue an error when presented
8975         with an integer (real) constant that cannot be simplified to an
8976         INT_CST (REAL_CST).
8977
8978         * cp-tree.h (c_get_alias_set): Remove declaration added in
8979         1998-06-13 change that should never have been checked in.
8980
8981 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8982
8983         * typeck.c (build_binary_op_nodefault): Change % in format strings
8984         to %%.
8985
8986         * decl.c (grokvardecl): Don't build_static_name for decls that
8987         aren't at namespace scope.
8988
8989         * init.c (perform_member_init): Catch default-initialization of
8990         references.
8991
8992 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8993
8994         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8995
8996 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8997
8998         * method.c (hack_identifier): Complain about getting a namespace
8999         or class template.
9000         * typeck.c (decay_conversion): Remove check for namespaces.
9001         * typeck2.c (incomplete_type_error): Likewise.
9002         * parse.y (template_arg): Add PTYPENAME expansion.
9003
9004 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
9005
9006         * decl.c (grokvardecl): Don't build external assembler names for
9007         TYPENAMEs in other namespaces as there is no declarator.
9008         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
9009         info from DECL_CONTEXT if it is NULL.
9010
9011 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
9012
9013         * call.c (check_dtor_name): Split out.
9014         (build_scoped_method_call): Use it.
9015         (build_method_call): Use it.
9016         * init.c (build_offset_ref): Use it.
9017
9018         * typeck.c (build_static_cast): Fix handling of pointers to members.
9019
9020         * decl.c (finish_function): Just return nothing from a constructor.
9021         * typeck.c (c_expand_return): Complain about returning a void
9022         expression from a destructor.
9023
9024 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
9025
9026         * class.c (alter_access): Accept a BINFO explaining how to get
9027         from the entity whose accessed is being altered to the type doing
9028         the altering.
9029         (handle_using_decl): New function containing code split out from ...
9030         (finish_struct_1): Here.
9031
9032         * cp-tree.h (complete_type_or_else): Declare.
9033         * init.c (build_new_1, build_delete): Use it.
9034         * typeck.c (require_complete_type): Use complete_type, rather than
9035         expanding it inline.
9036         (complete_type_or_else): New function.
9037         (build_component_ref): Use it.
9038         (pointer_int_sum): Make sure the type pointed to is complete.
9039         (pointer_diff): Likewise.
9040
9041         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
9042         types.
9043
9044         * search.c (get_matching_virtual): Note that member templates
9045         cannot override virtual functions.
9046
9047 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
9048
9049         * pt.c (check_explicit_specialization): If DECLARATOR turned into
9050         an error_mark_node from lookup_template_function, return the same.
9051         (determine_specialization): Also make sure TEMPLATE_ID isn't an
9052         error_mark_node, before we try to read its operands.
9053         * decl.c (grokdeclarator): If we got an error_mark_node from
9054         check_explicit_specialization, just return it right back.
9055
9056 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
9057
9058         * class.c (instantiate_type): Don't treat template-ids that don't
9059         specify any template arguments as equivalent to ordinary
9060         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
9061         pointer-to-members for member templates.  Tidy slightly.
9062         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
9063         * init.c (build_offset_ref): Handle template-ids like ordinary
9064         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
9065         offset part of the OFFSET_REF.
9066         * typeck.c (build_unary_op): Change check for unknown types to
9067         look for OFFSET_REFs, not SCOPE_REFs.
9068
9069 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
9070
9071         * pt.c (is_member_template_class): New function.
9072         (push_template_decl_real): Use it.
9073
9074 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
9075
9076         * friend.c (do_friend): Add support for nested classes using
9077         member functions of the enclosing class as friends.
9078
9079 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
9080
9081         * call.c (convert_default_arg): Make global, not static.
9082         (convert_arg_for_ellipsis): Split out from ...
9083         (build_over_call): Here.
9084         * cp-tree.h (convert_default_arg); Declare.
9085         (convert_arg_to_ellipsis): Likewise.
9086         (do_member_init): Remove.
9087         * init.c (do_member_init): Remove; this code is dead.
9088         (expand_member_init): Remove much of this code; it is dead.
9089         * typeck.c (convert_arguments): Use convert_default_arg and
9090         convert_arg_for_ellipsis, rather than duplicating here.
9091
9092         * call.c (convert_like): Don't fail silently if
9093         build_user_type_conversion fails.  Always return error_mark_node
9094         for failure.
9095
9096 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9097
9098         * search.c (covariant_return_p): Complain about ambiguous base.
9099
9100         * typeck.c (build_component_ref): Diagnose ref to nested type.
9101
9102 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9103
9104         * decl.c (grokparms): Check that INIT isn't an error_mark_node
9105         before giving error about invalid type for default arg.
9106
9107 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9108
9109         * call.c (build_method_call): Fix thinko.
9110
9111 1998-06-10  Dave Brolley  <brolley@cygnus.com>
9112
9113         * decl2.c (lang_decode_option): New argc/argv interface.
9114         * cp-tree.h (lang_decode_option): New argc/argv interface.
9115         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
9116         specified for cpplib-enabled compilers.
9117         * lex.c (lang_init): Don't check_newline for cpplib.
9118         (init_parse): Don't initialize cpplib here.
9119
9120 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9121
9122         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
9123         piece before checking DECL_MUTABLE_P.
9124
9125 1998-06-10  John Carr  <jfc@mit.edu>
9126
9127         * tree.c (debug_binfo): Make printf format match arguments.
9128
9129         * error.c (OB_PUTI): Make printf format match arguments.
9130
9131 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9132
9133         * init.c (perform_member_init): Handle default-initialization.
9134
9135         * except.c (build_throw): Handle throwing NULL.
9136
9137         * typeck.c (build_x_function_call): Use resolve_offset_ref.
9138
9139         * search.c (compute_access): Only strip an anonymous union
9140         for a FIELD_DECL.
9141
9142         * call.c (add_builtin_candidates): Tweak.
9143
9144         * cvt.c (build_expr_type_conversion): Restore code for conversion
9145         from class types.
9146         * decl2.c (delete_sanity): Use it.  Clean up.
9147
9148         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
9149
9150 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
9151
9152         * typeck.c (c_expand_return): Don't warn about void expressions on
9153         return statements in functions returning void.
9154
9155 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
9156
9157         * pt.c (fn_type_unification): Revise documentation.  Tidy.
9158         (type_unification): Likewise.
9159
9160 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
9161
9162         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
9163         expand_end_catch.
9164         * parse.y (function_try_block): Rename expand_start_catch, and delete
9165         expand_end_catch.
9166         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
9167         expand_end_catch.
9168
9169 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
9170
9171         * search.c (lookup_member): New fn.
9172         * class.c (finish_struct_1): Use it.
9173         * decl.c (lookup_name_real): Use it.
9174
9175 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9176
9177         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
9178
9179         * cp-tree.h: Add prototype for `maybe_print_template_context' and
9180         `maybe_make_one_only'.
9181
9182         * decl.c (auto_function): Remove unused variable `decl'.
9183
9184         * decl2.c: Include dwarf2out.h and dwarfout.h.
9185
9186         * lex.c: Remove redundant declarations of `set_float_handler' and
9187         `asm_out_file'.
9188
9189 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
9190
9191         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
9192         time flag.  Call __cp_eh_info instead of __cp_exception_info.
9193         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
9194         (__cp_exception_info): Return offset into cp_eh_info structure to
9195         match what use to be the start of this structure.
9196         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
9197         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
9198         compile time flag.
9199         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
9200         __cp_eh_info instead of __cp_exception_info.
9201
9202 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
9203
9204         * decl.c (cp_finish_decl): Disable inlining of extern inlines
9205         with static variables.
9206
9207 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
9208
9209         * init.c (build_offset_ref): Correct previous change to use build,
9210         not build_min.
9211
9212 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
9213
9214         * class.c (instantiate_type): Handle pointer-to-members where the
9215         member is a template.
9216         * init.c (build_offset_ref): Likewise.
9217         * typeck.c (build_unary_op): Likewise.
9218
9219 1998-06-07  Richard Henderson  <rth@cygnus.com>
9220
9221         * lex.c (lang_init_options): New function.
9222         (lang_init): Remove flag_exceptions == 2 hack.
9223
9224 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9225
9226         * search.c (envelope_add_decl): Tweak for implicit typename.
9227
9228         * call.c (joust): Also warn about confusing conversion op/constructor
9229         overload resolution.
9230
9231         * spew.c (yylex): Also return the TYPE_DECL if got_object.
9232         Don't clear got_object after '~'.
9233         * call.c (build_scoped_method_call): Tweak destructor handling.
9234         (build_method_call): Likewise.
9235         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
9236         TYPE_MAIN_VARIANT for destructors.
9237         * semantics.c (finish_object_call_expr): Complain about calling a
9238         TYPE_DECL.
9239
9240 1998-06-05  Per Bothner  <bothner@cygnus.com>
9241
9242         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
9243         Define - update needed by gcc.c change.
9244
9245 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9246
9247         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
9248
9249 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9250
9251         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
9252         * decl.c (lookup_name_real): Add namespaces_only parameter.
9253         If set, return only NAMESPACE_DECLs.
9254         (select_decl): Likewise.
9255         (identifier_type_value): Give additional parameter.
9256         (lookup_name_nonclass): Likewise.
9257         (lookup_name): Likewise.
9258         (find_binding): Skip namespace aliases.
9259         (binding_for_name): Likewise.
9260         (push_namespace): Check for namespace aliases.
9261         (lookup_name_namespace_only): New function.
9262         (begin_only_namespace_names, end_only_namespace_names): New functions.
9263         * decl2.c (set_decl_namespace): Skip namespace aliases.
9264         (do_using_directive): Likewise.
9265         (do_namespace_alias): Produce namespace aliases, fix alias
9266         redeclaration.
9267         * error.c (dump_decl): Support SCOPE_REF.
9268         * parse.y (extdef): Wrap lookup with namespace_only for namespace
9269         aliases and using declarations.
9270
9271 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
9272
9273         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
9274
9275         * error.c (dump_expr): Clean up NEW_EXPR case.
9276
9277 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9278
9279         Suggested by Brendan Kehoe
9280         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
9281         treat it as using ::decl.
9282
9283         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
9284
9285         * tree.c (mapcar): Support NEW_EXPR.
9286
9287         * error.c (dump_expr): Support NEW_EXPR.
9288
9289 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
9290
9291         * method.c (make_thunk): Use overload machinery to make name.
9292         * search.c (covariant_return_p): New fn.
9293         (get_matching_virtual): Use it.
9294
9295         * init.c (build_new_1): Fix check for void.
9296
9297 1998-06-01  Per Bothner  <bothner@cygnus.com>
9298
9299         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
9300         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
9301         java_int_type_node, java_long_type_node, java_float_type_node,
9302         java_double_type_node, java_char_type_node, java_boolean_type_node):
9303         New "primitive" types, with predefined names __java_byte etc.
9304         (record_builtin_java_type):  New function.
9305         (init_decl_processing):  Make Java types with record_builtin_java_type.
9306         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
9307         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
9308         (grokfndecl):  Call check_java_method for Java classes.
9309         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
9310         (process_overload_item):  Match types against specific
9311         java_XX_type_node types, rather than using is_java_type.
9312         * class.c (finish_struct_1):  Don't add default copy constructor
9313         or operator= if TYPE_FOR_JAVA.
9314         (pop_lang_conext):  Restore strict_prototyp proper if Java.
9315         * decl2.c (acceptable_java_type, check_java_method):  New functions.
9316         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
9317         (tsubst):  Move common statement after if statement.
9318         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
9319
9320 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
9321
9322         * pt.c (for_each_template_parm): Use first_rtl_op.
9323
9324         * tree.c (build_cplus_array_type_1): Also check index_type for
9325         template parms.
9326
9327 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
9328
9329         * pt.c (tsubst): Always copy BINFO_BASETYPES.
9330
9331 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
9332
9333         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
9334         TYPE_SIZE_UNIT too.
9335
9336 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
9337
9338         * decl.c (grokdeclarator): Don't complain about in-class
9339         initialization of static consts if we don't really know the type
9340         of the variable.
9341
9342 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
9343
9344         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
9345         * method.c (build_destructor_name): New fn.
9346         * decl2.c (maybe_retrofit_in_chrg): Split out...
9347         (grokclassfn): From here.  Reorganize.
9348         * decl.c (grok_ctor_properties): Make sure ctors for types with
9349         vbases have the in_chrg parm.
9350         * pt.c (instantiate_class_template): Update
9351         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
9352         grok_*_properties.
9353         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
9354
9355 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
9356
9357         * pt.c (instantiate_decl): Make test for whether or not static
9358         variables should be instantiated early match its comment.
9359
9360 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
9361
9362         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
9363         a member.
9364         (start_function): Call check_default_args.
9365         * decl2.c (grokfield): Don't call check_default_args.
9366         (check_default_args): Use cp_error_at.
9367         * lex.c (do_pending_defargs): Call check_default_args.
9368
9369 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
9370
9371         * call.c (build_method_call): Make sure get_type_value returns
9372         something before we try to use its TYPE_MAIN_VARIANT.
9373         (build_scoped_method_call): Likewise.
9374
9375 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
9376
9377         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9378         initialize an array.
9379
9380         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9381         DECL_VIRTUAL_P.
9382
9383         * friend.c (do_friend): Clarify template warning.
9384
9385 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
9386
9387         * decl.c (shadow_label): Don't treat decls as identifiers.
9388         (maybe_push_to_top_level): Clear shadowed_labels.
9389
9390         * pt.c (instantiate_decl): Reset lineno and filename after calling
9391         regenerate_decl_from_template.
9392
9393         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9394         error_mark_node.
9395
9396 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
9397
9398         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9399
9400 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9401
9402         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9403         (convert_nontype_argument): Handle cases when nontype template
9404         parameters become classes after substitution.
9405
9406 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9407
9408         * friend.c (is_friend): Use comptypes, rather than == to compare
9409         types.  Modify for new representation of template friends.
9410         (make_friend_class): Likewise.
9411         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
9412         (instantiate_class_template): Deal with template friends.
9413
9414         * decl.c (store_parm_decls): Remove redundant call to
9415         expand_main_function.
9416
9417 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9418
9419         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9420         DECL_USE_TEMPLATE.
9421
9422 1998-05-26  Per Bothner  <bothner@cygnus.com>
9423
9424         * language_as_string:  Handle lang_java.
9425
9426 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
9427
9428         * decl.c (pushdecl): Don't copy the type_decl.
9429
9430 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9431
9432         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9433         current_class_type.
9434         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9435
9436         * parse.y (complex_direct_notype_declarator): Use $1 to access
9437         scope of notype_qualified_id.
9438
9439 1998-05-26  Dave Brolley  <brolley@cygnus.com>
9440
9441         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9442         (init_parse): Initialize cpplib interface.
9443
9444         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9445         empty continuation.
9446
9447 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9448
9449         * decl.c (pushtag): Avoid crashing on erroneous input.
9450
9451 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9452
9453         * decl.c (push_namespace): Only produce one unique name for
9454         anonymous namespaces.
9455         (get_unique_name): Remove.
9456
9457 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
9458
9459         * call.c (tourney): Don't do any extra comparisons.
9460
9461         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9462
9463         * cp-tree.h (processing_template_parmlist): Declare.
9464         * decl.c (pushtag): Don't call push_template_decl when we
9465         shouldn't.
9466         * pt.c (processing_template_parmlist): New variable.
9467         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9468         (complete_template_args): Use it.
9469         (add_to_template_args): Likewise.
9470         (innermost_args): Likewise.
9471         (tsubst): Likewise.
9472         (begin_template_parm_list): Use processing_template_parmlist.
9473         (end_template_parm_list): Likewise.
9474
9475         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9476         * decl.c (grokdeclarator): Use it.
9477         * decl2.c (grok_x_components): Likewise.
9478         * init.c (initializing_context): Likewise.
9479         * method.c (do_build_copy_constructor): Likewise.
9480         (do_build_assign_ref): Likewise.
9481         * search.c (compute_access): Likewise.
9482         * typeck.c (build_component_ref): Likewise.
9483
9484         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9485         unnamed type a typedef name "for linkage purposes".
9486
9487         * pt.c (lookup_template_class): Don't look at
9488         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9489
9490         * method.c (build_overload_int): Handle error cases gracefully.
9491
9492         * pt.c (instantiate_decl): Handle static member variables
9493         correctly.
9494
9495         * pt.c (tsubst): Use the tsubst'd type when producing new
9496         TEMPLATE_PARM_INDEX nodes.
9497
9498 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
9499
9500         * tree.c (cp_tree_equal): Handle pointers to member functions.
9501
9502         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
9503         sure the type of the REF_BIND is a reference type.
9504         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9505         target_type for clarity.
9506
9507         * parse.y (xcond): Move call to condition_conversion ...
9508         * semantics.c (finish_for_cond): Here.
9509         * parse.c: Regenerated.
9510
9511 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
9512
9513         * decl.c (push_namespace): Namespaces have type void.
9514         * typeck2.c (incomplete_type_error): Complain about namespace
9515         used as expression.
9516         * typeck.c (decay_conversion): Likewise.
9517
9518 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9519
9520         * error.c (dump_expr): Support namespaces.
9521
9522 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
9523
9524         * cp-tree.def: Add SRCLOC.
9525         * cp-tree.h: Add struct tree_srcloc and accessor macros.
9526         * tree.c (build_srcloc, build_srcloc_here): New fns.
9527         * pt.c (add_pending_template): Use build_srcloc_here.
9528         (push_tinst_level): Update last_template_error_tick before erroring.
9529         (instantiate_decl): Restore lineno and input_filename before
9530         calling add_pending_template.
9531         * decl2.c (finish_file): Set up lineno and input_filename for
9532         pending templates.
9533
9534 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9535
9536         * decl.c (lang_print_error_function): New fn.
9537         (init_decl_processing): Set print_error_function to use it.
9538         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9539
9540         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9541         ICS_BAD_FLAG.
9542
9543         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9544         copy-initialization.
9545
9546         * class.c (build_vtable_entry): Use int_fits_type_p.
9547         (build_vtable): Pass a signed offset to build_vtable_entry.
9548         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9549         set_rtti_entry): Likewise.
9550
9551 1998-05-22  Per Bothner  <bothner@cygnus.com>
9552
9553         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
9554         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
9555
9556 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9557
9558         * pt.c (print_template_context): Use fprintf instead of cp_error.
9559
9560         * pt.c (determine_specialization): Just return an error_mark_node.
9561         Also print the decl we want in error messages.  If we complain,
9562         return error_mark_node.
9563         (tsubst_friend_function): Set lineno and input_filename so
9564         error messages will be useful.
9565         (instantiate_template): Just return an error_mark_node.
9566         (check_explicit_specialization): Don't mess with a returned
9567         error_mark_node.
9568
9569         * pt.c (print_template_context): Add new argument.
9570         (maybe_print_template_context): New fn.
9571         (push_tinst_level): Increment tinst_level_tick.
9572         (pop_tinst_level): Likewise.
9573         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
9574         xrealloc instead of xmalloc.
9575
9576         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9577
9578 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9579
9580         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9581         if the template we looked up is the same as the one we already
9582         have.
9583
9584 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
9585
9586         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9587         (cpp_reader,parse_in): Add for cpplib.
9588         (check_newline): Call handle_sysv_pragma with new interface.
9589         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9590
9591         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9592         (sub_getch): Call GETC for cpplib.
9593
9594         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9595         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9596
9597         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9598
9599 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9600
9601         * decl2.c (maybe_make_one_only): New fn.
9602         (import_export_vtable): Use it.
9603         (import_export_decl): Likewise.
9604         * pt.c (mark_decl_instantiated): Likewise.
9605
9606 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
9607
9608         * decl2.c (find_representative_member): Rename to ...
9609         (build_anon_union_vars): New function.
9610         (finish_anon_union): Fix stupidity of previous change.
9611
9612 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9613
9614         * decl.c (grokfndecl): Handle definition of specialization in
9615         friend declaration.
9616
9617         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
9618
9619 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9620
9621         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
9622         to look for type declarations.
9623         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
9624         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
9625         (finish_member_class_template): Declare.
9626         * decl.c (pushtag): Put member class templates on the
9627         CLASSTYPE_TAGS list, just as for ordinary member classes.
9628         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
9629         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
9630         IDENTIFIER_NAMESPACE_VALUEs.
9631         * parse.y (component_decl): Move code to ...
9632         * semantics.c (finish_member_class_template): New function.
9633         Don't put member class templates on the list of components for a
9634         class.
9635         * parse.c: Regenerated.
9636         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
9637         In fact, don't use DECL_CONTEXT at all here.
9638
9639 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9640
9641         * decl.c (record_unknown_type): New function.
9642         (init_decl_processing): Call it for the unknown and global type
9643         nodes.
9644
9645 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9646
9647         * decl2.c (find_representative_member): New function.
9648         (finish_anon_union): Use it.
9649
9650         * cp-tree.h (MAIN_NAME_P): New macro.
9651         (DECL_MAIN_P): Likwise.
9652         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
9653         (grokfndecl): Use the new macros.
9654         (grokdeclarator): Likewise.
9655         (start_function): Likewise.
9656         (store_parm_decls): Likewise.
9657         (finsh_function): Likewise.
9658         * friend.c (do_friend): Likewise.
9659         * typeck.c (build_function_call_real): Likewise.
9660         (build_unary_op): Likewise.
9661
9662 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
9663
9664         * decl2.c (start_objects, finish_objects, do_dtors,
9665         do_ctors): Split out from...
9666         (finish_file): ...here.
9667
9668 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
9669
9670         * tree.c (is_overloaded_fn): Don't abort on placeholders from
9671         push_class_decls.
9672
9673 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
9674
9675         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
9676
9677         * error.c (dump_expr): Handle an ARROW_EXPR.
9678
9679 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
9680
9681         * decl.c (saveable_obstack): Declare.
9682         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
9683         declare, if necessary.
9684
9685 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
9686
9687         * call.c (compare_qual): Remove.
9688         (is_subseq): Tweak.
9689         (is_properly_derived_from): New function.
9690         (maybe_handle_ref_bind): Likewise.
9691         (maybe_handle_implicit_object): Likewise.
9692         (compare_ics): Modify substantially to bring into conformance with
9693         the standard.
9694         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
9695         (comp_cv_qualification): Declare.
9696         (comp_cv_qual_signature): Likewise.
9697         * typeck.c (comp_cv_qualification): Likewise.
9698         (comp_cv_qual_signature): Likewise.
9699
9700 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9701
9702         * Makefile.in (parse.o): Depend on toplev.h.
9703
9704         * class.c (typecode_p): Remove prototype and definition.
9705
9706         * cp-tree.h (currently_open_class, is_empty_class, member_p):
9707         Add prototype.
9708
9709         * decl.c (push_overloaded_decl_top_level): Remove prototype and
9710         definition.
9711
9712         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
9713         in call to `cp_thing'.
9714         (cp_warning): Likewise for function pointer `warning'.
9715
9716         * except.c (do_function_call): Remove prototype and definition.
9717         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
9718
9719         * method.c (is_java_type): Add prototype and make it static.
9720
9721         * parse.y: Include toplev.h.
9722
9723         * pt.c (type_unification): Remove unused variable `arg'.
9724         (instantiate_decl): Likewise for `save_ti'.
9725
9726         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
9727
9728 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
9729
9730         * init.c (build_member_call): Handle template_ids.
9731         * parse.y (primary): Add global_scope template_id.
9732
9733 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
9734
9735         * decl2.c (get_sentry): Use end_temporary_allocation.
9736         Don't declare permanent_obstack.
9737
9738 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
9739
9740         * parse.y (.finish_new_placement): New non-terminal.
9741         (unary_expr, new_type_id): Use it.
9742         * parse.c: Regenerated.
9743
9744 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
9745
9746         * pt.c (redeclare_class_template): Say where the original definition
9747         of the template-parameter's default argument appeared.
9748
9749 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
9750
9751         * call.c (build_over_call): Tweak empty class handling.
9752
9753         * decl.c (make_typename_type): Use currently_open_class.
9754
9755         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
9756
9757 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9758
9759         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
9760         for a type unless it is one.
9761
9762         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
9763
9764 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
9765
9766         * Makefile.in (program_transform_name, objdir): Define.
9767
9768         * Makefile.in (BISON): Use bison from the build tree if it exists.
9769         (FLEX): Likewise.
9770
9771 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9772
9773         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
9774
9775         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
9776
9777 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
9778
9779         * call.c (build_scoped_method_call): Likewise.
9780
9781 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
9782
9783         * init.c (build_new_1): Call suspend_momentary around the creation
9784         of values that must be saved for exception handling.
9785         * parse.y (.build_new_placement): New non-terminal.
9786         (unary_expr, new_placement): Use it.
9787         * parse.c: Regenerated.
9788
9789 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
9790
9791         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
9792         old and new types.
9793
9794         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
9795         canonical type.
9796
9797         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
9798
9799 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
9800
9801         * decl.c (start_decl): Revert problem change.
9802
9803         * Makefile.in (CONFLICTS): Fix.
9804
9805 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9806
9807         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
9808
9809 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
9810
9811         * class.c (finish_struct_1): Use BINFO_SIZE.
9812
9813         * decl.c (start_decl): Use 'tem'.
9814
9815 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
9816
9817         * exception.cc: Include eh-common.h.
9818         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
9819         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
9820         (__cp_push_exception): Initialize eh_info struct as well.
9821         * except.c: Remove local structs and include eh-common.h.
9822         (init_exception_processing): Set language and version codes.
9823         (call_eh_info): Add presence of eh_info to runtime description of
9824         struct cp_eh_info.
9825         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
9826         * semantics.c (finish_try_block): Call start_catch_block() and
9827         end_catch_block().
9828         * parse.y (function_try_block): Call start_catch_block() and
9829         end_catch_block().
9830
9831 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
9832
9833         * typeck.c (original_type): New function.
9834         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
9835         to see if they're actually the same.
9836         * cp-tree.h (original_type): Declare.
9837
9838 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9839
9840         * Makefile.in (lex.o): Depend on output.h.
9841
9842         * call.c (add_function_candidate): Remove unused variable `cand'.
9843         (add_conv_candidate): Likewise.
9844         (build_builtin_candidate): Likewise.
9845
9846         * cp-tree.h: Add prototype for `types_overlap_p'.
9847
9848         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
9849
9850         * decl2.c (merge_functions): Remove unused variables `tmp' and
9851         `tempn'.
9852
9853         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
9854         (code_as_string): Likewise.
9855         (language_as_string): Likewise.
9856         (parm_as_string): Likewise.
9857         (op_as_string): Likewise.
9858         (assop_as_string): Likewise.
9859         (cv_as_string): Likewise.
9860
9861         * lex.c: Include output.h.
9862
9863         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
9864
9865         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
9866         ATTRIBUTE_UNUSED.
9867
9868         * tinfo.cc (__class_type_info::dcast): Change the type of variable
9869         `i' from int to size_t.
9870
9871         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
9872         ATTRIBUTE_UNUSED.
9873
9874 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
9875
9876         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
9877         DECL_NAMESPACE_SCOPE_P.
9878         (lang_decl_name): Likewise.
9879         * pt.c (tsubst_friend_function, tsubst): Likewise.
9880         * decl.c (pushdecl, redeclaration_error_message, start_decl,
9881         cp_finish_decl, start_function): Likewise.
9882         * class.c (finish_struct_1): Likewise.
9883         * call.c (build_over_call): Likewise.
9884         (compare_ics): Use DERIVED_FROM_P.
9885
9886 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
9887
9888         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
9889         * method.c (build_mangled_name): Use it.
9890         (build_decl_overload_real): Likewise.
9891
9892         * error.c (dump_simple_decl): New function, broken out from ...
9893         (dump_decl): Use it.
9894
9895 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
9896
9897         * ptree.c (lang_print_xnode): Add missing `break'.
9898
9899         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
9900
9901         * call.c (add_template_candidate): Adjust for changes to
9902         fn_type_unification.
9903         (add_template_candidate_real): Likewise.
9904         (add_template_conv_candidate): Likewise.
9905         (build_user_type_conversion_1): Likewise.
9906         (build_new_function_call): Likewise.
9907         (build_object_call): Likewise.
9908         (build_new_op): Likewise.
9909         (build_new_method_call): Likewise.
9910         * class.c (instantiate_type): Likewise.
9911         * cp-tree.h (unification_kind_t): New type.
9912         (fn_type_unification): Adjust prototype.
9913         (type_unificaiton): Likewise.
9914         * pt.c (UNIFY_ALLOW_NONE): New macro.
9915         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
9916         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
9917         (UNIFY_ALLOW_DERIVED): Likewise.
9918         (unify): Change prototype.
9919         (maybe_adjust_types_for_deduction): New function.
9920         (check_cv_quals_for_unify): Likewise.
9921         (determine_specialization): Adjust.
9922         (fn_type_unification): Likewise.
9923         (type_unification): Likewise.
9924         (type_unification_real): Likewise.  Use
9925         maybe_adjust_types_for_deduction.  Fix mishandling of
9926         back-unification of template functions passed as arguments.  Pass
9927         appropriate combination of UNIFY_ALLOW_* to unify.
9928         (unify): Remove unused NTPARMS parameter.  Use
9929         check_cv_quals_for_unify.  Remove bogus code that allowed
9930         too-generous unification in order to adhere more closely to standard.
9931         (get_bindings_real): Adjust.
9932         (get_class_bindings): Likewise.
9933
9934         * method.c (build_overload_identifier): Only use the innermost
9935         template arguments when mangling.
9936         * pt.c (tsubst_template_argument_vector): New function.
9937         (complete_template_args): Deal with the situation where the
9938         extra_args contain more than one level of arguments.
9939         (lookup_template_class): Deal with member template classes, which
9940         may have more than one level of arguments.
9941         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9942         Improve handling of member template classes.  Use
9943         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
9944         tsubst_template_argument_vector where appropriate.
9945         (regenerate_decl_from_template): Break out from ...
9946         (instantiate_decl): Here.
9947
9948         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9949         * parse.h: Regenerated.
9950         * parse.c: Really regenerated.
9951
9952         * cp-tree.h (finish_unary_op_expr): New function.
9953         (finish_id_expr): Likewise.
9954         (begin_new_placement): Likewise.
9955         (finish_new_placement): Likewise.
9956         (finish_declarator): Likewise.
9957         (finish_translation_unit): Likewise.
9958         (finish_parmlist): Likewise.
9959         (begin_class_definition): Likewise.
9960         (finish_class_definition): Likewise.
9961         (finish_default_args): Likewise.
9962         (finish_inline_definitions): Likewise.
9963         * parse.y (GCC_ASM_KEYWORD): Remove.
9964         (TYPENAME_ELLIPSIS): Likewise.
9965         * parse.c: Regenerated.
9966         Use new functions in semantics.c in the actions for many rules.
9967         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9968         * hash.h: Regenerated.
9969         * semantics.c (finish_expr_stmt): Allow NULL expr.
9970         (finish_unary_op_expr): New function, containing
9971         code previously in parse.y.
9972         (finish_id_expr): Likewise.
9973         (begin_new_placement): Likewise.
9974         (finish_new_placement): Likewise.
9975         (finish_declarator): Likewise.
9976         (finish_translation_unit): Likewise.
9977         (finish_parmlist): Likewise.
9978         (begin_class_definition): Likewise.
9979         (finish_class_definition): Likewise.
9980         (finish_default_args): Likewise.
9981         (finish_inline_definitions): Likewise.
9982
9983 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
9984
9985         * typeck.c (build_c_cast): Don't decay arrays and functions to
9986         pointer type when converting to a class type.
9987
9988 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
9989
9990         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9991         (DECL_CLASS_SCOPE_P): Likewise.
9992
9993 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
9994
9995         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9996         * decl2.c (constructor_name_full): Likewise.
9997
9998 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
9999
10000         * tree.c (mapcar): Add OVERLOAD support.
10001
10002         * init.c (resolve_offset_ref): We must use basetype_path before we
10003         destroy it with a call to convert_pointer_to.
10004
10005 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10006
10007         * class.c (currently_open_class): New fn.
10008         * decl.c (lookup_name_real): Use it.
10009         * search.c (lookup_field): Likewise.
10010
10011 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10012
10013         * cp-tree.def (OVERLOAD): New node.
10014         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
10015         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
10016         (NAMESPACE_BINDING): Remove.
10017         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
10018         namespace_binding.
10019         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
10020         Define.
10021         (tree_overload): New struct.
10022         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
10023         (REAL_IDENTIFIER_TYPE_VALUE): Define.
10024         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
10025         (lang_decl_flags): Remove in_namespace.
10026         (lang_decl): Remove chain.
10027         (DECL_CHAIN, DECL_NAMESPACE): Remove.
10028         (flag_honor_std): Declare extern.
10029         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
10030         namespace_binding, set_namespace_binding,
10031         lookup_function_nonclass, cat_namespace_levels,
10032         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
10033         scratch_ovl_cons, ovl_member, build_overload): Declare.
10034         (decl_list_length, get_namespace_id, current_namespace_id,
10035         overloaded_globals_p): Remove.
10036         (lookup_using_namespace, qualified_lookup_using_namespace): Change
10037         return type.
10038         (push_scratch_obstack): New macro.
10039         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
10040         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
10041         convs, fns.
10042         (build_new_function_call): Iterate using OVL_CHAIN.
10043         Print DECL_NAME in when reporting ambiguities.
10044         (build_object_call): Iterate using OVL_NEXT for fns, convs.
10045         (build_new_op): Call lookup_function_nonclass.
10046         Iterate using OVL_NEXT.
10047         (build_op_delete_call): Change detection of members.
10048         Do not wrap TREE_LIST around fields and single global functions.
10049         (build_over_call): Don't push a class level if the context is a
10050         namespace.
10051         (build_new_method_call): Iterate using OVL_NEXT.
10052         * class.c (add_method): Chain overloaded members using
10053         build_overload.  Remove copying of method.
10054         (grow_method): When iterating through the obstack, expect OVERLOAD
10055         nodes.  Chain overload members.
10056         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
10057         nodes in call to get_baselinks.
10058         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
10059         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
10060         fdecls that are OVERLOAD nodes.
10061         (validate_lhs): New function.
10062         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
10063         code.  Use DECL_NAME in error messages.  Split code between global
10064         and member function processing.
10065         * decl.c (global_type_node): New static variable.
10066         (in_std): New global.
10067         (struct binding_level): New field usings.
10068         (resume_binding_level): Assert that we are not in a class.
10069         (toplevel_bindings_p): Just check for namespace_p or
10070         pseudo_global.
10071         (resume_level): Remove.
10072         (find_binding): New function.
10073         (binding_for_name): Call it.
10074         (namespace_binding, set_namespace_binding): New functions.
10075         (push_namespace): Associate binding level with new namespace,
10076         resume_binding_level for existing namespace.  Remove old code.
10077         Fake std by counting.
10078         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
10079         (maybe_push_to_top_level): Save current namespace.
10080         (pop_from_top_level): Restore saved namespace.
10081         (pop_namespace): Call suspend_binding_level.  Remove old code.
10082         (cat_namespace_levels): New function.
10083         (set_identifier_type_value_with_scope): For namespace bindings,
10084         set BINDING_TYPE, and use global_type_node.
10085         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
10086         (identifier_type_value): New function.
10087         (pushtag): If no context, use current_namespace.
10088         (duplicate_decls): Don't process DECL_CHAIN.
10089         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
10090         already set.  Never reset it to NULL_TREE.  Lookup global variables
10091         in their namespace.  Push overloaded templates if they are on
10092         namespace level.
10093         (pushdecl_namespace_level): New function.
10094         (pushdecl_top_level): Implement using pushdecl_namespace_level.
10095         (pushdecl_using_decl): New function.
10096         (overloaded_globals_p): Remove.
10097         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
10098         them.  Use namespace_binding and set_namespace_value.
10099         (redeclaration_error_message): Complain if the declarations come
10100         from different namespaces.
10101         (lookup_tag): On namespace level, look in the BINDING_TYPE.
10102         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
10103         old code.
10104         (select_decl): New function.
10105         (lookup_name_real): Call it for qualified and unqualified lookup.
10106         Pass tree_bindings from the stack.
10107         If prefer_type is 1, also accept namespaces.
10108         (lookup_function_nonclass): New function.
10109         (init_decl_processing): Set the binding level of the global
10110         namespace to global_binding_level.
10111         Build a proper type list for __builtin_apply.
10112         Initialize std_node to "fake std" if flag_honor_std is set.
10113         Initialize global_type_node.
10114         Allocated bad_alloc in namespace std if flag_honor_std.
10115         (define_function): Set the DECL_CONTEXT to the current_namespace.
10116         (start_decl): A namespace is not considered as a context here.  If
10117         the DECL_CONTEXT is a namespace, push the decl.
10118         (cp_finish_decl): Check for namespaces used as initializers.
10119         (grokfndecl): Add namespace parameter.  Remove processing of
10120         DECL_CHAIN.
10121         (grokvardecl): Add namespace parameter.
10122         (grokdeclarator): Process SCOPEs that are namespaces.  For
10123         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
10124         (start_function): Check for contexts that are namespaces.
10125         Set context for declarations that have not been pushed.
10126         (store_parm_decls): Check for ::main only.
10127         (finish_function): Likewise.
10128         (start_method): Check for contexts that are namespaces.
10129         (start_method): Remove DECL_CHAIN processing.
10130         * decl2.c (flag_honor_std): Declare.
10131         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
10132         (decl_namespace_list): New static global.
10133         (grok_x_components): Ignore namespaces as type contexts.
10134         (check_classfn): Expect OVERLOAD nodes.
10135         (grokfield): Remove DECL_CHAIN processing.
10136         (finish_file): Call cat_namespace_levels.
10137         (merge_functions): New function.
10138         (ambiguous_decl): Rewrite.
10139         (lookup_using_namespace): Produce tree_bindings.
10140         (qualified_lookup_using_namespace): Likewise.
10141         (set_decl_namespace, decl_namespace, current_decl_namespace,
10142         push_decl_namespace, pop_decl_namespace): New functions.
10143         (arg_lookup): New struct.
10144         (add_function, arg_assoc_namespace, arg_assoc_class,
10145         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
10146         New functions.
10147         (get_namespace_id, current_namespace_id): Remove.
10148         (do_toplevel_using_decl): Rewrite.
10149         (do_class_using_decl): Complain about namespace qualifiers.
10150         (do_using_directive): Sorry if not on namespace level.  Complain
10151         about unknown namespaces.
10152         * error.c (dump_aggr_type): Check for namespace contexts.
10153         * except.c (init_exception_processing): Push terminate into std.
10154         * friend.c (is_friend): A namespace is not a context, here.
10155         * init.c (expand_member_init): Remove DECL_CHAIN processing.
10156         (build_offset_ref): Process OVERLOAD nodes.
10157         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
10158         * lex.c (identifier_type): Loop using OVL_CHAIN.
10159         (see_typename): Set looking_for_typename to 2.
10160         (real_yylex): Likewise.
10161         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
10162         (do_scoped_id): Expect OVERLOAD nodes.
10163         Change calling convention for qualified_lookup_using_namespace.
10164         (build_lang_decl): Don't set in_namespace anymore.
10165         * method.c (typevec_size): New global.
10166         (build_overload_nested_name): Return if global_namespace.
10167         Otherwise, always expect a declaration context.
10168         (build_qualified_name): Likewise.
10169         Make sure we don't write beyond typevec_size.
10170         (build_decl_overload_real): Likewise.
10171         Allocate one extra slot for the namespace.
10172         (hack_identifier): Mark code dead.
10173         Process OVERLOAD and NAMESPACE_DECL nodes.
10174         * parse.y (program): Pop namespaces until in global namespace.
10175         (extdef): In a using-declaration, don't discard the identifier if
10176         there is no declaration.
10177         (left_curly): Ignore type contexts which are namespaces.
10178         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
10179         used as scope.
10180         * pt.c (template_class_depth): Expect types to be namespaces.
10181         (determine_specialization): Simplify by expecting OVERLOAD nodes.
10182         (push_template_decl): Push into namespace level.
10183         Reset ctx if it is a namespace.
10184         Set DECL_CONTEXT to current_namespace if not set already.
10185         Ignore real contexts that are namespaces.
10186         (mangle_class_name_for_template): Skip global_namespace.
10187         Mangle other namespaces as declarations.
10188         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
10189         (lookup_template_class): Push into namespace of context.
10190         If the context is a namespace, set it to global_namespace.
10191         Use id_context for mangling.
10192         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
10193         (tsubst_friend_function): Ignore namespace contexts.
10194         Push into namespace level.
10195         (tsubst): Handle NAMESPACE_DECL nodes.
10196         Remove DECL_CHAIN processing.
10197         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
10198         * ptree.c (print_lang_identifier): Print bindings.
10199         (lang_print_xnode): Print OVERLOAD nodes.
10200         * rtti.c (init_rtti_processing): Push type_info into std.
10201         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
10202         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
10203         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
10204         lookup_fnfields_here): Likewise.
10205         Process all nodes, instead of going through TREE_CHAIN.
10206         * sig.c (build_signature_pointer_or_reference_type): Set context
10207         to global_namespace.
10208         (build_signature_table_constructor): Expect OVERLOAD nodes.
10209         * spew.c (yylex): Save old setting of looking_for_typename.
10210         * tree.c (decl_list_length): Remove.
10211         (binding_init): New function.
10212         (count_functions): Rewrite.
10213         (is_overloaded_fn): Expect OVERLOAD nodes.
10214         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
10215         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
10216         ovl_member): New functions.
10217         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
10218         (type_unknown_p): Likewise.
10219         (require_instantiated_type): Likewise.
10220         (build_component_ref): Declare code dead.
10221         (build_x_function_call): Create and expect OVERLOAD nodes.
10222         (build_function_call_real): Check for ::main only.
10223         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
10224         (convert_for_assignment): Check for TREE_LIST before accessing
10225         TREE_VALUE.
10226         * decl.c (duplicate_decls): Check for namespace bindings instead
10227         of global bindings.
10228         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
10229         lookup_name_current_level, start_decl, xref_tag,
10230         finish_enum): Likewise.
10231         * init.c (build_offset_ref): Likewise.
10232         * search.c (lookup_field): Likewise.
10233         (lookup_fnfields): Likewise.
10234         (dfs_debug_mark): Likewise.
10235         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
10236         (poplevel_class, pop_from_top_level): Likewise.
10237         * decl2.c (finish_method): Likewise.
10238         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
10239         * decl.c (record_builtin_type): Likewise.
10240         (init_decl_processing, grokfndecl): Likewise.
10241         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
10242         (make_lang_type): Likewise.
10243         * parse.y (make_thunk): Likewise.
10244         * pt.c (tsubst): Likewise.
10245         * tree.c (debug_binfo): Likewise.
10246         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
10247         tinfo2.cc, inc/new.h: Add std qualifications.
10248         * inc/new: Wrap with namespace std if __HONOR_STD.
10249         * inc/typeinfo: Likewise.
10250
10251 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
10252
10253         * call.c (build_user_type_conversion_1): Handle second_conv
10254         properly for templates.
10255
10256 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
10257
10258         * method.c (build_decl_overload_real): Set TREE_USED flag to
10259         zero for build_type_variants nodes as well.
10260
10261 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
10262
10263         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
10264
10265 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
10266
10267         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
10268         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
10269         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
10270         xref.o): Add toplev.h dependencies.
10271
10272 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
10273
10274         * errfn.c (cp_error, cp_warning): Remove declarations for
10275         error and warning respectively.
10276
10277 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10278
10279         * error.c: Convert to using ctype macros defined in system.h.
10280         * method.c: Likewise.
10281         * xref.c: Likewise.
10282         * lex.c: Likewise.  Also remove redundant system header stuff.
10283
10284 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
10285
10286         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
10287         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
10288         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
10289         xref.c: Add include of toplev.h.
10290
10291 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
10292
10293         * tree.c (perm_manip): Also regenerate the RTL of an extern.
10294         (copy_to_permanent): Use end_temporary_allocation.
10295
10296 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
10297
10298         * init.c (expand_vec_init): The initialization of each array
10299         element is a full-expression.
10300
10301 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
10302
10303         * method.c (build_mangled_name): Add a call to build_type_variant
10304         to get the right type.
10305
10306 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
10307
10308         * Makefile.in: Add .SUFFIXES.
10309
10310         * cp-tree.def: Remove NAMESPACE_DECL.
10311
10312 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
10313
10314         * call.c (build_over_call): Do evaluate arg even if it has empty
10315         class type.
10316         * decl.c (start_function): Don't push a member function.
10317
10318 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
10319
10320         * Makefile.in (g++FAQ.info): Put -o option before input file.
10321
10322 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
10323
10324         * gxxint.texi: Add info for squangling codes K and B.
10325
10326 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
10327
10328         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
10329         the expression in templates.
10330         (finish_stmt_expr): Likewise.
10331
10332 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
10333
10334         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
10335
10336 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
10337
10338         * decl.c (maybe_push_to_top_level): Always clear
10339         current_template_parms and processing_template_decl.
10340         (pushtag): Remove check of current_class_type and some comments,
10341         since maybe_push_to_top_level no longer creates confusion.
10342
10343 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
10344
10345         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
10346         (DECL_CLASS_TEMPLATE_P): Likewise.
10347         (DECL_PRIMARY_TEMPLATE): Likewise.
10348         (PRIMARY_TEMPLATE_P): Use it.
10349         (push_template_decl_real): New function.
10350         (redeclare_class_template): Take new template parameters as
10351         input.
10352         (is_specialization_of): New function.
10353         (comp_template_args): Declare.
10354         * decl.c (pushtag): Handle friend template classes.
10355         (xref_tag): Likewise.  Use new calling convention for
10356         redeclare_class_template.
10357         * decl2.c (grok_x_components): Handle friend templates.
10358         * friend.c (is_friend): Use is_specialization_of where
10359         appropriate.  Deal with friend class templates.
10360         (make_friend_class): Let a class template be friends with itself.
10361         * pt.c (comp_template_args): Remove declaration.
10362         (tsubst_friend_class): New function.
10363         (push_template_decl_real): New function.
10364         (push_template_decl): Use it.
10365         (redeclare_class_template): Adjust for new calling convention.
10366         (comp_template_args): Give it external linkage.
10367         (instantiate_class_type): Use tsubst_friend_class to deal
10368         with friend templates.
10369         * typeck.c (comptypes): Use comp_template_args, rather than
10370         expanding it inline.
10371         * parse.y (component_decl): Handle a nested template type
10372         like other component type declarations.
10373
10374         * pt.c (check_explicit_specialization): Handle overloaded
10375         constructors correctly.
10376
10377         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10378         (lookup_template_class): Use it.
10379
10380 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10381
10382         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
10383         * cp-tree.h: Add WRAPPER support.
10384         * call.c (add_candidate): Split out from add_*_candidate fns.
10385         (build_over_call): Take the candidate instead of function and args.
10386         Enforce access control here.  Emit overload warnings here.
10387         (add_warning): New fn.
10388         (joust): Add WARN parm.  If not set, call add_warning instead of
10389         printing a warning.  Re-enable some warnings.
10390         (tourney): Pass it.
10391         (convert_like): Adjust.
10392         (build_new_op): Adjust.
10393         (build_new_function_call): Adjust.
10394         (build_user_type_conversion_1): Adjust.
10395         (USER_CONV_FN): Adjust.
10396         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10397         build_int_wrapper): New fns.
10398
10399 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
10400
10401         * pt.c (unify): Fix typo in previous change.
10402
10403 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10404
10405         * error.c (dump_type_real): Declare canonical_name.
10406
10407         * typeck.c (comp_target_types): Fix PMFs.
10408
10409 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
10410
10411         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10412         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10413         TEMPLATE_DECL.
10414
10415         * pt.c (tsubst): Decrease the template-level of
10416         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
10417         TEMPLATE_PARM_INDEX.
10418         (template_decl_level): New function.
10419         (unify): Make sure to record unifications for template
10420         parameters, even when the parameters exactly match the arguments.
10421         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10422         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
10423         aren't from the level we're currently working on.
10424
10425 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
10426
10427         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10428
10429         * decl2.c (check_member_template): Set DECL_IGNORED for member
10430         class templates, too.
10431
10432         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10433
10434 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10435
10436         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10437
10438 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
10439
10440         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10441         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10442         (init_decl_processing): Handle TI types.
10443         * typeck.c (unsigned_type, signed_type): Handle TI types.
10444
10445 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
10446
10447         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10448         New local added_libraries.  Increment count when add library to
10449         arglist.
10450
10451 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
10452
10453         * cp-tree.h (type_as_string_real): New function.
10454         * pt.c (mangle_class_name_for_template): Use it.
10455         * error.c (dump_aggr_type): Change prototype.
10456         (dump_type_prefix): Likewise.
10457         (dump_type_suffix): Likewise.
10458         (dump_type_real): Convert from dump_type.  If desired, the
10459         "canonica" name of a typedef, i.e., the name of the underlying
10460         type, can be printed.
10461         (dump_type): Call dump_type_real.
10462
10463 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
10464
10465         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10466
10467         * typeck.c (comp_target_types): Tweak pedantic case.
10468         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
10469         Return -1 or 1 instead of 1 or 2.
10470         (compparms): Remove STRICT handling.
10471         (convert_for_assignment): Fix handling of pmfs.
10472
10473 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
10474
10475         * typeck.c (comp_target_types): Handle references like pointers.
10476         (comp_target_parms): Note that return code from comp_target_types
10477         can be negative to indicate failure.
10478
10479 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10480
10481         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10482         which requires a working target compiler to build.
10483
10484 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
10485
10486         * tree.c (avoid_overlap): Add prototype.
10487
10488         * spew.c (num_tokens): Add prototype.
10489         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10490
10491         * search.c (dfs_check_overlap): Add prototype.
10492         (dfs_no_overlap_yet): Likewise.
10493
10494         * pt.c (original_template): Add prototype.
10495         (inline_needs_template_parms): Likewise.
10496         (push_inline_template_parms_recursive): Likewise.
10497         (retrieve_specialization, register_specialization): Likewise.
10498         (print_candidates, reduce_template_parm_level): Likewise.
10499         (build_template_decl, mark_template_parm): Likewise.
10500         (tsubst_friend_function, get_bindings_real): Likewise.
10501
10502         * method.c (start_squangling): Add prototype.
10503         (end_squangling, check_ktype, issue_ktype): Likewise.
10504         (build_overloaded_scope_ref, check_btype): Likewise.
10505         (build_mangled_template_parm_index): Likewise.
10506
10507         * lex.c (init_cpp_parse): Add prototype.
10508         (handle_cp_pragma, handle_sysv_pragma): Likewise.
10509         (reduce_cmp, token_cmp): Likewise.
10510
10511         * except.c (call_eh_info): Add prototype.
10512         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10513         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10514
10515         * decl2.c (is_namespace_ancestor): Add prototype.
10516         (namespace_ancestor, add_using_namespace): Likewise.
10517         (ambiguous_decl): Likewise.
10518
10519         * decl.c (indent): Add prototype.
10520
10521         * call.c (add_template_candidate_real): Add prototype.
10522
10523 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
10524
10525         * decl2.c (build_expr_from_tree): Just return a PMF.
10526
10527 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
10528
10529         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10530         when doing initializations.
10531
10532         * pt.c (unify): Use comptypes to compare type args.
10533
10534 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
10535
10536         * decl.c (duplicate_decls): Fix check for when it's safe to free
10537         the new decl.
10538
10539         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10540         to type_as_string.
10541
10542 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
10543
10544         * pt.c (build_template_parm_index): Add prototype.
10545
10546         * search.c (my_tree_cons): Don't clear words outside the
10547         newly allocated node.
10548
10549 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
10550
10551         * lex.c (init_parse): Now returns char* containing the filename.
10552
10553 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
10554                           Jeff Law   <law@cygnus.com>
10555
10556         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10557         than a pointer.
10558
10559 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10560
10561         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10562
10563 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10564
10565         * decl.c (duplicate_decls): Don't warn for redundant decls if
10566         friend: let add_friend take care of it.
10567
10568 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10569
10570         * sig.c (build_signature_pointer_constructor): Don't set
10571         TREE_HAS_CONSTRUCTOR for a signature pointer.
10572         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10573         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10574         here, too.
10575         * typeck.c (build_unary_op): Only allow taking the address of a
10576         real constructor.
10577         * typeck2.c (digest_init): Simplify.
10578         (store_init_value): Don't pedwarn about using { } for pmfs.
10579
10580 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
10581
10582         * cp-tree.h (start_decl):  Update prototype.
10583         * decl.c (start_decl):  Like the C version, new parameters
10584         for the attributes.  Call cplus_decl_attributes here,
10585         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
10586         (grokdeclarator):  Pass NULL for new start_decl arguments.
10587         * pt.c (tsubst_expr):  Likewise.
10588         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
10589         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10590         * lex.c (build_lang_decl): Add lang_name_java.
10591         * class.c (push_lang_context): Add lang_name_java.
10592         * method.c (build_mangled_name): Check for is_java_type.
10593
10594 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10595
10596         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10597         * call.c (build_scoped_method_call): Check for TREE_CODE for
10598         VOID_TYPE instead of type ==  void_type_node.
10599         (build_method_call): Likewise.
10600         * decl.c (lookup_name_real): Likewise.
10601         (grokdeclarator): Likewise.
10602         (start_decl): Likewise.
10603         (grokparms): Likewise.
10604         (start_function): Likewise.
10605         (finish_function): Likewise.
10606         (start_method): Likewise.
10607
10608 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
10609
10610         * lex.c (finput): New variable.
10611         (init_cpp_parse):  Renamed from init_parse.
10612         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
10613         (finish_parse): New function.
10614         * cp-tree.h (init_lex, init_parse): Remove declarations.
10615
10616 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10617
10618         * call.c (build_call): Still evaluate the actual argument.
10619         * class.c (is_empty_class): Update for -fnew-abi.
10620
10621         * decl2.c: -fnew-abi implies -fsquangle.
10622
10623         * method.c (do_build_assign_ref): Don't do anything to copy
10624         an empty class.
10625         (do_build_copy_constructor): Likewise.
10626         * call.c (build_over_call): Likewise.
10627
10628 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10629
10630         * tree.c (avoid_overlap): Return a value.
10631
10632 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
10633
10634         * method.c (check_btype): Add missing argument to xrealloc.
10635         (check_ktype): Likewise.
10636
10637 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10638
10639         Implement empty base optimization.
10640         * class.c (finish_struct_1): Add vbase fields earlier.  Set
10641         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
10642         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
10643         (types_overlap_p): New fn.
10644         * tree.c (avoid_overlap): New fn.
10645         (build_base_fields): Use it to avoid overlapping empty bases.
10646         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
10647
10648         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
10649
10650         Re-implement allocation of base class subobjects.
10651         * tree.c (unshare_base_binfos): New fn.
10652         (layout_basetypes): Use it.  Now handles offsets of both virtual and
10653         non-virtual bases, after layout_type.
10654         (layout_vbasetypes): Remove.
10655         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
10656         (build_vbase_pointer_fields): Split out from old layout_basetypes.
10657         * class.c (finish_base_struct): Lose offset handling code.
10658         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
10659         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
10660         * cp-tree.h: Adjust.
10661
10662 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
10663
10664         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
10665         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
10666         * class.c (duplicate_tag_error): Likewise.
10667         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
10668         * tree.c (layout_vbasetypes): Update from layout_record, remove
10669         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
10670         (layout_basetypes): Likewise.
10671
10672 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
10673
10674         * class.c, Make sure system.h is included just after config.h.
10675         Delete lingering stdio and errno references too.
10676         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
10677
10678 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
10679
10680         * friend.c (is_friend): Fix access control for local classes.
10681
10682         * class.c (is_empty_class): New fn.
10683         * call.c (build_call): Don't pass empty class objects to a function.
10684
10685 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
10686
10687         * call.c (build_over_call): Do name resolution for default
10688         arguments of function templates in the scope of the templates.
10689
10690 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
10691
10692         * call.c: Include system.h.  Remove includes, declarations and
10693         defines provided by system.h.
10694         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
10695         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
10696         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
10697         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
10698         * typeck2.c, xref.c: Likewise.
10699         * Makefile.in: Dependencies updated as appropriate.
10700         * Make-lang.in: Likewise.
10701
10702 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
10703
10704         * pt.c (fn_type_unification): Allow incomplete unification without
10705         an immediate error message.
10706
10707 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10708
10709         * tree.c (member_p): New fn.
10710         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
10711         initializing class members.
10712
10713         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
10714         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
10715
10716         * call.c (build_method_call): Handle non-scoped destructors, too.
10717         * pt.c (tsubst_copy): Likewise.
10718
10719         * pt.c (print_template_context): Split out...
10720         (push_tinst_level): ...from here.
10721
10722         * friend.c (is_friend): Don't pass a type to decl_function_context.
10723
10724         * typeck.c (convert_for_initialization): Always hand off
10725         conversions to class type.
10726
10727 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10728
10729         * friend.c (is_friend): Local classes have the same access as the
10730         enclosing function.
10731
10732 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
10733
10734         * typeck.c (expand_target_expr): Delete dead function.
10735
10736         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
10737
10738         * repo.c (save_string): Delete dead function.
10739
10740         * method.c (thunk_printable_name): Delete dead function.
10741
10742         * lex.c (yynextch): Delete dead function.
10743
10744         * expr.c (tree_extract_aggr_init): #if 0 out.
10745
10746         * except.c (do_unwind): Delete dead function.
10747         (easy_expand_asm): Likewise.
10748
10749         * cvt.c (build_conversion_type_1): Delete dead function.
10750
10751         * cp-tree.h (push_expression_obstack): Declare.
10752
10753         * call.c (source_type): #if 0 out.
10754
10755         * class.c (alter_access): Remove unused label.  Add braces
10756         around empty else clause.
10757
10758         * lex.c (yyprint): Fix argument to printf.
10759
10760 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
10761
10762         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
10763
10764         * pt.c (instantiate_class_template): Make sure template
10765         arguments are permanent.
10766         * init.c (resolve_offset_ref): Don't go looking around in
10767         template types.
10768
10769         * semantics.c: Add routines to handle expressions, and some
10770         declaration processing.
10771         * parse.y: Use them.
10772         (current_class_depth): Move declaration to cp-tree.h.
10773         * parse.c: Regenerated.
10774         * cp-tree.h: Use them.
10775         (current_class_depth): Declare.
10776         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
10777
10778 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
10779
10780         * error.c (dump_decl): Be a bit more explicit with template
10781         type arguments, when verbose.
10782
10783 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
10784
10785         * inc/exception: Reorder closing braces.
10786
10787 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
10788
10789         * pt.c (redeclare_class_template): New function.
10790         * cp_tree.h (redeclare_class_template): Declare it.
10791         * decl.c (xref_tag): Use it.
10792
10793 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
10794
10795         * call.c (build_over_call): Check IS_AGGR_TYPE, not
10796         TYPE_LANG_SPECIFIC.
10797         * typeck.c (convert_arguments): Likewise.
10798
10799         * decl.c (grokdeclarator): Remove const and volatile from type after
10800         setting constp and volatilep.
10801
10802         * class.c (finish_struct_1): Don't warn about bool bitfield larger
10803         than one bit.
10804
10805 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
10806
10807         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
10808
10809 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
10810
10811         * call.c (build_object_call): Complain about ambiguous operator(),
10812         rather that crashing.
10813         (build_new_op): Likewise.
10814         (build_op_delete_call): Likewise.
10815
10816 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
10817
10818         * cvt.c (perform_qualification_conversions): Use comp_target_types
10819         instead of comp_ptr_ttypes.
10820
10821 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
10822
10823         * cp-tree.h (enforce_access): Declare.
10824         * call.c (enforce_access): Make it extern, not static.
10825         * class.c (alter_access): Use enforce_access; modify code for ISO
10826         compliance, rather than ARM rules.
10827
10828 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10829
10830         * cp-tree.h: Fix typo.
10831
10832 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
10833
10834         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
10835         if (aggregate_value_p (type)).
10836
10837         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
10838
10839 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
10840
10841         * tree.c (mapcar): When dealing with a DECL, use it's constant
10842         value, if any.
10843         * pt.c (lookup_template_class): Don't mangle the names of template
10844         classes whose arguments are unknown.
10845
10846         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
10847
10848 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
10849
10850         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
10851
10852 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
10853
10854         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
10855         boolean_type_node to 1.
10856
10857 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
10858
10859         * error.c (dump_expr): Remove unused variable `l'.
10860
10861         * pt.c (for_each_template_parm): New function, created by
10862         converting uses_template_parms.
10863         (tree_fn_t): New typedef.
10864         (uses_template_parms): Use it.
10865         (mark_template_parm): New function.
10866         (push_template_decl): Check that the argument list of a partial
10867         specialization uses all the template parameters.
10868
10869         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
10870         with it; we might want it for debugging.
10871         * cp-tree.h (type_unification): Change interface.
10872         * class.c (finish_struct_1): Skip nested template types, just like
10873         ordinary nested types.
10874         (instantiate_type): Use new interface to type_unification.
10875         * lex.c (init_lex): Add __sz as opname for sizeof.
10876         * method.c (build_overload_scope_ref): New function.
10877         (build_overload_int): Handle complex expressions.  Set
10878         numeric_output_need_bar if necessary.
10879         (build_overload_value): Handle non-PARM_DECL nodes; this
10880         routine is now used by build_overload_int.  Remove some
10881         assignments to numeric_output_need_bar.  Use
10882         build_overload_scope_ref.
10883         (build_qualified_name): Note that some template mangled names end
10884         with digits, and set numeric_output_need_bar appropriately.  Use
10885         build_underscore_int.
10886         * pt.c (unify): Change interface.
10887         (type_unification_real): Likewise.
10888         (determine_specialization): Use new interfaces.
10889         (tsubst): Deal gracefully with situations in which the argument
10890         vector is not fully filled.
10891         (fn_type_unification): Use new interfaces.
10892         (type_unification): Likewise.  Remove NOP_EXPR hack.
10893         (type_unification_real): Likewise.
10894         (unify): Likewise.  Deal with unification of complex expressions.
10895
10896 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10897
10898         * pt.c (complete_template_args): Initialize skip properly.
10899
10900         * decl.c (make_typename_type): Revert.
10901         (make_implicit_typename): Remove.
10902         (lookup_name_real): Don't call it.  Call lookup_field if we see a
10903         TYPE_DECL from a template base.
10904         * search.c (lookup_field): Do implicit typename stuff.
10905
10906 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
10907                           Geoff Noer    <noer@cygnus.com>
10908
10909         * Makefile.in: Various fixes for building cygwin32 native toolchains.
10910         * Make-lang.in: Likewise.
10911
10912 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10913
10914         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
10915
10916 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
10917
10918         * decl.c (make_implicit_typename): Rewrite removed code.
10919         (make_typename_type): Call it if the type we look up comes from
10920         a base that uses template parms.
10921
10922         * pt.c (complete_template_args): Rewrite.
10923         (tsubst, FUNCTION_DECL): Use it.
10924
10925 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
10926
10927         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
10928         c_expand_asm_operands () if output_operands, input_operands or
10929         clobbers is not NULL_TREE.
10930
10931 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10932
10933         * pt.c (complete_template_args): New function.
10934         (get_bindings): Deal with specializations of function templates
10935         with return type containing parameters from outer class
10936         templates.
10937         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10938         substitute arguments and compose a new type.
10939
10940 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
10941
10942         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10943         FUNCTION_DECLs.
10944
10945 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10946
10947         * decl.c (make_implicit_typename): Lose useless code.
10948
10949         * call.c (standard_conversion): Handle A* -> const A* properly.
10950
10951         * pt.c (get_bindings_real): Rename from get_bindings.  Add
10952         check_rettype parm.
10953         (get_bindings): Pass 1.
10954         (get_bindings_overload): Pass 0.
10955
10956 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
10957
10958         * pt.c (check_explicit_specialization): When reverting a static
10959         member function, also remove the `this' parameter from
10960         last_function_parms.
10961
10962 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10963
10964         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10965         a function context.
10966
10967         * decl.c (store_bindings): Use free_binding_vecs.
10968         (pop_from_top_level): Likewise.
10969
10970 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
10971
10972         * decl.c (make_implicit_typename): Only change the type of a
10973         TYPENAME_TYPE.
10974
10975 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
10976
10977         * semantics.c: New file, containing routines to perform the
10978         semantic phase of parsing.
10979         * parse.y: Use it.
10980         * pt.c (tsubst_expr): Likewise.
10981         * cp-tree.h: Declare the various functions in semantics.c.
10982         Provide macros to access _STMT tree nodes.
10983         * cp-tree.def: Add ASM_STMT tree node.
10984         * Makefile.in, Make-lang.in: Add dependencies on and for
10985         semantics.c.
10986
10987 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
10988
10989         * pt.c (push_template_decl): Only check primary templates.
10990
10991         * pt.c (check_explicit_specialization): Complain about default args
10992         in explicit specialization.
10993
10994         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10995         constructor_declarator.
10996
10997 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
10998
10999         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
11000         has no overloaded operator ->.
11001
11002         * call.c (build_field_call): Don't crash when presented with a
11003         field that is actually a nested type.
11004
11005         * decl.c (pushtag): Deal with friend class injection in local
11006         classes.
11007
11008         * call.c (build_object_call): Don't crash if OBJ is a
11009         pointer-to-member-function.
11010
11011 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11012
11013         * pt.c (push_template_decl): Complain about template with C linkage,
11014         anonymous template class.
11015
11016 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11017
11018         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
11019         * search.c: Likewise.
11020
11021         * lex.c (do_pending_defargs): Only call
11022         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
11023
11024         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
11025
11026 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
11027
11028         * parse.y: Deal with CONSTRUCTORS in new_initializers.
11029
11030 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
11031
11032         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
11033         closely mimics the behavior in parse.y.
11034         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
11035         into a compound statement.
11036
11037 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11038
11039         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
11040         * pt.c (inline_needs_template_parms): New fn.
11041         (original_template): New fn.
11042         (push_inline_template_parms_recursive): New fn.
11043         (maybe_begin_member_template_processing): Use them.
11044         (maybe_end_member_template_processing): Likewise.
11045         (is_member_or_friend_template): Rename to is_member_template.
11046         Member functions of local classes are never member templates.
11047
11048 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11049
11050         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
11051         added in the class scope to catch redefinition error.
11052
11053         * pt.c (reduce_template_parm_level): Also copy
11054         the DECL_TEMPLATE_PARMS field.
11055
11056 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
11057
11058         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
11059         reduced-level template type parameter.
11060
11061 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11062
11063         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
11064         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
11065         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
11066         * decl.c (duplicate_decls): Propagate it.
11067         * typeck2.c (abstract_virtuals_error): Use two loops to emit
11068         abstract virtual functions and virtual functions which need a
11069         final overrider separately.
11070
11071 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11072
11073         * lang-specs.h: Properly put brackets around array elements in
11074         initializer.
11075
11076         * typeck.c (build_binary_op_nodefault): Correctly place parens around
11077         && and || in expression.
11078
11079 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11080
11081         * call.c (default_parm_conversions): Remove prototype definition.
11082         (build_method_call): Remove unused variable result.
11083
11084         * cvt.c (ocp_convert): Remove unused variable conversion.
11085
11086         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
11087
11088         * except.c (do_unwind): #if 0 definition of unused variables fcall
11089         and next_pc.
11090
11091         * expr.c (extract_scalar_init): #if 0 prototype and function
11092         definition.
11093
11094         * init.c (expand_aggr_init_1): Remove unused variable init_type.
11095         (build_new_1): Remove unused variable t.
11096
11097         * pt.c (instantiate_class_template): Remove unused variable newtag;
11098         cast called function return value to void.
11099         (do_decl_instantiation): Remove unused variables name and fn.
11100
11101         * tree.c (get_type_decl): Add default return to shut up compiler from
11102         complaining control reaches end of non-void function.
11103
11104         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
11105
11106 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11107
11108         * call.c (default_parm_conversions): Remove prototype definition.
11109         (build_method_call): Remove unused variable result.
11110         (build_over_call): Add default case in enumeration switch.
11111
11112 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11113
11114         * decl2.c (lang_decode_option): Change j's type to size_t.
11115
11116         * tree.c (layout_vbasetypes): record_align and desired_align are of
11117         type unsigned int; const_size and nonvirtual_const_size likewise.
11118
11119 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
11120
11121         * parse.y (new_initializer): Make sure all initializers are
11122         lists.
11123
11124 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
11125
11126         * decl2.c (import_export_decl): Mark tinfo functions for
11127         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
11128
11129 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
11130
11131         * method.c: Fix typo.
11132
11133 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11134
11135         * method.c: Include "system.h" to get stdlib.h, stdio.h,
11136         ctype.h, string.h, etc.
11137         (issue_nrepeats): Add default case in enumeration switch.
11138         (check_btype): Likewise.
11139         (process_overload_item): Likewise.
11140
11141         * Makefile.in (method.o): Depend on system.h.
11142
11143 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11144
11145         * lex.c (do_scoped_id): Fix parenthesizing.
11146
11147 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
11148
11149         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
11150         FLAG_RTTI is unset, initialize type info machinery and continue
11151         with FLAG_RTTI enabled.
11152         (get_typeid): Likewise.
11153
11154 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11155
11156         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
11157         from B.
11158
11159 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
11160
11161         * pt.c (finish_member_template_decl): Deal more gracefully with
11162         invalid declarations.
11163
11164 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
11165
11166         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
11167         cp-tree.h: Clean up more old overloading code, old RTTI code, and
11168         some formatting quirks.
11169
11170         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
11171         method.c, pt.c, ptree.c, typeck.c: Remove support for
11172         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
11173         * class.h: Remove.
11174         * Makefile.in: Adjust.
11175
11176         * pt.c (unify): Don't allow reduced cv-quals when strict.
11177
11178         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
11179         *type_unification* and unify.
11180
11181 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
11182
11183         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
11184         (nested_name_specifier): And add it before this use.
11185         (typename_sub0): And this use.  Also add use without the keyword.
11186         (typename_sub1): Likewise.
11187         * pt.c (instantiate_class_template): Don't actually instantiate
11188         anything if our type uses template parms.
11189
11190 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
11191
11192         * decl.c (start_function): Don't call temporary_allocation for a
11193         nested function.
11194
11195 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11196
11197         * pt.c (instantiate_class_template): Don't mess with friends if
11198         our type uses template parms.
11199
11200 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11201
11202         * parse.y (nested_name_specifier): Use explicit_template_type.
11203         (typename_sub): Allow a template_type, an explicit_template_type,
11204         or an implicit template type at the end.
11205         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
11206         * decl.c (make_typename_type): Handle template-id where the name
11207         is a TEMPLATE_DECL.
11208         * call.c (build_scoped_method_call): Handle member template
11209         destructor call.
11210         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
11211         destructor is represented by the type.
11212
11213         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
11214         * parse.y (nested_name_specifier): Add 'template' case.
11215         (explicit_template_type): New rule.
11216         (typename_sub): Use it.
11217         * decl.c (make_typename_type): Handle getting a template-id for NAME.
11218         * pt.c (tsubst): Likewise.
11219
11220 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11221
11222         * pt.c (add_to_template_args): Fix thinko.
11223         (instantiate_class_template): Call it later.
11224
11225         * pt.c (get_class_bindings): Add outer_args parm.
11226         (most_specialized_class): Likewise.
11227         (instantiate_class_template): Pass it.
11228         (more_specialized_class): Likewise.
11229         (lookup_template_class): Get context from template if none
11230         was specified.
11231         (finish_member_template_decl): Don't do anything with a
11232         partial specialization.
11233         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
11234         AGGREGATE_TYPE_P.
11235         * class.c (finish_struct): Member class templates have already been
11236         checked for name clashes.
11237         * decl.c (pushdecl_with_scope): Handle pushing at class level.
11238
11239 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11240
11241         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
11242         (tsubst, *_PARM): Support multiple levels of template classes.
11243         (instantiate_class_template): Look up the pattern from the
11244         original template.
11245         (lookup_template_class): Handle getting a template for d1.
11246         (push_template_decl): Correct setting of 'primary'.
11247         (reduce_template_parm_level): Add 'levels' parm.
11248         (finish_member_template_decl): Support member class templates.
11249         (template_class_depth): Handle multiple levels.
11250         * parse.y (component_decl_1, fn.def2): Remove member template case.
11251         (component_decl): Add member template cases.
11252         * decl2.c (check_member_template): We now handle member template
11253         classes.
11254         * decl.c (pushtag): Handle member templates.
11255         * method.c (do_inline_function_hair): Don't touch
11256         IDENTIFIER_GLOBAL_VALUE.
11257         * init.c (build_offset_ref): If name isn't an identifier, just
11258         return it.
11259         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
11260
11261         * typeck.c (get_delta_difference): Do adjust for conversions to
11262         and from virtual base.
11263
11264 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
11265
11266         * typeck.c (get_delta_difference): Give hard error for conversion
11267         from virtual base.
11268
11269         * cp-tree.h: Tweak formatting.
11270
11271 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
11272
11273         * decl.c (push_namespace): Handle redeclaration error.
11274
11275         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
11276         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
11277         (NAMESPACE_BINDING): New macro.
11278         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
11279         * *.c: Use them.
11280
11281         * pt.c (push_template_decl): Use innermost_args.
11282
11283         * decl.c (get_unique_name): Tweak from earlier in the name.
11284
11285 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11286
11287         * cp-tree.def: Add CPLUS_BINDING node.
11288         * cp-tree.h (tree_binding): New struct.
11289         (BINDING_SCOPE, BINDING_VALUE): New macros.
11290         (current_namespace, global_namespace): Declare extern.
11291         (struct lang_decl_flags): New field in_namespace.
11292         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
11293         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
11294         (TREE_INDIRECT_USING): New macro.
11295         * decl2.c (current_namespace, global_namespace): Declare.  The
11296         value is a NAMESPACE_DECL now, not a TREE_LIST.
11297         (is_namespace_ancestor, namespace_ancestor): New static functions.
11298         (add_using_namespace, ambiguous_decl): Likewise.
11299         (lookup_using_namespace): New support function for lookup_name.
11300         (qualified_lookup_using_namespace): New support function for
11301         do_scoped_id and lookup_namespace_name.
11302         (get_namespace_id): Mark as obsolete.
11303         (current_namespace_id): Likewise.
11304         (do_namespace_alias): Implement.
11305         (do_using_directive): Implement as call to add_using_namespace.
11306         * decl.c (binding_for_name): New function.
11307         (push_namespace, pop_namespace): Implement.
11308         (push_decl): Don't install a FUNCTION_DECL in the global branch.
11309         (lookup_namespace_name): Implement using qualified lookup.
11310         (lookup_name_real): For global scoping, lookup in
11311         global_namespace.  For namespace scoping, lookup in given
11312         namespace.  For unscoped lookup, iterate over namespace,
11313         considering using directives.
11314         (init_decl_processing): Initialize global_namespace.
11315         (grokvardecl): Build assembler name as static name for globals.
11316         (grokdeclarator): Remove old namespace mangling.
11317         (xref_tag): When installing a global binding for the
11318         tag, make sure we have an identifier.
11319         * method.c (build_overload_nested_name): Mangle namespaces.
11320         (build_qualified_name): Likewise.
11321         (build_decl_overload_real): Likewise.
11322         * lex.c (build_lang_decl): Set namespace for new declaration to
11323         current_namespace.
11324         (do_scoped_id): Find global names in global or current
11325         namespace, or using qualified namespace lookup, depending on
11326         context.
11327         * init.c (build_member_call): When scope is namespace, use
11328         build_x_function_call instead.
11329         (build_offset_ref): When scope is namespace, collapse processing
11330         to lookup_namespace_name instead.
11331         * error.c (dump_decl): Support NAMESPACE_DECL.
11332         * decl.c (pushdecl): Bind globals to current namespace.
11333         (push_overloaded_decl): Likewise.
11334         (lookup_tag): Likewise.
11335         (lookup_name_current_level): Likewise.
11336         (xref_tag): Likewise.
11337         (start_function): Likewise.
11338         * lex.c (do_identifier): Likewise.
11339         (identifier_typedecl_value): Likewise.
11340         (real_yylex): Likewise.
11341         * method.c (do_inline_function_hair): Likewise.
11342         * parse.y (unscoped): Likewise.
11343         * pt.c (check_explicit_specialization): Likewise.
11344         (lookup_template_class): Likewise.
11345         * rtti.c (call_void_fn): Likewise.
11346         * sig.c (build_sigtable): Likewise.
11347         * ptree.c (lang_print_xnode): New function.
11348
11349 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
11350
11351         * pt.c (instantiate_class_template): Don't instantiate if pedantic
11352         and the args use template parms.
11353
11354         * pt.c (push_tinst_level): If the instantiation uses template parms,
11355         fail silently.
11356         * decl.c (xref_basetypes): Do call complete_type for basetypes
11357         that involve template parameters.
11358
11359 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11360
11361         * typeck2.c (process_init_constructor): Fix labeled init check.
11362
11363 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11364
11365         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
11366         argument to tsubst and friends.
11367
11368         * pt.c (tsubst, FUNCTION_DECL): Tidy.
11369
11370         * typeck.c (build_x_function_call): Handle static member function
11371         templates like non-templates.  Handle friend templates like normal
11372         function templates.
11373         * pt.c (tsubst, *_PARM): Don't use orig_level.
11374         (get_bindings): Don't call add_to_template_args.
11375         (instantiate_template): Likewise.
11376         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11377         * ptree.c (print_lang_type): Print index/level for template parms.
11378
11379 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
11380
11381         * Make-lang.in (cc1plus): Note that cc1plus depends on
11382         cp/cp-tree.h and cp/cp-tree.def.
11383
11384         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11385         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11386         position in a template parameter list.
11387         * cp-tree.h (template_parm_index): New structure, used as the tree
11388         structure for a TEMPLATE_PARM_INDEX.
11389         (TEMPLATE_PARM_IDX): New macro.
11390         (TEMPLATE_PARM_LEVEL): Likewise.
11391         (TEMPLATE_PARM_DESCENDANTS): Likewise.
11392         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11393         (TEMPLATE_PARM_DECL): Likewise.
11394         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11395         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11396         (TEMPLATE_TYPE_DECL): Likewise.
11397         (TEMPLATE_CONST_IDX): Remove.
11398         (TEMPLATE_CONST_LEVEL): Likewise.
11399         (TEMPLATE_CONST_SET_INFO): Likewise.
11400         (TEMPLATE_TYPE_SET_INFO): Likewise.
11401         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11402         node.
11403         (TEMPLATE_TYPE_LEVEL): Likewise.
11404         * decl.c (decls_match): Call comp_template_parms, rather than
11405         expanding it inline.
11406         (duplicate_decls): If two template declarations are being merged,
11407         then their TEMPLATE_INFOs should be merged as well.
11408         (grokfndecl): Save template-id information when declaring a friend
11409         with explicit template arguments.  Pass arguments to
11410         check_explicit_specialization via correct convention; at some
11411         point check_explicit_specialization changed, but these call-sites
11412         did not.
11413         (grokdeclarator): Tidy up slightly.
11414         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
11415         two template functions with the same DECL_ASSEMBLER_NAME the same,
11416         since the names are not yet mangled.
11417         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11418         TEMPLATE_CONST_PARM.
11419         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
11420         decl for a non-type parameter, rather than printing `<tparm ...>'.
11421         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11422         (do_friend): Deal with template friends.
11423         * lex.c (do_pending_inlines): Call
11424         maybe_begin_member_template_processing, rather than
11425         conditionally calling begin_member_template_processing.
11426         (process_next_inline): Likewise.  Call
11427         maybe_end_member_template_processing, rather than
11428         conditionally calling end_member_template_processing.
11429         (do_pending_defargs): Likewise.
11430         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11431         TEMPLATE_CONST_PARM.
11432         * method.c (build_mangled_template_parm_index): New function.
11433         (build_overload_value): Use it.
11434         (build_overload_name): Likewise.
11435         * pt.c (finish_member_template_decl): Allow friend declarations.
11436         (template_class_depth): New function.
11437         (is_member_template): Rename, and modify, to become...
11438         (is_member_or_friend_template): New function.
11439         (end_member_template_processing): Rename, and modify, to become...
11440         (maybe_end_member_template_processing).
11441         (build_template_parm_index): New function.
11442         (reduce_template_parm_level): New function.
11443         (process_template_parm): Modify to use build_template_parm_index.
11444         (push_template_decl): Deal with friend templates.
11445         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11446         TEMPLATE_CONST_PARM.
11447         (tsubst_friend_function): New function.
11448         (instantiate_class_template): Generate the DECL_FRIENDLIST
11449         for a new instantiation by using tsubst_friend_function rather
11450         than just tsubst.
11451         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11452         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11453         appropriate new macros.  Use reduce_template_parm_level to
11454         generate lower-level template parameters.  Handle tsubst'ing into
11455         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
11456         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11457         templates.  Similarly for the template parameters for a new
11458         template.
11459         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
11460         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
11461         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11462         (get_bindings): Call add_to_template_args if necessary.
11463         (instantiate_decl): Handle instantiations of friend templates.
11464         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11465         TEMPLATE_TYPE_PARM as a list of fields; it's not!
11466         * spew.c (yylex): Do a little manual constant propagation to
11467         clarify the code.
11468
11469 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
11470
11471         * error.c: Include sys/types.h.
11472
11473 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
11474
11475         * method.c (build_mangled_name): Start CPP directives in column zero.
11476
11477 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11478
11479         * typeck2.c (process_init_constructor): Sorry about non-trivial
11480         labeled initializers.
11481         * parse.y (initlist): Re-enable labeled initializers.
11482
11483 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11484
11485         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11486         all callers changed.  Rely on the new parameter instead of arg
11487         being a TREE_LIST when determine whether we are working inside
11488         template template parameter.  Clean up is_type test.
11489
11490 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11491
11492         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11493         * typeck2.c (initializer_constant_valid_p): Allow conversions
11494         between pointers and references.
11495
11496 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
11497
11498         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11499         if pedantic || warn_pointer_arith.
11500
11501 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11502
11503         * pt.c (unify): Handle TEMPLATE_DECL.
11504
11505 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
11506
11507         * cp-tree.h (strip_attrs): Remove decl.
11508
11509 1998-02-18  Doug Evans  <devans@cygnus.com>
11510
11511         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11512         Update olddecl's attributes too.
11513         (strip_attrs): Remove function.
11514         * typeck.c (common_type): Call merge_machine_type_attributes.
11515
11516 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
11517
11518         * parse.y (initdcl0_innards): New grammar symbol.
11519         (nomods_initdecls, nomods_initdcl0): Change type from itype to
11520         none, since the resulting value is never used.
11521         (parse_decl): New function.
11522         (datadef): Remove redundant actions.
11523         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11524         * parse.c: Regenerated.
11525
11526 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11527
11528         * parse.y (simple_stmt): Use getdecls() to check for decl.
11529
11530 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11531
11532         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11533         macros.
11534         (c++.install-common): Install c++filt properly as native or as cross
11535         variant.
11536         (c++.uninstall): Add c++filt.
11537
11538 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11539
11540         * call.c (standard_conversion): Fix multi-level ptr conversions.
11541
11542 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
11543
11544         * init.c (build_new): Propagate error_mark_node up.
11545
11546 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
11547
11548         * parse.y (simple_stmt): If the condition isn't a declaration,
11549         start the controlled block after the test.
11550
11551 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11552
11553         * call.c (build_over_call): Convert builtin abs, labs and fabs to
11554         tree-codes.
11555         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11556         builtins.
11557
11558 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11559
11560         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11561
11562 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11563
11564         * cp-tree.h: Add access_protected_virtual_node.
11565         * class.c (init_class_processing): Initialize it.
11566         * decl.c (xref_basetypes): Use it.
11567         * parse.y (base_class_access_list): Likewise.
11568
11569         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11570         (c++.install-common): Install c++filt.
11571
11572 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11573
11574         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11575
11576 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
11577
11578         * call.c (reference_binding): Use comptypes when comparing
11579         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11580
11581 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
11582
11583         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11584         (really_overloaded_fn): Move check here from is_overloaded_fn.
11585         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11586
11587 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
11588
11589         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11590         conversions.
11591
11592 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
11593
11594         * cp-tree.h (push_template_decl): Return the decl passed in, or an
11595         equivalent duplicate.
11596         * decl.c (pushtag): Use the return value from push_template_decl.
11597         (duplicate_decls): When duplicating a template declaration, merge
11598         the DECL_TEMPLATE_RESULTs as well.
11599         (make_implicit_typename): Don't try to dive into typename types to
11600         find a context for making a new implicit typename.
11601         (start_decl): Use the return value from push_template_decl.
11602         (grokdeclarator): Complain about declarations list `const operator
11603         int'.  Since we don't correctly handle in-class initializations of
11604         non-static data members, complain about this (now illegal)
11605         practice.  Issue an error for initializations of non-const statics
11606         since that is illegal as well, and since we don't handle that case
11607         correctly either.
11608         (start_function): Use the return value from push_template_decl.
11609         (start_method): Likewise.
11610         * decl2.c (grokfield): Likewise.  Since the change to
11611         grokdeclarator ensures that all initialized fields are in fact
11612         static, remove a redundant test for TREE_PUBLIC.
11613         * parse.y (initlist): Disable labeled initializers since they do
11614         not work as per the documentation, and since they do not use the
11615         same syntax as the C front end.
11616         * pt.c (push_template_decl): Return the decl passed in, or an
11617         equivalent duplicate.
11618         (lookup_template_class): When searching in a nested context,
11619         use the right arguments.
11620         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
11621         * typeck.c (build_component_ref): Assign the correct type to the
11622         result of build_vfn_ref.
11623
11624 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
11625
11626         * pt.c (convert_nontype_argument): Fix typo.
11627         (check_explicit_specialization): Allow old-style specialization
11628         of class template members.
11629
11630 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
11631                           Manfred Hollstein  <manfred@s-direktnet.de>
11632
11633         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
11634         when deciding to override DECL_ASSEMBLER_NAME.
11635
11636 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
11637
11638         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
11639         * cp-tree.h (flag_do_squangling): Add declaration.
11640         * lang-options.h: Add -fsquangle and -fno-squangle.
11641         * method.c: Add macros and static variables for squangling.
11642         (build_overload_name): Rename to build_mangled_name, add logic for B
11643         compression, and split into process_modifiers and
11644         process_overload_item.
11645         (process_modifiers): New function, to handle constant, reference,
11646         and pointer types.
11647         (process_overload_item): New function, handles issue of type codes.
11648         (build_overload_name): New function, start squangling and call
11649         build_mangled_name.
11650         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
11651         (start_squangling): New function to initialize squangling structs.
11652         (end_squangling): New function to destroy squangling structs.
11653         (nrepeats): Rename variable to Nrepeats.
11654         (issue_nrepeats): New function for issuing 'n' type repeats.
11655         (check_ktype): New function to check for type K name compression.
11656         (build_overload_nested_name): Add a check for K name compression.
11657         (build_qualified_name): Add a check for K name compression and don't
11658         use DECL_ASSEMBLER_NAME when squangling is on.
11659         (check_btype): New function, checks for B type compression.
11660         (build_static_name, build_decl_overload_real): Initiate squangling.
11661         (build_typename_overload, build_overload_with_type): Initiate
11662         squangling
11663
11664 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
11665
11666         * method.c (make_thunk): Avoid name buffer overflow.
11667
11668 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
11669
11670         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
11671         don't define them yet.
11672
11673         * parse.y (nomods_initdcl0): Add constructor_declarator case.
11674
11675 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11676
11677         * config-lang.in (diff_excludes): Use basename only.
11678
11679 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11680
11681         * tinfo2.cc: Add tinfo for signed char.
11682
11683 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
11684
11685         * search.c (compute_access): Handle protected constructors in derived
11686         classes as accessible.
11687
11688 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
11689
11690         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
11691         Call convert_from_reference sooner.
11692
11693 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
11694
11695         * cvt.c (ocp_convert): Obtain the constant values from constant
11696         decls even if the destination type is the same as the type of the
11697         decl.
11698
11699         * decl2.c (finish_file): Make sure that static inlines with
11700         definitions are not marked DECL_EXTERNAL before returning.
11701
11702 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11703
11704         * decl.c: Lose arg_looking_for_template.
11705         (lookup_name_real): Likewise.
11706         * parse.y: Lose processing_template_arg, template_arg1.
11707         (primary): Likewise.
11708         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
11709
11710 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11711
11712         * error.c (dump_decl): Fix type of default arguments for template
11713         template parameters and nontype template parameters.
11714         * parse.y (template_parm): Handle invalid default template
11715         template arguments here.
11716
11717         * parse.y (template_parm): Use template_arg instead of PTYPENAME
11718         for default template template argument.
11719         * pt.c (coerce_template_parms): Merge default template argument
11720         codes.  Can treat RECORD_TYPE as template name if it is implicitly
11721         created.  Fix argument index in error message.
11722         * typeck.c (comptypes): Merge template argument comparison codes in
11723         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
11724
11725 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
11726
11727         * lex.c (file_name_nondirectory): Also check for '/'.
11728
11729 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
11730
11731         * parse.y (primary): Deal with statement-expressions in
11732         templates.
11733         * pt.c (tsubst_copy): Handle BIND_EXPR.
11734         * tree.c (mapcar): Likewise.
11735
11736         * call.c (add_template_candidate_real): Pass extra parameter to
11737         fn_type_unification.
11738         * cp-tree.h (fn_type_unification): Add parameter.
11739         * pt.c (fn_type_unification): Add additional parameter to deal with
11740         static member functions.
11741         (get_bindings): Deal with static member functions.
11742
11743         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
11744         (revert_static_member_fn): Declare.
11745         * decl.c (revert_static_member_fn): Remove declaration.  Change
11746         linkage from internal to external.
11747         (cp_finish_decl): Deal with virtual functions in classes local to
11748         template functions.
11749         * decl2.c (finish_file): Don't forget to emit increment/decrement
11750         expressions in initializers for file-scope variables.
11751         * parse.y (typename_sub2): If the typename doesn't names a
11752         template, rather than a type, issue an error message.
11753         * pt.c (check_explicit_specialization): Handle specializations of
11754         static member functions.
11755         (coerce_template_parms): Handle offset references to lists of
11756         member functions.
11757         * search.c (note_debug_info_needed): Don't crash when handed a
11758         type which is being defined.
11759         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
11760         that can happen with some illegal code.
11761
11762 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11763
11764         * call.c (user_harshness): Initialize `code' to 0.
11765         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
11766         (null_ptr_cst_p): Add parentheses around && within ||.
11767         (standard_conversion): Likewise.
11768         (z_candidate): Likewise.
11769         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
11770         (build_object_call): Likewise for `mem_args'.
11771         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
11772         default case in enumeration switch.
11773
11774         * class.c (build_vtable_entry): Add explicit braces to avoid
11775         ambiguous `else'.
11776         (build_class_init_list): Likewise.
11777         (finish_struct_1): Initialize `width' to 0.
11778         (instantiate_type): Initialize `name' to NULL_TREE.  Add
11779         explicit braces to avoid ambiguous `else'.
11780
11781         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
11782         `else'.
11783
11784         * decl.c (grok_reference_init): Eliminate unused parameter, all
11785         callers changed.
11786         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
11787         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
11788         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
11789         (grokdeclarator): Add parentheses around && within ||.  Add
11790         explicit braces to avoid ambiguous `else'.
11791         (grokparms): Initialize `type' to NULL_TREE.
11792         (xref_tag): Remove unused label `just_return'.
11793         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
11794         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
11795         (hack_incomplete_structures): Add parentheses around assignment
11796         used as truth value.
11797
11798         * decl2.c (coerce_delete_type): Hide definition of `e3'.
11799
11800         * error.c: Include <stdlib.h>.
11801         (dump_expr): Change the type of `i' to size_t.  Remove unused
11802         label `error'.
11803
11804         * except.c (init_exception_processing): Remove unused variable `d'.
11805         (expand_throw): Likewise for `label'.
11806
11807         * friend.c (add_friends): Add explicit braces to avoid ambiguous
11808         `else'.
11809
11810         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
11811         (sort_base_init): Likewise for `binfo'.
11812         (expand_member_init): Likewise for `rval'.
11813         (build_member_call): Add parentheses around assignment used as
11814         truth value.
11815         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
11816         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
11817         `old_immediate_size_expand' to 0.
11818         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
11819         (build_vec_delete_1): Remove unused variable `block'.
11820         (expand_vec_init): Initialize `itype' to NULL_TREE.
11821
11822         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
11823         declaration of `index' and `rindex' with autoconf macros.
11824         (reinit_parse_for_expr): Remove unused variables
11825         `look_for_semicolon' and `look_for_lbrac'.
11826         (cons_up_default_function): Initialize `args' to NULL_TREE.
11827         (readescape): Initialize `firstdig' to 0.
11828         (real_yylex): Add parentheses around assignment used as truth value.
11829
11830         * method.c: Include <strings.h> if we don't have <string.h>.
11831         Protect declaration of `index' with autoconf macro.
11832
11833         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
11834         Initialize `type' to NULL_TREE.
11835         (structsp): Remove unused variable `id'.
11836
11837         * pt.c (coerce_template_parms): Add explicit braces to avoid
11838         ambiguous `else'.
11839         (lookup_template_class): Initialize `template' to NULL_TREE.
11840         (instantiate_class_template): Remove unused variable `name' and `e'.
11841         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
11842         (do_poplevel): Initialize `saved_warn_unused' to 0.
11843         (type_unification): Remove unused varable `parm'.
11844         (unify): Likewise for `j'.
11845
11846         * repo.c (init_repo): Add parentheses around assignment used as
11847         truth value.
11848         (finish_repo): Remove unused varable `p'.
11849
11850         * search.c (get_binfo): Initialize `type' to NULL_TREE.
11851         (get_base_distance): Likewise.
11852         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
11853         and `new_v' to NULL_TREE.
11854         (lookup_fnfields): Likewise for `rval_binfo_h'.
11855         (breadth_first_search): Add parentheses around assignment used as
11856         truth value.
11857         (get_template_base): Initialize `type' to NULL_TREE.
11858
11859         * sig.c (append_signature_fields): Initialize `last_mfptr' to
11860         NULL_TREE.
11861         (build_signature_table_constructor): Likewise for
11862         `last_rhs_field', `pfn' and `vt_off'.
11863         (build_sigtable): Likewise for `init'.
11864
11865         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
11866         (propagate_binfo_offsets): Likewise for `delta'.
11867         (hash_tree_cons): Initialize hashcode to 0.
11868         (can_free): Likewise for `size'.
11869         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
11870
11871         * typeck.c (convert_sequence): Hide prototype.
11872         (common_type): Add explicit braces to avoid ambiguous `else'.
11873         (comp_target_types): Likewise.
11874         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
11875         (build_function_call_real): Add explicit braces to avoid ambiguous
11876         `else'.
11877         (convert_arguments): Initialize `called_thing' to 0.
11878         (convert_for_initialization): Initialize `savew' and `savee' to 0.
11879
11880         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
11881         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
11882         (build_x_arrow): Likewise for `last_rval'.
11883
11884         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
11885
11886 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
11887
11888         * decl.c (init_decl_processing): Use set_sizetype.
11889         * decl2.c (sizetype): Don't declare.
11890         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
11891         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
11892         (build_component_addr, unary_complex_lvalue): Likewise.
11893         * rtti.c (expand_class_desc): Likewise.
11894         * class.c (get_vfield_offset): Likewise.
11895
11896 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
11897
11898         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
11899         early to avoid bogus error.  Handle overloaded function
11900         names provided as template arguments correctly.
11901         (coerce_template_parms): Don't mishandle overloaded functions when
11902         dealing with template template parameters.
11903         (lookup_template_class): Issue an error message, rather than
11904         crashing, when the TYPE_DECL provided is not a template type.
11905
11906 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11907
11908         * class.c (instantiate_type): Don't just return a known type if
11909         it's wrong.
11910
11911 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
11912
11913         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
11914         since that code could never be reached.
11915
11916         * error.c (dump_decl): Avoid aborting in the midst of printing an
11917         error message about an illegal template declaration.
11918
11919         * parse.y (structsp): Print an error message, rather than crashing,
11920         when a class-head does not name a class.
11921
11922         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
11923         template arguments as a g++ extension.
11924
11925         * cp-tree.def (ALIGNOF_EXPR): New tree code.
11926         * decl2.c (grok_alignof): If processing_template_decl, just store
11927         the expression.
11928         * typeck.c (c_alignof): Likewise.
11929         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11930         * error.c (dump_expr): Likewise.
11931         * pt.c (tsubst_copy): Likewise.
11932         * tree.c (cp_tree_equal): Likewise.
11933         * pt.c (uses_template_parms): Correctly determine whether or not a
11934         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11935         folding can be done.
11936
11937         * cp-tree.h (grok_enum_decls): Remove type parameter.
11938         * decl.c (grok_enum_decls): Likewise.
11939         * decl2.c (grok_x_components): Call grok_enum_decls
11940         unconditionally, since it will do nothing if there is no
11941         current_local_enum.  Use the new calling sequence.
11942         * pt.c (tsubst_enum): Use the new calling sequence for
11943         grok_enum_decls.
11944
11945         * decl.c (start_function): Make member functions of local classes
11946         in extern inline functions have comdat linkage here...
11947         (grokdeclarator): Rather than here.
11948
11949 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
11950
11951         * pt.c (convert_nontype_argument): Use decl_constant_value.
11952
11953 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
11954
11955         * call.c (add_template_candidate_real): New function.
11956         (add_template_candidate): Use it.
11957         (add_template_conv_candidate): Likewise.
11958         (joust): Pass extra argument to more_specialized.
11959         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11960         (is_local_class): Remove.
11961         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11962         * cp-tree.h (is_local_class): Remove.
11963         (perform_array_to_pointer_conversion): Likewise.
11964         (finish_member_template_decl): Add.
11965         (check_explicit_specialization): Return a tree, not an int.
11966         (more_specialized): Take additional argument.
11967         (get_bindings): Likewise.
11968         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11969         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11970         (perform_array_to_pointer_conversion): Remove.
11971         * decl.c (saved_scope): Add processing_specialization,
11972         processing_explicit_instantiation fields.
11973         (maybe_push_to_top_level): Save them.
11974         (pop_from_top_level): Restore them.
11975         (grokfndecl): Use new return value from
11976         check_explicit_specialization.
11977         (start_decl): Don't check flag_guiding_decls before pushing
11978         decls.
11979         (cp_finish_decl): Remove previous (bogus) change.
11980         (grok_declarator): Use decl_function_context rather than
11981         is_local_class.
11982         * decl2.c (finish_file): Pass extra argument to get_bindings.
11983         (build_expr_from_tree): Let build_x_component_ref check
11984         validity of arguments rather than doing it here.
11985         * lex.c (cons_up_default_function): Remove code fooling with
11986         processing_specialization, processing_explicit_instantiation
11987         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11988         * method.c (build_overload_identifier): Mangle local classes in
11989         template functions correctly.
11990         * parse.y (finish_member_template_decl): Move to pt.c.
11991         * pt.c (finish_member_template_decl): Moved here from parse.y.
11992         (print_candidates): New function.
11993         (determine_specialization): Change interface.  Properly look for
11994         most specialized versions of template candidates.
11995         (check_explicit_specialization): Fully process explicit
11996         instantiations.
11997         (push_template_decl): Avoid looking at CLASSTYPE fields in
11998         FUNCTION_DECLS.
11999         (determine_overloaded_function): Remove.
12000         (convert_nontype_argument): Change name from
12001         convert_nontype_parameter.  Use determine_overloaded_function
12002         instead of instantiate_type.
12003         (mangle_class_name_for_template): Handle type contexts as well as
12004         function contexts.
12005         (classtype_mangled_name): Likewise.
12006         (lookup_template_class): Likewise.
12007         (tsubst): Likewise.
12008         (more_specialized): Take explict template arguments as a
12009         parameter.
12010         (most_specialized): Likewise.
12011         (get_bindings): Likewise.  Check that return types match before
12012         proclaiming a function a match.
12013         (do_decl_instantiation): Remove code searching for function to
12014         instantiate; that is now done in check_explicit_specialization.
12015         (add_maybe_template): Pass extra argument to get_bindings.
12016         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
12017         implementation.
12018         * typeck.c (build_component_ref): Check for invalid arguments.
12019
12020 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
12021
12022         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
12023         return_target and call_target are equivalent.
12024
12025         * pt.c (type_unification_real): Just accept function parms that
12026         don't use any template parms.
12027
12028 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12029
12030         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
12031         unset DECL_NOT_REALLY_EXTERN.
12032
12033         * parse.y (typename_sub*): Fix std::.
12034
12035 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12036
12037         * error.c (dump_decl): Fix type default template args.
12038         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
12039
12040 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
12041
12042         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
12043         (file_name_nondirectory): Use.
12044
12045 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12046
12047         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
12048         that are not really present.  Substitute default arguments in
12049         template template arguments.  Correctly convert TEMPLATE_DECL to
12050         TEMPLATE_TEMPLATE_PARM.
12051         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
12052         are no longer treated specially here.
12053         * parse.y (template_template_parm): Fix copy error.
12054         * decl.c (grokdeclarator): Warn about missing `typename' for nested
12055         type created from template template parameters.
12056         * parse.y (bad_parm): Likewise
12057
12058         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
12059         (push_nested_class): Likewise.
12060         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
12061         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
12062         (copy_template_template_parm): Declare.
12063         * decl.c (arg_looking_for_template): New variable.
12064         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
12065         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
12066         node if arg_looking_for_template is nonzero.
12067         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
12068         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
12069         (grokdeclarator): Handle TEMPLATE_DECL.
12070         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
12071         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
12072         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
12073         (dump_decl): Handle unnamed template type parameters.
12074         Handle template template parameters.
12075         (dump_function_name): Handle template template parameters.
12076         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
12077         Handle TEMPLATE_TEMPLATE_PARM.
12078         * method.c (build_template_template_parm_names): New function.
12079         (build_template_parm_names): Handle TEMPLATE_DECL.
12080         (build_overload_nested_name, build_overload_name):
12081         Handle TEMPLATE_TEMPLATE_PARM.
12082         * parse.y (maybe_identifier): New nonterminal.
12083         (template_type_parm): Use it.
12084         (template_template_parm, template_arg1): New nonterminal.
12085         (template_parm): Add template_template_parm rules.
12086         (template_arg): Set processing_template_arg.
12087         (template_arg1): Rules moved from template_arg.
12088         (primary, nonnested_type): Set arg_looking_for_template if we are
12089         processing template arguments.
12090         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
12091         (process_template_parm): Handle template template parameters.
12092         (coerce_template_parms, comp_template_args): Likewise.
12093         (mangle_class_name_for_template, lookup_template_class): Likewise.
12094         (uses_template_parms): Handle TEMPLATE_DECL and
12095         TEMPLATE_TEMPLATE_PARM.
12096         (current_template_args): Handle TEMPLATE_DECL.
12097         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
12098         * search.c (dfs_walk, dfs_record_inheritance):
12099         Handle TEMPLATE_TEMPLATE_PARM.
12100         * tree.c (copy_template_template_parm): New function.
12101         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
12102         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
12103
12104 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
12105
12106         * decl.c (start_decl): Don't allow duplicate definitions of static
12107         data members.
12108
12109         * call.c (build_user_type_conversion_1): Handle user-defined
12110         template conversion operators correctly.
12111
12112         * decl2.c (build_expr_from_tree): Issue an error message if the
12113         object in a COMPONENT_REF is a TEMPLATE_DECL.
12114
12115         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
12116
12117         * class.c (is_local_class): New function.
12118         * cp-tree.h (is_local_class): Declare it.
12119         (last_tree): Likewise.
12120         (begin_tree): Likewise.
12121         (end_tree): Likewise.
12122         (lookup_template_class): Change prototype.
12123         * decl.c (cp_finish_decl): Check for NULL where necessary.
12124         Consider FUNCTION_DECLS to declare objects with top-level binding,
12125         when calling make_decl_rtl.
12126         (grokdeclarator): Give members of local classes internal linkage.
12127         (start_function): Remove declaration of last_tree.
12128         (finish_function): Set flag_keep_inline_functions around call to
12129         rest_of_compilation if we are processing a member function in a
12130         local class.
12131         (start_method): Call push_template_decl for member functions of
12132         local classes in template functions.
12133         * decl2.c (import_export_decl): Don't give external linkage to
12134         instantiations of templates with internal linkage.
12135         * parse.y (last_tree): Remove declaration.
12136         (template_type): Pass extra parameter to lookup_template_class.
12137         (self_template_type): Likewise.
12138         (structsp): Move call to reset_specialization into left_curly.
12139         (left_curly): Call reset_specialization, and begin_tree.
12140         * pt.c (saved_trees): New variable.
12141         (mangle_class_name_for_template): Change prototype.  Use
12142         additional function context to name local classes in templates
12143         correctly.
12144         (classtype_mangled_name): Pass the context.
12145         (push_template_decl): Handle local classes and templates, and
12146         member functions for such classes.
12147         (convert_nontype_parameter): Fix handling of pointer-to-member
12148         constants.
12149         (lookup_template_class): Handle local classes in templates.
12150         (tsubst): Likewise.  Don't assume that template instantiations
12151         have external linkage; pay attention to the template declaration.
12152         (mark_decl_instantiated): Likewise.
12153         (begin_tree): New function.
12154         (end_tree): Likewise.
12155
12156         * decl.c (xref_basetypes): Don't call complete_type for basetypes
12157         that involve template parameters; that can lead to infinite
12158         recursion unnecessarily.
12159
12160         * pt.c (register_specialization): Do not register specializations
12161         that aren't ready to be registered yet.
12162         (check_explicit_specialization): Handle explicit specialization of
12163         constructors and destructors.
12164         (build_template_decl): New function.
12165         (push_template_delc): Handle out-of-class specializations of
12166         member templates.
12167
12168         * pt.c (check_explicit_specialization): Set up the template
12169         information before registering the specialization.
12170         (coerce_template_parms): Fix thinko.
12171         (tsubst): Handle specializations of member templates correctly.
12172
12173         * class.c (finish_struct_methods): Remove calls to
12174         check_explicit_specialization from here.
12175         (finish_struct): And insert them here.
12176         * cp-tree.h (perform_qualification_conversions): New function.
12177         (perform_array_to_pointer_conversion): Likewise.
12178         (begin_explicit_instantiation): Likewise.
12179         (end_explicit_instantiation): Likewise.
12180         (determine_specialization): Renamed from
12181         determine_explicit_specialization.
12182         (comp_template_parms): New function.
12183         (processing_explicit_instantiation): New variable.
12184         * cvt.c (perform_qualification_conversions): New function.
12185         (perform_array_to_pointer_conversion): Likewise.
12186         * decl.c (duplicate_decls): Don't consider template functions
12187         alike unless they have the same parameters.  Refine handling of
12188         instantiation/specialization mismatches.
12189         (start_decl): Don't call pushdecl for template specializations,
12190         since they don't affect overloading.
12191         (start_function): Likewise.
12192         (grokfndecl): Call check_explicit_specialization a little later.
12193         Don't call duplicate_decls for memberm template specializations.
12194         (grokdeclarator): Don't update template_count for classes that are
12195         themselves specializations.  Remove use of `2' as parameter to
12196         grokfndecl since that value isn't used.
12197         * lex.c (cons_up_default_function): Save and restore
12198         processing_explicit_instantiation around calls to grokfield.
12199         * parse.y (finish_member_template_decl): New function.
12200         (component_decl_1): Use it.
12201         (fn.def2): Likewise.
12202         (template_arg_list_opt): New nonterminal.
12203         (template_type): Use it.
12204         (self_template_type): Likewise.
12205         (template_id): Likewise.
12206         (object_template_id): Likewise.
12207         (notype_template_declarator): Likwise.
12208         (begin_explicit_instantiation): Likewise.
12209         (end_explicit_instantiation): Likewise.
12210         (explicit_instantiation): Use them.
12211         * pt.c (coerce_template_parms): Add parameters.
12212         (processing_explicit_instantiation): New variable.
12213         (convert_nontype_parameter): New function.
12214         (determine_overloaded_function): Likewise.
12215         (begin_explicit_instantiation): Likewise.
12216         (end_explicit_instantiation): Likewise.
12217         (retrieve_specialization): Likewise.
12218         (register_specialization): Likewise.
12219         (processing_explicit_specialization): Removed.
12220         (determine_specialization): Handle specializations of member
12221         functions of template class instantiations.
12222         (check_explicit_specialization): Refine to conform to standard.
12223         (comp_template_parms): New function.
12224         (coerce_template_parms): Call convert_nontype_parameter.
12225         (tsubst): Refine handling of member templates.  Use
12226         register_specialization.
12227         (instantiate_template): Use retrieve_specialization.
12228         (do_decl_instantiation): Likewise.
12229         (instantiate_decl): Likewise.
12230         (type_unification): Improve handling of explict template
12231         arguments.
12232         * tree.c (mapcar): Return error_mark_node, rather than aborting,
12233         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
12234         * typeck.c (build_unary_op): Call determine_specialization, rather
12235         than determine_explicit_specialization.
12236
12237 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
12238
12239         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
12240
12241 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12242
12243         * error.c (dump_decl): For enum tags, output the tag, not its value.
12244
12245 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
12246
12247         * decl.c (init_decl_processing): Only call init_rtti_processing
12248         FLAG_RTTI is set.
12249
12250 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
12251
12252         * init.c (build_new_1): Split out from build_new.
12253         (build_new): Just return a NEW_EXPR.
12254         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
12255
12256         * decl2.c (get_temp_regvar): Tweak.
12257
12258         * cp-tree.h (TREE_CALLS_NEW): Comment out.
12259         * class.c (resolves_to_fixed_type_p): Remove use.
12260         * method.c (build_opfncall): Likewise.
12261         * call.c (build_new_op): Likewise.
12262
12263 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
12264
12265         * exception.cc (__eh_alloc, __eh_free): New fns.
12266         (__cp_push_exception, __cp_pop_exception): Use them.
12267         (__uncatch_exception): Call terminate here if no exception.
12268         * except.c (build_terminate_handler): New fn.
12269         (expand_start_catch_block): Use it.
12270         (expand_exception_blocks): Likewise.
12271         (alloc_eh_object): New fn.
12272         (expand_throw): Use it.  Protect exception init with terminate.
12273         * typeck.c (build_modify_expr): Remove code that ignores trivial
12274         methods.
12275
12276 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12277
12278         * call.c (add_builtin_candidate): Add default case in enumeration
12279         switch.
12280         (build_new_op): Likewise.
12281         (convert_like): Likewise.
12282         * cvt.c (build_expr_type_conversion): Likewise.
12283         * tree.c (real_lvalue_p): Likewise.
12284         (lvalue_p): Likewise.
12285         (cp_tree_equal): Likewise.
12286         * typeck.c (comptypes): Likewise.
12287         (build_component_ref): Likewise.
12288         (build_function_call_real): Likewise.
12289         (build_binary_op_nodefault): Likewise.
12290         (build_unary_op): Likewise.
12291         (build_modify_expr): Likewise.
12292         * typeck2.c (initializer_constant_valid_p): Likewise.
12293
12294 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
12295
12296         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
12297
12298 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
12299
12300         * pt.c (coerce_template_parms): Make sure to digest_init if
12301         possible.
12302
12303         * decl.c (duplicate_decls): Make the newdecl virtual if the
12304         olddecl was, just as is done with other attributes of olddecl.
12305
12306 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12307
12308         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
12309         address of an OFFSET_REF.
12310
12311         * cp-tree.def: Add AGGR_INIT_EXPR.
12312         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
12313         AGGR_INIT_EXPR where appropriate.
12314         * expr.c (cplus_expand_expr): Likewise.  Simplify.
12315
12316         * decl2.c (finish_file): Remove call to register_exception_table.
12317
12318 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12319
12320         * pt.c (instantiate_class_template): Don't do injection when
12321         processing_template_decl is true, as pollutes current_binding_level
12322         for base classes.
12323
12324 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
12325
12326         * pt.c (maybe_fold_nontype_arg): Add prototype.
12327
12328 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12329
12330         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
12331         * error.c (dump_expr): Likewise.
12332
12333 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12334
12335         * typeck.c (build_function_call_real): Remove "inline called before
12336         definition" pedwarn.
12337
12338         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
12339
12340 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12341
12342         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
12343
12344         * pt.c (type_unification_real): Change __null to type void* with
12345         a warning.
12346
12347 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
12348
12349         * call.c (implicit_conversion): Don't call
12350         build_user_type_conversion_1 with a NULL expr, since it will
12351         crash.
12352
12353         * pt.c (unify): Don't try to unify array bounds if either array is
12354         unbounded.
12355
12356 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12357
12358         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
12359         Replace extern decls with casts.
12360
12361         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
12362         Update last_parm_cleanup_insn.
12363         (store_after_parms): Remove.
12364         * cp-tree.h: Adjust.
12365
12366 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12367
12368         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12369         (finish_file): Check DECL_COMDAT instead of weak|one_only.
12370         (import_export_vtable): Use make_decl_one_only instead of
12371         comdat_linkage for win32 tweak.
12372         (import_export_decl): Likewise.
12373         * pt.c (mark_decl_instantiated): Likewise.
12374
12375         * decl2.c (finish_file): Lose handling of templates in pending_statics.
12376
12377 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
12378
12379         * decl2.c (finish_file): Lose call to expand_builtin_throw.
12380         * except.c (expand_builtin_throw): Remove.
12381         * cp-tree.h: Remove ptr_ptr_type_node.
12382         * decl.c: Likewise.
12383
12384 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
12385
12386         * decl.c (ptr_ptr_type_node): Define.
12387         (init_decl_processing): Initialize it.
12388         * cp-tree.h: Declare it.
12389         * exception.cc (__cp_exception_info): Use __get_eh_info.
12390         (__cp_push_exception): Likewise.
12391         (__cp_pop_exception): Likewise.
12392
12393         From Scott Snyder <snyder@d0sgif.fnal.gov>:
12394         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12395         saved_pc.
12396         (init_exception_processing): Removed saved_pc initialization.
12397
12398 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
12399
12400         * pt.c (instantiate_decl): Defer all templates but inline functions.
12401
12402 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12403
12404         * init.c (expand_vec_init): Don't fold a list of parameters.
12405
12406         * decl.c (copy_args_p): Handle copy elision for types with virtual
12407         bases.
12408         * call.c (build_over_call): Likewise.
12409
12410 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
12411
12412         * pt.c (lookup_template_function): Copy the template arguments,
12413         not just the list containing them, to the permanent obstack.
12414
12415 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
12416
12417         * except.c (expand_start_catch_block): suspend_momentary for the
12418         terminate handler.
12419
12420         * error.c (dump_decl): Handle LOOKUP_EXPR.
12421
12422 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
12423
12424         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12425         permanent obstack if we are processing a template decl.
12426         * typeck.c (build_static_cast): Likewise.
12427         (build_const_cast): Likewise.
12428         (build_reinterpret_cast): Likewise.
12429
12430         * pt.c (coerce_template_parms): Coerce some expressions, even
12431         when processing_template_decl.
12432
12433 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12434
12435         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12436         handling of pointer difference expressions.
12437
12438         * typeck.c (comp_target_types): Comparison of function/method types
12439         is independent of nptrs.
12440
12441 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
12442
12443         * pt.c (tsubst): Avoid creating pointer to reference and
12444         reference to reference types.
12445
12446 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12447
12448         * parse.y (do_id): New nonterminal.
12449         (template_id): Use it.
12450
12451 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12452
12453         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12454         * spew.c (yylex): Don't do_identifier here.
12455         * decl2.c (build_expr_from_tree): Revert last change.
12456
12457         * decl2.c (build_expr_from_tree): Expand the name for a method call.
12458         * parse.y (object_template_id): Don't try to take the DECL_NAME.
12459
12460 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
12461
12462         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12463         alloc_expr.
12464         * call.c (build_op_delete_call): Adjust.
12465
12466         * except.c (expand_end_catch_block): Lose rethrow region.
12467         (expand_start_catch_block): Likewise.
12468         (expand_end_catch_block): Don't expand_leftover_cleanups.
12469
12470 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12471
12472         * pt.c (tsubst): Remove tree_cons call (places redundant info into
12473         DECL_TEMPLATE_INSTANTIATION).
12474
12475 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12476
12477         * tree.c (is_overloaded_fn): Handle getting a fn template.
12478         (really_overloaded_fn): Likewise.
12479         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12480         * pt.c (check_explicit_specialization): Tweak.
12481         (determine_explicit_specialization): Tweak.
12482
12483         * tree.c, cp-tree.h (get_target_expr): New fn.
12484
12485 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
12486
12487         * pt.c (check_explicit_specialization): Fix misspelling in
12488         diagnostic: `preceeded'.
12489         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12490         `conversiona'.
12491
12492 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
12493
12494         * pt.c (determine_explicit_specialization): Avoid an internal
12495         error for bad specializations.
12496
12497         * method.c (build_overload_value): Handle SCOPE_REF.
12498
12499 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
12500
12501         * class.c (prepare_fresh_vtable): Enable even more complex MI
12502         vtable names.
12503
12504 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12505
12506         * exception.cc (__check_eh_spec): Optimize a bit.
12507
12508         * exception.cc (__cp_pop_exception): Lose handler arg.
12509         * except.c (do_pop_exception): Likewise.
12510         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12511         (expand_end_catch_block): Likewise.
12512
12513 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12514
12515         * pt.c (check_explicit_specialization): Complain about using a
12516         template-id for a non-specialization.
12517
12518 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
12519
12520         * repo.c: Prototype rindex only if needed.
12521         * xref.c: Likewise.
12522
12523 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12524
12525         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12526
12527 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12528
12529         * typeck.c (build_const_cast): Handle references here instead of
12530         handing off to convert_to_reference.
12531
12532         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12533         TerminateFunctionCall.
12534         (init_exception_processing): Likewise.  Terminate et al are now
12535         the fns, not ADDR_EXPRs.
12536         (various): Lose redundant assemble_external calls.
12537         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12538
12539         * cp-tree.h (struct lang_decl_flags): Add comdat.
12540         (DECL_COMDAT): New macro.
12541         * decl.c (duplicate_decls): Propagate it.
12542         (cp_finish_decl): Handle it.
12543         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12544
12545         * class.c: Remove static pending_hard_virtuals.
12546         (add_virtual_function): Take pointers to pending_virtuals
12547         and pending_hard_virtuals.
12548         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
12549
12550 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
12551
12552         * decl2.c (import_export_vtable): If we support one_only but not
12553         weak symbols, mark instantiated template vtables one_only.
12554         (import_export_decl): Likewise for tinfo functions.
12555         (finish_vtable_vardecl): Also write out vtables from explicitly
12556         instantiated template classes.
12557         * pt.c (mark_class_instantiated): Revert last change.
12558
12559         * except.c (expand_throw): Call mark_used on the destructor.
12560
12561 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
12562
12563         * lex.c (lang_init): Enable flag_exceptions by default if no
12564         command line switch was specified.
12565
12566 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
12567
12568         * pt.c (unify): Handle `void' template parameters in
12569         specializations.
12570
12571 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
12572
12573         * rtti.c (build_dynamic_cast): Handle template case here.
12574         (build_dynamic_cast_1): Not here.
12575
12576         * typeck2.c (digest_init): Make copies where appropriate.
12577
12578         * decl2.c (delete_sanity): resolve_offset_ref.
12579
12580         * except.c: Call terminate without caching so many bits.
12581
12582         * except.c (expand_start_catch_block): Fix catching a reference
12583         to pointer.
12584
12585 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12586
12587         * init.c (build_new): Copy size to the saveable obstack.
12588
12589         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12590         TRY_CATCH_EXPR for now.
12591
12592 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12593
12594         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12595         has DECL_LANG_SPECIFIC.
12596
12597         * exception.cc (struct cp_eh_info): Add handlers field.
12598         (__cp_push_exception): Initialize it.
12599         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
12600         (__throw_bad_exception): Remove.
12601         * except.c (call_eh_info): Add handlers field.
12602         (get_eh_handlers): New fn.
12603         (push_eh_cleanup): Increment handlers.
12604
12605 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12606
12607         * except.c (expand_start_eh_spec): Use the try/catch code.
12608         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
12609         doing everything inline.
12610         (init_exception_processing): throw_type_match now takes
12611         const void pointers.
12612         * exception.cc (__check_eh_spec): New fn.
12613         * inc/exception: Neither terminate nor unexpected return.
12614         * decl.c: Make const_ptr_type_node public.
12615         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
12616
12617         * except.c (expand_start_catch_block): We only need the rethrow
12618         region for non-sjlj exceptions.
12619         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
12620
12621 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
12622
12623         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
12624         (various.o): Likewise.
12625         * inc/new: Add placement deletes.  Add throw specs for default new.
12626         * new.cc (set_new_handler): Move here from libgcc2.
12627         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
12628         (new): Move from libgcc2.  Throw bad_alloc.
12629         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
12630         * decl.c (init_decl_processing): Update exception specs on new and
12631         delete.
12632
12633         * method.c (build_decl_overload_real): Don't mess with global
12634         placement delete.
12635
12636         * init.c (build_new): Check for null throw spec, not nothrow_t.
12637
12638         * decl.c (duplicate_decls): Don't complain about different exceptions
12639         from an internal declaration.
12640
12641         * call.c (build_op_delete_call): Fix check for member fns again.
12642
12643         * decl2.c (import_export_decl): Interface hackery affects
12644         virtual synthesized methods.
12645
12646 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12647
12648         * decl.c (start_decl): Don't just complain about a mismatched
12649         scope, fix it.
12650
12651         * decl.c (make_implicit_typename): Handle case where t is not
12652         actually from context.
12653         * tree.c (get_type_decl): Lose identifier case.
12654         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
12655         * parse.y (nonnested_type): Just use lookup_name.
12656         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
12657
12658 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
12659
12660         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
12661         T was built in C language context (for example, by
12662         output_func_start_profiler).
12663
12664 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
12665
12666         * decl.c (make_implicit_typename): New fn.
12667         (lookup_name_real): Use it.  Use current_class_type as the context.
12668
12669 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
12670
12671         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
12672
12673 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12674
12675         * friend.c (do_friend): Warn about non-template friends in templates.
12676
12677         * call.c (build_op_delete_call): Fix handling of inherited delete.
12678
12679         * search.c (dfs_record_inheritance): Ignore template type parms.
12680
12681 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
12682
12683         * call.c (build_new_op): Fix copy error.
12684         (build_op_new_call): New fn.
12685         (build_op_delete_call): New fn.
12686         * cp-tree.h: Declare them.
12687         * init.c (build_new): Use them.  Support placement delete.
12688         (build_x_delete): Use build_op_delete_call.
12689         (build_delete): Likewise.
12690         * decl2.c (delete_sanity): Likewise.
12691         (coerce_delete_type): Don't complain about placement delete.
12692
12693 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12694
12695         * call.c (build_new_function_call): Remove unused 'obj' parm.
12696         * cp-tree.h, typeck.c: Adjust.
12697
12698         * init.c (build_new): Make the cleanup last longer.
12699         (expand_vec_init): Call do_pending_stack_adjust.
12700
12701 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
12702
12703         * pt.c (do_type_instantiation): Fix typo.
12704         (mark_class_instantiated): If we support one_only but not weak
12705         symbols, don't mark this as known.
12706
12707         * init.c (build_new): Handle vec delete in EH cleanup.
12708
12709 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12710
12711         * call.c (build_method_call): Call complete_type before checking
12712         for destructor.
12713
12714 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
12715
12716         * decl.c (add_block_current_level): Delete.
12717         * init.c (build_vec_delete_1): Delete build_block and
12718         add_block_current_level calls.
12719
12720 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
12721
12722         * init.c (build_new): Handle freeing allocated memory when the
12723         constructor throws.
12724
12725         * call.c (build_new_method_call): Fix flags arg.
12726
12727         * pt.c (do_type_instantiation): Don't try to instantiate
12728         member templates.
12729         (mark_decl_instantiated): If we support one_only but not
12730         weak symbols, mark this one_only.
12731         * decl2.c (import_export_vtable): Don't defer handling of vtables
12732         if MULTIPLE_SYMBOL_SPACES.
12733
12734 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12735
12736         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
12737
12738 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
12739
12740         * except.c (do_pop_exception): Return a value.
12741
12742 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
12743
12744         * call.c (build_new_method_call): Handle getting a
12745         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
12746         if we got template parms.
12747         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
12748         not just the args.
12749         * decl2.c (build_expr_from_tree): Tweak last change.
12750         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
12751         (maybe_fold_nontype_arg): Split out from tsubst_copy.
12752         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
12753
12754 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
12755
12756         * pt.c (tsubst_copy): Handle explicit template arguments in
12757         function calls.
12758         * typeck.c (build_x_function_call): Likewise.
12759         * decl2.c (build_expr_from_tree): Lookup function name if it
12760         hasn't been done.
12761
12762         * pt.c (tsubst): Instantiate template functions properly when
12763         template parameter does not appear in function arguments and return
12764         type.
12765         (comp_template_args): Handle member templates required by tsubst.
12766
12767 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12768
12769         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
12770         previous change.
12771
12772 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12773
12774         * pt.c (coerce_template_parms): Tweak error message.
12775
12776         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
12777         return type defaults to `int', even if there are storage-class
12778         specifiers.
12779
12780 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12781
12782         Complete nested exception support.
12783         * except.c (do_pop_exception): Split out...
12784         (push_eh_cleanup): From here.  Handle the EH region by hand.
12785         (expand_start_catch_block): Add a new level for the catch parm.
12786         Move the rethrow region outside the two cleanup regions.
12787         Protect the initializer for the catch parm with terminate.
12788         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
12789         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
12790         popping off the middle of the stack.
12791         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
12792         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
12793         (build_cplus_new): Only wrap CALL_EXPRs.
12794         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
12795         the constructor call.
12796
12797 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12798
12799         * Make-lang.in (c++.distdir): Make inc subdirectory.
12800
12801 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12802
12803         * decl2.c (finish_file): Put back some code.
12804
12805 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12806
12807         * decl2.c (finish_file): Remove redundant code.
12808         * method.c (emit_thunk): Don't let the backend defer generic thunks.
12809
12810 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
12811
12812         * except.c (call_eh_info): Split out...
12813         (push_eh_info): From here.
12814         (expand_builtin_throw): Use it.
12815         (expand_start_catch_block): Move region start back.
12816
12817 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
12818
12819         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
12820         (real_yylex): Record wide strings using target endianness, not host.
12821
12822 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
12823
12824         * repo.c (rindex): Add decl unconditionally.
12825         (get_base_filename, open_repo_file): Don't cast rindex.
12826         * xref.c (rindex): Add decl unconditionally.
12827         (index): Remove unused decl.
12828         (open_xref_file): Don't cast rindex.
12829
12830 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12831
12832         * class.c (build_vbase_path): Propagate the result type properly.
12833
12834 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
12835
12836         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
12837         remaining use of saved_throw_type with a call to get_eh_type.
12838
12839 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
12840
12841         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
12842         (file_name_nondirectory): New function, doing the same as the macro.
12843         (set_typedecl_interface_info): Use it instead of the macro.
12844         (check_newline): Likewise.
12845         (handle_cp_pragma): Likewise.
12846
12847         * repo.c (get_base_filename): Cast result of rindex to char*.
12848         (open_repo_file): Likewise.
12849         * xref.c (open_xref_file): Likewise.
12850         * error.c (dump_char): Make its arg int, not char.
12851
12852         * except.c (push_eh_info): Pass the number of fields - 1 down, not
12853         the exact number of fields.
12854
12855 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
12856
12857         Support for nested exceptions.
12858         * tinfo2.cc (__is_pointer): New fn.
12859         * exception.cc (struct cp_eh_info): Define.
12860         (__cp_exception_info, __uncatch_exception): New fns.
12861         (__cp_push_exception, __cp_pop_exception): New fns.
12862         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
12863         Lose empty_fndecl.
12864         (init_exception_processing): Likewise.  __eh_pc is now external.
12865         (push_eh_info): New fn.
12866         (get_eh_{info,value,type,caught}): New fns.
12867         (push_eh_cleanup): Just call __cp_pop_exception.
12868         (expand_start_catch_block): Use push_eh_info.  Start the eh region
12869         sooner.
12870         (expand_end_eh_spec): Use push_eh_info.
12871         (expand_throw): Call __cp_push_exception to set up the exception info.
12872         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
12873         when we rethrow.
12874         (expand_builtin_throw): Don't refer to empty_fndecl.
12875
12876 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
12877
12878         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
12879
12880 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
12881
12882         * method.c (build_template_parm_names, build_decl_overload_real):
12883         Add static to definitions.
12884         * pt.c (add_to_template_args, note_template_header,
12885         processing_explicit_specialization, type_unification_real): Likewise.
12886         ({determine,check}_explicit_specialization): Use a single string for
12887         error messages.
12888
12889 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12890
12891         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
12892         (expand_end_catch_block): Likewise.
12893         (expand_end_eh_spec): Likewise.
12894
12895 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
12896
12897         * decl.c (duplicate_decls): Handle template specializations
12898         correctly.
12899         * error.c (dump_function_name): Fix printing of specializations of
12900         member functions that are not member templates.
12901         * cp-tree.h (processing_specialization): Make global.
12902         * pt.c (processing_specialization): Likewise.
12903         * lex.c (cons_up_default_function): Save and restore
12904         processing_specialization to avoid confusion.
12905
12906 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12907
12908         * decl.c (init_decl_processing): Give null_node unknown* type.
12909         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
12910         (common_type): Likewise.
12911         * error.c (args_as_string): Recognize null_node.
12912
12913 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12914
12915         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
12916         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
12917
12918         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
12919
12920         * Make-lang.in (g++): Include prefix.o.
12921
12922 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
12923
12924         * pt.c (determine_explicit_specialization): Initialize "dummy"
12925         to keep Purify quiet.
12926
12927 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12928
12929         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12930         (build_overload_int): Not here.
12931
12932 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
12933
12934         * class.c (build_type_pathname): Remove.
12935         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12936
12937 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
12938
12939         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12940         &&label GNU extension.
12941
12942 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
12943
12944         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12945         so as to avoid incorrect manglings.
12946         * method.c (build_decl_overload_real): Don't mangle return types
12947         for constructors.
12948
12949 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12950
12951         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12952         scratch_tree_cons): Define as macros for now.
12953         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12954         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12955         typeck2.c: Use them and the expression_obstack variants.
12956
12957 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12958
12959         * decl.c (store_return_init): Allow classes with explicit ctors to
12960         be used with the named return values extension.
12961
12962 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
12963
12964         * pt.c (instantiate_decl): Fix previous change.
12965
12966 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12967
12968         * pt.c (tsubst): Fix thinko.
12969         (instantiate_decl): Really use the original template.
12970
12971         * call.c (build_new_method_call): Use simple constructor_name for
12972         error messages.
12973
12974 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
12975
12976         * method.c (build_underscore_int): Don't use ANSI specific
12977         features.
12978
12979 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12980
12981         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12982         for our key method; it might have been inlined by -O3.
12983
12984 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
12985
12986         * decl.c (make_typename_type): Do not try to call lookup_field for
12987         non-aggregate types.
12988
12989 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
12990
12991         * typeck.c (build_reinterpret_cast): Tweak.
12992
12993 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
12994
12995         * typeck.c (build_reinterpret_cast): Converting a void pointer
12996         to function pointer with a reinterpret_cast produces a warning
12997         if -pedantic is issued.
12998
12999 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13000
13001         * typeck.c (c_expand_return): Don't warn about returning a
13002         reference-type variable as a reference.
13003
13004 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13005
13006         * method.c (build_static_name): Fix typo.
13007
13008 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
13009
13010         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
13011         OLDDECL before we try to do DECL_USE_TEMPLATE.
13012
13013 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13014
13015         * decl.c (duplicate_decls): Don't warn about template instances.
13016
13017         * typeck.c (mark_addressable): Lose ancient code that unsets
13018         DECL_EXTERNAL.
13019
13020         * pt.c (do_decl_instantiation): Lose support for instantiating
13021         non-templates.
13022
13023         * call.c (build_new_function_call): Fix handling of null explicit
13024         template args.
13025         (build_new_method_call): Likewise.
13026
13027 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
13028
13029         * method.c (build_underscore_int): Fix typo.
13030
13031 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
13032
13033         * tree.c (print_lang_statistics): #if 0 call to
13034         print_inline_obstack_statistics until its definition is checked in.
13035
13036 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13037
13038         * decl2.c (finish_file): Move dump_tree_statistics to end.
13039
13040         * pt.c (instantiate_decl): Look for the original template.
13041         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
13042         of member templates.
13043
13044 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13045
13046         * Makefile.in (g++FAQ.*): New rules.
13047         (CONFLICTS): Update.
13048         * g++FAQ.texi: Moved from libg++.
13049
13050         * parse.y (PFUNCNAME): Only specify the type once.
13051
13052 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
13053
13054         * lex.c (real_yylex): Clean up the code to fully behave the way
13055         the c-lex.c parser does for complex and real numbers.
13056
13057 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13058
13059         * method.c (build_decl_overload_real): Reformat.
13060
13061 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
13062
13063         * method.c (synthesize_method): If at_eof, determine our linkage.
13064
13065 1997-09-29  Paul Eggert  <eggert@twinsun.com>
13066
13067         * lex.c (real_yylex): Treat `$' just like `_', except issue a
13068         diagnostic if !dollars_in_ident or if pedantic.
13069
13070         * lang-specs.h (@c++): -ansi no longer implies -$.
13071
13072         * decl2.c (lang_decode_option):
13073         -traditional and -ansi now do not mess with
13074         dollars_in_ident.
13075
13076 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
13077
13078         * Makefile.in (parse.o, decl.o): Also depend on
13079         $(srcdir)/../except.h $(srcdir)/../output.h.
13080         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
13081         $(srcdir)/../except.h $(srcdir)/../output.h.
13082         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
13083         ../insn-codes.h.
13084
13085         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
13086
13087         * expr.c (cplus_expand_expr): Make it static.
13088
13089         * decl2.c, init.c, typeck.c: Include "expr.h".
13090         (expand_expr): Use proper values when calling the function.
13091
13092 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13093
13094         * lang-options.h: New -Wold-style-cast flag.
13095         * cp-tree.h (warn_old_style_cast): New variable.
13096         * decl2.c (warn_old_style_cast): Likewise.
13097         (lang_decode_option): Support -Wold-style-cast.
13098         (reparse_absdcl_as_casts): Produce old-style-cast warning.
13099
13100 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13101
13102         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
13103         TREE_USED, reset value based on already_used.
13104
13105         * init.c (expand_member_init): Revert change.
13106
13107 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13108
13109         * cp-tree.h, decl.c, decl2.c, pt.c:
13110         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
13111
13112         * decl2.c (lang_decode_option): Add missing ;.
13113
13114 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13115
13116         * friend.c (do_friend): Disable injection for all template-derived
13117         decls.
13118         * decl2.c (lang_decode_option): Handle -fguiding-decls.
13119         * parse.y (notype_template_declarator): New nonterminal.
13120         (direct_notype_declarator): Use it.
13121         (complex_direct_notype_declarator): Likewise.
13122         (object_template_id): Accept any kind of identifier after TEMPLATE.
13123         (notype_qualified_id): Don't add template declarators here.
13124
13125 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
13126
13127         * call.c (add_template_candidate): Add explicit_targs parameter.
13128         (build_scoped_method_call): Use it.
13129         (build_overload_call_real): Likewise.
13130         (build_user_type_conversion_1): Likewise.
13131         (build_new_function_call): Likewise.
13132         (build_object_call): Likewise.
13133         (build_new_op): Likewise.
13134         (build_new_method_call): Likewise.
13135         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
13136         (build_new_method_call): Likewise.
13137
13138         * class.c (finish_struct_methods): Add specialization pass to
13139         determine which methods were specializing which other methods.
13140         (instantiate_type): Handle TEMPLATE_ID_EXPR.
13141
13142         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
13143
13144         * cp-tree.h (name_mangling_version): New variable.
13145         (flag_guiding_decls): Likewise.
13146         (build_template_decl_overload): New function.
13147         (begin_specialization): Likewise.
13148         (reset_specialization): Likewise.
13149         (end_specialization): Likewise.
13150         (determine_explicit_specialization): Likewise.
13151         (check_explicit_specialization): Likewise.
13152         (lookup_template_function): Likewise.
13153         (fn_type_unification): Add explicit_targs parameter.
13154         (type_unification): Likewise.
13155
13156         * decl.c (duplicate_decls): Add smarts for explicit
13157         specializations.
13158         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
13159         specializations.
13160         (grokfndecl): Call check_explicit_specialization.
13161
13162         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
13163         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
13164         (check_classfn): Handle specializations.
13165
13166         * error.c (dump_function_name): Print specialization arguments.
13167
13168         * friend.c (do_friend): Don't call pushdecl for template
13169         instantiations.
13170
13171         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
13172
13173         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
13174         and -fno-guiding-decls.
13175
13176         * lex.c (identifier_type): Return PFUNCNAME for template function
13177         names.
13178
13179         * method.c (build_decl_overload_real): New function.
13180         (build_template_parm_names): New function.
13181         (build_overload_identifier): Use it.
13182         (build_underscore_int): New function.
13183         (build_overload_int): Use it.  Add levels for template
13184         parameters.
13185         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
13186         (build_overload_nested_names): Handle template type parameters.
13187         (build_template_decl_overload): New function.
13188
13189         * parse.y (YYSTYPE): New ntype member.
13190         (nested_name_specifier): Use it.
13191         (nested_name_specifier_1): Likewise.
13192         (PFUNCNAME): New token.
13193         (template_id, object_template_id): New non-terminals.
13194         (template_parm_list): Note specializations.
13195         (template_def): Likewise.
13196         (structsp): Likewise.
13197         (fn.def2): Handle member template specializations.
13198         (component_decl_1): Likewise.
13199         (direct_notype_declarator): Handle template-ids.
13200         (component_decl_1): Likewise.
13201         (direct_notype_declarator): Handle template-ids.
13202         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
13203
13204         * pt.c (processing_specializations): New variable.
13205         (template_header_count): Likewise.
13206         (type_unification_real): New function.
13207         (processing_explicit_specialization): Likewise.
13208         (note_template_header): Likewise.
13209         (is_member_template): Handle specializations.
13210         (end_template_decl): Call reset_specialization.
13211         (push_template_decl): Handle member template specializations.
13212         (tsubst): Likewise.
13213         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
13214         (instantiate_template): Handle specializations.
13215         (instantiate_decl): Likewise.
13216         (fn_type_unification): Handle explicit_targs.
13217         (type_unification): Likewise.  Allow incomplete unification
13218         without an error message, if allow_incomplete.
13219         (get_bindings): Use new calling sequence for fn_type_unification.
13220
13221         * spew.c (yylex): Handle PFUNCNAME.
13222
13223         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
13224         (really_overloaded_fn): Likewise.
13225         (get_first_fn): Handle function templates.
13226
13227         * typeck.c (build_x_function_call): Use really_overloaded_fn.
13228         Handle TEMPLATE_ID_EXPR.
13229         (build_x_unary_op): Likewise.
13230         (build_unary_op): Likewise.
13231         (mark_addressable): Templates whose address is taken are marked
13232         as used.
13233
13234 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13235
13236         * decl.c (init_decl_processing): Declare __builtin_constant_p as
13237         accepting any kind of type, not only int.
13238
13239 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13240
13241         * search.c (get_matching_virtual): Notice virtual bases when sorrying
13242         about covariant returns.
13243
13244         * parse.y (member_init): Also imply typename here.  Remove ancient
13245         extension for initializing base members.
13246
13247 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13248
13249         Handle multi-level typenames and implicit typename in base list.
13250         * parse.y (typename_sub{,[0-2]}): New rules.
13251         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
13252         (nonnested_type): New rule.
13253         (complete_type_name): Use it.
13254         (base_class.1): Use typename_sub and nonnested_type.
13255         (nested_name_specifier): Don't elide std:: here.
13256         * decl.c (make_typename_type): Handle getting a type for NAME.
13257         (lookup_name_real): Turn std:: into :: here.
13258
13259         Rvalue conversions were removed in London.
13260         * call.c (is_subseq): Don't consider lvalue transformations.
13261         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
13262         (joust): Re-enable ?: kludge.
13263
13264 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
13265
13266         * decl.c (start_function): Up warning of no return type to be a
13267         pedwarn.
13268
13269 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13270
13271         * init.c (expand_member_init): Don't set TREE_USED.
13272         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
13273         set,don't clear TREE_USED wholesale.
13274
13275 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
13276
13277         * call.c (build_over_call): Do require_complete_type before
13278         build_cplus_new.
13279
13280 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13281
13282         * search.c (lookup_field): Call complete_type in all cases.
13283
13284         * decl.c (finish_function): Just warn about flowing off the end.
13285
13286 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13287
13288         * decl.c (grokparms): Don't bash a permanent list node if we're
13289         in a function.
13290
13291 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
13292
13293         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
13294
13295 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13296
13297         * call.c (build_new_op): Give better error for syntactically
13298         correct, but semantically invalid, use of undeclared template.
13299
13300         * call.c (compare_qual): Handle pmfs.
13301
13302         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
13303         after the exception spec.
13304
13305 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13306
13307         * call.c (null_ptr_cst_p): Integer type, not integral type.
13308
13309         * call.c (joust): Disable warnings until they can be moved to the
13310         right place.
13311
13312 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
13313
13314         * Makefile.in, config-lang.in:  Convert to autoconf.
13315
13316 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13317
13318         * decl.c (lookup_name_real): Add implicit 'typename' to types from
13319         base classes.
13320
13321         * pt.c (most_specialized_class): Fix typo.
13322         (tsubst): Move constant folding to TREE_VEC case.
13323
13324 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
13325
13326         * pt.c (do_poplevel): Don't warn about unused local variables
13327         while processing_template_decl since we don't always know whether
13328         or not they will need constructing/destructing.
13329
13330         * pt.c (uses_template_parms): Check the values of an enumeration
13331         type to make sure they don't depend on template parms.
13332
13333         * decl.c (make_typename_type): Don't lookup the field if the
13334         context uses template parms, even if we're not
13335         processing_template_decl at the moment.
13336
13337         * pt.c (coerce_template_parms): Avoid looking at the
13338         TYPE_LANG_DECL portion of a typename type, since there won't be
13339         one.
13340         (tsubst): Do constant folding as necessary to make sure that
13341         arguments passed to lookup_template_class really are constants.
13342
13343 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13344
13345         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
13346         * decl2.c (finish_file): Only register exception tables if we
13347         need to.
13348
13349         * decl.c (init_decl_processing): Add __builtin_[fs]p.
13350
13351 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13352
13353         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
13354
13355 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
13356
13357         * error.c (dump_decl): Avoid crashing when presented with a
13358         uninitialized constant, as can occur with a template parameter.
13359         (dump_expr): Make sure that there are enough levels of
13360         current_template_parms before we start diving through them.
13361
13362 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
13363
13364         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
13365         c-typeck.c.
13366
13367 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13368
13369         * except.c (expand_throw): Call build_delete for all
13370         exception types, not just objects with destructors.
13371
13372 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
13373
13374         * decl.c (current_local_enum): Remove static.
13375         * pt.c (tsubst_enum): Save and restore value of current_local_enum
13376         in case template is expanded in enum decl.
13377         (instantiate_class_template): Use new tsubst_enum signature.
13378         (tsubst_expr): Likewise.
13379
13380 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
13381
13382         * pt.c (begin_member_template_processing): Take a function as
13383         argument, not a set of template arguments.  Use the template
13384         parameters, rather than the arguments.  Handle non-type parameters
13385         correctly.  Push a binding level for the parameters so that multiple
13386         member templates using the same parameter names can be declared.
13387         (end_member_template_processing): Pop the binding level.
13388         (push_template_decl): Mark member templates as static when
13389         appropriate.
13390
13391         * lex.c (do_pending_inlines): Pass the function, not its template
13392         arguments, to begin_member_template_processing.
13393         (process_next_inline): Likewise.
13394         (do_pending_defargs): Likewise.
13395
13396         * error.c (dump_expr): Obtain the correct declaration for a
13397         TEMPLATE_CONST_PARM.
13398
13399         * call.c (add_template_conv_candidate): New function.
13400         (build_object_call): Handle member templates, as done in the other
13401         build_ functions.
13402
13403 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
13404
13405         * decl.c (replace_defag): Undo previous change.
13406         * lex.c (do_pending_defargs): Deal with member templates.
13407
13408         * pt.c (is_member_template): Avoid crashing when passed a
13409         non-function argument.
13410
13411 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13412
13413         * class.c (grow_method): Remove check for redeclaration.
13414
13415 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
13416
13417         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13418         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13419         (PRIMARY_TEMPLATE_P): Use it.
13420         * call.c (build_overload_call_real): Use it.
13421         * class.c (instantiate_type): Likewise.
13422         * decl.c (decls_match): Likewise.
13423         * method.c (build_overload_identifier): Likewise.
13424         * pt.c (push_template_decl): Likewise.
13425         (classtype_mangled_name): Likewise.
13426         (lookup_template_class): Likewise.
13427
13428         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13429         DECL_NTPARMS to conform to usage elsewhere.
13430         * call.c (add_template_candidate): Likewise.
13431         * class.c (instantiate_type): Likewise.
13432         * pt.c (instantiate_template): Likewise.
13433         (get_bindings): Likewise.
13434
13435         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13436         is_member_template.
13437
13438         * pt.c (unify): Undo changes to allow multiple levels of template
13439         parameters.
13440         (type_unification): Likewise.
13441         (fn_type_unification): Likewise.
13442         (get_class_bindings): Likewise.
13443         * cp-tree.h (Likewise).
13444
13445         * decl.c (replace_defarg): Check that the type of the default
13446         parameter does not invlove a template type before complaining
13447         about the initialization.
13448
13449         * error.c (dump_expr): Deal with template constant parameters in
13450         member templates correctly.
13451
13452         * pt.c (is_member_template): Deal with class specializations
13453         correctly.
13454         (tsubst): Handle "partial instantiation" of member templates
13455         correctly.
13456
13457 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
13458
13459         * pt.c (type_unification): Change calling sequence to allow for
13460         multiple levels of template parameters.
13461         (tsubst_expr): Likewise.
13462         (tsubst): Likewise.
13463         (tsubst_copy): Likewise.
13464         (instantiate_template): Likewise.
13465         (unify): Likewise.
13466         * call.c (build_overload_call_real): Use it.
13467         (add_builtin_candidate): Use it.
13468         (build_new_method_call): Use it.
13469         * class.c (instantiate_type): Use it.
13470         * decl.c (grokdeclarator): Use it.
13471         * decl2.c (finish_file): Use it.
13472         * method.c (build_overload_identifier): Use it.
13473
13474         * call.c (add_template_candidate):  Add additional parameter for
13475         the function return type.  Call fn_type_unification istead of
13476         type_unification.
13477         (build_user_type_conversion_1): Handle member templates.
13478         (build_new_function_call): Likewise.
13479         (build_new_op): Likewise.
13480         (build_new_method_call): Likewise.
13481
13482         * class.c (grow_method): Don't give an error message indicating
13483         that two member templates with the same name are ambiguous.
13484         (finish_struct): Treat member template functions just like member
13485         functions.
13486
13487         * cp-tree.h (check_member_template): Add declaration.
13488         (begin_member_template_processing): Likewise.
13489         (end_member_template_processing): Likewise.
13490         (fn_type_unification): Likewise.
13491         (is_member_template): Likewise.
13492         (tsubst): Change prototype.
13493         (tsubst_expr): Likewise.
13494         (tsubst_copy): Likewise.
13495         (instantiate_template): Likewise.
13496         (get_bindings): Likewise.
13497
13498         * decl.c (decls_match): Handle multiple levels of template
13499         parameters.
13500         (pushdecl): Handle template type params just like other type
13501         declarations.
13502         (push_class_level_binding): Return immediately if the
13503         class_binding_level is NULL.
13504         (grokfndecl): If check_classfn() returns a member_template, use
13505         the result of the template, not the template itself.
13506
13507         * decl2.c (check_member_template): New function.  Check to see
13508         that the entity declared to be a member template can be one.
13509         (check_classfn): Allow redeclaration of member template functions
13510         with different types; the new functions can be specializations or
13511         explicit instantiations.
13512
13513         * error.c (dump_decl): Handle multiple levels of template
13514         parameters.
13515         (dump_function_decl): Update to handle function templates.
13516
13517         * lex.c (do_pending_inlines): Set up template parameter context
13518         for member templates.
13519         (process_next_inline): Likewise.
13520
13521         * method.c (build_overload_identifier): Adjust for multiple levels
13522         of template parameters.
13523
13524         * parse.y (fn.def2): Add member templates.
13525         (component_decl_1): Likewise.
13526
13527         * pt.c (begin_member_template_processing): New function.
13528         (end_member_template_processing): Likewise.
13529         (is_member_template): Likewise.
13530         (fn_type_unification): Likewise.
13531         (current_template_parms): Return a vector of all the template
13532         parms, not just the innermost level of parms.
13533         (push_template_decl): Deal with the possibility of member
13534         templates.
13535         (lookup_template_class): Likewise.
13536         (uses_template_parms): Likewise.
13537         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13538         TEMPLATE_CONST_PARM to deal with multiple levels of template
13539         arguments.   Add processing of TEMPLATE_DECL to produce new
13540         TEMPLATE_DECLs from old ones.
13541         (do_decl_instantiation): Handle member templates.
13542
13543         * search.c (lookup_fnfields_1): Handle member template conversion
13544         operators.
13545
13546         * tree.c (cp_tree_equal): Check the levels, as well as the
13547         indices, of TEMPLATE_CONST_PARMs.
13548
13549         * typeck.c (comptypes): Check the levels, as well as the indices,
13550         fo TEMPLATE_TYPE_PARMs.
13551         (build_x_function_call): Treat member templates like member
13552         functions.
13553
13554 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13555
13556         * typeck.c (c_expand_return): Always convert_for_initialization
13557         before checking for returning a pointer to local.
13558
13559         * pt.c (type_unification): If strict and the function parm doesn't
13560         use template parms, just compare types.
13561
13562 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
13563
13564         * method.c (build_overloaded_value): Replace direct call
13565         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13566
13567 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13568
13569         * typeck.c (convert_arguments): Don't arbitrarily choose the first
13570         of a set of overloaded functions.
13571
13572 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13573
13574         * lex.c (real_yylex): Don't elide __FUNCTION__.
13575
13576         * method.c (build_overload_value): Add in_template parm.
13577         (build_overload_int): Likewise.
13578         (build_overload_identifier): Pass it.
13579
13580         * decl.c (duplicate_decls): Don't bash a previous template
13581         definition with a redeclaration.
13582
13583         * pt.c (unify): float doesn't match double.
13584
13585         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13586         TYPE_DECL.  Handle getting non-template types.
13587         * parse.y (explicit_instantiation): Use typespec instead of
13588         aggr template_type.
13589
13590 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
13591
13592         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13593
13594 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
13595
13596         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13597         (compare_ics): Likewise.
13598
13599 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13600
13601         * call.c (joust): Warn about choosing one conversion op over
13602         another because of 'this' argument when the other return type is
13603         better.
13604         (source_type): New fn.
13605
13606         * call.c (build_new_op): Strip leading REF_BIND from first operand
13607         to builtin operator.
13608
13609         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
13610         use its RTL.
13611
13612 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13613
13614         * call.c (null_ptr_cst_p): Remove support for (void*)0.
13615
13616 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
13617
13618         * typeck.c (expand_target_expr): Make definition match declaration.
13619
13620         * class.c (get_basefndecls): Make definition match declaration.
13621
13622 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
13623
13624         * input.c (sub_getch): Eventually give up and release the input file.
13625
13626         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
13627         right place.
13628
13629         * call.c (joust): Tweak message.
13630
13631 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
13632
13633         * error.c (type_as_string): Put const/volatile on template type
13634         parameters where appropriate.
13635
13636 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
13637
13638         * call.c (strictly_better): Make arguments unsigned ints.
13639
13640 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
13641
13642         * lex.c (real_yylex): Refer to __complex instead of complex.
13643
13644 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
13645
13646         * lex.c (real_yylex): Don't use getc directly.
13647
13648 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13649
13650         * call.c (is_subseq): Don't try to be clever.
13651
13652 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13653
13654         * parse.y, pt.c: Include "except.h".
13655         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
13656         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
13657         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
13658         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
13659         prototyping.
13660
13661 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13662
13663         * decl2.c (mark_vtable_entries): Instead of replacing pure
13664         virtuals with a reference to __pure_virtual, copy the decl and
13665         change the RTL.
13666
13667 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13668
13669         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
13670
13671         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
13672
13673         * pt.c (instantiate_class_template): Call repo_template_used
13674         before finish_prevtable_vardecl.
13675
13676         * call.c (is_subseq): New fn.
13677         (compare_ics): Use it.
13678
13679         * repo.c (finish_repo): Don't crash on no args.
13680
13681         * parse.y (named_complex_class_head_sans_basetype): Handle
13682         explicit global scope.
13683         * decl2.c (handle_class_head): New fn.
13684
13685         * pt.c (unify): Add CONST_DECL case.
13686
13687 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13688
13689         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
13690
13691         * cp-tree.h (report_type_mismatch): Add prototype.
13692         * call.c (build_overload_call_real): Remove erroneous fourth
13693         argument to report_type_mismatch.
13694         (build_user_type_conversion_1): Remove erroneous second arg to
13695         tourney.
13696         (build_new_function_call): Likewise.
13697         (build_object_call): Likewise.
13698         (build_new_op): Likewise.
13699         (build_new_method_call): Likewise.
13700
13701 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13702
13703         * error.c (dump_decl): Don't bother processing a function with no
13704         DECL_LANG_SPECIFIC.
13705
13706         * method.c (emit_thunk): Call init_function_start in the macro case.
13707
13708 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13709
13710         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
13711         defined and used to set flag_vtable_thunks.
13712
13713 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13714
13715         * parse.y: Don't clear the inlines from their obstack until they've
13716         all been processed.
13717
13718         * decl.c (duplicate_decls): Don't complain about exception
13719         specification mismatch if flag_exceptions is off.
13720
13721 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
13722
13723         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
13724
13725 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
13726
13727         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
13728         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
13729         Include <stdio.h> before include files that formerly used STDIO_PROTO.
13730
13731         * decl.c, g++spec.c, lex.c, method.c, repo.c:
13732         Include "config.h" first, as per autoconf manual.
13733
13734 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13735
13736         * decl.c (duplicate_decls): Tweak wording.
13737         * lex.c (do_pending_defargs): Don't die if we see a default arg
13738         that isn't a DEFAULT_ARG.
13739         * error.c (dump_expr): Handle DEFAULT_ARG.
13740
13741         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
13742         * lang-options.h: Add -fhandle-exceptions.
13743
13744         * class.c (build_vtable): Vtables are artificial.
13745         (prepare_fresh_vtable): Likewise.
13746
13747 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13748
13749         * cvt.c (ocp_convert): After converting to the target type, set
13750         LOOKUP_NO_CONVERSION.
13751
13752         * call.c (joust): Warn about potentially confusing promotion rules
13753         with -Wsign-promo.
13754         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
13755
13756 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
13757
13758         * exception.cc: Declare __terminate_func with noreturn attribute.
13759
13760 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
13761
13762         * parse.y: Break out eat_saved_input, handle errors.
13763         (function_try_block): Use compstmt instead of compstmt_or_error.
13764
13765 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13766
13767         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
13768
13769 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13770
13771         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
13772         existence of cc1plus check whether $(LANGUAGES) contains C++.
13773
13774 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13775
13776         * method.c (do_build_copy_constructor): When copying an anonymous
13777         union member loop around to handle nested anonymous unions.  Use
13778         the offset of the member relative to the outer structure, not the
13779         union.
13780
13781 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13782
13783         * call.c (resolve_args): New fn.
13784         (build_new_function_call): Use it.
13785         (build_object_call): Likewise.
13786         (build_new_method_call): Likewise.
13787
13788 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13789
13790         * call.c (build_over_call): tsubst all default parms from templates.
13791
13792 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13793
13794         * decl.c (struct cp_function): Add static_labelno.
13795         (push_cp_function_context): Save it.
13796         (pop_cp_function_context): Restore it.
13797
13798 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13799
13800         * typeck.c (build_component_ref_1): Convert from reference.
13801
13802 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13803
13804         * parse.y (current_declspecs, prefix_attributes): Initialize to
13805         NULL_TREE.
13806
13807         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
13808         before we try to force it to be a TREE_LIST.
13809         (decl): Make sure $1.t is non-nil.
13810
13811 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13812
13813         * pt.c (uses_template_parms): Handle template first-parse codes.
13814
13815         * decl.c (cp_finish_decl): Only warn about user-defined statics.
13816
13817 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13818
13819         * pt.c (unify): Handle BOOLEAN_TYPE.
13820
13821         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
13822         * pt.c (tsubst): Don't set it.
13823         * call.c (build_over_call): Use uses_template_parms.
13824
13825 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13826
13827         * method.c (build_overload_nested_name): Use static_labelno
13828         instead of var_labelno.
13829         (build_qualified_name): New fn.
13830         (build_overload_name): Split out from here.
13831         (build_static_name): Use build_qualified_name.
13832         * decl.c (cp_finish_decl): Statics in extern inline functions
13833         have comdat linkage.
13834         (start_function): Initialize static_labelno.
13835
13836 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13837
13838         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
13839         before "all member functions in class [] are private".
13840
13841 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13842
13843         * lex.c (do_scoped_id): convert_from_reference.
13844         * init.c (build_offset_ref): Likewise.
13845
13846 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13847
13848         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
13849
13850 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13851
13852         * typeck.c (get_member_function_from_ptrfunc): Promote index
13853         before saving it.
13854
13855 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13856
13857         * tree.c (layout_basetypes): Move non-virtual destructor warning.
13858         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
13859
13860 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13861
13862         * decl.c (grokdeclarator): Call add_defarg_fn for the function
13863         type, too.
13864         * lex.c (add_defarg_fn): Adjust.
13865         (do_pending_defargs): Adjust.  Don't skip the first parm.
13866
13867 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13868
13869         * decl.c (build_enumerator): Global enumerators are also readonly.
13870
13871         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
13872         (build_dynamic_cast): Call it and convert_from_reference.
13873
13874         * lex.c (add_defarg_fn): New fn.
13875         (snarf_defarg): Don't add to defarg_types.
13876         (do_pending_defargs): Lose defarg_types.  All fns we process now
13877         have defargs.
13878         * decl.c (grokfndecl): Call add_defarg_fn.
13879
13880         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
13881         * cp-tree.def: Add DEFAULT_ARG.
13882         * spew.c (yylex): Call snarf_defarg as appropriate.
13883         * parse.y: New tokens DEFARG and DEFARG_MARKER.
13884         (defarg_again, pending_defargs, defarg, defarg1): New rules.
13885         (structsp): Use pending_defargs.
13886         (parms, full_parm): Use defarg.
13887         * lex.c (init_lex): Initialize inline_text_firstobj.
13888         (do_pending_inlines): Never pass the obstack to feed_input.
13889         (process_next_inline): Call end_input instead of restore_pending_input.
13890         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
13891         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
13892         * input.c (end_input): New fn.
13893         (sub_getch): At the end of some fed input, just keep returning EOF
13894         until someone calls end_input.
13895         Remove 'obstack' field from struct input_source.
13896         * decl.c (grokparms): Handle DEFAULT_ARG.
13897         (replace_defarg): New fn.
13898         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
13899
13900 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13901
13902         * call.c (implicit_conversion): If nothing else works, try binding
13903         an rvalue to a reference.
13904
13905 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
13906
13907         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
13908         ifndef for Cygwin32 to include SIGSEGV.
13909
13910 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13911
13912         * class.c (finish_struct_1): Only complain about pointers without
13913         copy stuff if there are any constructors.
13914
13915         * rtti.c (build_dynamic_cast): Call complete_type on the types.
13916
13917         * decl.c (grokfndecl): If the function we chose doesn't actually
13918         match, die.
13919
13920         * decl2.c (grokclassfn): Don't specify 'const int' for the
13921         artificial destructor parm.
13922
13923         * pt.c (type_unification): If we are called recursively, nothing
13924         decays.
13925
13926 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
13927
13928         * decl.c (init_decl_processing): Stop trying to catch signals
13929         other than SIGABRT since the Cygwin32 library doesn't support
13930         them correctly yet.  This fixes a situation in which g++ causes
13931         a hang on SIGSEGVs and other such signals in our Win32-hosted
13932         tools.
13933
13934 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
13935
13936         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13937
13938 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13939
13940         * typeck2.c (store_init_value): Always return the value if our
13941         type needs constructing.
13942
13943         * method.c (hack_identifier): Convert class statics from
13944         reference, too.
13945
13946 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13947
13948         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13949
13950 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
13951
13952         * typeck.c (c_expand_return): Make sure we clean up temporaries at
13953         the end of return x;
13954
13955 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13956
13957         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13958
13959 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
13960
13961         * except.c (expand_builtin_throw): Add support
13962         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13963
13964 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13965
13966         * repo.c (extract_string): Null-terminate.
13967
13968         * cp-tree.h (TI_SPEC_INFO): New macro.
13969         (CLASSTYPE_TI_SPEC_INFO): New macro.
13970         * pt.c (push_template_decl): Correctly determine # of template parms
13971         for partial specs.
13972
13973         * call.c (compare_ics): Really fix 'this' conversions.
13974
13975         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13976         non-template fn.
13977
13978         * pt.c (push_template_decl): Complain about mismatch in # of
13979         template parms between a class template and a member template.
13980
13981 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13982
13983         * method.c (synthesize_method): You can't call
13984         function_cannot_inline_p after finish_function.
13985         * decl.c (finish_function): Turn on flag_inline_functions and turn
13986         off DECL_INLINE before handing a synthesized method to the
13987         backend.
13988
13989 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13990
13991         * method.c (synthesize_method): Remove July 30 change to never set
13992         DECL_INLINE if at_eof.
13993
13994 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
13995
13996         * xref.c (GNU_xref_member): Ensure that the node has a
13997         decl_lang_specific part before checking DECL_FRIEND_P.
13998
13999 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14000
14001         * pt.c (instantiate_class_template): Diagnose non-class types used
14002         as bases.
14003
14004 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14005
14006         * typeck.c (build_conditional_expr): Use convert_for_initialization
14007         instead of convert_and_check.
14008
14009 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14010
14011         * parse.y (typespec): Don't pedwarn for typeof.
14012
14013 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
14014
14015         * repo.c (finish_repo): Only check changes if we would write a
14016         repo file.
14017
14018         * call.c (compare_ics): Fix handling of 'this' conversions.
14019
14020         * pt.c (do_decl_instantiation): Support static data too.  Rename
14021         from do_function_instantiation.
14022         * cp-tree.h: Adjust.
14023         * parse.y: Adjust.
14024
14025         * repo.c (extract_string): New fn.
14026         (get_base_filename): Use it.
14027         (init_repo): Compare old args with current args.
14028
14029 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
14030
14031         * Makefile.in, Make-lang.in: Protect C-ls with a comment
14032         character, idea from Paul Eggert <eggert@twinsun.com>.
14033
14034 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
14035
14036         * typeck.c (c_expand_return): Be more persistent in looking for
14037         returned temps.
14038
14039         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
14040         pointer to reference.
14041
14042         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
14043
14044 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14045
14046         * init.c (build_member_call, build_offset_ref):
14047         Use do_scoped_id instead of do_identifier.
14048
14049         * cvt.c (convert): Remove bogosity.
14050
14051 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14052
14053         * cvt.c (build_up_reference): Do checks of ARGTYPE and
14054         TARGET_TYPE before trying to use get_binfo.
14055
14056 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
14057
14058         * cvt.c (build_up_reference): Call get_binfo to get access control.
14059
14060         * decl2.c (import_export_decl): If we don't support weaks, leave
14061         statics undefined.
14062
14063 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
14064
14065         * except.c (expand_builtin_throw): Add support for machines that
14066         cannot access globals after throw's epilogue when
14067         -fno-sjlj-exceptions is used.
14068
14069 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14070
14071         * parse.y: 'std::' becomes '::'.
14072         * lex.c (real_yylex): Remove 'namespace' warning.
14073         * init.c (build_member_call): Ignore 'std::'.
14074         (build_offset_ref): Likewise.
14075         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
14076         (do_toplevel_using_decl): Ignore 'using std::whatever'.
14077         * decl.c (push_namespace): Just sorry.
14078         (pop_namespace): Nop.
14079         (init_decl_processing): Declare std namespace.
14080
14081 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14082
14083         * search.c (push_class_decls): A name which ambiguously refers to
14084         several instantiations of the same template just refers to the
14085         template.
14086
14087 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
14088
14089         * decl.c (build_enumerator): Fix problem with unsigned long
14090         enumerated values being smashed to ints, causing overflow
14091         when computing next enumerated value (for enum values around
14092         MAX_VAL).
14093
14094 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14095
14096         * typeck.c (build_component_ref): Only call mark_used on a decl.
14097
14098 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14099
14100         * typeck.c (build_c_cast): Make the check for a ptr to function
14101         more specific before possible default_conversion call.
14102
14103 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
14104
14105         * except.c (expand_exception_blocks): Simplify and fix and make
14106         sure we don't end a region in a sequence, as expand_end_bindings
14107         doesn't like it.
14108
14109 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
14110
14111         * except.c (init_exception_processing): Mark terminate as not
14112         returning so that the optimizer can optimize better.
14113
14114 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
14115
14116         * cvt.c (convert): Don't do any extra work, if we can avoid it
14117         easily.
14118
14119 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
14120
14121         * *.[chy]: Change cp_convert to ocp_convert, change convert to
14122         cp_convert.  convert is now reserved for the backend, and doesn't
14123         have the semantics a frontend person should ever want.
14124
14125 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14126
14127         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
14128         Lose -traditional support.
14129
14130 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14131
14132         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
14133
14134         * parse.y (self_reference): Do it for templates, too.
14135         * class.c (pushclass): Don't overload_template_name; the alias
14136         generated by build_self_reference serves the same purpose.
14137
14138         * tree.c (list_hash): Make static, take more args.
14139         (list_hash_lookup): Likewise.
14140         (list_hash_add): Make static.
14141         (list_hash_canon): Lose.
14142         (hash_tree_cons): Only build a new node if one isn't already in the
14143         hashtable.
14144         (hash_tree_chain): Use hash_tree_cons.
14145         * cp-tree.h: Adjust.
14146         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
14147         of calling lookup_name.
14148
14149 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14150
14151         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
14152         doesn't refer to the CONST_DECLs.
14153
14154 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
14155
14156         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
14157         is bigger.
14158         (expand_class_desc): Convert the last argument to a sizetype.
14159
14160 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14161
14162         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
14163         __real__): Add reswords.
14164         * hash.h: Regenerate.
14165         * lex.h (rid): Add RID_COMPLEX.
14166         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
14167         * lex.c (init_lex): Add building of RID_COMPLEX.
14168         (real_yylex): General cleanup in line with what c-lex.c also has,
14169         sans the cruft for traditional; add handling of SPEC_IMAG, complex
14170         types, and imaginary numeric constants.
14171         * parse.y (REALPART, IMAGPART): Add tokens.
14172         (unary_expr): Add REALPART and IMAGPART rules.
14173         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
14174         * decl.c (complex_{integer,float,double,long}_type_node): Define
14175         types.
14176         (init_decl_processing): Set up the types.
14177         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
14178         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
14179         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14180         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
14181         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
14182         COMPLEX_TYPE case.
14183         * method.c (build_overload_name): Add handling of the different
14184         COMPLEX_TYPEs, prefixing them with `J'.
14185         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
14186         as a template parm.
14187         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
14188         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
14189         (mapcar): Handle COMPLEX_CST.
14190         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
14191         (common_type): Add code for complex types.
14192         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14193         (convert_for_assignment): Likewise.
14194         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
14195
14196 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14197
14198         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
14199         tsubst_expr, as it might try to do overload resolution.
14200
14201 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14202
14203         * pt.c (instantiate_class_template): Oops.
14204
14205 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14206
14207         * cp-tree.def: Add TAG_DEFN.
14208         * pt.c (tsubst_enum): New fn.
14209         (instantiate_class_template): Use it.
14210         (tsubst_expr): Support TAG_DEFN.
14211         (tsubst): Support local enums.
14212         (tsubst_copy): Likewise.
14213         * decl.c (finish_enum): Likewise.
14214         (start_enum): If this is a local enum, switch to permanent_obstack.
14215
14216 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
14217
14218         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
14219         (finish_function): Put the base init code for constructors just
14220         after the parm cleanup insns.
14221         (struct cp_function): Add last_parm_cleanup_insn.
14222         (push_cp_function_context): Likewise.
14223         (pop_cp_function_context): Likewise.
14224
14225 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14226
14227         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
14228
14229 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14230
14231         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
14232         for THUNK_FNDECL before we switch to temporary allocation.
14233
14234 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14235
14236         * call.c (build_new_op): Handle null arg2 for ?:.
14237
14238 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
14239
14240         * except.c (expand_exception_blocks): Ensure that we flow through
14241         the end of the exception region for the exception specification.
14242         Move exception region for the exception specification in, so that
14243         it doesn't protect the parm cleanup.  Remove some obsolete code.
14244         * decl.c (store_parm_decls): Likewise.
14245         (finish_function): Likewise.
14246
14247 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14248
14249         * init.c (build_new): Fix nothrow handling.
14250
14251 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14252
14253         * init.c (emit_base_init): Don't warn about the initialization
14254         list for an artificial member.
14255
14256 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14257
14258         * expr.c (do_case): Handle !START case for the error msg.
14259
14260 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14261
14262         * decl2.c, lang-options.h: New option -Weffc++.
14263         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
14264         to -Weffc++.
14265
14266         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
14267         to MULTIPLE_SYMBOL_SPACES.
14268
14269 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14270
14271         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
14272
14273         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
14274
14275         * typeck.c (c_expand_return): Don't complain about returning void
14276         to void in an artificial function.
14277         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
14278         don't set DECL_RESULT, set DECL_ARTIFICIAL.
14279         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
14280
14281 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
14282
14283         * init.c (init_decl_processing): Add support for setjmp/longjmp based
14284         exception handling.
14285         * except.c (init_exception_processing): Likewise.
14286         (expand_end_catch_block): Likewise.
14287         (expand_exception_blocks): Likewise.
14288         (expand_throw): Likewise.
14289         * exception.cc (__default_terminate): Likewise.
14290
14291         * init.c (perform_member_init): Use new method of expr level
14292         cleanups, instead of cleanups_this_call and friends.
14293         (emit_base_init): Likewise.
14294         (expand_aggr_vbase_init_1): Likewise.
14295         (expand_vec_init): Likewise.
14296         * decl.c (cp_finish_decl): Likewise.
14297         (expand_static_init): Likewise.
14298         (store_parm_decls): Likewise.
14299         (cplus_expand_expr_stmt): Likewise.
14300         * decl2.c (finish_file): Likewise.
14301
14302         * Make-lang.in (exception.o): Ok to compile with -O now.
14303
14304         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
14305         we know it will be done later by the backend.
14306
14307         * decl2.c (lang_f_options): Remove support for short temps.
14308         * lang-options.h: Likewise.
14309
14310 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14311
14312         * tree.c (varargs_function_p): New fn.
14313         * method.c (emit_thunk): Replace broken generic code with code to
14314         generate a heavyweight thunk function.
14315
14316 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
14317
14318         * pt.c (process_template_parm): pedwarn about floating-point parms.
14319
14320         * decl.c (grokdeclarator): inline no longer implies static.
14321
14322         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
14323
14324 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14325
14326         * class.c (check_for_override): The signature of an overriding
14327         function is not changed.
14328
14329         * call.c (build_over_call): Move setting of conv into the loop.
14330         Note: this change, along with the related changes of the 18th thru
14331         the 20th of April, fix an infinite loop problem in conversions.
14332
14333 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14334
14335         * call.c (build_user_type_conversion_1): Really ignore rvalue
14336         conversions when looking for a REFERENCE_TYPE.
14337
14338         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
14339         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
14340         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
14341         (build_unary_op): Likewise.
14342         * call.c (build_over_call): See through a CONVERT_EXPR around the
14343         ADDR_EXPR for on a temporary.
14344         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
14345         the ADDR_EXPR for a local variable.
14346
14347 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
14348
14349         * call.c (build_user_type_conversion_1): If we're trying to
14350         convert to a REFERENCE_TYPE, only consider lvalue conversions.
14351         (build_new_function_call): Print candidates.
14352         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
14353         (reference_binding): Binding a temporary of a reference-related type
14354         is BAD.
14355
14356 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14357
14358         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
14359         * tinfo2.cc (type_info::before): Likewise.
14360
14361 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
14362
14363         * call.c (implicit_conversion): Oops.
14364
14365 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14366
14367         * call.c (implicit_conversion): Try to find a reference conversion
14368         before binding a const reference to a temporary.
14369
14370 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
14371
14372         * exception.cc (__default_unexpected): Call terminate by default,
14373         so that if the user overrides terminate, the correct function will
14374         be called.
14375
14376 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
14377
14378         * parse.y (left_curly): Avoid trying to use any fields of
14379         error_mark_node, as there aren't any.
14380
14381 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14382
14383         * lex.c (do_identifier): Avoid breaking on overloaded methods
14384         as default arguments.
14385
14386 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
14387
14388         * call.c (add_template_candidate): Initialize the variable "dummy".
14389
14390 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
14391
14392         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
14393         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
14394
14395 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14396
14397         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
14398         (debug_binfo): Delete decl, not needed.
14399
14400         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
14401         promotes_to_aggr_type): Delete fns.
14402         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
14403         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
14404         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
14405
14406         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
14407
14408         * friend.c (is_friend_type): Delete fn.
14409         * cp-tree.h (is_friend_type): Delete decl.
14410
14411         * decl.c (original_result_rtx, double_ftype_double,
14412         double_ftype_double_double, int_ftype_int, long_ftype_long,
14413         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
14414         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
14415
14416         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
14417         fwd decls.
14418         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
14419
14420         * decl.c (pushdecl_nonclass_level): #if 0, unused.
14421         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14422
14423         * lex.c (reinit_lang_specific): #if 0, unused.
14424         * cp-tree.h (reinit_lang_specific): #if 0 decl.
14425
14426         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14427         * cp-tree.h (revert_static_member_fn): Delete decl.
14428
14429         * class.c (root_lang_context_p): Delete fn.
14430         * cp-tree.h (root_lang_context_p): Delete decl.
14431
14432         * decl.c (set_current_level_tags_transparency): #if 0, unused.
14433         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14434
14435         * lex.c (set_vardecl_interface_info): Make static.
14436         * cp-tree.h (set_vardecl_interface_info): Delete decl.
14437
14438         * call.c (find_scoped_type): Make static.
14439         * cp-tree.h (find_scoped_type): Delete decl.
14440
14441         * search.c (convert_pointer_to_vbase): Make static.
14442         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14443
14444         * decl.c (const_ptr_type_node): Likewise.
14445         * cp-tree.h (const_ptr_type_node): Delete decl.
14446
14447         * typeck.c (common_base_type): Make static.
14448         * cp-tree.h (common_base_types): Delete erroneous decl.
14449
14450         * pt.c (classtype_mangled_name): Make static.
14451         * cp-tree.h (classtype_mangled_name): Delete decl.
14452
14453         * lex.c (check_newline): Make static.
14454         * cp-tree.h (check_newline): Delete decl.
14455
14456         * typeck.c (build_x_array_ref): Delete fn, same idea as
14457         grok_array_decl.
14458         * cp-tree.h (build_x_array_ref): Delete decl.
14459
14460         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14461         copy_lang_decl.
14462         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14463
14464         * class.c (build_vtable_entry): Make static.
14465         * cp-tree.h (build_vtable_entry): Delete decl.
14466
14467         * class.c (build_vbase_pointer): Make static.
14468         * cp-tree.h (build_vbase_pointer): Delete decl.
14469
14470         * sig.c (build_sptr_ref): Add forward decl and make static.
14471         * cp-tree.h (build_sptr_ref): Delete decl.
14472
14473         * call.c (build_new_method_call): Add forward decl and make static.
14474         * cp-tree.h (build_new_method_call): Delete decl.
14475
14476         * call.c (build_object_call): Make static.
14477         * class.c (check_for_override, complete_type_p, mark_overriders):
14478         Likewise.
14479         * decl.c (cp_function_chain): Likewise.
14480         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14481         Likewise.
14482         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14483         Likewise.
14484         * tree.c (build_cplus_array_type_1): Likewise.
14485         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14486         (comp_target_parms): Likewise.
14487
14488         * init.c (build_builtin_call): Make static.
14489         * cp-tree.h (build_builtin_call): Delete decl.
14490
14491         * typeck.c (binary_op_error): Delete decl.
14492         * cp-tree.h (binary_op_error): Likewise.
14493
14494 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14495
14496         * call.c (build_method_call): Compare against error_mark_node
14497         directly, rather than the ERROR_MARK tree code.
14498         * cvt.c (cp_convert): Likewise.
14499         * decl.c (print_binding_level): Likewise.
14500         (duplicate_decls): Likewise.
14501         (grokdeclarator): Likewise.
14502         (grokdeclarator): Likewise.
14503         * init.c (expand_aggr_init_1): Likewise.
14504         (decl_constant_value): Likewise.
14505         * method.c (build_opfncall): Likewise.
14506         (hack_identifier): Likewise.
14507         * typeck.c (build_modify_expr): Likewise.
14508
14509         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14510
14511 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14512
14513         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14514
14515         * pt.c (coerce_template_parms): Add new error message.
14516
14517         * method.c (build_overload_value): Implement name mangling for
14518         floating-point template arguments.
14519
14520         * method.c (build_overload_int, icat, dicat): Fix mangling of template
14521         arguments whose absolute value doesn't fit in a signed word.
14522
14523 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14524
14525         * friend.c: New file; put all of the friend stuff in here.
14526         * init.c: Instead of here.
14527         * Makefile.in (CXX_OBJS): Add friend.o.
14528         (friend.o): Add dependencies.
14529         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14530
14531 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14532
14533         * call.c (build_scoped_method_call): Complain if the scope isn't a
14534         base.
14535
14536 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14537
14538         * parse.y (left_curly): Don't crash on erroneous type.
14539
14540         * init.c (build_delete): Fix type of ref.
14541
14542 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14543
14544         * search.c (get_vbase_1): Renamed from get_vbase.
14545         (get_vbase): Wrapper, now non-static.
14546         (convert_pointer_to_vbase): Now static.
14547
14548         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14549         * init.c (build_delete): Pass one.
14550         (build_partial_cleanup_for): Use build_scoped_method_call.
14551         * decl.c (finish_function): Pass a binfo.
14552
14553 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14554
14555         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14556
14557         * typeck.c (build_c_cast): Lose other reference to flag.
14558
14559         * call.c (build_field_call): Don't look for [cd]tor_identifier.
14560         * decl2.c (delete_sanity): Remove meaningless use of
14561         LOOKUP_HAS_IN_CHARGE.
14562         * decl.c (finish_function): Use build_scoped_method_call instead
14563         of build_delete for running vbase dtors.
14564         * init.c (build_delete): Call overload resolution code instead of
14565         duplicating it badly.
14566
14567 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14568
14569         * call.c (build_over_call): Call mark_used before trying to elide
14570         the call.
14571
14572         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14573
14574 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14575
14576         * typeck.c (build_modify_expr): Always pedwarn for a cast to
14577         non-reference used as an lvalue.
14578
14579 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14580
14581         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14582
14583 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14584
14585         * parse.y (handler): Fix template typo.
14586
14587 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14588
14589         * error.c (lang_decl_name): New fn.
14590         * tree.c (lang_printable_name): Use it.
14591
14592 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
14593
14594         * g++spec.c: Include config.h so that we can catch bzero #defines
14595         from the config file.
14596
14597 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
14598
14599         * new1.cc: Include a declaration for malloc, to avoid warning, and
14600         avoid lossing on systems that require one (ones that define malloc
14601         in xm.h).
14602
14603 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14604
14605         * decl2.c (max_tinst_depth): New variable.
14606         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14607         option.
14608         * pt.c (max_tinst_depth): Variable moved.
14609         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
14610         as legal.
14611
14612 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14613
14614         * decl.c (xref_basetypes): Allow a base class that depends on
14615         template parms to be incomplete.
14616
14617         * decl2.c (build_expr_from_tree): Support typeid(type).
14618         * rtti.c (get_typeid): Support templates.
14619         (expand_si_desc, expand_class_desc): Fix string length.
14620         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
14621
14622 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
14623
14624         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
14625
14626         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
14627
14628 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14629
14630         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
14631         smashes together template and non-template decls of the same
14632         signature.
14633
14634 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14635
14636         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
14637
14638 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14639
14640         * decl.c (duplicate_decls): Next route, pedwarn about different
14641         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
14642
14643 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14644
14645         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
14646         (struct lang_type): Delete has_default_implementation member.
14647         Increase dummy to 21.
14648         * decl.c (start_method): Delete usage.
14649
14650         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
14651         store_after_parms, start_decl_1, auto_function): Add decls.
14652         (get_arglist_len_in_bytes, declare_implicit_exception,
14653         have_exceptions_p, make_type_decl, typedecl_for_tag,
14654         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
14655         build_component_type_expr, cplus_exception_name,
14656         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
14657         * call.c (build_this): Make static.
14658         (is_complete): Likewise.
14659         (implicit_conversion): Likewise.
14660         (reference_binding): Likewise.
14661         (standard_conversion): Likewise.
14662         (strip_top_quals): Likewise.
14663         (non_reference): Likewise.
14664         (build_conv): Likewise.
14665         (user_harshness): Likewise.
14666         (rank_for_ideal): Likewise.
14667         * decl.c (start_decl_1): Delete forward decl.
14668         (push_decl_level): Make static.
14669         (resume_binding_level): Make static.
14670         (namespace_bindings_p): Make static.
14671         (declare_namespace_level): Make static.
14672         (lookup_name_real): Make static.
14673         (duplicate_decls): Make static.  Take register off NEWDECL and
14674         OLDDECL parm decls.
14675         * decl2.c (get_sentry): Make static.
14676         (temp_name_p): Delete fn.
14677         * except.c (auto_function): Delete decl.
14678         * lex.c (handle_{cp,sysv}_pragma): Make static.
14679         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
14680         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
14681         * pt.c (tsubst_expr_values): Make static.
14682         * rtti.c (combine_strings): Delete decl.
14683
14684 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14685
14686         * pt.c (push_template_decl): Handle getting a typedef.
14687
14688         * call.c (build_new_function_call): Complain about void arg.
14689
14690 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14691
14692         * decl.c (duplicate_decls): Give pedwarn of different exceptions
14693         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
14694
14695 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
14696
14697         * except.c (expand_throw): Don't expand the cleanup tree here,
14698         since we are not going to write the rtl out.  Fixes problem with
14699         -g -O on SPARC.
14700
14701 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
14702
14703         * Make-lang.in: Add $(exeext) as necessary.
14704
14705 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
14706
14707         * parse.y (handler_seq): Must have at least one catch clause.
14708
14709 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14710
14711         * call.c (add_builtin_candidate): Restore ?: hack.
14712
14713         * decl.c (grok_op_properties): More warnings.
14714
14715 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14716
14717         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
14718         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
14719
14720         * decl.c (duplicate_decls): Scale back to a warning, and only do
14721         'em if -pedantic.
14722
14723 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
14724
14725         * decl.c (duplicate_decls): pedwarn mismatched exception
14726         specifications.
14727
14728 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
14729
14730         * call.c (build_new_method_call): Don't display the invisible
14731         argument for controlling virtual bases.
14732
14733 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
14734
14735         * new: Add nothrow new and delete, bad_alloc and throw specifications
14736         for delete.
14737         * decl.c (init_decl_processing): Add throw specification for delete.
14738         * new.cc (nothrow): Define.
14739         * lex.c (real_yylex): Removing warning that throw and friends are
14740         keywords.
14741         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
14742         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
14743         * Make-lang.in: Add new{1,2}.{cc,o}.
14744
14745 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14746
14747         * lex.c (cons_up_default_function): Fix return type of synth op=.
14748
14749         * init.c (emit_base_init): Add warnings for uninitialized members
14750         and bases.
14751
14752         * decl.c (xref_basetypes): Add warning for non-polymorphic type
14753         with destructor used as base type.
14754
14755         * decl.c (grok_op_properties): Add warning for op= returning void.
14756         * typeck.c (c_expand_return): Add warning for op= returning anything
14757         other than *this.
14758
14759         * class.c (finish_struct_1): Add warning for class with pointers
14760         but not copy ctor or copy op=.
14761
14762         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
14763         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
14764         (instantiate_template): If -fexternal-templates, add this
14765         instantiation to pending_templates.
14766
14767         * decl2.c (copy_assignment_arg_p): Disable old hack to support
14768         Booch components.
14769
14770 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
14771
14772         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
14773
14774 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
14775
14776         * call.c (standard_conversion): Handle getting references.  Tack
14777         on RVALUE_CONV here.  Do it for non-class types, too.
14778         (reference_binding): Pass references to standard_conversion.
14779         (implicit_conversion): Likewise.
14780         (add_builtin_candidate): Disable one ?: kludge.
14781         (convert_like): Handle RVALUE_CONVs for non-class types.
14782         (joust): Disable the other ?: kludge.
14783
14784 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14785
14786         * decl.c (init_decl_processing): Add code to build up common
14787         function types beforehand, to avoid creation then removal of
14788         things already in the hash table.
14789
14790 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14791
14792         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
14793         the arguments.
14794
14795         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
14796         current_template_parms.
14797
14798 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
14799
14800         * search.c (lookup_field): Don't return a function, check want_type.
14801
14802 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14803
14804         * init.c (build_new): Make sure PLACEMENT has a type.
14805
14806 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14807
14808         * init.c (build_new): Support new (nothrow).
14809
14810 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14811
14812         * pt.c (instantiate_decl): Also do push_to_top_level before setting
14813         up DECL_INITIAL.
14814
14815         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
14816         * pt.c (tsubst): Defer instantiation of default args.
14817         * call.c (build_over_call): Until here.
14818
14819 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14820
14821         * search.c (lookup_field): Make sure we have an
14822         IDENTIFIER_CLASS_VALUE before we try to return it.
14823
14824 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14825
14826         * call.c (build_method_call): Delete unused var PARM.
14827         (build_overload_call_real): Likewise.
14828         (build_object_call): Delete unused var P.
14829         (build_new_op): Likewise.
14830         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
14831         var definitions, which are never used.
14832         (shadow_tag): Delete unused var FN.
14833         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
14834         * init.c (build_new): Delete unused var ALLOC_TEMP.
14835         * method.c (hack_identifier): Delete unused var CONTEXT.
14836         (do_build_copy_constructor): Delete unused var NAME.
14837         (synthesize_method): Delete unused var BASE.
14838         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
14839         * rtti.c (build_headof): Delete unused var VPTR.
14840         (get_typeid): Delete unused var T.
14841         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
14842         and ORIG_OP2.
14843         (build_ptrmemfunc): Delete unused vars U and NINDEX.
14844         * typeck2.c (build_functional_cast): Delete unused var BINFO.
14845
14846 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14847
14848         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
14849         things in a type being defined.
14850         * decl.c (finish_enum): Reverse the values so that they are in
14851         the correct order.
14852
14853         * pt.c (instantiate_class_template): Don't initialize
14854         BINFO_BASETYPES until the vector is filled out.
14855         (unify): Don't abort on conflicting bindings, just fail.
14856         (instantiate_decl): Do push_tinst_level before any tsubsting.
14857
14858         * method.c (build_overload_value): Handle getting a
14859         TEMPLATE_CONST_PARM for a pointer.
14860
14861 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
14862
14863         * init.c (expand_member_init): Don't give 'not a base' error for
14864         templates.
14865
14866         * pt.c (instantiate_decl): Call import_export_decl later.
14867
14868         * pt.c (instantiate_class_template): Return a value.
14869
14870         * parse.y (extension): New rule for __extension__.
14871         (extdef, unary_expr, decl, component_decl): Use it.
14872
14873 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
14874
14875         * class.c (base_binfo): Remove unused base_has_virtual member.
14876         (finish_base_struct): Likewise.
14877         (finish_struct_1): Likewise.
14878
14879 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
14880
14881         * search.c (expand_upcast_fixups): Fix bogus code generation
14882         problem where the generated code uses the wrong index into the
14883         runtime built vtable on the stack.  Old code could clobber random
14884         stack values.
14885
14886 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
14887
14888         * init.c (perform_member_init): Make sure the partial EH cleanups
14889         live on the function_obstack.
14890
14891 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
14892
14893         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
14894         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
14895
14896 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
14897
14898         * decl.c (grokvardecl): Avoid ANSI style initialization.
14899
14900 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
14901
14902         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
14903
14904 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
14905
14906         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
14907
14908 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14909
14910         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
14911         arguments we compare against.  Start the count of I at 1, not 0,
14912         since argv[0] is still the command.
14913
14914 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
14915
14916         * lang-specs.h: Accept .cp as an C++ extension.
14917
14918 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14919
14920         * cp-tree.h (ptr_reasonably_similar): Add decl.
14921
14922 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14923
14924         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14925         pointer.  New local SPECBITS with the parm's value.
14926         (grokdeclarator): Pass &specbits down.
14927
14928         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14929         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14930
14931         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14932         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14933
14934         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14935         not an error_mark_node.
14936
14937 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14938
14939         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14940         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14941
14942 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
14943
14944         * decl.c (grokdeclarator): When giving an anonymous struct a name,
14945         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14946         not affected).
14947
14948         * typeck2.c (build_m_component_ref): If component is a pointer
14949         to data member, resolve the OFFSET_REF now.
14950
14951         * call.c (convert_like): Don't go into infinite recursion.
14952
14953         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14954
14955         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14956         * tree.c (layout_basetypes): And on the vbase ptr.
14957
14958 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14959
14960         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14961         CHAR_TYPE_SIZE so bool is always the same size as another type.
14962
14963         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14964
14965 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
14966
14967         * decl2.c (grok_x_components): Remove synthesized methods from
14968         TYPE_METHODS of an anonymous union, complain about member
14969         functions.
14970         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14971         anonymous unions.
14972         (finish_function): Just clear the DECL_RTL of our arguments.
14973
14974 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14975
14976         * decl2.c (finish_file): Emit DWARF debugging info for static data
14977         members.
14978
14979         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14980
14981 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
14982
14983         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14984         IDENTIFIER_NODE.
14985
14986 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14987
14988         * Make-lang.in (g++-cross$(exeext)): Fix typo.
14989
14990 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14991
14992         Make the g++ driver now be a standalone program, rather than one
14993         that tries to run the gcc driver after munging up the options.
14994         * Make-lang.in (g++.c, g++spec.o): New rules.
14995         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14996         added.
14997         (g++$(exeext)): New rule, based on xgcc rule.
14998         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14999         * g++spec.c: New file.
15000         * g++.c: Removed file.
15001
15002 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
15003
15004         * cvt.c (build_up_reference): Arrange for any temporary values
15005         that have been keep in registers until now to be put into memory.
15006
15007 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15008
15009         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
15010         that make -j3 bootstrap works better.
15011
15012 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
15013
15014         * decl.c (pushtag): Do pushdecl for anon tags.
15015
15016 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15017
15018         * typeck.c (c_expand_return): Fix logic.
15019         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
15020
15021 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
15022
15023         * g++.c (main): Make sure arglist has a final NULL entry.  Add
15024         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
15025         stdin/stdout of the invoked program are redirected to
15026         nowheresville.
15027
15028 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15029
15030         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
15031
15032 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
15033
15034         * init.c (resolve_offset_ref): Handle obj.vfn better.
15035         * typeck.c (build_component_ref): Set TREE_TYPE on result from
15036         build_vfn_ref.
15037
15038 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
15039
15040         * typeck.c (convert_for_assignment): Also handle anachronistic
15041         implicit conversions from (::*)() to cv void*.
15042         * cvt.c (cp_convert_to_pointer): Likewise.
15043
15044 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15045
15046         * lex.c (handle_cp_pragma): Fix bogus warning.
15047
15048 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
15049
15050         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
15051         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
15052
15053 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15054
15055         * class.c (finish_struct_1): Support DWARF2_DEBUG.
15056         * search.c (dfs_debug_mark): Likewise.
15057         * decl2.c (finish_vtable_vardecl): Likewise.
15058         * decl.c (pushtag, finish_enum): Likewise.
15059         * lex.c (check_newline): Use debug_* instead of calling *out
15060         functions directly.
15061
15062 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15063
15064         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
15065         on some picky hosts.
15066
15067 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15068
15069         * class.c (finish_struct_1): A class has a non-trivial copy
15070         constructor if it has virtual functions.
15071
15072         * cvt.c (cp_convert): Always call a constructor.
15073
15074         * call.c (reference_binding): Still tack on a REF_BIND
15075         for bad conversions.
15076         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
15077
15078         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
15079         (c_expand_return): Likewise.
15080         * typeck2.c (digest_init): Likewise for { }.
15081         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
15082         * cvt.c (cp_convert): Handle failure better.
15083
15084 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15085
15086         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
15087         of GCC be path-relative.
15088
15089 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15090
15091         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
15092         it does need choose-temp.o and pexecute.o.
15093
15094 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15095
15096         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
15097         that we still use it.
15098         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
15099
15100 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15101
15102         * init.c (expand_default_init): Avoid calling constructors to
15103         initialize reference temps.
15104
15105         * cvt.c (convert_to_reference): Fix.
15106
15107 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15108
15109         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
15110         (convert_to_reference): Likewise.
15111         * typeck.c (convert_for_initialization): Likewise.
15112         * init.c (expand_default_init): Likewise.
15113         (expand_aggr_init_1): Likewise.
15114         * cp-tree.h (CONV_NONCONVERTING): Lose.
15115         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
15116         * *.c: Adjust.
15117         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
15118
15119 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
15120
15121         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
15122
15123 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15124
15125         * init.c (expand_aggr_init_1): Don't crash on non-constructor
15126         TARGET_EXPR.
15127
15128 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15129
15130         * g++.c: Include gansidecl.h.
15131         (VPROTO, PVPROTO, VA_START): Delete.
15132         (choose_temp_base_try, choose_temp_base, perror_exec,
15133         run_dos) [__MSDOS__]: Delete fns.
15134         (pfatal_with_name): Delete fn.
15135         (temp_filename): Declare like in gcc.c.
15136         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
15137         (error_count, signal_count): Define.
15138         (error): Delete both definitions.
15139         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
15140         (pfatal_pexecute): Add fn from gcc.c.
15141         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
15142         code to use the pexecute stuff also used by gcc.c.
15143         (MIN_FATAL_STATUS): Define.
15144         * Make-lang.in (g++): Add dependency on and linking with
15145         choose-temp.o and pexecute.o.
15146
15147         * cp-tree.h: Include gansidecl.h.
15148         (STDIO_PROTO): Delete #undef/#define.
15149         * cvt.c (NULL): Delete #undef/#define.
15150         * expr.c (NULL): Likewise.
15151         * init.c (NULL): Likewise.
15152         * rtti.c (NULL): Likewise.
15153         * xref.c (NULL): Likewise.
15154
15155         * cp-tree.h (build_user_type_conversion): Add prototype.
15156         * call.c (build_user_type_conversion): Delete prototype.  Correct
15157         decl of FLAGS arg to be an int.
15158         * cvt.c (build_user_type_conversion): Likewise.
15159
15160 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
15161
15162         * cp-tree.def: Add TRY_BLOCK and HANDLER.
15163         * except.c (expand_start_catch_block): Support templates.
15164         * parse.y (try_block, handler_seq): Likewise.
15165         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
15166
15167 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15168
15169         * pt.c (current_template_args): New fn.
15170         (push_template_decl): Use it.
15171         * decl.c (grokdeclarator): Use it.
15172
15173         * decl2.c (build_expr_from_tree): Dereference ref vars.
15174
15175         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
15176         the decl-specifier-seq.
15177
15178         * decl.c (grok_op_properties): Don't force the type of a conversion
15179         op to be complete.  Don't warn about converting to the same type
15180         for template instantiations.
15181
15182         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
15183         methods.
15184
15185 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
15186
15187         * typeck.c (get_delta_difference): Remove previous bogusness.
15188         Don't give errors if force is set.
15189
15190 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15191
15192         * decl2.c (finish_file): Don't emit debug info.
15193         * decl.c (pushdecl): Lose obsolete code.
15194         (grokdeclarator): Still do the long long thing after complaining.
15195         * search.c (note_debug_info_needed): Don't do anything if we're in a
15196         template.
15197         * method.c (synthesize_method): For non-local classes,
15198         push_to_top_level first.
15199
15200 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
15201
15202         * typeck.c (get_delta_difference): Add no_error parameter.
15203         (build_ptrmemfunc): Call get_delta_difference with no_error set;
15204         we don't want error messages when converting unrelated
15205         pointer-to-member functions.
15206
15207 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
15208
15209         * error.c (dump_expr): Improve the wording on error messages that
15210         involve pointer to member functions.
15211
15212 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
15213
15214         * cvt.c (cp_convert_to_pointer): Move code for conversions from
15215         (::*)() to void* or (*)() up a bit, so that we can convert from
15216         METHOD_TYPEs as well.
15217
15218 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15219
15220         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
15221         There are no 'member' types.
15222         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
15223         (build_x_typeid): Handle errors.
15224
15225 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
15226
15227         * typeck.c (convert_for_assignment): Handle anachronistic implicit
15228         conversions from (::*)() to void* or (*)().
15229         * cvt.c (cp_convert_to_pointer): Likewise.
15230         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
15231         conversions from here.
15232         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
15233         * lang-options.h: Likewise.
15234         * decl2.c (warn_pmf2ptr): Define.
15235         * cp-tree.h: Declare it.
15236         * typeck2.c (digest_init): Allow pmfs down into
15237         convert_for_initialization.
15238
15239 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15240
15241         * typeck.c (c_expand_return): Fix for returning overloaded fn.
15242
15243 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15244
15245         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
15246         * decl.c (grok_reference_init): Pass DIRECT_BIND.
15247         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
15248         DIRECT_BIND.
15249         * call.c (convert_like): Don't pass INDIRECT_BIND.
15250         * typeck.c (convert_arguments): Likewise.
15251         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
15252
15253 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15254
15255         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
15256         similar code in build_up_ref.
15257         * cvt.c (build_up_reference): Drastically simplify.
15258
15259 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
15260
15261         * typeck.c (signed_or_unsigned_type): If the given type already
15262         as the correct signedness, then just return it.
15263
15264         * typeck.c ({un,}signed_type): If can't do anything, call
15265         signed_or_unsigned_type.
15266
15267 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
15268
15269         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
15270         current_class_type is NULL.
15271
15272 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
15273
15274         * class.c (finish_struct_1): Avoid empty structs by adding a field
15275         so layout_type gets the mode right.
15276
15277         * typeck.c (c_expand_return): Drastically simplify.
15278
15279 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15280
15281         * typeck.c (decay_conversion): Handle overloaded methods.
15282
15283 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15284
15285         * call.c (build_over_call): A TARGET_EXPR has side-effects.
15286
15287 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
15288
15289         * cvt.c (convert_to_pointer_force): Add code to support pointer to
15290         member function to pointer to function conversions.
15291         * init.c (resolve_offset_ref): Add code to allow faked up objects,
15292         ignoring them if they are not used, and giving an error, if they
15293         are needed.
15294         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
15295         code, and so that we can give an error, if we needed an object,
15296         and one was not provided.
15297         (build_c_cast): Don't call default_conversion when we want to
15298         convert to pointer to function from a METHOD_TYPE.
15299
15300 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
15301
15302         * Make-lang.in (cplib2.ready): Fix logic.
15303
15304         * decl.c (shadow_tag): Only complain about non-artificial function
15305         members.
15306
15307         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
15308
15309 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
15310
15311         * expr.c (cplus_expand_expr): Pre-tweak call_target like
15312         expand_inline_function would.
15313
15314         * pt.c (mark_decl_instantiated): If extern_p, call
15315         mark_inline_for_output.
15316
15317 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
15318
15319         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
15320         pmd conversions.
15321
15322         * typeck.c (get_delta_difference): Fix wording, as we can be used
15323         for pointer to data members.
15324
15325 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
15326
15327         * pt.c (tsubst): If the function decl isn't a member of this
15328         template, return a copy of the decl (including copying the
15329         lang-specific part) so we don't hose ourselves later.
15330
15331 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15332
15333         * class.c (finish_struct): Remove DWARF-specific tag handling.
15334         * decl.c (pushtag): Likewise.
15335         (finish_function): Always clear DECL_ARGUMENTS on function decls with
15336         no saved RTX.
15337         * decl2.c (finish_file): Emit DWARF debugging info for static data
15338         members.
15339
15340 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
15341
15342         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
15343         isn't the same as the new one before we whack it.
15344
15345 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15346
15347         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
15348         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
15349         warn_traditional and warn_strict_prototypes; remove ancient
15350         'overload' code; remove references to flag_traditional.
15351
15352 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
15353
15354         * input.c (sub_getch): Handle 8-bit characters in string literals.
15355
15356 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
15357
15358         * tree.c (mapcar): Handle CONSTRUCTORs.
15359         (copy_to_permanent): Handle expression_obstack properly.
15360
15361         * Make-lang.in (cplib2.txt): Also depend on the headers.
15362
15363         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
15364         INT_TYPE_SIZE.
15365         (expand_class_desc): Use USItype for offset field.
15366         * tinfo.h (struct __class_type_info): Likewise.
15367
15368         * method.c (build_overload_int): TYPE_PRECISION should be applied
15369         to types.
15370
15371 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15372
15373         * call.c (build_new_op): A COND_EXPR involving void must be a
15374         builtin.
15375
15376 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15377
15378         * typeck.c (build_x_component_ref): New fn.
15379         (build_object_ref): Use it.
15380         * parse.y (primary): Use it.
15381         * decl2.c (build_expr_from_tree): Use it.
15382         * cp-tree.h: Declare it.
15383
15384         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
15385         * error.c (dump_type_suffix): Handle variable arrays.
15386
15387 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15388
15389         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
15390
15391 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15392
15393         * decl.c (lookup_name_real): Don't try to look up anything in a
15394         TYPENAME_TYPE.
15395
15396         * tinfo2.cc (__throw_type_match_rtti): Oops.
15397
15398 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15399
15400         * Make-lang.in (exception.o): Use -fno-PIC for now.
15401
15402 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15403
15404         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
15405         calling them.
15406         (get_tinfo_fn_dynamic): Extracted from build_typeid.
15407         * tinfo2.cc (__dynamic_cast): Adjust.
15408
15409         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
15410         (build_x_typeid): Likewise.
15411
15412         * parse.y: Call build_x_typeid instead of build_typeid.
15413         * cp-tree.def: Add TYPEID_EXPR.
15414         * pt.c (tsubst_copy): Handle typeid.
15415         * decl2.c (build_expr_from_tree): Likewise.
15416         * rtti.c (build_x_typeid): Throw bad_typeid from here.
15417         (build_typeid): Not here.
15418         * cp-tree.h: Declare build_x_typeid.
15419
15420 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
15421
15422         * call.c (convert_like): Pull out constant values.
15423
15424         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15425
15426 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15427
15428         * decl.c (init_decl_processing): Create short int types before
15429         creating size_t in case a machine description needs to use
15430         unsigned short for size_t.
15431
15432 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15433
15434         * Make-lang.in (exception.o): Turn off pic.
15435
15436         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15437         type, multi-level ptr conversions.
15438
15439         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15440         (throw_bad_cast): Use it.
15441         (throw_bad_typeid): New fn.
15442         (build_typeid): Throw bad_typeid as needed.
15443         Use build_call.
15444         (synthesize_tinfo_fn): Handle functions and arrays before checking
15445         for cv-quals.
15446
15447         * Remove .h from standard C++ headers, add new.h, move into inc
15448         subdirectory.
15449
15450         * exception*: Remove pointer from object, constructors.  Add
15451         default exception::what that uses type_info::name.  Add
15452         __throw_bad_typeid.
15453
15454         * init.c (build_new): Don't add a cookie to new (void *) T[2].
15455
15456 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
15457
15458         * Make-lang.in: Building C++ code depends on cc1plus.
15459
15460 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15461
15462         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15463         a HOST_WIDE_INT, not a tree.
15464
15465 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15466
15467         * exception.cc: Don't include <stdlib.h>.
15468
15469         * Make-lang.in (c++.clean): Remove cplib2.*.
15470
15471 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
15472
15473         * parse.y (component_decl_1, component_costructor_declarator case):
15474         Pass attributes/prefix_attributes in tree list.
15475
15476 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15477
15478         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15479
15480 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15481
15482         * lex.c (do_identifier): Don't do deferred lookup in a template
15483         header.
15484
15485         * typeck2.c (store_init_value): Oops.
15486
15487         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15488         New files for C++ lang-support library.
15489         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15490         (CXX_LIB2FUNCS): Define.
15491         And rules for building the C++ lang-support code.
15492         * config-lang.in (headers): Define.
15493         (lib2funcs): Define.
15494
15495 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15496
15497         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15498         digest_init.
15499         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15500         * typeck2.c (store_init_value): Check for initializing pmf with { }
15501         here.
15502         (process_init_constructor): Not here.
15503
15504 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15505
15506         * pt.c (begin_template_parm_list): Increment
15507         processing_template_decl here.
15508         (end_template_parm_list): Not here.
15509         (process_template_parm): No need to add 1 to it now.
15510         * *.c: Use processing_template_decl instead of current_template_parms
15511         to check for being in a template.
15512
15513         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
15514         (tsubst_copy): Handle CONSTRUCTOR.
15515         (instantiate_decl): Set up context properly for variables.
15516         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15517         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15518
15519 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15520
15521         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15522
15523 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15524
15525         * method.c (make_thunk): Call comdat_linkage before setting the
15526         TREE_CODE.
15527
15528         * decl2.c (comdat_linkage): Use make_decl_one_only.
15529         (import_export_decl): Likewise.
15530         * decl.c (init_decl_processing): Check supports_one_only instead of
15531         SUPPORTS_WEAK.
15532
15533 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15534
15535         * decl2.c (grokfield): Tighten checking for access decls.
15536
15537         * decl.c (make_typename_type): Resolve references to
15538         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
15539         (lookup_name_real): Types that depend on a template parameter get
15540         an implicit 'typename' unless they're in the current scope.
15541         (start_decl_1): We don't care about incomplete types that depend
15542         on a template parm.
15543         (grokdeclarator): Resolve 'typename's in the type specifier that
15544         refer to members of the current scope.
15545
15546         * call.c (build_over_call): Remove 'inline called before
15547         definition' diagnostic.
15548         (build_method_call): Likewise.
15549         * decl.c (duplicate_decls): Downgrade 'used before declared
15550         inline' to a warning, only with -Winline.
15551
15552 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
15553
15554         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15555
15556 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15557
15558         * call.c (build_method_call): When calling a signature
15559         default implementation, as in other cases, let instance_ptr simply
15560         be instance.
15561
15562 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
15563
15564         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15565
15566 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
15567
15568         * except.c (expand_start_catch_block): Add a pushlevel so that -g
15569         works on hppa and SPARC.
15570
15571 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15572
15573         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15574
15575 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15576
15577         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15578         before testing whether it's a signature.
15579
15580 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15581
15582         * call.c (build_new_method_call): Don't complain about signature
15583         pointers and references not being an aggr type.
15584         (build_this): If a signature pointer or reference was passed in,
15585         just return it.
15586         (build_new_method_call): If instance is a signature pointer, set
15587         basetype to the signature type of instance.
15588         * sig.c (build_signature_method_call): Deleted basetype and
15589         instance parameters, they can be found as the DECL_CONTEXT of
15590         function and as the first argument passed in.
15591         * cp-tree.h: Changed declaration of build_signature_method_call.
15592         * call.c (build_method_call): Deleted first two arguments in call
15593         of build_signature_method_call.
15594         (build_over_call): Added call to build_signature_method_call.
15595
15596 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15597
15598         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15599         target_expr.
15600
15601 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15602
15603         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15604
15605 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
15606
15607         * except.c (expand_start_try_stmts): Move to except.c in the backend.
15608         (expand_end_try_stmts): Remove.
15609
15610         * init.c (perform_member_init): Use add_partial_entry () instead
15611         of directly manipulating lists.
15612         (emit_base_init): Likewise.
15613
15614 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
15615
15616         * except.c (expand_exception_blocks): Always make sure USE and
15617         CLOBBER insns that came at the end still do, the backend relies
15618         upon this.
15619
15620 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15621
15622         * call.c (build_over_call): We can only use a TARGET_EXPR of the
15623         right type.
15624
15625 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
15626
15627         * cvt.c (convert_to_reference): Revert last change, don't complain
15628         about temp without target decl.
15629
15630 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
15631
15632         * decl.c (grokdeclarator): Don't core dump when void() is given.
15633
15634 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
15635
15636         * decl.c (copy_args_p): Don't crash.
15637
15638 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
15639
15640         * pt.c (tsubst): And support template args inside the exception
15641         specification.
15642
15643         * pt.c (tsubst): Add support for exception specifications in
15644         template functions.
15645
15646 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
15647
15648         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
15649         fields now.
15650         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
15651         (start_function): Likewise.
15652         (start_method): Likewise.
15653         (grokfield): Likewise.
15654         (make_call_declarator): Add throw spec parameter.
15655         (set_quals_and_spec): Add routine.
15656         * lex.c (set_quals_and_spec): Likewise.
15657         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
15658         * decl.c (shadow_tag): Eliminate the throw spec parameter to
15659         grokdeclarator.
15660         (groktypename): Likewise.
15661         (start_decl): Eliminate the throw spec parameter.  Eliminate the
15662         throw spec parameter to grokdeclarator.  Eliminate the throw spec
15663         field in DECL_STMT.
15664         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
15665         (grokfndecl): Remove useless set of raises.
15666         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
15667         the throw spec parameter to start_decl.  Pull the throw spec out
15668         of the call declarator.
15669         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
15670         (start_function): Eliminate the throw spec parameter.  Eliminate
15671         the throw spec parameter to grokdeclarator.
15672         (start_method): Likewise.
15673         * decl2.c (grokfield): Likewise.
15674         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
15675         (grokoptypename): Likewise.
15676         (finish_file): Eliminate the throw spec parameter to
15677         start_function.  Add throw spec to make_call_declarator.
15678         * except.c (init_exception_processing): Add throw spec to
15679         make_call_declarator.  Eliminate the throw spec parameter to
15680         start_decl.
15681         (expand_start_catch_block): Eliminate the throw spec parameter to
15682         grokdeclarator.
15683         (expand_builtin_throw): Add throw spec to make_call_declarator.
15684         Eliminate the throw spec parameter to start_function.
15685         (start_anon_func): Likewise.
15686         * lex.c (make_call_declarator): Add throw spec parameter.
15687         (set_quals_and_spec): New routine.
15688         (cons_up_default_function): Add throw spec to make_call_declarator.
15689         Eliminate the throw spec parameter to grokfield.
15690         * method.c (synthesize_method): Eliminate the throw spec parameter
15691         to start_function.
15692         * pt.c (process_template_parm): Eliminate the throw spec parameter
15693         to grokdeclarator.
15694         (tsubst): Add throw spec to make_call_declarator.
15695         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
15696         (do_function_instantiation): Eliminate the throw spec parameter to
15697         grokdeclarator.  Eliminate the throw spec parameter to
15698         start_function.
15699         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
15700         to start_function.
15701         * parse.y (datadef): Remove non-winning optimization.
15702         (decl): Likewise.
15703         (fndef): Remove ambiguous error productions uncovered by grammar
15704         fixing.
15705         (constructor_declarator): Add exception_specification_opt here.
15706         (component_constructor_declarator): Likewise.
15707         (direct_after_type_declarator): Likewise.
15708         (complex_direct_notype_declarator): Likewise.
15709         (direct_abstract_declarator): Likewise.
15710         (fn.def1): Remove exception_specification_opt.
15711         (fn.def2): Likewise.
15712         (condition): Likewise.
15713         (initdcl0): Likewise.
15714         (initdcl): Likewise.
15715         (notype_initdcl0): Likewise.
15716         (nomods_initdcl0): Likewise.
15717         (component_decl_1): Likewise.
15718         (component_declarator): Likewise.
15719         (after_type_component_declarator0): Likewise.
15720         (after_type_component_declarator): Likewise.
15721         (notype_component_declarator): Likewise.
15722
15723 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15724
15725         * call.c (build_over_call): Also use an INIT_EXPR when
15726         initializing anything from an rvalue.
15727
15728         * call.c (build_over_call): Call stabilize_reference when building
15729         an INIT_EXPR instead of calling the copy ctor.
15730
15731         * call.c (joust): Extend the previous change to all comparisons.
15732
15733         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
15734         NO_LINKAGE_HEURISTICS.
15735
15736         * decl2.c (finish_file): Emit any statics that weren't already.
15737
15738         * typeck.c (build_static_cast): Implement.
15739         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
15740         * decl.c (grokparms): Use can_convert_arg instead of
15741         implicit_conversion directly.
15742         (copy_args_p): New fn.
15743         * cvt.c (convert_to_reference): Don't complain about temp with
15744         static_cast.
15745         (build_up_reference): Handle TARGET_EXPRs.
15746         * call.c (build_over_call): Elide unnecessary temps.
15747         (can_convert*): Use new overloading code.
15748
15749 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
15750
15751         * call.c: Move TYPE_PTR*_MACROS ...
15752         * cp-tree.h: To here.
15753         * typeck.c (build_reinterpret_cast): Implement.
15754
15755         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
15756         ptr_complete_ob.
15757         (joust): If we're comparing a function to a builtin and the worst
15758         conversion for the builtin is worse than the worst conversion for the
15759         function, take the function.
15760
15761         * typeck.c (build_const_cast): Implement.
15762         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
15763         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
15764
15765 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
15766
15767         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
15768         too early.  Make sure we explode if exprtype turns out to be a
15769         NULL_TREE when it shouldn't be.
15770
15771 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
15772
15773         * cp-tree.h: New routine make_call_declarator.
15774         * lex.c (make_call_declarator): Define it.
15775         * except.c (init_exception_processing): Use it.
15776         (expand_builtin_throw): Likewise.
15777         (start_anon_func): Likewise.
15778         * decl2.c (finish_file): Likewise.
15779         * lex.c (cons_up_default_function): Likewise.
15780         * parse.y: Likewise.
15781         * pt.c (tsubst): Likewise.
15782
15783 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
15784
15785         * decl2.c (groktypefield): Remove unused code.
15786
15787 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
15788
15789         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
15790         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
15791         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
15792         nonempty_cv_qualifiers.
15793         * hash.h: Rebuild.
15794
15795         * lex.c (make_pointer_declarator): Change type_quals into
15796         cv_qualifiers.
15797         (make_reference_declarator): Likewise.
15798
15799 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15800
15801         * decl.c (start_function): Only check interface_* for templates
15802         with flag_alt_external_templates.
15803
15804         * call.c (build_new_op): Check for comparison of different enum types.
15805         (build_over_call): Fix arg # output.
15806
15807         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
15808
15809 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
15810
15811         * call.c (build_new_op): Check for erroneous args.
15812
15813         * call.c (build_new_method_call): Add missing args to cp_error.
15814
15815         * tree.c (error_type): Don't print reference-to-array.
15816
15817         * typeck.c (convert_for_assignment): Don't say contravariance for
15818         removing const.
15819
15820 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15821
15822         * call.c (build_over_call): Diagnose bad convs for `this'.
15823
15824         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
15825         on _ctor_arg.
15826
15827         * call.c (convert_like): Handle bad convs.
15828         (build_over_call): Handle bad convs better.
15829
15830         * decl2.c: -fansi-overloading is now the default.
15831
15832         * call.c (build_new_method_call): Check for erroneous args.
15833
15834         * pt.c (instantiate_class_template): Propagate
15835         TYPE_USES_MULTIPLE_INHERITANCE.
15836
15837 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
15838
15839         * call.c (enforce_access): Add static to routine.
15840
15841 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
15842
15843         * call.c (build_user_type_conversion_1): Fix bad handling.
15844         (compare_ics): Likewise.
15845
15846 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15847
15848         * call.c (standard_conversion): Oops.
15849
15850 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
15851
15852         * g++.c: Update test for win32 (&& ! cygwin32).
15853
15854 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15855
15856         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
15857         (ptr_reasonably_similar): New fn.
15858         * call.c (BAD_RANK): New rank.
15859         (ICS_BAD_FLAG): New macro.
15860         (standard_conversion): Handle almost-right pointer conversions.
15861         (reference_binding): Handle bad rvalue bindings.
15862         (add_*_candidate): Stuff.
15863         (build_over_call): Pass bad conversions to convert_for_initialization.
15864         (compare_ics): Handle bad convs.
15865         (joust): Likewise.
15866
15867 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
15868
15869         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
15870         integer_type_node when computing pointer offsets.
15871
15872 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
15873
15874         * tree.c (lvalue_type): New fn.
15875         (error_type): New fn.
15876         * call.c (op_error): Use error_type.
15877         (add_conv_candidate): Use lvalue_type.
15878         (add_builtin_candidates): Likewise.
15879         * error.c (args_as_string): Use error_type.
15880
15881 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15882
15883         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
15884         (tsubst): Not here.
15885
15886         * decl.c (init_decl_processing): With -ansi, __null's type is the
15887         signed integral type with the same number of bits as a pointer.
15888         Introduce a new variable null_node for it.
15889         * cp-tree.h: Adjust.
15890         * call.c (null_ptr_cst_p): Adjust.
15891
15892 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
15893
15894         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
15895         optimize.
15896
15897 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15898
15899         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
15900         fns of classes without virtual functions.
15901
15902         * call.c (add_function_candidate): Handle `this' specially.
15903         (compare_ics): Likewise.
15904
15905 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
15906
15907         * typeck.c (build_conditional_expr): Fix handling of __null.
15908
15909         * decl2.c (comdat_linkage): New fn.
15910         (import_export_vtable): Use it.
15911         (import_export_decl): Use it.
15912         * method.c (make_thunk): Use it.
15913
15914 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15915
15916         * pt.c (end_template_decl): If we don't actually have parms, return.
15917         * parse.y (template_header): Accept 'template <>'.
15918
15919         * errfn.c: Allow 5 args.
15920
15921 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
15922
15923         * tree.c (make_temp_vec): New fn.
15924         * pt.c (push_template_decl): Handle partial specs.
15925         (instantiate_class_template): Likewise.
15926         (more_specialized): Use get_bindings.
15927         (more_specialized_class): New fn.
15928         (get_class_bindings): New fn.
15929         (most_specialized_class): New fn.
15930         (do_function_instantiation): List candidates for ambiguous case.
15931         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15932         (shadow_tag): Call push_template_decl for partial specializations.
15933         * parse.y: Likewise.
15934         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15935         DECL_TEMPLATE_MEMBERS.
15936         * call.c (print_z_candidates): Reduce duplication.
15937
15938 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15939
15940         * decl2.c (lang_decode_option): Allow -fansi-overloading.
15941
15942 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15943
15944         * pt.c (get_bindings): New fn.
15945         (most_specialized): Likewise.
15946         (do_function_instantiation): Use them.
15947         (add_maybe_template): New fn.
15948         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15949         * call.c (build_new_op): Handle guiding decls.
15950         (build_new_function_call): Likewise.
15951         * decl2.c (finish_file): Likewise.
15952
15953         * decl2.c (mark_used): Do synthesis here.
15954         * call.c (build_method_call): Not here.
15955         (build_over_call): Or here.
15956         * typeck.c (build_function_call_real): Or here.
15957         * tree.c (bot_manip): Call mark_used on functions used in default
15958         args.
15959
15960 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15961
15962         * decl2.c (import_export_vtable): Delete code that disabled vtable
15963         heuristic on systems with ASM_OUTPUT_EXTERNAL.
15964
15965 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15966
15967         * typeck.c (build_x_function_call): Handle static call context
15968         better.
15969
15970         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15971         the function, not its outer block.
15972
15973         * call.c (build_field_call): Pass fields on to build_opfncall
15974         regardless of TYPE_OVERLOADS_CALL_EXPR.
15975         (build_method_call): Pass on to build_new_method_call sooner.
15976
15977         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15978         gives us.
15979         * class.c (instantiate_type): Don't put a POINTER_TYPE to
15980         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
15981         modifying it.
15982
15983 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
15984
15985         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15986         (add_builtin_candidate): Don't take enums for ++.
15987         (build_new_method_call): Handle non-aggregates and field calls.
15988         Move new overloading code from...
15989         * cvt.c: Here.
15990
15991         * decl.c (grokparms): Don't check default args in templates.
15992
15993 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
15994
15995         * cvt.c (build_new_op): Fix args to build_unary_op.
15996         (add_builtin_candidates): Don't call type_promotes_to on float.
15997
15998         * decl.c (grokparms): Check the type of the default arg.
15999
16000         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
16001         returning NULL_TREE.
16002
16003         * typeck.c (build_x_binary_op): Avoid doing extra work.
16004         (build_x_unary_op): Likewise.
16005         (build_x_conditional_expr): Likewise.
16006         * cvt.c (build_over_call): Return.
16007         (add_builtin_candidate): Fix MEMBER_REF.
16008         (build_new_op): Likewise.
16009
16010 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
16011
16012         * method.c (build_overload_name): Put bug fix into code but leave
16013         disabled for now so we can be bug compatible with older releases
16014         that do repeats incorrectly.  In the future, we can enable it.
16015
16016 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
16017
16018         * cvt.c (convert_like): Don't call build_cplus_new twice.
16019
16020         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
16021         Control new overloading code with -fansi-overloading.
16022
16023 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16024
16025         * cvt.c (build_over_call): Call build_cplus_new.
16026         * call.c (build_method_call): Likewise.
16027         * typeck.c (build_function_call_real): Likewise.
16028         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
16029         the COND_EXPR in a TARGET_EXPR so they use the same slot.
16030
16031         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
16032         recursive calls.
16033         * typeck.c (complete_type): Propagate
16034         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
16035
16036 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
16037
16038         * cvt.c (joust): More ?: kludging.  Sigh.
16039         (build_over_call): Don't try to synthesize global fns.
16040
16041         * search.c (lookup_conversions): Use binfo marking.
16042
16043 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
16044
16045         * search.c (build_mi_matrix): Use the correct value of cid
16046         when determining the new mi_size.
16047
16048 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16049
16050         * cvt.c (add_builtin_candidates): Do consider type conversion ops
16051         for the first parms of += et al.
16052         (strip_top_quals): New fn.
16053         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
16054         (implicit_conversion): Likewise.
16055         (add_builtin_candidates): Be careful about arrays.
16056         (build_new_method_call): Handle vtable optimization.
16057
16058 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16059
16060         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
16061         * cvt.c (reference_binding): Use it.
16062         (implicit_conversion): Use it.
16063         (add_builtin_candidate, COND_EXPR): Use it.
16064
16065         * cvt.c (build_new_function_call): Check for error args.
16066
16067         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
16068
16069         * gxx.gperf: Add __null.
16070         * hash.h: Regenerate.
16071         * lex.h: Add RID_NULL.
16072         * lex.c (init_lex): Create null_pointer_node here, stick it in
16073         RID_NULL.
16074         * decl.c (init_decl_processing): Still set its type here.
16075         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
16076         (convert_to_pointer_force): Likewise.
16077         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
16078         if (! pedantic).
16079         * call.c (convert_harshness): Use null_ptr_cst_p.
16080         * typeck.c (convert_for_assignment): Likewise.  Don't produce
16081         null_pointer_node.
16082
16083         * error.c (args_as_string): Handle lists of actual args, too.
16084         * cvt.c (null_ptr_cst): Support (void*)0 for now.
16085         (build_user_type_conversion_1): Improve diagnostics.
16086         (build_new_function_call): Likewise.
16087         (build_object_call): Likewise.
16088         (build_new_method_call): Likewise.  Move call before def diagnostic...
16089         (build_over_call): Here.
16090
16091         * cvt.c (build_new_method_call): Don't complain about no match if
16092         LOOKUP_SPECULATIVELY.
16093         (build_over_call): Fix 'this' for virtual fn.
16094         (build_new_method_call): Add diagnostic.
16095
16096 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16097
16098         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
16099         constructors to be passed in.
16100         (build_over_call): Likewise.
16101         (build_user_type_conversion_1): Pass them in.
16102         (convert_like): Likewise.
16103         (build_object_call): Handle overloaded conversions.
16104         (build_over_call): Pass the right args to build_vfn_ref.
16105         (standard_conversion): Fix pmf convs.
16106         (joust): Handle comparing statics and non-statics.
16107         (build_new_method_call): New fn.
16108         * call.c (build_method_call): Call it if NEW_OVER.
16109
16110 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
16111
16112         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
16113         %D instead.
16114
16115 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
16116
16117         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
16118         instead of just maybe_build_cleanup so that we deallocate the
16119         thrown object.
16120
16121 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16122
16123         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
16124         * cp-tree.h (finish_prevtable_vardecl): Add decl.
16125
16126 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
16127
16128         * pt.c (instantiate_class_template): Call complete_type.  Also, if
16129         we're at the end of the file and we just instantiated a template
16130         class with a vtable, call finish_prevtable_vardecl.
16131
16132         * error.c (dump_decl): Don't explode (or explode more gracefully
16133         as appropriate) if the object being dumped has a null type.
16134         (dump_expr): Likewise.
16135
16136         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
16137         by counting the number of nodes that we'll need before allocating
16138         the array.
16139         (lookup_fnfields): Fix comment.
16140         (breadth_first_search): Fix comment.
16141
16142 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
16143
16144         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
16145         TYPE_ALIGN.
16146         * class.c (finish_struct): Call cplus_decl_attributes here.
16147         (finish_struct_1): Not here.
16148         * cp-tree.h: Adjust.
16149
16150         * pt.c (type_unification): New parameter STRICT.
16151         (unify): If STRICT, don't allow cv addition or base deduction.
16152         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
16153
16154 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16155
16156         * search.c (get_template_base{_recursive}): New fns.
16157         * pt.c (more_specialized): New fn.
16158         (do_function_instantiation): Use it.
16159         (unify): Handle base deduction.
16160         * cvt.c (joust): Use more_specialized.
16161         Don't arbitrarily choose between non-builtin candidates.
16162         (build_over_call): Call require_complete_type.
16163
16164         * decl.c (start_function): Statics are static even in a #pragma
16165         interface file.
16166
16167         * decl2.c (import_export_vtable): Disable vtable heuristic on
16168         systems with ASM_OUTPUT_EXTERNAL.
16169
16170         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
16171         (standard_conversion): No std conv to enum type.
16172
16173         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
16174         for ptm's.
16175
16176         * cvt.c (reference_binding): Bind directly to a base subobject of
16177         a class rvalue.
16178
16179         * cvt.c (build_new_op): Enforce access control.
16180
16181 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16182
16183         * typeck2.c (process_init_constructor): When scanning the
16184         union for a named field, skip things that aren't FIELD_DECLs.
16185
16186         * method.c (synthesize_method): Don't scan fndecl's rtl if
16187         we're at the end of the file; just assume the function can't
16188         be inlined.
16189
16190 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16191
16192         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
16193         it failed.
16194
16195         * cvt.c (build_user_type_conversion_1): Handle overloaded
16196         conversion ops.
16197
16198         * cvt.c (add_builtin_candidates): Don't consider type conversion
16199         operators for the first parameter of operator=.
16200
16201 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16202
16203         * typeck.c (complete_type): Only call layout_type if we're not
16204         expanding a template.
16205
16206 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16207
16208         * cvt.c (compare_ics): Oops.
16209
16210         * cvt.c (op_error): Oops.
16211
16212         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
16213         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
16214         (build_conv): Use them.
16215         (implicit_conversion): Use them.
16216         (convert_like): Handle them.
16217         (build_new_op): Handle builtin COND_EXPR again.
16218         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
16219         in lists of types for COND_EXPR.
16220         (add_builtin_candidate): Add enum candidates for COND_EXPR.
16221
16222 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16223
16224         * typeck.c (build_modify_expr): Always attempt to build a call to
16225         the assignment operator, even if we're using a default one.
16226         (convert_for_initialization): Call complete_type.
16227
16228 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16229
16230         * cvt.c (reference_binding): A REF_BIND gets the reference type.
16231         (implicit_conversion): Likewise.
16232         (convert_like): Likewise.
16233         (compare_ics): Likewise.
16234         (compare_qual): Likewise.
16235         (print_z_candidates): Handle no candidates.
16236         (build_new_op): Don't handle builtin COND_EXPR for now.
16237
16238 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
16239
16240         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
16241
16242 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16243
16244         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
16245
16246         * cvt.c (build_builtin_candidate): Oops.
16247         (build_new_op): Oops.
16248
16249         * method.c (build_opfncall): Pass COND_EXPR on.
16250         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
16251         (add_builtin_candidate{,s}): Likewise.
16252         (add_builtin_candidates): Likewise.
16253         (print_z_candidates, op_error, build_new_op): Likewise.
16254         (type_decays_to): New fn.
16255         * lex.c (init_lex): Just say ?: for COND_EXPR.
16256
16257 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16258
16259         * typeck.c (complete_type): Call layout_type rather than building
16260         a new array type.
16261
16262         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
16263         only use ptrdiff_t.
16264
16265 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16266
16267         * cvt.c: Always compile the new overloading code (but don't use it).
16268         (implicit_conversion): Add a BASE_CONV when converting to
16269         the same class type.
16270         (convert_like): Handle BASE_CONV.
16271
16272 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16273
16274         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
16275         (add_builtin_candidate): Likewise.
16276
16277         NEW_OVER changes:
16278         * typeck.c (build_x_function_call): Try an operator function
16279         whenever we call an object of class type.
16280         * method.c (build_opfncall): Pass CALL_EXPRs through.
16281         * cvt.c (implicit_conversion): Do const-ref case first.
16282         (add_conv_candidate, build_object_call, op_error): New fns.
16283         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
16284         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
16285         builtin candidates.
16286         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
16287         Fall back on preincrement handling.  Use op_error.
16288         Handle warn_synth.
16289         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
16290         an error_mark_node.
16291         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
16292         properly.
16293
16294 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16295
16296         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
16297
16298 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
16299
16300         * typeck.c (build_component_ref_1): Use build_component_ref
16301         instead of open coding it here.
16302
16303 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16304
16305         * g++.c (main): Don't link with -lg++.
16306
16307         NEW_OVER changes:
16308         * cvt.c (convert_to_reference): Don't use convert_from_reference on
16309         result of build_type_conversion.
16310         (cp_convert): Only call build_method_call for ctors if
16311         build_type_conversion failed.
16312         (ptr_complete_ob): New function.
16313         (TYPE_PTR{,OB,MEM}_P): New macros.
16314         ({add,build}_builtin_candidate{,s}): New functions.
16315         (print_z_candidates): Handle builtins.
16316         (build_user_type_conversion_1): Don't use conversion fns for
16317         converting to a base type.
16318         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
16319         (build_user_type_conversion): Use convert_from_reference.
16320         (build_new_op): New function.
16321         (build_over_call): Fix handling of methods.
16322         (compare_ics): Handle AMBIG_CONV properly.
16323         * typeck2.c: Increment abort count.
16324         * method.c (build_opfncall): Forward most requests to build_new_op.
16325         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
16326
16327 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16328
16329         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
16330         invalid second argument to dump_expr_list.
16331
16332 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
16333
16334         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
16335
16336 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
16337
16338         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
16339         ASSEMBLE_EXTERNAL.
16340
16341 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
16342
16343         * typeck2.c (process_init_constructor): New pedwarn for using { }
16344         to initialize a pointer to member function.
16345         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
16346         we can avoid the new error.
16347
16348 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
16349
16350         * typeck.c (build_ptrmemfunc1): New function to hide details of
16351         pointer to member functions better.
16352
16353 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
16354
16355         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
16356         methods into the actual method, as we know the implied object is
16357         not used.
16358
16359 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16360
16361         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
16362         inside a system header.
16363
16364 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
16365
16366         * call.c (build_method_call): Call complete_type on the
16367         instance type.
16368
16369 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
16370
16371         * typeck.c (build_component_ref): Always build up an OFFSET_REF
16372         for obj_ptr->func so that we can know which object to use in a
16373         method call.
16374
16375 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
16376
16377         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
16378         around things.  Also improve maintainability.
16379
16380 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
16381
16382         * decl.c (grokdeclarator): Check for overflow when evaluating an
16383         array dimension.
16384
16385 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16386
16387         * cvt.c (cp_convert): Don't check for ambiguity with constructor
16388         if NEW_OVER.
16389
16390         * typeck.c (build_x_function_call): Pass function overload
16391         questions to new overloading code if NEW_OVER.
16392         * init.c (expand_aggr_init_1): Only check for type conversion ops
16393         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
16394         Don't check for ambiguity with constructor if NEW_OVER.
16395         * cvt.c (convert_to_reference): Dereference the result of a type
16396         conversion operator.
16397         (build_conv): Propagate ICS_USER_FLAG.
16398         (implicit_conversion): Call instantiate_type.
16399         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
16400         (add_function_candidate): Fix cv-quals on argtype.
16401         (print_z_candidates): New function.
16402         (build_new_function_call): Call it.
16403         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
16404         consider non-converting constructors.
16405         Call print_z_candidates.
16406         Return an AMBIG_CONV for an ambiguous conversion.
16407         (build_user_type_conversion): Handle AMBIG_CONV.
16408         (convert_like): Fix test for building TARGET_EXPR.
16409         Call instantiate_type.
16410         Handle AMBIG_CONV and LVALUE_CONV.
16411         (build_over_call): Handle 0 args and ellipsis.
16412         * cp-tree.def: Add AMBIG_CONV.
16413
16414 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
16415
16416         * decl.c (lookup_name_real): If we find mem in obj when parsing
16417         `obj->mem', make sure we return the right value.
16418
16419 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
16420
16421         * search.c (get_base_distance): Call complete_type.
16422
16423 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
16424
16425         * decl.c (store_bindings): Make static.
16426
16427 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16428
16429         * init.c (expand_aggr_init_1): Don't check type conversions if
16430         NEW_OVER.
16431
16432         * cvt.c (z_candidate): Put back template field.
16433         (add_function_candidate): Set it.
16434         (add_template_candidate): Likewise.
16435         (joust): Use it.
16436         (compare_qual): Handle references and pointers to members.
16437         (compare_ics): Handle reference bindings.
16438
16439         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16440
16441 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
16442
16443         * call.c (compute_conversion_costs): Call complete_type.
16444
16445         * tree.c (vec_binfo_member): Use comptypes instead of comparing
16446         pointers, so we can handle template parameters.
16447
16448 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16449
16450         * cvt.c (cp_convert_to_pointer): We have to call complete_type
16451         here; let's make it explicit instead of a side effect of an
16452         error check.
16453
16454 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16455
16456         * cvt.c (z_candidate): Remove template field.
16457         (reference_binding): Handle binding to temporary.
16458         (implicit_conversion): Likewise.
16459         (add_function_candidate): Handle artificial constructor parms.
16460         Handle functions with too few parms.
16461         (add_template_candidate): New function.
16462         (build_user_type_conversion_1): Handle constructors.
16463         (convert_like): Likewise.
16464         (build_over_call): Likewise.
16465         (build_new_function_call): Support templates.
16466         (compare_ics): Fix reference, inheritance handling.
16467
16468 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16469
16470         * decl.c: Add signed_size_zero_node.
16471         (init_decl_processing): Build it.
16472         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16473         when we're trying to make a negative delta.
16474
16475 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16476
16477         Stop doing this damn index==strchr variable name confusion.
16478         * class.c (add_virtual_function): Change local var INDEX to be
16479         named IDX.
16480         (add_method): Likewise.
16481         * lex.c (print_parse_statistics): Likewise.
16482         * search.c (make_memoized_table_entry): Likewise.
16483         (lookup_fnfields_here): Likewise.
16484         (lookup_field): Likewise.
16485         (lookup_fnfields): Likewise.
16486         (get_baselinks): Likewise.
16487         * sig.c (build_signature_table_constructor): Likewise.
16488         (build_signature_method_call): Likewise.
16489         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16490         (get_member_function_from_ptrfunc): Likewise.
16491         (build_ptrmemfunc): Change local var INDEX to be IDX.
16492         (c_expand_start_case): Likewise.
16493
16494 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16495
16496         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16497         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16498         (convert_to_reference): Use build_type_conversion to convert to
16499         the reference type directly.
16500         (standard_conversion): Fix void* case, non-conversions.
16501         (reference_binding): Fix expr == 0 case, non-conversions.
16502         (convert_like): Support REF_BIND.
16503         (compare_qual): Split out from compare_ics.
16504         (compare_ics): Use it, handle icses with only a qual_conv.
16505
16506         * init.c (expand_vec_init): Don't crash if decl is NULL.
16507
16508 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
16509
16510         * mpw-config.in: New file, configury for Mac MPW.
16511         * mpw-make.sed: New file, makefile editing for MPW.
16512
16513 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16514
16515         * pt.c (instantiate_class_template): Call repo_template_used.
16516
16517         * search.c (lookup_conversions): Only lookup conversions in
16518         complete types.
16519
16520 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16521
16522         * cp-tree.def: Renamed from tree.def, to avoid confusion with
16523         gcc's tree.def.
16524         * cp-tree.h, lex.c: Include cp-tree.def.
16525         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16526
16527 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16528
16529         * init.c (build_vec_delete_1): Call complete_type.
16530
16531 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
16532
16533         * except.c (start_anon_func): Make sure anonymous functions are
16534         never external.
16535
16536 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16537
16538         * decl.c (finish_function): If function_depth > 1, set nested.
16539
16540         * decl2.c (grokbitfield): Revert Bob's change.
16541         * class.c (finish_struct_1): Fix handling of named bitfield widths.
16542
16543 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16544
16545         * pt.c (add_pending_template): Handle types.
16546         (lookup_template_class): With -fexternal-templates, just add the class
16547         to pending_templates instead of instantiating it now.
16548         * decl2.c (finish_file): Handle types in pending_templates.
16549
16550 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16551
16552         * decl2.c (grokbitfield): Handle constant decls appropriately.
16553         Give an appropriate error message now instead of spewing core
16554         later.
16555
16556 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16557
16558         * decl2.c: Don't turn on thunks by default for now.
16559
16560 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
16561
16562         * typeck.c (complete_type): Handle error_mark_node.
16563         (common_type, OFFSET_TYPE): Handle template_type_parms.
16564
16565 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16566
16567         * pt.c (instantiate_decl): If at_eof, call import_export_decl
16568         regardless of DECL_INLINE.
16569
16570         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16571
16572         * class.c (finish_struct_bits): Copy TYPE_SIZE.
16573
16574         * rtti.c (build_dynamic_cast): Support templates.
16575         * tree.def: Support DYNAMIC_CAST_EXPR.
16576         * pt.c (tsubst_copy): Likewise.
16577         * decl2.c (build_expr_from_tree): Likewise.
16578
16579 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16580
16581         * typeck.c (build_static_cast): Support templates.
16582         (build_const_cast): Likewise.
16583         * tree.def: Support CONST/STATIC_CAST_EXPR.
16584         * pt.c (tsubst_copy): Likewise.
16585         * decl2.c (build_expr_from_tree): Likewise.
16586
16587 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16588
16589         * decl2.c (finish_vtable_vardecl): Don't trust
16590         TREE_SYMBOL_REFERENCED for vtables of local classes.
16591
16592 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16593
16594         * pt.c (tsubst_copy): Handle operator T.
16595
16596 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16597
16598         * init.c (build_delete): Move creation of PARMS inside test of
16599         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16600
16601 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16602
16603         * typeck.c (build_conditional_expr): Don't assume that
16604         the arguments to ?: are always pointers or records.
16605
16606 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16607
16608         * decl2.c (import_export_decl): Still emit static/weak/comdat
16609         copies of inline template functions with -fno-implicit-templates.
16610
16611 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
16612
16613         * init.c (build_delete): Determine the complete basetype
16614         path to the destructor we're calling.
16615
16616 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
16617
16618         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
16619         initialize the enum, because we really and truly don't know where
16620         it came from.
16621         (start_enum): Don't copy integer_zero_node because
16622         build_enumerator will do it.
16623
16624 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16625
16626         * decl.c (finish_function): Do access control on base destructors.
16627
16628         * pt.c (tsubst, case FUNCTION_DECL): Set up
16629         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
16630         hose us.
16631
16632 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
16633
16634         * cvt.c (build_up_reference): If we have already extended the
16635         lifetime of the temporary, don't try it again.
16636         * typeck.c (c_expand_return): Don't try and convert the return
16637         value twice when we want a reference, once is enough.
16638
16639 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
16640
16641         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
16642         LOOKUP_ONLYCONVERTING at all for now.
16643
16644         * search.c (add_conversions): Put the conversion function in
16645         TREE_VALUE, the basetype in TREE_PURPOSE.
16646         * cvt.c (build_type_conversion): Adjust.
16647         * cvt.c (build_expr_type_conversion): Adjust.
16648         * call.c (user_harshness): Adjust.
16649
16650 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16651
16652         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
16653         backend's benefit.
16654
16655 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
16656
16657         * except.c (expand_start_catch_block): Add a dummy region, if we
16658         get an error, so that we can avoid core dumping later.
16659
16660 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
16661
16662         * cp-tree.h (OFFSET_REF): Remove.
16663         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
16664         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
16665         * init.c (expand_aggr_init_1): Likewise.
16666         (build_new): Likewise.
16667         * typeck.c (expand_target_expr): Likewise.
16668
16669 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16670
16671         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
16672         TARGET_EXPR.
16673
16674 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
16675
16676         * cvt.c (build_up_reference): Redo how and when temporaries are
16677         created.
16678         * decl.c (grok_reference_init): Don't try and be smart about
16679         running cleanups.
16680
16681 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
16682
16683         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
16684         (TARGET_EXPR...), now that it has 4 arguments.
16685         * tree.c (build_cplus_new): Likewise.
16686
16687 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16688
16689         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
16690
16691         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
16692         * decl.c (struct saved_scope): Remove named_labels,
16693         {base,member}_init_list.
16694         (maybe_push_to_top_level): Don't set them.  Call
16695         push_cp_function_context if appropriate.
16696         (pop_from_top_level): Likewise.
16697
16698         * method.c (do_build_assign_ref): Remove obsolete check of
16699         TYPE_HAS_ASSIGN_REF (basetype).
16700
16701         * decl.c (grokfndecl): Diagnose user definition of
16702         implicitly-declared methods.
16703
16704 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
16705
16706         * method.c (do_build_copy_constructor): Add code to give
16707         meaningful error messages instead of crashing.
16708         (do_build_assign_ref): Don't synthesize assignment operators for
16709         classes containing reference or const members.
16710
16711         * class.c (struct base_info): Remove cant_synth_copy_ctor
16712         and cant_synth_asn_ref.
16713         (finish_base_struct): Remove the code that tries to conditionalize
16714         synthesis of copy constructors & assignment operators based on
16715         access permissions.  Instead, let it fail when it tries to
16716         synthesize the copy constructor.  This will give meaningful error
16717         messages instead of silently generating code to perform a bitcopy.
16718
16719 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
16720
16721         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
16722         determining types for constant values.
16723
16724         * decl.c (struct named_label_list): Use instead of stuffing
16725         random items into a TREE_LIST node.
16726         (named_label_uses): Use the new struct.
16727         (poplevel): Likewise.
16728         (lookup_label): Likewise.
16729         (define_label): Add an error message to tell the user the line
16730         where the goto is located in addition to the destination of the
16731         goto.
16732         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
16733         named_label_uses.
16734         (finish_function): Likewise.
16735
16736         (start_decl): Complain about defining a static data member
16737         in a different type from which it was declared.
16738
16739 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16740
16741         * cvt.c (build_expr_type_conversion): Adjust.
16742
16743 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
16744
16745         * call.c (build_method_call): Always convert 'this' to the
16746         appropriate type.
16747
16748         * search.c (add_conversions): Put the conversion function in
16749         TREE_VALUE, the type in TREE_PURPOSE.
16750         * cvt.c (build_type_conversion): Adjust.
16751         * call.c (user_harshness): Adjust.
16752
16753         * method.c (emit_thunk): Call temporary_allocation and
16754         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
16755
16756         * tree.c (build_cplus_array_type): Handle tweaking of
16757         TYPE_MAIN_VARIANT here.
16758         * typeck.c (common_type): Not here.
16759
16760         * typeck.c (complete_type): Only try to complete an array type if
16761         it has a domain.
16762
16763 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16764
16765         * decl.c (grokvardecl): Call complete_type.
16766         (grokdeclarator): Call complete_type for PARM_DECLs.
16767
16768 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16769
16770         * pt.c (instantiate_class_template): Re-set
16771         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
16772
16773 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
16774
16775         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
16776         smart enough to do it right.
16777         * tree.c (cp_expand_decl_cleanup): Likewise.
16778         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
16779         cp_expand_decl_cleanup.
16780         (store_parm_decls): Likewise.
16781         (hack_incomplete_structures): Likewise.
16782         * except.c (push_eh_cleanup): Likewise.
16783
16784 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
16785
16786         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
16787         frontend to the backend where it belongs.
16788         * tree.c (unsave_expr): Likewise.
16789         (unsave_expr_now): Likewise.
16790         * tree.def (UNSAVE_EXPR): Likewise.
16791         * cp-tree.h (unsave_expr): Likewise.
16792         (unsave_expr_now): Likewise.
16793
16794 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
16795
16796         * init.c (emit_base_init): Make sure the partial EH cleanups live
16797         on the function_obstack.
16798
16799 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
16800
16801         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
16802         when checking for pointer types.
16803
16804 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16805
16806         * pt.c (instantiate_class_template): Remove obsolete check for
16807         access declarations.
16808
16809 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
16810
16811         * call.c (build_overload_call): Simplify calls to
16812         build_overload_call by removing last parameter.
16813         (build_method_call): Likewise.
16814         * cp-tree.h: Likewise.
16815         * method.c (build_opfncall): Likewise.
16816         * typeck.c (build_x_function_call): Likewise.
16817
16818 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
16819
16820         * call.c (default_parm_conversions): Factor out common code.
16821         (build_method_call): Use it.
16822         (build_overload_call_real): Use it.
16823
16824 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
16825
16826         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
16827         but pedwarn as the code is bogus.
16828         * typeck.c (decay_conversion): Likewise.
16829         (build_function_call_real): Use build_addr_func instead of
16830         default_conversion.  Don't allow pointer-to-method functions down
16831         here.
16832         (build_unary_op): Use real pointer-to-member functions instead of
16833         fake ones.
16834         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
16835         (convert_for_assignment): Removed some obsolete code.
16836         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
16837         build_x_function_call instead of current_class_ptr.  Only call
16838         digest_init once on an initializer, we do this just checking
16839         TREE_TYPE.
16840         (build_expr_from_tree): Pass current_class_ref to
16841         build_x_function_call instead of current_class_ptr.
16842         * init.c (build_member_call): Likewise.
16843         * pase.y: Likewise.
16844         * error.c (dump_expr): Handle OFFSET_REFs better.
16845         * pt.c (unify): Handle pointer-to-member functions better.
16846         * decl.c (finish_function): Clear out current_class_ref just like
16847         we do for current_class_ptr.
16848
16849         * typeck.c (get_delta_difference): Handle virtual bases better.
16850
16851 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
16852
16853         * sig.c (build_signature_table_constructor): Use the delta for
16854         the original basetype for this virtual function with thunks.
16855         (build_signature_method_call): We still need to adjust 'this'
16856         with thunks.
16857
16858 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
16859
16860         * call.c (build_addr_func): New routine.  Used to get the `real'
16861         address of a function or a method.  Needed to avoid getting a
16862         pointer-to-member function.
16863         (build_call): New routine to build CALL_EXPRs.
16864         (build_method_call): Use it.
16865         * cvt.c (convert_to_aggr): Likewise.
16866         * typeck.c (build_function_call_real): Likewise.
16867         * sig.c (build_signature_table_constructor): Use build_addr_func.
16868         * cp-tree.h (build_call, build_addr_func): Declare them.
16869
16870 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
16871
16872         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
16873         * parse.y: Remove uses of LOOKUP_AGGR.
16874
16875 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
16876
16877         * *.[chy]: Rename current_class_decl to current_class_ptr, and
16878         C_C_D to current_class_ref.
16879
16880 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16881
16882         * call.c (convert_harshness): Tighten up pointer conversions.
16883
16884 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
16885
16886         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
16887         (finish_file): Likewise.
16888
16889 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16890
16891         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
16892
16893         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
16894         code.
16895
16896 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16897
16898         * decl2.c: Turn on thunks by default where supported.
16899
16900 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
16901
16902         * cp-tree.h (build_overload_call_maybe): Removed.
16903         * call.c (build_overload_call_real): Invert meaning of last arg to
16904         be require_complete.
16905         (build_overload_call): Likewise.
16906         * typeck.c (build_x_function_call): Use build_overload_call_real
16907         instead of build_overload_call_maybe.
16908
16909 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
16910
16911         * decl2.c (finish_file): Don't try to emit functions that haven't
16912         been compiled.
16913
16914 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16915
16916         * decl2.c (finish_vtable_vardecl): Oops.
16917
16918         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
16919         Also store the bindings from previous_class_values.
16920         (pop_from_top_level): Restore them.
16921
16922 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16923
16924         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16925         symbol has been referenced.
16926         (finish_file): Re-join synthesis/vtable loop with inline emission
16927         loop, disable inlining when an inline is output.
16928
16929 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
16930
16931         * except.c (init_exception_processing): Setup saved_in_catch.
16932         (push_eh_cleanup): Reset __eh_in_catch.
16933         (expand_start_catch_block): Set __eh_in_catch.
16934
16935 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
16936
16937         * except.c (push_eh_cleanup): Add tracking for whether or not we
16938         have an active exception object.
16939         (expand_builtin_throw): Use it to make sure a rethrow without an
16940         exception object is caught.
16941
16942 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16943
16944         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16945         cache.
16946
16947 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16948
16949         * decl2.c (finish_file): Also use sentries for vars with
16950         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16951         created).
16952
16953         * lex.c (handle_cp_pragma): Disable #pragma
16954         interface/implementation if SUPPORTS_ONE_ONLY > 1.
16955
16956 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16957
16958         * method.c (emit_thunk): Wrap default case in
16959         temporary/permanent_allocation.
16960
16961         * method.c (make_thunk): Use DECL_ONE_ONLY.
16962         (emit_thunk): Call assemble_end_function.
16963
16964 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16965
16966         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16967         (import_export_decl): Likewise.
16968         (finish_prevtable_vardecl): Disable vtable hack if
16969         SUPPORTS_ONE_ONLY > 1.
16970
16971 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
16972
16973         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16974         PREDECREMENT_EXPRs take two arguments, not one.
16975
16976 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
16977
16978         * class.c (build_vtable_entry): Don't build thunks for abstract
16979         virtuals.
16980
16981         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16982         frontend.
16983
16984 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
16985
16986         * class.c (set_rtti_entry): Use size_zero_node.
16987         (build_vtable): Likewise.
16988
16989 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
16990
16991         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16992         (prepare_fresh_vtable): Likewise.
16993
16994 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
16995
16996         * method.c (emit_thunk): Call mark_used on the target function.
16997
16998         * call.c (build_method_call): Don't warn about pending templates.
16999
17000 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17001
17002         * decl2.c (finish_file): Fix list walking logic.
17003
17004         * typeck2.c (check_for_new_type): Only warn if -pedantic.
17005
17006 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
17007
17008         * class.c (finish_struct_1): Remove old code for
17009         dont_allow_type_definitions.
17010         * cp-tree.h: Likewise.
17011         * spew.c: Make sure cp-tree.h is included before parse.h, so the
17012         definition of flagged_type_tree is found before it is used.
17013         * lex.c: Likewise.
17014         * parse.y: Added the ftype member to the type union, and changed a
17015         number of rules to use it instead of ttype.  Added calls to
17016         check_for_new_type() as appropriate.
17017         * typeck2.c (check_for_new_type): New function for checking
17018         if a newly defined type appears in the specified tree.
17019         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
17020         for check_for_new_type().
17021
17022 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
17023
17024         * decl2.c (finish_file): Only use a sentry if the decl is public.
17025
17026         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
17027         don't pass LOOKUP_ONLYCONVERTING.
17028
17029 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
17030
17031         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
17032         properly keeps track of const and volatile type modifiers.
17033
17034 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
17035
17036         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
17037         * pt.c (comp_template_args): Use it.
17038
17039         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
17040         assemble_external for artificial function decls.
17041
17042         * decl.c (cp_finish_decl): Oops.
17043
17044 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17045
17046         * decl2.c (import_export_decl): Put static data member templates
17047         into common storage, or make them weak, depending on whether they
17048         are dynamically or statically initialized.
17049         (get_sentry): New function.
17050         (finish_file): Do import_export_decl for static data members before
17051         building the init/fini functions.  Don't init/fini a variable that's
17052         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
17053         push/pop_temp_slots.
17054         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
17055         expand_static_init thang.
17056         * method.c (get_id_2): New function.
17057
17058 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
17059
17060         * parse.y (empty_parms): Make sure we use C++-style prototypes
17061         when we're declaring member functions.
17062
17063 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17064
17065         * Makefile.in (CONFLICTS): 16 s/r conflicts.
17066         * parse.y (self_template_type): New nonterminal.
17067
17068 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17069
17070         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
17071         name.
17072         * parse.y (base_class.1): Allow 'typename foo::bar'.
17073
17074         * lex.c (check_newline): Remove #pragma code that plays with the
17075         input stream, since we now deal with tokens.  Clear nextchar when
17076         we're done.
17077         (handle_cp_pragma): Use real_yylex.
17078         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
17079         in one place.
17080
17081         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
17082
17083         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
17084
17085 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17086
17087         * parse.y: New token SELFNAME for potential constructor.
17088         * spew.c (yylex): Handle it.
17089         * lex.c (identifier_type): Produce it.
17090
17091         * parse.y (complete_type_name): In :: case, don't push class binding.
17092         (complex_type_name): Likewise.
17093
17094 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
17095
17096         * typeck.c (build_reinterpret_cast): Handle pointer to member
17097         functions.
17098
17099 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17100
17101         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
17102         pragmas.
17103         (check_newline): Put the vtable/unit/implementation/interface pragma
17104         code into handle_cp_pragma, replacing it with a call.
17105         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
17106         args.  Get the next token after handling the pragma token.
17107
17108 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17109
17110         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
17111         (convert_to_pointer_force): Likewise.
17112
17113         * init.c (build_new): Fix array new without -fcheck-new.
17114
17115 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
17116
17117         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
17118         tree.c: Lose TYPE_NESTED_NAME.
17119
17120         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
17121         as identifiers.
17122
17123         * tree.def: Add VEC_INIT_EXPR.
17124         * expr.c (cplus_expand_expr): Handle it.
17125         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
17126         the extra file-scope symbol nastiness.
17127
17128 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17129
17130         * method.c (make_thunk): Thunks are static.
17131         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
17132
17133         * decl2.c (mark_vtable_entries): Emit thunks as needed.
17134         (finish_file): Don't emit them here.
17135
17136 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17137
17138         * rtti.c (build_dynamic_cast): Handle null pointers.
17139         (ifnonnull): New function.
17140
17141 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
17142
17143         * call.c (build_method_call): Remember the original basetype we
17144         were called with.  Give an error message instead of trying
17145         (incorrectly) to call a non-static member function through a
17146         non-inherited class.
17147
17148         * search.c (expand_upcast_fixups): Mark the new fixup as
17149         DECL_ARTIFICIAL.
17150
17151 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17152
17153         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
17154
17155         * class.c (set_rtti_entry): Fix for thunks.
17156
17157         * decl2.c (import_export_decl): Still emit typeinfo fns for
17158         cv-variants of builtin types.
17159
17160         * rtti.c (expand_class_desc): Set up base_info_type_node here.
17161         (init_rtti_processing): Instead of here.
17162
17163 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
17164
17165         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
17166         (build_typeid): Only complain about taking dynamic typeid without
17167         -frtti.
17168
17169         * decl2.c: flag_rtti defaults to 1.
17170
17171         * rtti.c (get_tinfo_var): The general class case is now smaller.
17172         (init_rtti_processing): Pack the latter three fields of base_info
17173         into 32 bits.
17174
17175 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
17176
17177         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
17178
17179 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
17180
17181         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
17182         (push_memoized_context): Split out code to undefer pop_type_level to
17183         (clear_memoized_cache): here.
17184         (pop_memoized_context): We can only handle one layer of deferral of
17185         pop_type_level so clear the cache, if there was a previous level.
17186
17187 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17188
17189         * rtti.c (init_rtti_processing): Build up base_info_type_node.
17190         (expand_class_desc): Use one pointer to an array of base_info
17191         structs, passed using a CONSTRUCTOR.
17192
17193 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
17194
17195         * class.c (build_vbase_path): Remove block extern for
17196         flag_assume_nonnull_objects here.
17197         (build_vfn_ref): Split out functionality into build_vtbl_ref.
17198         (build_vtbl_ref): New routine.
17199         (build_vtable): Set up rtti info here.
17200         (add_virtual_function): Note in CLASSTYPE_RTTI the best
17201         place where we can get the rtti pointers from to avoid having to
17202         search around for a place.
17203         (finish_base_struct): Likewise.
17204         (finish_struct_1): Likewise.  Never create totally new vtables
17205         with totally new vtable pointers for rtti.  Disable code to layout
17206         vtable pointers better until we want to break binary
17207         compatibility.
17208         * rtti.c (build_headof_sub): New routine to convert down to a
17209         sub-object that has an rtti pointer in the vtable.
17210         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
17211         maintainable.
17212         (build_dynamic_cast): Make sure we have saved it, if we need to.
17213         * search.c (dfs_init_vbase_pointers): Disable code that deals with
17214         a more efficient vtable layout, enable later.
17215         * call.c (flag_assume_nonnull_objects): Moved declaration to
17216         * cp-tree.h: here.  Declare build_vtbl_ref.
17217         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
17218         function calls that want a tree.
17219
17220 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17221
17222         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
17223         other X subobjects in the most derived type.  Ack.
17224
17225         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
17226         get_typeid will do it for us.
17227         (get_typeid_1): Break out call-building for expand_*_desc to use.
17228         (get_typeid): Call it.
17229         (expand_*_desc): Likewise.
17230         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
17231         and void *.
17232         (init_decl_processing): Lose builtin_type_tdescs lossage.
17233         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
17234
17235 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
17236
17237         * pt.c (tsubst): When calling set_nested_typename, use
17238         TYPE_NESTED_NAME (current_class_type) instead of
17239         current_class_name.
17240
17241         * decl.c (pushdecl): Likewise.
17242         (pushdecl_class_level): Likewise.
17243         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
17244         set_nested_typename.
17245
17246 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
17247
17248         * rtti.c (synthesize_tinfo_fn): Handle arrays.
17249
17250         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
17251
17252 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17253
17254         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
17255         (init_rtti_processing): Lose bad_cast_type.
17256         (build_dynamic_cast): Use throw_bad_cast.
17257
17258         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
17259
17260         * decl2.c (finish_file): Don't synthesize artificial functions
17261         that are external and not inline.
17262
17263         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
17264
17265         * decl2.c (finish_file): Handle having new inlines added to
17266         saved_inlines by synthesis.
17267
17268         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
17269
17270 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17271
17272         RTTI rewrite to initialize nodes as needed, not require that
17273         users #include <typeinfo>, complete functionality and reduce wasted
17274         space.
17275         * rtti.c (init_rtti_processing): New fn.
17276         (build_typeid): The vtable entry is now a function.
17277         (get_tinfo_var): New fn.
17278         (get_tinfo_fn): Likewise.
17279         (get_typeid): Use it.
17280         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
17281         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
17282         points __rtti_*.
17283         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
17284         (synthesize_tinfo_fn): New fn.
17285         * method.c (build_t_desc_overload): Lose.
17286         (build_overload_with_type): More generic.
17287         * decl.c (init_decl_processing): Call init_rtti_processing.
17288         * class.c (set_rtti_entry): Use get_tinfo_fn.
17289         * decl2.c (mark_vtable_entries): Mark the rtti function.
17290         (finish_prevtable_vardecl): Don't build_t_desc.
17291         (import_export_decl): Handle tinfo functions.
17292         (finish_file): Likewise.
17293         * typeck.c (inline_conversion): New fn.
17294         (build_function_call_real): Use it.
17295         * cp-tree.h: Add decls.
17296
17297         * method.c (hack_identifier): Also convert component_refs from
17298         references.
17299
17300         * lex.c (cons_up_default_function): Use the type, not the name, in
17301         declspecs.
17302
17303         * decl2.c (import_export_vtable): Fix weak vtables.
17304
17305 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
17306
17307         * search.c (get_base_distance_recursive): Fix access checks for
17308         protected bases.
17309
17310 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17311
17312         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
17313         cp-tree.h.
17314         (convert_harshness): Add prototypes wrapped by PROTO.
17315         * decl2.c (grok_function_init): Likewise.
17316         (do_toplevel_using_decl): Change to void return type.
17317         * class.c (build_vtable_entry): Remove decl of make_thunk.
17318         (merge_overrides): Fix order of arg definitions.
17319         (finish_vtbls): Likewise.
17320         (fixup_vtable_deltas): Likewise.
17321         (modify_all_direct_vtables): Likewise.
17322         (modify_all_indirect_vtables): Likewise.
17323         * search.c (get_base_distance_recursive): Likewise.
17324         (get_abstract_virtuals_1): Likewise.
17325         (fixup_virtual_upcast_offsets): Likewise.
17326         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
17327         * init.c (perform_member_init): Fix order of arg definitions.
17328         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
17329         * cp-tree.h (make_thunk): Add decl.
17330         (overload_template_name, push_template_decl): Add decls.
17331         (do_toplevel_using_decl): Change to void return type.
17332         (vec_binfo_member): Add decl.
17333
17334 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17335
17336         * typeck.c (mark_addressable, convert_for_assignment,
17337         convert_for_initialization, pointer_int_sum, pointer_diff,
17338         unary_complex_lvalue): Add prototypes wrapped by PROTO.
17339         (convert_sequence): #if 0 fn decl, since definition also is.
17340
17341 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
17342
17343         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
17344         cast to pointer types for type searching.
17345
17346 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17347
17348         * typeck.c (get_delta_difference): Use cp_error, not error, in the
17349         case where BINFO == 0.
17350
17351 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
17352
17353         * call.c (build_method_call): Fix wording of error messages so
17354         constructors come out right.
17355
17356 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
17357
17358         * decl.c (push_overloaded_decl): Don't warn about hidden
17359         constructors when both the type and the function are declared
17360         in a system header file.
17361
17362 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
17363
17364         * class.c (finish_struct_1): Propagate the TYPE_PACKED
17365         flag for the type to the type's fields.
17366
17367 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17368
17369         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
17370
17371 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
17372
17373         * class.c (base_info, finish_base_struct): Replace
17374         needs_virtual_dtor with base_has_virtual.
17375
17376         (finish_struct_1): Remove the old code that tried to make default
17377         destructors virtual.  Use base_has_virtual when checking if we need
17378         to add a vtable entry for the rtti code.
17379
17380 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17381
17382         * pt.c (push_template_decl): Complain about template decl with
17383         inappropriate declaration.
17384
17385 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17386
17387         * typeck.c (build_x_unary_op): Remove bogus check for taking
17388         the address of a member function.
17389
17390 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17391
17392         * parse.y (constructor_declarator): Only push the class if
17393         we are not already in the class.
17394
17395 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
17396
17397         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
17398         Add additional argument to INIT_CUMULATIVE_ARGS.
17399
17400 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17401
17402         * decl.c (shadow_tag): Fix error about anon union with methods.
17403
17404         * parse.y (self_reference): Only generate a self-reference if this
17405         is a non-template class.
17406         (opt.component_decl_list): Only use it if it was generated.
17407
17408         * parse.y (component_decl_1): Use constructor_declarator.
17409         (fn.def2): Likewise.
17410         (notype_component_declarator0): Likewise.
17411
17412 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17413
17414         * typeck.c (build_x_unary_op): Add checks for taking the address
17415         of a TARGET_EXPR or of a member function, and give appropriate
17416         warnings.
17417
17418 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17419
17420         * pt.c (process_template_parm): Allow template type parms to be
17421         used as types for template const parms.
17422
17423 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
17424
17425         * init.c (expand_vec_init): Ensure the eh cleanups are on the
17426         function_obstack.
17427
17428 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17429
17430         * decl.c (lookup_name_real): Be even more picky about the
17431         ambiguous lookup warning.
17432         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17433         * parse.y (constructor_declarator): Rather than here.
17434
17435         * parse.y (constructor_declarator): New nonterminal.
17436         (fn.def1): Use it.
17437         (explicit_instantiation): Likewise.
17438
17439 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17440
17441         Add implicit declaration of class name at class scope.
17442         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17443         * parse.y (self_reference): New nonterminal.
17444         (opt.component_decl_list): Use it.
17445         (fn.def1): Add nested_name_specifier type_name cases.
17446         * class.c (build_self_reference): New function.
17447         (finish_struct): Handle access_default later, move self-reference
17448         decl to the end.
17449         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17450         * cp-tree.h: Adjust.
17451
17452         * pt.c (do_function_instantiation): Separate handling of member
17453         functions and non-member functions properly.
17454
17455 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17456
17457         * pt.c (process_template_parm): Improve error for 'volatile class K'.
17458
17459         * class.c (finish_struct_1): Check the right slot for destructors.
17460
17461         * decl.c (start_enum): Complain about enum templates.
17462
17463 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
17464
17465         * init.c (resolve_offset_ref): Offset pointers to member data by one.
17466         * typeck.c (unary_complex_lvalue): Likewise.
17467
17468 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
17469
17470         * typeck.c (c_expand_return): Check for a returned local
17471         array name, similar to the check for an ADDR_EXPR.
17472
17473 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17474
17475         * decl.c (cp_finish_decl): Don't build cleanups for static
17476         variables here.
17477
17478 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
17479
17480         * typeck.c (build_modify_expr): Fix error messages to be more
17481         accurate.
17482         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17483         assignment operators.
17484         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
17485         assignment operators.
17486
17487 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17488
17489         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
17490         give an error if initialized.  pedwarn about nested type with the
17491         same name as its enclosing class.
17492
17493         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17494
17495         * typeck.c (require_complete_type): Be sure to instantiate the
17496         MAIN_VARIANT of the type.
17497
17498         * decl2.c (finish_file): Instantiate pending templates before
17499         processing static constructors and destructors.
17500
17501         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17502         unless at_eof.
17503
17504 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
17505
17506         * decl2.c (delete_sanity): If error_mark_node is passed
17507         in as an expression, quit while we're ahead.
17508
17509         * decl.c (grokdeclarator): Give an error message if `friend'
17510         is combined with any storage class specifiers.
17511
17512 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
17513
17514         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17515         definition of nonexistent nested type.
17516
17517         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17518         not to say 'typedef'.
17519
17520 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17521
17522         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17523         * search.c (dfs_walk, dfs_init_vbase_pointers,
17524         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17525         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17526
17527 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17528
17529         * except.c (build_throw): Support minimal parse.
17530         * pt.c (tsubst_copy): Support THROW_EXPR.
17531         * decl2.c (build_expr_from_tree): Likewise.
17532
17533         * pt.c (mangle_class_name_for_template): Always allocate
17534         scratch_firstobj.
17535
17536 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
17537
17538         * cvt.c (cp_convert_to_pointer): Give an appropriate error
17539         when trying to cast from an incomplete type.
17540
17541 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17542
17543         * pt.c (instantiate_class_template): Don't bother setting up
17544         CLASSTYPE_TAGS explicitly, as the nested types will add
17545         themselves.
17546
17547 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
17548
17549         * decl.c (shadow_tag): Remove old error check for usage of
17550         an enum without a previous declaration.
17551         (xref_tag): Add error message about usage of enums without a
17552         previous declaration.
17553
17554 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17555
17556         * lex.c (do_identifier): Only do name consistency check if we're
17557         parsing.
17558
17559         * pt.c (push_template_decl): Don't crash if we get a member defn
17560         that doesn't match.
17561
17562         * decl.c (xref_tag_from_type): New function to do an xref without
17563         always having to figure out code_type_node.
17564         * cp-tree.h: Declare it.
17565         * pt.c (instantiate_class_template): Use it for friend classes.
17566         (lookup_template_class): Use it.
17567
17568         * typeck2.c (build_functional_cast): Pull out a single parm before
17569         passing it to build_c_cast.
17570
17571 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
17572
17573         * expr.c (do_case): Give an error message if a pointer is
17574         given as a case value.
17575
17576 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17577
17578         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17579         an overload list.
17580
17581         * lex.c (cons_up_default_function): Really, now, interface hackery
17582         does not apply to synthesized methods.
17583
17584 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
17585
17586         * call.c (build_method_call): Ctors and dtors now have special names
17587         with respect to lookups.
17588         * class.c (add_method): Likewise.
17589         (grow_method): Likewise.
17590         (finish_struct_methods): Likewise.
17591         (warn_hidden): Likewise.
17592         (finish_struct_1): Likewise.
17593         * cvt.c (convert_to_reference): Likewise.
17594         (convert_to_aggr): Likewise.
17595         (cp_convert): Likewise.
17596         * decl2.c (check_classfn): Likewise.
17597         * init.c (expand_member_init): Likewise.
17598         (expand_default_init): Likewise.
17599         (expand_aggr_init_1): Likewise.
17600         (build_offset_ref): Likewise.
17601         (build_new): Likewise.
17602         (build_delete): Likewise.
17603         * lex.c (do_inline_function_hair): Likewise.
17604         * search.c (lookup_field_1): Likewise.
17605         (lookup_fnfields_here): Likewise.
17606         (lookup_field): Likewise.
17607         (lookup_fnfields): Likewise.
17608         (get_virtual_destructor): Likewise.
17609         (dfs_debug_mark): Likewise.
17610         (dfs_pushdecls): Likewise.
17611         (dfs_compress_decls): Likewise.
17612         * tree.c (layout_basetypes): Likewise.
17613         * typeck.c (build_component_ref): Likewise.
17614         (build_x_function_call): Likewise.
17615         (build_modify_expr): Likewise.
17616         (convert_for_initialization): Likewise.
17617         (build_functional_cast): Likewise.
17618         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
17619         (CTOR_NAME): New.
17620         (DTOR_NAME): New.
17621         * decl.c (ctor_identifier): New.
17622         (dtor_identifier): New.
17623         (init_decl_processing): Set them.
17624
17625 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
17626
17627         * typeck.c (build_component_ref): Don't get confused by fields whose
17628         context has no type name, like pointer to member functions.
17629
17630 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17631
17632         * decl.c (grokdeclarator): Handle typedef without declarator.
17633
17634         * pt.c (tsubst): Handle SCOPE_REF in declarator.
17635
17636         * parse.y (bad_parm): Catch another case of missing `typename'.
17637
17638         * lex.c (yyprint): Handle TYPE_DECLs.
17639
17640         * decl.c (start_function): Don't try to be clever.
17641
17642         * lex.c: Lose compiler_error_with_decl.
17643         * typeck2.c: Lose error_with_aggr_type.
17644         (incomplete_type_error): Use cp_* instead of old functions.
17645         (readonly_error): Likewise.
17646         * typeck.c (convert_arguments): Likewise.
17647         * search.c (lookup_nested_field): Likewise.
17648         * method.c (make_thunk): Likewise.
17649         * decl.c (grokparms): Likewise.
17650         * cp-tree.h: Update.
17651
17652         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
17653         and value.
17654
17655 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
17656
17657         * method.c (build_opfncall): When deleting a pointer to an
17658         array, build a new pointer to the tree past any ARRAY_TYPE
17659         nodes.
17660
17661 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17662
17663         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
17664
17665 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
17666
17667         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
17668         and ! DECL_INLINE.
17669
17670         * decl.c (finish_function): Don't set nested based on
17671         hack_decl_function_context.
17672         * parse.y (function_try_block): Check for nested function.
17673         (pending_inlines): Likewise.
17674
17675         * decl2.c (build_expr_from_tree): If a unary op already has a
17676         type, just return it.
17677
17678         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
17679
17680         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
17681         (finish_file): Check the return value of walk_vtables.
17682         (finish_prevtable_vardecl): Return int.
17683         (finish_vtable_vardecl): Likewise.
17684         (prune_vtable_vardecl): Likewise.
17685         * lex.c (set_vardecl_interface_info): Likewise.
17686         * cp-tree.h: Adjust return types.
17687
17688         * class.c (delete_duplicate_fields_1): Don't complain about
17689         duplicate nested types if they're the same type.
17690         (finish_struct): Remove check for duplicate.
17691         * decl2.c (grokfield): Don't check for typedef of anonymous type.
17692
17693 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17694
17695         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
17696
17697         * decl.c (grokdeclarator): Lose special handling of class-level
17698         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
17699         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
17700
17701         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
17702
17703         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
17704
17705         * search.c (compute_access): Fix handling of anonymous union
17706         members.
17707         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
17708         from anonymous unions to their members.
17709
17710         * typeck.c (build_x_function_call): For static member functions,
17711         hand off to build_member_call.
17712
17713 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17714
17715         * typeck.c (build_component_ref): Handle OFFSET_REFs.
17716
17717         * init.c (expand_vec_init): Fix init == 0 case.
17718
17719 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17720
17721         * init.c (build_new): pedwarn about init and array new.
17722         (expand_vec_init): Handle lists, use convert_for_initialization.
17723
17724         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
17725         when converting to an aggregate type.
17726         * cvt.c (cp_convert): Pass it through.
17727
17728         * typeck.c (build_conditional_expr): Handle user-defined
17729         conversions to slightly different types.
17730
17731         * decl.c (grokdeclarator): Force an array type in a parm to be
17732         permanent.
17733
17734         * decl2.c (do_using_directive): Sorry.
17735         (do_namespace_alias): Likewise.
17736         * lex.c (real_yylex): Warn about using the `namespace' keyword.
17737
17738 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17739
17740         * parse.y (datadef): Move call to note_list_got_semicolon up.
17741
17742 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
17743
17744         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
17745
17746 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
17747
17748         * decl.c (cp_finish_decl): The exception regions have to be
17749         nested, not overlapping.  We start the exception region for a
17750         decl, after it has been fully built, and all temporaries for it
17751         have been cleaned up.
17752
17753 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
17754
17755         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
17756
17757 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
17758
17759         * tree.def: Add RETURN_INIT.
17760         * pt.c (instantiate_decl): Handle RETURN_INIT.
17761         * decl.c (store_return_init): Handle minimal_parse_mode.
17762
17763         * tree.c (cp_build_type_variant): Just return an error_mark_node.
17764         * decl.c (make_typename_type): Don't try to get the file and line
17765         of an identifier.
17766         * typeck.c (comptypes): Handle TYPENAME_TYPE.
17767
17768 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
17769
17770         * decl.c (poplevel): Make sure we clear out and restore old local
17771         non-VAR_DECL values by default when they go out of scope.
17772
17773 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17774
17775         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
17776         referring to addresses of variables and functions.
17777
17778         * error.c (dump_expr): Support SIZEOF_EXPR.
17779
17780         * init.c (do_friend): Use the return value of check_classfn.
17781
17782         * typeck.c (convert_arguments): Call complete_type.
17783
17784         * method.c (hack_identifier): After giving an error, set value to
17785         error_mark_node.
17786
17787 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17788
17789         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
17790         lossage for local classes.
17791         * cp-tree.h: Declare it.
17792         * decl.c (lookup_name_real): Evil, painful hack for local classes.
17793         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
17794         Use hack_decl_function_context.
17795         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
17796         (start_function): Use hack_decl_function_context.
17797         (finish_function): Likewise.
17798         * method.c (synthesize_method): Likewise.
17799         * lex.c (process_next_inline): Likewise.
17800         (do_pending_inlines): Likewise.
17801         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
17802         done with it.
17803
17804 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
17805
17806         * sig.c (build_signature_pointer_or_reference_type): Align
17807         signature pointers/references on 8-byte boundaries so they can be
17808         grabbed 2 words at a time on a Sparc.
17809
17810 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
17811
17812         * method.c (hack_identifier): Requiring a static chain is now a
17813         hard error.
17814         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
17815         functions.
17816
17817 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17818
17819         * init.c (build_offset_ref): Call complete_type.
17820
17821         * decl.c (pop_from_top_level): Always pop previous_class_type.
17822
17823         * parse.y: Handle multiple decls in a for-init-statement.
17824         * pt.c (tsubst_expr): Likewise.
17825
17826         * pt.c (tsubst): Use tsubst_expr for the second operand of an
17827         ARRAY_REF.
17828
17829         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
17830         (poplevel_class): Set it here.
17831         (pop_from_top_level): Pop it here if we're returning to class scope.
17832         * class.c (pushclass): Don't set it here.
17833
17834         * decl.c (maybe_push_to_top_level): Save current_template_parms,
17835         and clear it if !pseudo.
17836         (pop_from_top_level): Restore it.
17837
17838         * decl2.c (finish_file): Push the dummy each time we walk the list
17839         of vtables.
17840
17841         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
17842         something for CAST_EXPR.
17843
17844 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17845
17846         * cvt.c (cp_convert): Warn about implicit conversion of the
17847         address of a function to bool, as it is always true.
17848
17849 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17850
17851         * typeck.c (c_expand_return): Fix warning for local externs returned.
17852
17853 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
17854
17855         * tree.c (mapcar): Propagate const and volatile properly.
17856
17857         * typeck.c (complete_type): Be sure to instantiate the
17858         MAIN_VARIANT of the type.
17859
17860         * method.c (synthesize_method): Class interface hackery does not
17861         apply to synthesized methods.
17862
17863 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
17864
17865         * pt.c (comp_template_args): Use comptypes rather than just
17866         checking for TEMPLATE_TYPE_PARM equivalence.
17867
17868         * typeck.c (build_x_function_call): Call complete_type before
17869         checking TYPE_OVERLOADS_CALL_EXPR.
17870
17871 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
17872
17873         * g++.c (main): Check also for new define ALT_LIBM.
17874
17875 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17876
17877         * pt.c (instantiate_class_template): If we don't have a pattern
17878         yet, that's OK.
17879         (coerce_template_parms): If we see a local class, bail.
17880
17881         * decl.c (grok_reference_init): Make sure there's a type before
17882         checking its code.
17883
17884         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
17885         (push_template_decl): Likewise.
17886
17887         * parse.y (named_class_head): Set
17888         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
17889
17890         * decl.c (xref_tag): Diagnose redeclaration of template
17891         type-parameter name.
17892
17893         * error.c (dump_type): Handle anonymous template type parms.
17894
17895         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
17896         TYPE_STUB_DECL.
17897         (coerce_template_parms): Likewise.
17898
17899 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
17900
17901         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
17902         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
17903
17904 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
17905
17906         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
17907         before trying to get its STUB_DECL.
17908         (coerce_template_parms): Likewise.
17909
17910         * parse.y (template_type_parm): If they didn't use 'class',
17911         pretend they did after giving an error.
17912
17913         * pt.c (coerce_template_parms): Diagnose use of local class.
17914
17915         * decl.c (grok_reference_init): Use instantiate_type.
17916
17917         * error.c (dump_expr): Handle TEMPLATE_DECLs.
17918
17919         * parse.y (named_class_head): Diagnose mismatching types and tags.
17920
17921         * decl.c (pushdecl): Type decls and class templates clash with
17922         artificial type decls, not hide them.
17923
17924         * decl.c (redeclaration_error_message): Diagnose redefinition of
17925         templates properly.
17926         (duplicate_decls): Diagnose disallowed overloads for template
17927         functions, too.
17928
17929         * decl.c (start_decl): Call complete_type before checking for a
17930         destructor.
17931
17932         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17933
17934         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17935
17936 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17937
17938         * decl.c (grok_op_properties): Don't check for operator++(int) in
17939         a template.
17940
17941         * tree.c (perm_manip): Return a copy of variable and function
17942         decls with external linkage.
17943
17944         * tree.def: Change some of the min tree codes to type "1".
17945         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17946         * method.c (build_overload_int): Emit something arbitrary for
17947         anything but an INTEGER_CST if we're in a template.
17948
17949         * decl.c (cp_finish_decl): Call complete_type before deciding
17950         whether or not to lay out the decl.
17951
17952         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17953
17954 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17955
17956         * typeck2.c (build_x_arrow): Call complete_type.
17957
17958         * pt.c (add_pending_template): Broken out.
17959         (lookup_template_class): If -fexternal-templates, call it for all
17960         the methods of implemented types.
17961         (instantiate_class_template): Instead of instantiating them here.
17962         (instantiate_decl): Handle -fexternal-templates earlier.
17963
17964 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17965
17966         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17967         memoized lookup stuff inside GATHER_STATISTICS.
17968
17969 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17970
17971         * decl.c (start_decl): Complain about array of incomplete type
17972         here.
17973         (grokdeclarator): Not here.
17974
17975         * parse.y (template_parm): Expand full_parm inline so we can set
17976         the rule's precedence.
17977
17978         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17979         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17980         * decl2.c (grokbitfield): Don't check for integer constant here.
17981         * class.c (finish_struct_1): Check here.
17982
17983         * decl.c (define_label): Make the min decl go on permanent_obstack.
17984
17985         * pt.c (unify): Don't handle CONST_DECLs.
17986         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17987         (tsubst_copy): Likewise.
17988
17989         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17990         CONST_DECL for a template parm.
17991
17992 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
17993
17994         * decl.c (grokdeclarator): Complain about array of incomplete type
17995         here.
17996         (start_decl_1): Not here.
17997
17998         * pt.c (tsubst): Handle pointer-to-function declarators.
17999
18000         * method.c (hack_identifier): If pedantic, diagnose local class
18001         methods that require a static chain.
18002
18003         * decl.c (grok_op_properties): No longer static.
18004         * cp-tree.h: Declare it.
18005         * pt.c (tsubst): Call it for operators.
18006         Use tsubst_copy for TREE_VECs.
18007
18008         * parse.y (template_arg): The expr has precedence like '>'.
18009
18010 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
18011
18012         * pt.c (coerce_template_parms): Don't coerce an expression using
18013         template parms.
18014         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
18015         (tsubst): Don't use build_index_2_type if the max_value uses template
18016         parms.
18017         * method.c (build_overload_int): Emit something arbitrary for an
18018         expression using template parms.
18019
18020         * parse.y (template_close_bracket): New non-terminal to catch use
18021         of '>>' instead of '> >' in template class names.
18022         (template_type): Use it.
18023         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
18024
18025         * tree.def: Add CAST_EXPR.
18026         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
18027         CONVERT_EXPR for minimal_parse_mode.
18028         * typeck.c (build_c_cast): Likewise.
18029         * pt.c (tsubst_copy): Likewise.
18030         * decl2.c (build_expr_from_tree): Likewise.
18031         * error.c (dump_expr): Likewise.
18032
18033 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18034
18035         * except.c (SetTerminate, SetUnexpected): Put back global vars.
18036         (init_exception_processing): Put back decl/init of
18037         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
18038         fns from libstdc++.
18039
18040         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
18041         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
18042         Delete unused fns.
18043         * cp-tree.h (declare_uninstantiated_type_level,
18044         uninstantiated_type_level_p): Delete prototypes.
18045
18046 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
18047
18048         * pt.c (tsubst_expr): Add default return.
18049
18050 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18051
18052         * error.c (fndecl_as_string): Delete unused arg CNAME.
18053         * sig.c (build_signature_table_constructor,
18054         build_signature_method_call): Fix calls.
18055
18056         * class.c (the_null_vtable_entry): Delete var definition.
18057         (init_class_processing): Delete tree the_null_vtable_entry init.
18058         * decl.c (no_print_{functions, builtins}): Declare as static.
18059         (__tp_desc_type_node): #if 0 var definition.
18060         (init_type_desc): #if 0 init of __tp_desc_type_node.
18061         (vb_off_identifier): Move var decl into init_decl_processing.
18062         (current_function_assigns_this): Declare as static.
18063         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
18064         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
18065         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
18066         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
18067         * init.c (BI_header_type, BI_header_size): Declare as static.
18068         * pt.c (template_classes): Delete unused var.
18069         (add_pending_template): Delete decl for non-existent fn.
18070         (lookup_template_class): Delete vars CODE and TAG_CODE.
18071         (instantiate_template): Delete unused var TARGS.
18072         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
18073         Delete decls.
18074         (__tp_desc_type_node): #if 0 var decl.
18075         (fndecl_as_string): Fix prototype.
18076
18077 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
18078
18079         * tree.def: Add GOTO_STMT.
18080         * pt.c (tsubst_expr): Support goto and labels.
18081         * decl.c (define_label): Support minimal parsing.
18082         * parse.y (simple_stmt): Likewise.
18083
18084 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18085
18086         * xref.c (GNU_xref_member): Only define/set var I if
18087         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
18088         used.
18089         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
18090         (GNU_xref_end): Fix call.
18091         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
18092         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
18093
18094         * tree.c (build_exception_variant): Delete unused vars I, A, T,
18095         T2, and CNAME.
18096         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
18097         (mapcar): Delete unused var CODE.
18098         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
18099         (break_out_cleanups): Fix call.
18100         (bot_manip): Likewise.
18101         * call.c (build_method_call): Likewise.
18102         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
18103         Likewise.
18104         * typeck.c (unary_complex_lvalue, build_modify_expr,
18105         convert_for_initialization): Likewise.
18106         * typeck2.c (build_functional_cast): Likewise.
18107         * cp-tree.h (build_cplus_new): Fix prototype.
18108
18109         * repo.c (open_repo_file): Delete unused var Q.
18110         (repo_compile_flags, repo_template_declared,
18111         repo_template_defined, repo_class_defined, repo_inline_used,
18112         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
18113         (repo_get_id, repo_vtable_used): Declare as static.
18114         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
18115         prototypes.
18116
18117 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
18118
18119         * parse.y (pending_inlines): Add function_try_block case.
18120
18121         * pt.c (unify): Fix for template const parms.
18122
18123 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18124
18125         * lex.c (extract_interface_info): Delete forward decl.
18126         (default_copy_constructor_body, default_assign_ref_body): Delete
18127         decls for non-existent functions.
18128         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
18129         (init_lex): Delete setting them.
18130         (cons_up_default_function): Delete unused vars FUNC_BUF,
18131         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
18132         #if 0'd synth code.
18133         (toplevel, expression_obstack): Delete unused extern decls.
18134         (tree_node_kind): Delete unused enum.
18135         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
18136         GATHER_STATISTICS.
18137         (tree_node_kind_names): Delete unused extern decl.
18138         (synth_obstack): Delete unused var.
18139         (init_lex): Don't set it.
18140         (init_parse): Add decl before use.
18141         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
18142         (current_unit_{name, language}): Delete unused vars.
18143         (check_newline): Don't bother setting them, just accept the #pragma.
18144         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
18145         (current_unit_{name, language}): Delete decls.
18146
18147         * search.c: Wrap all of the memoized functions, macros, and
18148         variables inside #ifdef GATHER_STATISTICS.
18149         (lookup_field, lookup_fnfields): Likewise.
18150         (init_search_processing): Likewise.
18151         (reinit_search_statistics): Wrap whole function.
18152         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
18153
18154         * decl.c (finish_function): Only call pop_memoized_context if
18155         GATHER_STATISTICS is defined.
18156         (start_function): Likewise for push_memoized_context.
18157         * class.c (pushclass, popclass): Likewise.
18158
18159         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
18160         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
18161
18162         * cvt.c (cp_convert): Delete unused local var FORM.
18163         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
18164         prototypes.
18165
18166 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18167
18168         * pt.c (do_poplevel): Oops; really return what we get from
18169         poplevel this time.
18170
18171 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18172
18173         * cp-tree.h (is_aggr_type): Add prototype.
18174
18175         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
18176         * method.c ({push,pop}_cp_function_context): Delete decls.
18177         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
18178         (SetUnexpected, SetTerminate): Delete unused vars.
18179         (init_exception_processing): Don't set SetUnexpected or
18180         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
18181         (output_exception_table_entry): Delete unused array LABEL.
18182         (expand_internal_throw): Delete unused var PARAMS.
18183         (expand_start_catch_block): Delete unused var CLEANUP.
18184         (emit_exception_table): Delete unused var EH_NODE_DECL.
18185         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
18186         GOTO_UNWIND_AND_THROW.  Don't set them.
18187         (end_eh_unwinder): Add top decl.
18188         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
18189         (exception_section, push_rtl_perm, do_function_call,
18190         lang_interim_eh, push_eh_cleanup, eh_outer_context,
18191         expand_end_eh_spec, end_eh_unwinder): Declare as static.
18192         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
18193         throw_used): Likewise.
18194         * cp-tree.h (expand_end_eh_spec): Delete prototype.
18195
18196         * search.c (dfs_mark, dfs_mark_vtable_path,
18197         dfs_unmark_vtable_path, dfs_mark_new_vtable,
18198         dfs_unmark_new_vtable, dfs_clear_search_slot,
18199         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
18200         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
18201         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
18202         functions.
18203         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
18204         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
18205         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
18206         Only define #ifdef GATHER_STATISTICS.
18207         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
18208         is defined.
18209         (vbase_decl): Delete var definition.
18210         (init_search): Delete old decl.
18211         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
18212         never actually used.
18213         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
18214         (get_base_distance_recursive): Delete unused fourth arg
18215         BASETYPE_PATH.  Fix call .
18216         (get_base_distance): Fix call.
18217         (push_class_decls): Delete unused var ID.
18218         (make_memoized_table_entry): Declare as static.
18219         (breadth_first_search): Declare as static.
18220         (tree_has_any_destructor_p): Declare as static.
18221         (pop_class_decls): Delete unused arg pop_class_decls.
18222         * class.c (popclass): Fix call to pop_class_decls.
18223         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
18224         tree_has_any_destructor_p): Delete prototypes.
18225
18226         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
18227         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
18228         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
18229         (build_user_desc): Delete unused var T.
18230         (build_class_desc): Delete unused vars T and OFF.
18231         (build_t_desc): Delete unused var NAME_STRING.
18232         (build_headof): Make static.
18233         (get_bad_cast_node): Likewise.
18234         (get_def_to_follow): Likewise.
18235         * cp-tree.h (init_type_desc): Add prototype.
18236         (build_headof): Remove prototype.
18237
18238 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18239
18240         * pt.c (tsubst): Only look for matching decls at file scope for
18241         non-member functions.
18242
18243         * call.c (build_scoped_method_call): Handle scoped destructor
18244         calls in templates.
18245
18246         * decl.c (*_top_level): Also save previous_class_values.
18247
18248         * pt.c (tsubst_expr): Support do {} while loops.
18249         * parse.y (simple_stmt): Likewise.
18250         * tree.def: Likewise.
18251
18252         * method.c (build_overload_identifier): For a class nested in a
18253         template class, don't mangle in the template parms from our
18254         context.
18255
18256         * lex.c, cp-tree.h: Remove support for template instantiations in
18257         the pending_inlines code.
18258         * pt.c: Remove dead functions and unused arguments.
18259         (uses_template_parms): TYPENAME_TYPEs always use template parms.
18260         * parse.y: Stop passing anything to end_template_decl.
18261         * tree.c (print_lang_statistics): Only print tinst info #ifdef
18262         GATHER_STATISTICS.
18263
18264 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18265
18266         * init.c (expand_recursive_init{,_1}): Delete decls.
18267         (sort_member_init): Delete unused var INIT.
18268         (emit_base_init): Delete unused var X.
18269         (build_offset_ref): Delete unused var CNAME.
18270         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
18271         (emit_base_init): Delete unused local var BASE.  Delete extern
18272         decl of IN_CHARGE_IDENTIFIER.
18273         (build_delete): Delete unused local var VIRTUAL_SIZE.
18274
18275         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
18276         (build_delete): Fix call.
18277         * decl2.c (delete_sanity): Likewise.
18278         * cp-tree.h (build_vec_delete): Update prototype.
18279
18280         * typeck.c (common_base_type): Delete unused var TMP.
18281         (build_binary_op): Delete local var ARGS_SAVE.
18282         (build_array_ref): Delete unused var ITYPE.
18283         (c_expand_return): Delete unused var USE_TEMP.
18284
18285         * typeck.c (compexcepttypes): Delete unused arg STRICT.
18286         (comptypes): Fix calls.
18287         * decl.c (duplicate_decls): Likewise.
18288         * cp-tree.h (compexcepttypes): Delete extra arg.
18289
18290         * decl2.c (check_classfn): Delete unused second arg CNAME.
18291         * decl.c (start_decl, grokfndecl): Fix calls.
18292         * init.c (do_friend): Likewise.
18293         * cp-tree.h (check_classfn): Update prototype.
18294
18295         * cp-tree.h (signature_error, import_export_vtable,
18296         append_signature_fields, id_in_current_class, mark_used,
18297         copy_assignment_arg_p): Add decls.
18298         * decl2.c (mark_used): Delete decl.
18299
18300         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
18301
18302         * class.c (get_vtable_entry): Disable unused function.
18303         (doing_hard_virtuals): Delete unused static global var.
18304         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
18305         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
18306         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
18307         (modify_one_vtable): Delete unused var OLD_RTTI.
18308         (finish_struct_anon): Delete unused vars OFFSET and X.
18309         (finish_struct_bits): Delete unused var METHOD_VEC.
18310         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
18311         for-scope local variable METHODS.
18312
18313         * call.c (user_harshness): Delete unused/unneeded arg PARM.
18314         (ideal_candidate): Delete unused args BASETYPE and PARMS.
18315         (build_method_call): Delete unused args passed into ideal_candidate.
18316         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
18317         * cp-tree.h (synthesize_method): Add decl.
18318
18319         * decl.c (note_level_for_for): Give void return type.
18320         (pushdecl_nonclass_level): Likewise.
18321         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
18322         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
18323         (suspend_binding_level): Delete unused var LEVEL.
18324         (duplicate_decls): Delete unused var CTYPE.
18325         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
18326         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
18327         PTR_ENDLINK.
18328         (grokdeclarator): Delete unused var C.
18329         (grokdeclarator): Delete unused var SIZE_VARIES.
18330         (grokparms): Delete unused var SAW_VOID.
18331         (start_function): Delete unused var OLDDECL.
18332         (cplus_expand_expr_stmt): Delete unused var
18333         REMOVE_IMPLICIT_IMMEDIATELY.
18334
18335         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
18336
18337         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
18338
18339 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18340
18341         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
18342         (build_min_nt): Likewise.
18343         * pt.c (do_pushlevel): Emit line note.
18344         (do_poplevel): Return what we get from poplevel.
18345         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
18346         * parse.y: Use do_pushlevel and do_poplevel.
18347         * cp-tree.h: Declare do_poplevel.
18348
18349         * cp-tree.h: Declare at_eof.
18350         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
18351         * decl2.c (import_export_decl): Renamed from import_export_inline.
18352         (finish_file): Call it to do interface handling for statics.
18353         * pt.c (tsubst_copy): Call mark_used on variables and functions
18354         used here.
18355
18356         * decl2.c (finish_file): Don't emit statics we can't generate.
18357         * pt.c (instantiate_decl): Don't set interface on instantiations
18358         we can't generate.
18359
18360         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
18361         * tree.c (print_lang_statistics): Print max template depth.
18362         * pt.c (push_tinst_level): Dump entire instantiation context.
18363         (instantiate_class_template): Use it and pop_tinst_level.
18364         (instantiate_decl): Likewise.
18365
18366         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
18367         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
18368
18369 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18370
18371         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
18372         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
18373         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
18374         the new template implementation.
18375
18376 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18377
18378         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
18379
18380 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
18381
18382         * decl.c (cp_finish_decl): Delay emitting the debug information for
18383         a typedef that has been installed as the canonical typedef, if the
18384         type has not yet been defined.
18385
18386 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18387
18388         * decl2.c (grokfield): Still call pop_nested_class for access decls.
18389
18390 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18391
18392         * decl.c (lookup_label): Call label_rtx.
18393
18394         * decl.c (make_binding_level): New function.
18395         (pushlevel, pushlevel_class): Call it instead of explicit
18396         duplicate calls to xmalloc.
18397
18398         * decl.c (init_decl_processing): Delete useless build_pointer_type
18399         call.
18400
18401         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
18402         (sizet_ftype_string): Delete variable.
18403         (init_decl_processing): Add built-in functions fabsf, fabsl,
18404         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
18405         variable strlen_ftype, used for strlen.
18406
18407 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18408
18409         * decl.c (push_to_top_level): Start from current_binding_level
18410         again for now; the stl hacks depend on g++ being broken in this
18411         way, and it'll be fixed in the template rewrite.
18412
18413         * tree.def: Add USING_DECL.
18414         * decl2.c (do_class_using_decl): Implement.
18415         (grokfield): Pass access decls off to do_class_using_decl instead of
18416         grokdeclarator.
18417         * error.c (dump_decl): Handle USING_DECLs.
18418         * decl.c (grokdeclarator): Remove code for handling access decls.
18419         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18420         as access decls for now.
18421         (finish_struct): Don't check USING_DECLs for other uses of the name.
18422
18423         * search.c (get_matching_virtual): Use cp_error_at.
18424
18425 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18426
18427         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18428         match c-typeck.c.
18429         (self_promoting_args_p): Move the check that TYPE is non-nil
18430         before trying to look at its main variant.
18431         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18432
18433         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18434         Delete macros.
18435         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18436         (do_friend): Delete call to xref_friend.
18437         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18438
18439         * typeck.c (convert_sequence): #if 0 unused function.
18440
18441         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18442         be in decl_in_memory_p.
18443         (decl_in_memory_p): Delete decl.
18444         * expr.c (decl_in_memory_p): Delete fn.
18445         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18446
18447         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18448
18449 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18450
18451         * class.c (finish_struct_1): Check for a pure-specifier on a
18452         non-virtual function here.
18453
18454         * decl2.c (grok_function_init): Don't check whether the function
18455         is virtual here.
18456         (grokfield): Don't call check_for_override here.
18457
18458         * decl.c (push_to_top_level): Start from inner_binding_level,
18459         check class_shadowed in class levels.
18460
18461 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
18462
18463         * decl.c (resume_level): Ignore things that don't have names, instead
18464         of core dumping.
18465
18466 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18467
18468         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18469
18470 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
18471
18472         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18473         synthesized dtor.
18474
18475         * parse.y (complete_type_name): Bind global_scope earlier.
18476         (complex_type_name): Likewise.
18477         (qualified_type_name): Remove.
18478
18479 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
18480
18481         * decl.c (grokfndecl): Move code that looks for virtuals in base
18482         classes...
18483         * class.c (check_for_override): ... to a new function.
18484         (finish_struct_1): Call it.
18485
18486         * cp-tree.h: Declare warn_sign_compare.
18487
18488         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18489         rather than extra_warnings to decide whether to warn about
18490         comparison of signed and unsigned.
18491
18492         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
18493         implies -Wsign-compare.  -Wall doesn't imply -W.
18494
18495 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
18496
18497         * typeck.c (build_component_ref): Fix to handle anon unions in base
18498         classes as well.
18499
18500 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18501
18502         * class.c (resolves_to_fixed_type_p): Delete code dealing with
18503         a WITH_CLEANUP_EXPR, since we don't generate them any more.
18504         * cvt.c (build_up_reference): Likewise.
18505         * decl.c (grok_reference_init): Likewise.
18506         (cp_finish_decl): Likewise.
18507         * error.c (dump_expr): Likewise.
18508         * tree.c (real_lvalue_p): Likewise.
18509         (lvalue_p): Likewise.
18510         (build_cplus_new): Likewise.
18511         (unsave_expr_now): Likewise.
18512         * typeck.c (unary_complex_lvalue, build_modify_expr,
18513         c_expand_return): Likewise.
18514
18515 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18516
18517         Make the C++ front-end pay attention to attributes for structures.
18518         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18519         finish_struct_1.
18520         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18521         Take out old round_up_size use and setting the DECL_ALIGN possibly
18522         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
18523         can override what the attribute set.
18524         * cp-tree.h (finish_struct): Update prototype.
18525         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18526         attributes to finish_struct.
18527         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18528         value down into finish_struct.
18529         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18530
18531 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
18532
18533         * decl.c (poplevel):  Re-word dead for local handling.
18534         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
18535         (cp_finish_decl):  If is_for_scope, check for duplicates so
18536         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
18537
18538         * lex.c (do_identifier):  Use global binding in preference of
18539         dead for local variable.
18540
18541 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
18542
18543         * init.c (initializing_context): Handle anon union changes, the
18544         context where fields of anon unions can be initialized now has to be
18545         found by walking up the TYPE_CONTEXT chain.
18546
18547 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
18548
18549         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18550         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18551         (obscure_complex_init): If bss is supported, always set
18552         DECL_INITIAL to error_mark_node.
18553
18554 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18555
18556         * init.c (is_friend): Make sure there's a context before we see if
18557         it's an aggr type.
18558
18559 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
18560
18561         * init.c (is_friend): Classes are not friendly with nested classes.
18562
18563 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
18564
18565         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18566         and record its result.
18567
18568 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
18569
18570         * class.c (finish_struct_anon): Switch around code to not move anon
18571         union elements around, nor mess up their contexts, nor offsets,
18572         instead we now build up the right number of COMPONENT_REFs for all
18573         the anon unions that may be present at build_component_ref time.
18574         * typeck.c (lookup_anon_field): New routine to handle field lookup
18575         on fields without names.  We find them, based upon their unique type
18576         instead.
18577         * typeck.c (build_component_ref): Allow FIELD_DECL components.
18578         Handle finding components in anonymous unions, and ensure that a
18579         COMPONENT_REF is built for each level as necessary.
18580
18581 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
18582
18583         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18584         code that ensures that copy ctors are used if appropriate.
18585
18586 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18587
18588         * init.c (build_vec_delete): Only give an error if base isn't an
18589         error_mark_node.
18590
18591 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
18592
18593         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18594         (yylex): If we see `new', keep slurping.
18595
18596 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
18597
18598         * class.c (finish_struct_1): Move code for handling anon unions...
18599         (finish_struct_anon): to here.  Fixup so that we do the offset
18600         calculations right, and so that the fields are physically moved to
18601         the containers's chain.
18602
18603 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18604
18605         * decl.c (grokdeclarator): Avoid trying to get an operand off an
18606         identifier node.
18607
18608 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
18609
18610         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
18611         POINTER_SIZE to agree with expr.c.
18612
18613 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
18614
18615         * search.c (lookup_field): Don't report ambiguities if protect is 0,
18616         instead return NULL_TREE.
18617
18618 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
18619
18620         * class.c (finish_struct_1): Call warn_hidden if we want warnings
18621         about overloaded virtual functions.
18622         (warn_hidden): New routine to warn of virtual functions that are
18623         hidden by other virtual functions, that are not overridden.
18624         (get_basefndecls): New routine, used by warn_hidden.
18625         (mark_overriders): New routine, used by warn_hidden.
18626         * search.c (get_matching_virtual): Remove old warning that just
18627         isn't very useful.
18628
18629 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18630
18631         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
18632
18633         * typeck.c (null_ptr_cst_p): Delete unused fn.
18634         (build_function_call_maybe): Delete unused fn.
18635
18636         * expr.c (extract_init): #if 0 the code after unconditional return 0
18637         for now.
18638
18639         Delete old cadillac code.
18640         * edsel.c: Remove file.
18641         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
18642         * Makefile.in (CXX_OBJS): Delete edsel.o.
18643         (edsel.o): Delete rule.
18644         * cp-tree.h (flag_cadillac): Delete var decl.
18645         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
18646         * decl2.c (flag_cadillac): Delete var definition.
18647         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
18648         (grokfield): Delete code depending on flag_cadillac.
18649         (finish_anon_union): Likewise.
18650         * class.c (finish_struct_1): Likewise.
18651         (pushclass): Likewise.
18652         (popclass): Likewise.
18653         (push_lang_context): Likewise.
18654         (pop_lang_context): Likewise.
18655         * decl.c (init_decl_processing): Likewise.
18656         (start_decl): Likewise.
18657         (cp_finish_decl): Likewise.
18658         (xref_tag): Likewise.
18659         (finish_enum): Likewise.
18660         (start_function): Likewise.
18661         (finish_function): Likewise.
18662         (finish_stmt): Likewise.
18663         * lex.c (lang_init): Likewise.
18664         (check_newline): Likewise.
18665
18666         * lex.c (do_pending_inlines): Delete synthesized method kludge.
18667
18668         Delete defunct, ancient garbage collection implementation.
18669         * rtti.c: New file with the RTTI stuff from gc.c.
18670         * gc.c: Removed file (moved the remaining stuff into rtti.c).
18671         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
18672         (rtti.o): New rule, replacing gc.o.
18673         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
18674         * cp-tree.h: Delete gc-related fn decls.
18675         (DECL_GC_OFFSET): Delete macro.
18676         (flag_gc): Delete extern decl.
18677         * decl.c (current_function_obstack_index): Delete var decl.
18678         (current_function_obstack_usage): Delete var decl.
18679         (start_function): Delete clearing of current_function_obstack_index
18680         and current_function_obstack_usage.
18681         (init_decl_processing): Delete code relying on -fgc.
18682         Delete call to init_gc_processing.
18683         (cp_finish_decl): Delete calls to build_static_gc_entry and
18684         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
18685         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
18686         and to expand_expr of a __gc_main call.
18687         (maybe_gc_cleanup): Delete var decl.
18688         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
18689         * decl2.c (flag_gc): Delete var decl.
18690         (lang_f_options): Delete offering of -fgc.
18691         (lang_decode_option): Delete -fgc and -fno-gc handling.
18692         (get_temp_regvar): Delete gc code.
18693         * init.c (build_new): Delete gc code.
18694         * lex.c (init_lex): Delete checking of flag_gc.
18695
18696         * typeck.c (convert_arguments): Delete gc code.
18697         (build_component_addr): Delete -fgc warning.
18698         (build_modify_expr): Delete gc code.
18699
18700         * decl2.c (build_push_scope): Delete fn.
18701         * cp-tree.h (build_push_scope): Delete decl.
18702
18703         * search.c (clear_search_slots): Delete fn.
18704         * cp-tree.h (clear_search_slots): Delete decl.
18705
18706         * search.c (tree_needs_constructor_p): Delete fn.
18707         * cp-tree.h (tree_needs_constructor_p): Delete decl.
18708
18709         * tree.c (id_cmp): Delete fn.
18710
18711         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
18712         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
18713
18714         * tree.c (decl_value_member): Delete fn.
18715         * cp-tree.h (decl_value_member): Delete decl.
18716
18717         * tree.c (list_hash_lookup_or_cons): Delete fn.
18718         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
18719
18720         * method.c (cplus_exception_name): Delete fn.
18721         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
18722
18723         * spew.c (shift_tokens): Delete fn.
18724
18725 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18726
18727         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
18728         to cp_finish_decl.
18729         * parse.y: Likewise.
18730
18731 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18732
18733         * tree.c (build_cplus_staticfn_type): Delete function definition;
18734         never used.
18735         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
18736
18737         * tree.c (virtual_member): Delete function definition; never used.
18738         * cp-tree.h (virtual_member): Delete decl.
18739
18740 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
18741
18742         * typeck.c (build_component_ref): Handle getting vbase pointers
18743         out of complex multiple inheritance better.
18744
18745 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
18746
18747         * typeck.c (build_object_ref): Make sure we use the real type, not
18748         any reference type.
18749
18750 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
18751
18752         * tree.c (build_exception_variant): Don't create new types if we
18753         don't have to, also build new types on the right obstack.
18754
18755 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18756
18757         * decl.c (store_bindings): Split out from push_to_top_level.
18758         (push_to_top_level): Call it for b->type_shadowed on class binding
18759         levels.
18760
18761 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
18762
18763         * search.c (expand_upcast_fixups): Fix so that offsets stored in
18764         vbase_offsets are always right.  Fixes a problem where virtual base
18765         upcasting and downcasting could be wrong during conversions on this
18766         during virtual function dispatch at ctor/dtor time when dynamic
18767         vtable fixups for deltas are needed.  This only sounds easier than
18768         it is.  :-)
18769         (fixup_virtual_upcast_offsets): Change to reflect new calling
18770         convention for expand_upcast_fixups.
18771
18772 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18773
18774         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
18775         check that it's usable as the bitfield width.
18776
18777 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18778
18779         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
18780         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
18781         only ever used for functions in it.
18782
18783 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18784
18785         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
18786         (nested_type): Likewise.
18787         (nested_name_specifier): Use lastiddecl.
18788
18789         * decl.c (grokdeclarator): Adjust accordingly.
18790         * init.c (expand_member_init): Likewise.
18791         * parse.y (base_class): Likewise.
18792         * typeck2.c (build_functional_cast): Likewise.
18793
18794         * typeck2.c (build_functional_cast): Fill in name after we've
18795         checked for non-aggr type.
18796
18797 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
18798
18799         * decl2.c (warn_pointer_arith): Default to on.
18800
18801 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18802
18803         * lex.c (is_rid): New function.
18804         * decl.c (grokdeclarator): Diagnose reserved words used as
18805         declarator-ids.
18806
18807 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
18808
18809         * tree.c (get_decl_list): Don't lose cv-quals.
18810
18811         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
18812         typespecs used as declarator-ids.
18813
18814 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
18815
18816         * decl.c (poplevel): When poping a level, don't give a warning for
18817         any subblocks that already exist.
18818
18819 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18820
18821         * typeck.c (build_object_ref): Finish what I started.
18822
18823         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
18824
18825         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
18826
18827         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
18828         scope.
18829
18830 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18831
18832         * decl.c (xref_tag): Handle passing a type in directly.
18833
18834         * parse.y (qualified_type_name): Pull out the type.
18835         (nested_type): Likewise.
18836         Take types directly instead of as identifiers.
18837         * call.c (build_scoped_method_call): Take types directly instead of
18838         as identifiers.
18839         * decl.c (xref_basetypes): Likewise.
18840         * init.c (expand_member_init): Likewise.
18841         (build_member_call): Likewise.
18842         (build_offset_ref): Likewise.
18843         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
18844         * method.c (do_build_assign_ref): Likewise.
18845         * decl.c (grokdeclarator): Handle a type appearing as the
18846         declarator-id for constructors.
18847         * method.c (do_build_copy_constructor): current_base_init_list now
18848         uses the types directly, not their names.
18849         * init.c (sort_base_init): Likewise.
18850         (expand_member_init): Likewise.
18851         * init.c (is_aggr_type): New function, like is_aggr_typedef.
18852
18853 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
18854
18855         * tree.c (layout_basetypes): Call build_lang_field_decl instead
18856         of build_lang_decl if first arg is a FIELD_DECL.
18857
18858 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18859
18860         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
18861         non-empty.
18862         * except.c (expand_start_catch_block): Set TREE_USED to avoid
18863         warnings about the catch handler.
18864
18865 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
18866
18867         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
18868         expand_target_expr.
18869
18870 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18871
18872         Fix access control to use trees rather than integers.
18873         * class.c (access_{default, public, protected, private,
18874         default_virtual, public_virtual, private_virtual}_node): Add
18875         definitions.
18876         (init_class_processing): Do creation of those nodes.
18877         * cp-tree.h (access_type): Delete enum decl.
18878         (access_{default, public, protected, private, default_virtual,
18879         public_virtual, private_virtual}_node): Add decls.
18880         (compute_access): Change return type.
18881         * search.c (compute_access): Have tree return type, instead of enum.
18882         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
18883         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
18884         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
18885         * parse.y (VISSPEC): Make ttype rather than itype.
18886         (base_class_access_list): Likewise.
18887         * *.[cy]: Change all refs of `access_public' to `access_public_node',
18888         etc.
18889         * call.c (build_method_call): Make ACCESS be a tree.
18890         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
18891         * cvt.c (convert_to_aggr): Likewise.
18892         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
18893         Likewise.
18894         * method.c (hack_identifier): Likewise.
18895         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
18896
18897 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
18898
18899         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
18900         frontend, and make it more consistent with respect to
18901         warn_pointer_arith.
18902
18903 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
18904
18905         * decl.c (pushdecl): Check for duplicate parameter names.
18906
18907 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
18908
18909         * decl.c (expand_static_init): Call assemble_external for atexit.
18910
18911 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
18912
18913         * except.c (do_unwind): Remove some generated dead code.
18914         (eh_outer_context): New routine, factor out some common code from
18915         expand_builtin_throw and end_eh_unwinder.  Add code to do return
18916         address masking for the PA.
18917         (expand_builtin_throw): Use eh_outer_context instead of open coding
18918         it here.
18919         (end_eh_unwinder): Likewise.
18920
18921 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
18922
18923         * except.c (expand_throw): Call assemble_external for __empty, if we
18924         use it.
18925
18926 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
18927
18928         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18929         NORMAL_RETURN_ADDR_OFFSET.
18930         (end_eh_unwinder): Likewise.
18931
18932 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
18933
18934         * gc.c (build_dynamic_cast): Make sure we don't cast away const
18935         when dealing with references, and make sure we handle dynamic
18936         casting to a cv qualified reference.
18937
18938 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
18939
18940         * except.c (struct eh_context): New structure top hold eh context
18941         information.
18942         (push_eh_context): New routine.
18943         (pop_eh_context): Likewise.
18944         * decl.c (push_cp_function_context): Use them.
18945         (pop_cp_function_context): Likewise.
18946
18947 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
18948
18949         * decl2.c (finish_file): Also prune uninteresting functions in the
18950         inline emission loop.
18951
18952 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
18953
18954         * sig.c (build_signature_table_constructor): Mark functions
18955         in the signature as referenced.
18956
18957 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
18958
18959         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18960         the inline emission stuff.
18961
18962 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
18963
18964         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18965         weak symbols.
18966         * lang-options.h: Add -f{no-,}weak.
18967         * decl.c (init_decl_processing): If the target does not support weak
18968         symbols, don't use them.
18969         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18970
18971 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
18972
18973         * init.c (expand_member_init): warning for base init after members.
18974
18975 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
18976
18977         * cvt.c (build_expr_type_conversion): Don't convert to a reference
18978         type.
18979
18980 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
18981
18982         * method.c (report_type_mismatch): Improve wording for volatile
18983         mismatches.
18984
18985 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
18986
18987         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18988         expand_assignment, as the later doesn't handle things that have
18989         copy constructors well.  The compiler would do bitwise copying,
18990         instead of ctor calling in some cases.
18991
18992 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
18993
18994         * g++.c (my_strerror): Return "cannot access" if errno is 0.
18995         (pfatal_with_name, perror_exec): Don't assume that
18996         the returned value from my_strerror contains no '%'s.
18997         (concat): Remove.
18998         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18999
19000 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
19001
19002         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
19003         TYPE_METHODS/TREE_CHAIN mean what they used to.
19004         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
19005         instead of TYPE_METHODS.
19006         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
19007         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
19008         * cp-tree.h (CLASSTYPE_METHODS): Lose.
19009         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
19010         TYPE_METHODS.
19011         (struct lang_decl): Lose next_method field.
19012         (DECL_NEXT_METHOD): Lose.
19013         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
19014         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
19015         anymore.
19016         (finish_struct_methods): Don't mess with the TREE_CHAINs in
19017         fn_fields.
19018
19019         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
19020         vector.
19021
19022         * call.c (build_method_call): Synthesize here even when not inlining.
19023         * typeck.c (build_function_call_real): Likewise.
19024
19025 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
19026
19027         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
19028         == DBX_DEBUG, call dbxout_start_new_source_file and
19029         dbxout_resume_previous_source_file when appropriate.
19030
19031 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
19032
19033         * except.c (start_anon_func): Push to the top level.
19034         (end_anon_func): Pop from the top level.
19035
19036 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
19037
19038         * cp-tree.h (build_cleanup): New routine to build cleanups.
19039         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
19040         call at ctor time and use atexit to run it later.
19041         * decl2.c (build_cleanup): New routine, taken from finish_file.
19042         (finish_file): Use build_cleanup instead, and don't put function
19043         local statics in global dtor list.
19044
19045 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
19046
19047         * except.c (expand_throw): Ensure that we have cleanups, if we try
19048         and expand cleanups.
19049
19050 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
19051
19052         * except.c (expand_throw): Add logic to manage dynamic cleanups for
19053         the EH object.
19054         (expand_end_catch_block): Use the magic of expand_goto, instead of
19055         emit_jump so that we get the cleanup for any catch clause parameter
19056         and the cleanup for the exception object.  Update to reflect label
19057         changes.
19058         (push_eh_cleanup): New routine to register a cleanup for an
19059         exception object.
19060         (empty_fndecl): Used to default cleanup actions to
19061         nothing.
19062         (init_exception_processing): Setup empty_fndecl.  Setup
19063         saved_cleanup.
19064         (expand_start_catch_block): Update to reflect label changes.  Call
19065         push_eh_object to register the cleanup for the EH object.
19066         (start_anon_func): New routine to start building lambda expressions
19067         from trees.
19068         (end_anon_func): New routine to end them.
19069         (struct labelNode): Change so that we can use tree labels, or rtx
19070         labels.
19071         (saved_cleanup): Object to check for dynamic cleanups for the
19072         exception handling object.
19073         (push_label_entry): Change so that we can use tree labels, or rtx
19074         labels.
19075         (pop_label_entry): Likewise.
19076         (top_label_entry): Likewise.
19077         (expand_start_all_catch): Use tree label instead of rtx label, so
19078         that we can get the magic of expand_goto.
19079         (expand_end_all_catch): Update to reflect label changes.
19080
19081         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
19082         use UNSAVE_EXPRs.
19083         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
19084         building_cleanup logic, as we now use UNSAVE_EXPRs.
19085         * cp-tree.h (unsave_expr): Declare it.
19086         * decl.c (building_cleanup): Remove.
19087         (maybe_build_cleanup): Remove building_cleanup logic, and use
19088         UNSAVE_EXPR instead.
19089
19090 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
19091
19092         * gc.c (build_t_desc): Update error message to say <typeinfo>.
19093
19094 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19095
19096         * decl.c (pushdecl): Only warn about shadowing a local variable if
19097         warn_shadow is true.
19098
19099 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
19100
19101         * typeck.c (build_binary_op_nodefault): Added warning about
19102         comparisons between different enum types with -Wall, unless
19103         -fenum-int-equiv set.
19104
19105 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
19106
19107         * class.c (finish_struct_1): Skip down to the inner type in
19108         multidimensional arrays.  Ensures ctors will be made for types that
19109         need constructing.
19110
19111 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
19112
19113         * decl.c (last_dtor_insn): New to track the last compiler generated
19114         insn in a dtor.
19115         (store_parm_decls): Set it.
19116         (finish_function): Use it to see if the dtor is empty.  Avoid doing
19117         vtable setup all the time, if we can.
19118         (struct cp_function): Add last_dtor_insn.
19119         (push_cp_function_context): Save it.
19120         (pop_cp_function_context): Restore it.
19121
19122 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
19123
19124         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
19125         warnings.
19126
19127 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
19128
19129         * typeck.c (expand_target_expr): Make sure targets get put into the
19130         current temp_slot_level, so that the free_temp_slots call will reuse
19131         them.
19132
19133 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
19134
19135         * class.c (finish_struct_1): Delay delta fixups for virtual bases
19136         until after we have done the hard virtuals, to avoid a bogus `every
19137         virtual function must have a unique final overrider' for virtual
19138         functions that are only overridden by hard virtuals.
19139
19140 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19141
19142         * pt.c (do_function_instantiation): Don't try to find a file-scope
19143         template for a member function.
19144
19145 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
19146
19147         * g++.c (main): Add handling of -nodefaultlibs.
19148
19149 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
19150
19151         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
19152         distinguish between direct bindings of reference variables, and
19153         indirect bindings of reference variables.
19154         * cvt.c (build_up_reference): Use it.
19155         * typeck.c (convert_arguments): Use it to indicate this is an
19156         indirect binding.
19157         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
19158         as they are unused.
19159         (expand_static_init): Likewise.
19160         (cplus_expand_expr_stmt): Likewise.
19161         * decl2.c (finish_file): Likewise.
19162         * init.c (perform_member_init): Likewise.
19163         (emit_base_init): Likewise.
19164         (expand_aggr_vbase_init_1): Likewise.
19165
19166 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19167
19168         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
19169         get a DECL_LANG_SPECIFIC node.
19170         * cp-tree.h (lang_decl_flags): Add new member `level'.
19171         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
19172         decl_flags level member.
19173
19174 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19175
19176         * call.c (build_method_call): Make sure instance has a
19177         TYPE_LANG_SPECIFIC node before we dive into it.
19178
19179 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
19180
19181         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
19182
19183 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
19184
19185         * decl.c (duplicate_decls): When smashing decls, smash staticness in
19186         the usual way.
19187
19188 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
19189
19190         * decl.c (poplevel): Handle the merging of subblocks of cleanups
19191         when finishing blocks that have already been created (usually due to
19192         the fixup goto code).  Fixes bad debugging information.
19193
19194 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
19195
19196         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
19197         that's not a list of overloaded functions.
19198
19199 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19200
19201         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
19202         before trying to use DECL_ABSTRACT_VIRTUAL_P.
19203
19204 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
19205
19206         * decl2.c (mark_used): New function for hooking into setting of
19207         TREE_USED on decls.
19208         * call.c (build_method_call): Use it.
19209         * class.c (instantiate_type): Likewise.
19210         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
19211         for all like-named functions.
19212         * method.c (hack_identifier): Likewise.
19213         (emit_thunk): Don't call assemble_external.
19214         (make_thunk): Create thunk as a FUNCTION_DECL so that it
19215         gets the right mode and ENCODE_SECTION_INFO works.
19216
19217         * parse.y: Use mark_used.  Pass operator names to do_identifier.
19218         * lex.c (do_identifier): Handle operator names.
19219
19220         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
19221
19222 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19223
19224         * errfn.c: Include stdio.h.
19225         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
19226
19227 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
19228
19229         * typeck2.c (digest_init): Always convert initializers to the
19230         right type.
19231
19232 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
19233
19234         * init.c (member_init_ok_or_else): Don't allow member initializers
19235         for indirect members, as it is invalid.
19236
19237 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19238
19239         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
19240
19241 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
19242
19243         * parse.y (for.init.statement): Catch compound statements inside for
19244         initializations, if we're being pedantic.
19245
19246 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
19247
19248         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
19249         looking for.
19250
19251 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
19252
19253         * error.c (dump_expr): Don't core dump when a boolean expression is
19254         used as a default argument.
19255
19256 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19257
19258         * class.c (finish_struct_bits): Check aggregate_value_p instead of
19259         RETURN_IN_MEMORY.
19260
19261 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
19262
19263         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
19264         BLKmode type that would otherwise be returned in registers.
19265
19266 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19267
19268         * g++.c (WITHLIBC): New macro.
19269         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
19270         saw_libc and pass it at the end if it was set.
19271
19272 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19273
19274         * parse.y (fn.def1): Call split_specs_attrs in
19275         declmods notype_declarator case.