* tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
[official-gcc.git] / gcc / cp / ChangeLog
blobffe4cd265dc62057df2995a436fb15d67d91a4f8
1 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
3         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
4         bitfields, rather than DECL_BIT_FIELD.
5         * ir.texi: Document how to tell whether or not a field is a
6         bitfield.
7         
8         * lex.c (make_lang_type): Fix typo in comment.
10 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
12         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
14 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
16         * pt.c (tsubst_decl): If the type of a template instantiation is
17         bogus, so is the whole instantiation.
19 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
21         * decl.c (initialize_local_var): Handle static variables here.
22         (cp_finish_decl): Tweak handling of function-scope static
23         variables.
24         * semantics.c (expand_stmt): Handle DECL_STMTs for static
25         variables.
27         * method.c (emit_thunk): Don't crash when -fsyntax-only.
29         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
30         global_dtor_p.  Add init_priority.
31         (DECL_ACCESS): Adjust accordingly.
32         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
33         (GLOBAL_INIT_PRIORITY): Likewise.
34         * decl.c (lang_mark_tree): Adjust accordingly.
35         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
36         and GLOBAL_INIT_PRIORITY.
37         * dump.c (dequeue_and_dump): Print them.
38         * ir.texi: Document them.
40         * decl2.c (struct priority_info_s): Remove initialization_sequence
41         and destruction_sequence.
42         (start_static_storage_duration_function): Return the body of the
43         function.  Convert for function-at-a-time mode.
44         (generate_inits_for_priority): Remove.
45         (finish_static_storage_duration_function): Change prototype.
46         Adjust for function-at-a-time mode.
47         (do_static_initialization): Likewise.
48         (do_static_destruction): Likewise.
49         (do_static_initialization_and_destruction): Remove.
50         (start_static_initialization_or_destruction): New function.
51         (finish_static_initialization_or_destruction): Likewise.
52         (get_priority_info): Don't manipulation initialization_sequence or
53         destruction_sequence.
54         (prune_vars_needing_no_initialization): New function.
55         (write_out_vars): Likewise.
56         (finish_file): Use the various new functions instead of the old.
57         
58 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
60         * cp-tree.h (warn_float_equal): Declare.
61         * decl2.c (warn_float_equal): Define.
62         (lang_decode_option): Recognize -W[no-]float-equal.
63         * typeck.c (build_binary_op_nodefault): Conditionally warn
64         about equality tests of floating point types.
66 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
68         Support normal type_info-based EH mechanisms with -fno-rtti.
69         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
70         (build_eh_type_type_ref): Likewise.
71         (build_eh_type): Remove.
72         (expand_throw): Call build_eh_type_type, not build_eh_type.
73         * decl2.c (import_export_decl): Don't associate the tinfo fn with
74         the vtable if -fno-rtti.
75         * decl.c (init_decl_processing): Always init_rtti_processing.
77         * rtti.c (get_typeid): Don't complain about -fno-rtti.
79         * class.c (class_cache_obstack, class_obstack): Remove.
80         (init_class_processing): Don't initialize class_obstack.
81         (push_cache_obstack): Remove.
82         (pushclass): Don't call it.
83         * cp-tree.h: Remove prototype for push_cache_obstack.
84         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
85         (pushlevel_class): Don't push_decl_level.
86         (poplevel_class): Don't pop_stack_level.
87         (push_class_level_binding): Don't push_cache_obstack.
88         (init_decl_processing): Don't intialize decl_obstack.
89         * search.c (push_class_decls): Don't push_cache_obstack.
90         * tree.c (list_hash_add): Put hash node on permanent_obstack.
91         (hash_tree_cons): Don't mess with obstacks.
92         (print_lang_statistics): Don't print stats for class_obstack and
93         decl_obstack.
95 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
97         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
98         * ir.texi: Document DECL_EXTERNAL.
100         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
101         * ir.texi: Document THUNK_DECLs.
103         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
104         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
105         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
106         * error.c (dump_template_bindings): Remove unused parameter.
107         Handle multiple levels of template parameters.
108         (dump_template_decl): Use `parms', not `args', for template
109         parameters.  Fix thinko.
110         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
111         flags to dump_template_bindings.
112         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
113         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
114         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
115         (tsubst_copy): Clarify variable name.
116         (most_general_template): Robustify.
117         
118 1999-09-29  Nathan Sidwell  <nathan@acm.org>
120         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
121         to change primary template rendering.
123 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
125         * cp-tree.h (UPT_TEMPLATE): Remove.
126         (UPT_PARMS): Likewise.
127         (DECL_NEEDED_P): New macro.
128         * decl2.c (finish_vtable_vardecl): Use it.
129         (finish_objects): Don't crash with -fsyntax-only.
130         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
131         -fsyntax-only.
132         * pt.c (tsubst_friend_function): Remove FIXME that talks about
133         obstacks.
134         (tsubst_expr): Correct handling of function try-blocks.
135         * semantics.c: Include flags.h.
136         (expand_body): Don't do RTL generation if -fsyntax-only.
137         * Makefile.in (semantics.o): Depends on flags.h.
138         
139 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
141         * pt.c (most_general_template): Adjust declaration.
143         * cp-tree.h: (most_general_template): Declare.
145         * error.c (dump_template_value): Rename to ...
146         (dump_template_argument): This.
147         (dump_template_argument_list): New function.
148         (dump_type): Use it.
149         (dump_template_parameter): New function.
150         (dump_template_decl): Use it.
151         (dump_template_bindings): New function.
152         (dump_function_decl): Use it. Pretty print function template
153         instantiations.
155 1999-09-28  Nathan Sidwell  <nathan@acm.org>
157         * decl.c (grokdeclarator): Distinguish parameter context for
158         diagnostics. Tidy up missing type diagnostic.
159         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
161 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
163         * ir.texi: Improve documentation for TARGET_EXPR.
165 1999-09-27  Nathan Sidwell  <nathan@acm.org>
167         Augment stringification of trees.
168         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
169         (fndecl_as_string, type_as_string_real, args_as_string,
170         code_as_string, language_as_string, parm_as_string,
171         op_as_string, assop_as_string, cv_as_string): Remove.
172         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
173         (context_as_string): Declare new function.
174         * error.c (cp_printers): Move definition.
175         (OB_UNPUT): Remove.
176         (OB_END_TEMPLATE_ID): Adjust.
177         (interesting_scope_p): Remove.
178         (dump_scope): New static function.
179         (dump_qualifiers): Adjust prototype, reimplement.
180         (dump_template_value): Use tree_string_flags.
181         (dump_type_real): Move back to dump_type.
182         (dump_type): Adjust prototype. Use tree_string_flags.
183         (dump_aggr_type): Likewise. Use dump_template_parms.
184         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
185         Return pad flag.
186         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
187         (dump_simple_decl): Likewise.
188         (dump_decl): Likewise. Use dump_template_decl.
189         (dump_template_decl): New static function broken out of dump_decl.
190         (dump_function_decl): Adjust prototype. Use tree_string_flags.
191         (dump_parameters): Likewise. Prefix space.
192         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
193         (dump_function_name): Likewise. Use dump_template_parms.
194         (dump_template_parms): New static function broken out of
195         dump_function_name.
196         (dump_expr_list): Adjust prototype. Use tree_string_flags.
197         (dump_expr): Likewise.
198         (fndecl_as_string): Removed
199         (type_as_string_real): Removed
200         (dump_binary_op): Adjust prototype. Use tree_string_flags.
201         (dump_unary_op): Likewise.
202         (type_as_string): Likewise.
203         (expr_as_string): Likewise.
204         (decl_as_string): Likewise.
205         (context_as_string): New function.
206         (lang_decl_name): Adjust.
207         (decl_to_string): New static print callback.
208         (expr_to_string): Likewise.
209         (fndecl_to_string): Likewise.
210         (code_as_string): Renamed to ...
211         (code_to_string): ... here. Adjust.
212         (language_as_string): Renamed to ...
213         (language_to_string): ... here. Adjust.
214         (parm_as_string): Renamed to ...
215         (parm_to_string): ... here.
216         (op_as_string): Renamed to ...
217         (op_to_string): ... here.
218         (assop_as_string): Renamed to ...
219         (assop_to_string): ... here.
220         (type_to_string): New static print callback.
221         (args_as_string): Renamed to ...
222         (args_to_string): ... here. Adjust.
223         (cv_as_string): Renamed to ...
224         (cv_to_string): ... here. Adjust.
225         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
226         (print_template_context): Likewise.
228 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
230         * cp-tree.h (expand_throw): Remove prototype.
231         * except.c (expand_throw): Make it static.  Use tree-generation
232         functions, rather than RTL-generation functions.
233         (build_throw): Use it.
234         * expr.c: Include except.h.
235         (cplus_expand_expr): Don't call expand_throw here.
236         * Makefile.in (expr.o): Depend on except.h.
237         * ir.texi: Update documentation for THROW_EXPR.
238         
239         * decl.c (start_function): Set x_dont_save_pending_sizes rather
240         than calling get_pending_sizes.
241         * init.c (build_new): Don't save and restore
242         immediate_size_expand; instead, assert that it has the expected
243         value already.
245 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
247         * lex.c (compiler_error): Add missing call to va_end().
249 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
251         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
252         * ir.texi: Document RESULT_DECL and DECL_RESULT.
254         * cp-tree.h (check_return_expr): New function.
255         * decl.c (finish_constructor_body): New function.
256         (pushdecl): Put global friend functions in namespace binding
257         level, not the class binding level.
258         (finish_destructor_body): Make sure the dtor_label is always
259         defined.  Fix typo in comment.
260         (finish_function): Move generation of constructor-termination code
261         to semantic-analysis time.  Move generation of implicit `main'
262         return value to semantic-analysis time.
263         * semantics.c (finish_return_stmt): Generate goto's to
264         ctor_label/dtor_label here.  Use check_return_expr to do semantic
265         analysis on the returned expression.
266         * typeck.c (maybe_warn_about_returning_address_of_local): New
267         function split out from c_expand_return.
268         (check_return_expr): Likewise.
269         (c_expand_return): Just generate the RTL for the return.
270         
271 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
273         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
274         (cleanup_type): Likewise.
275         (search_tree): Change prototype.
276         * decl.c (local_variable_p): Adjust for new interface to
277         search_tree.
278         (check_default_argument): Likewise.
279         * error.c (dump_expr): Handle INIT_EXPR.
280         * except.c (expand_throw): Don't make cleanup_type a local static.
281         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
282         * init.c (build_new): Call build_new_1 directly, rather than
283         building a NEW_EXPR.
284         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
285         processing file-scope initializers.
286         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
287         * tree.c: Include splay-tree.h
288         (no_linkage_helper): Adjust for new interface to search_tree.
289         (search_tree): Pass around pointers to tree nodes, rather than the
290         nodes themselves.  Handle VEC_INIT_EXPR.
291         (no_linkage_check): Adjust for new interface to search_tree.
292         (mapcar): Handle VEC_INIT_EXPR.
293         (target_remap): New variable.
294         (bot_manip): Use it.
295         (bot_replace): New function.
296         (break_out_target_exprs): Use it to remap all variables used in a
297         default argument expression.
298         * typeck.c (build_modify_expr): Don't crash when outside a
299         function and presented with an INIT_EXPR assignment
300         * Makefile.in (tree.o): Depend on splay-tree.h.
302 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
304         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
305         DECL_BUILT_IN.
306         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
307         callers changed.
308         Set the builtin's DECL_BUILT_IN_CLASS.
310 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
312         * decl.c (pushdecl): Don't make local declarations of extern
313         variables give the variable a DECL_CONTEXT for the function.
314         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
315         Don't accidentally make RTL for local declarations.
316         (emit_local_var): Handle declarations with asm-specifiers here.
317         
318 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
320         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
321         STMT_IS_FULL_EXPR_P.
323         * cp-tree.h (language_function): Add cannot_inline.
324         * decl.c (start_function): Restore current_function_cannot_inline
325         from the saved value.
326         (save_function_data): Save current_function_cannot_inline.
327         * decl2.c (start_objects): Change prototype.  Build the function
328         in function-at-a-time mode.
329         (finish_objects): Likewise.
330         (generate_ctor_or_dtor_function): Adjust accordingly.
331         
332         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
333         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
334         Don't call expand_anon_union_decl here
335         * semantics.c (exapnd_stmt): Call it here, instead.
336         * typeck.c (mark_addressable): Addressed variables are implicitly
337         used.
338         
339 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
341         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
342         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
343         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
344         * cp-tree.h: Add tree checking macros to various tree access
345         macros. 
346         * ptree.c (print_lang_decl): Test for function or variable
347         before accessing template info.
349 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
351         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
352         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
353         * decl2.c (lang_f_options): Add -fshort-wchar.
354         * cp-tree.h: Declare flag_short_wchar.
355         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
356         int' for wchar_t.
358 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
360         * ir.texi: Fix formatting errors and typos.
362 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
364         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
366         * decl.c (pushdecl): Do create a binding for extern "C" functions,
367         but not for their DECL_ASSEMBLER_NAMEs.
368         (lookup_name_current_level): Fix formatting.
369         (xref_tag): Likewise.
370         * decl2.c (start_objects): Mark static constructors and
371         destructors as used.
373 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
375         * decl.c (define_case_label): Don't crash if we're not in a switch.
377         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
378         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
379         for unsupported flags.
381 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
383         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
384         Accept and warn about -fthis-is-variable.
386 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
388         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
389         CLEANUP_STMT, and SCOPE_STMT.
391         * decl2.c (lang_decode_option): Adjust, in the wake of recent
392         changes to option processing.
394 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
396         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
397         function pointer from pmfs with no object given.
398         (convert_for_assignment): Do not return error when converting
399         pmfs.
401 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
403         * lex.c (internal_filename): New variable.
404         (INTERNAL_FILENAME): New macro.
405         (init_parse): Allocate internal_filename and mark as root.  Use it
406         instead of a string constant.
408 1999-09-21  Nathan Sidwell  <nathan@acm.org>
410         Reimplement dynamic cast and catch matching.
411         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
412         * search.c (dynamic_cast_base_recurse): New function.
413         (get_dynamic_cast_base_type): New function for dynamic cast.
414         * rtti.c (build_dynamic_cast_1): Determine source and target
415         class relationship. Call __dynamic_cast_2.
416         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
417         (__user_type_info::dyncast): New dynamic cast dispatcher.
418         (__user_type_info::sub_kind): New nested enumeration.
419         (__user_type_info::contained_p): sub_kind predicate.
420         (__user_type_info::contained_public_p): Likewise.
421         (__user_type_info::contained_nonpublic_p): Likewise.
422         (__user_type_info::contained_nonvirtual_p: Likewise.
423         (__user_type_info::upcast_result): New nested struct.
424         (__user_type_info::dyncast_result): New nested struct.
425         (*::do_upcast): New catch function.
426         (*::do_dyncast): New dynamic cast function.
427         (__user_type_info::find_public_subobj): New dynamic cast
428         helper dispatcher.
429         (*::do_find_public_subobj): New dynamic cast helper function.
430         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
431         (__user_type_info::dyncast): Define dynamic cast dispatcher.
432         (*::do_upcast): Define catch function.
433         (*::do_dyncast): Define dynamic cast function.
434         (*::do_find_public_subobj): Define dynamic cast helper function.
435         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
436         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
437         (__dynamic_cast_2): New dynamic cast runtime.
439 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
441         * cp-tree.h (finish_stmt_expr): Change prototype.
442         * expr.c (cplus_expand_expr): Adjust call accordingly.
443         * init.c (finish_init_stmts): Likewise.
444         * parse.y (primary): Likewise.
445         * pt.c (tsubst_copy): Likewise.
446         * semantics.c (finish_stmt_expr): Don't take two parameters.
447         Don't remove generated BLOCKs from the block-tree.
449         Remove support for assigning to `this'.
450         * NEWS: Note that fact.
451         * class.c (build_vbase_path): Don't check flag_this_is_variable.
452         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
453         (language_function): Remove assigns_this, just_assigned_this, and
454         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
455         (base_init_expr): Remove.
456         (current_vcalls_possible_p): New macro.
457         (vtbls_set_up_p): Likewise.
458         (emit_base_init): Change prototype.
459         * decl.c (finish_destructor_body): New function, split out from
460         finish_function.
461         (current_function_assigns_this): Remove.
462         (current_function_just_assigned_this): Likewise.
463         (start_function): Don't set them.
464         (finish_function): Don't check them.  Don't emit
465         base-initialization code here.  Generate code for destructors when
466         doing semantic analysis.
467         (finish_stmt): Don't check current_function_just_assigned_this.
468         * decl2.c (lang_f_options): Remove this-is-variable.
469         (lang_decode_option): Likewise.
470         (grokclassfn): Don't check flag_this_is_variable.
471         * init.c (emit_base_init): Return the expression generated.
472         (construct_virtual_bases): Don't push/pop obstacks.  Fix
473         typo.
474         (build_new_1): Don't check flag_this_is_variable.
475         (get_temp_regvar): Don't set DECL_REGISTER.
476         (build_vec_init): Don't call use_variable.
477         * lang-options.h: Remove "-fthis-is-variable" and
478         "-fno-this-is-variable".
479         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
480         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
481         expand_expr_stmt.
482         * semantics.c (finish_expr_stmt_real): Rename to ...
483         (finish_expr_stmt): This.  Remove assigned_this parameter.
484         (begin_if_stmt): Call do_pushlevel before starting the statement.
485         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
486         blocks.
487         (setup_vtbl_ptr): Emit initialization code for bases and members
488         at semantic-analysis time.  Emit code to initialize vtables in
489         destructors here.
490         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
491         Don't handle CTOR_INITIALIZER any more.
492         * typeck.c (build_modify_expr): Don't check for assignments to
493         this.
494         (c_expand_return): Don't suggest assigning to `this'.
495         
496         * Makefile.in (decl.o): Depend on RTL_H.
497         (decl2.o): Likewise.
498         (class.o): Likewise.
499         (call.o): Likewise.
500         (method.o): Likewise.
501         (search.o): Likewise.
502         (tree.o): Likewise.
503         (pt.o): Likewise.
505         * decl.c (duplicate_decls): When a builtin function is redeclared
506         as static, make sure it is mangled correctly.
508         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
509         detail about the statement-tree.
510         
511 1999-09-20  Nathan Sidwell  <nathan@acm.org>
513         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
515 1999-09-20  Nick Clifton  <nickc@cygnus.com>
517         * decl2.c (lang_decode_option): Extend comment.
519 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
521         * typeck.c: Include "tm_p.h".
523 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
525         * ir.texi: New file.
527 1999-09-19  Paul Burchard <burchard@pobox.com>
529         * semantics.c (expand_stmt): Initialize return value.
531 1999-09-18  Paul Burchard <burchard@pobox.com>
533         * gxxint.texi: G++ now implements namespaces.
534         
535 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
537         * decl.c (pop_label): Don't warn about unused labels more than
538         once.
539         * semantics.c (finish_goto_stmt): Always marked used labels as
540         used.
542         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
543         even when the declaration is external.
544         (cp_finish_decl): Adjust call to layout_var_decl.
545         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
547 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
549         * typeck.c (get_member_function_from_ptrfunc): Always consider
550         virtuality inside member pointer.
552 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
554         Turn on function-at-a-time processing.  
555         * cp-tree.h (doing_semantic_analysis_p): New macro.
556         (SF_DEFAULT): Define to zero, not SF_EXPAND.
557         (start_handler_parms): Change prototype.
558         (expand_start_catch_block): Likewise.
559         (expand_end_catch_block): Likewise.
560         (expand_start_eh_spec): Likewise.
561         (expand_end_eh_spec): Declare.
562         (finish_handler_parms): Change prototype.
563         (begin_catch_block): Declare.
564         (finish_handler): Change prototype.
565         (do_pushlevel): Declare.
566         (do_poplevel): Likewise.  
567         * decl.c (pushlevel): Don't create
568         binding levels when not doing semantic analysis.
569         (poplevel): Don't pop them.
570         (pushdecl): Assert that we are never called when not doing
571         semantic analysis.
572         (pushdecl_top_level): Use push_to_top_level.
573         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
574         label when expanding.
575         (cp_finish_decl): Only inject for-scope variables when doing
576         semantic analysis.  Add comments.
577         (start_handler_parms): Return the handler parm.
578         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
579         already set.  Reinitialize from saved function data if available.
580         Don't pushlevel when not doing semantic analysis.
581         (store_parm_decls): Only generate RTL when expanding.  Only
582         pushdecl when doing semantic analysis.  Set
583         current_eh_spec_try_block if appropriate.
584         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
585         Combine common code.  Don't poplevel when not doing semantic
586         analysis.
587         (push_cp_function_context): Don't expand functions without an
588         explicit call to expand_body.
589         (mark_lang_function): Make eh_spec_try_block and
590         x_scope_stmt_stack.  
591         * except.c (expand_end_eh_spec): Don't
592         declare.
593         (process_start_catch_block): Likewise.
594         (push_eh_cleanup): Use finish_decl_cleanup.
595         (initialize_handler_parm): New function.
596         (expand_start_catch_block): Use it.
597         (expand_end_catch_block): Use tree-generation functions, not
598         RTL-generation functions.
599         (expand_start_eh_spec): Likewise.
600         (expand_end_eh_spec): Likewise.
601         (expand_exception_blocks): Simplify.
602         (start_anon_func): Use do_pushlevel.
603         (end_anon_func): Use do_poplvel.  Call expand_body for the
604         function.  
605         * expr.c (do_case): Don't call define_case_label.  
606         * init.c (create_temporary_var): Set DECL_CONTEXT for local
607         variables.  
608         * method.c (emit_thunk): Call expand_body for the
609         thunk.
610         (sythesize_method): Likewise.  
611         * parse.y (handler_args): Give it ttype.
612         (eat_saved_input): Call expand_body.
613         (base_init): Use do_pushlevel.
614         (pending_inline): Call expand_body.
615         (handler): Adjust calls to finish_handler_parms and
616         finish_handler.
617         (handler_args): Don't call expand_start_catch_block.  Return the
618         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
619         * parse.c: Regenerated.
620         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
621         * semantics.c (do_pushlevel): Give it external linkage.  Build
622         SCOPE_STMTs.
623         (do_poplevel): Likewise.
624         (finish_case_label): Call define_case_label when doing semantic
625         analysis.
626         (finish_goto_stmt): Create RTL for labels.
627         (finish_function_try_block): Set in_function_try_handler
628         unconditionally.
629         (finish_function_handler_sequence): Unset it.
630         (finish_handler_parms): Use expand_start_catch_block even when
631         building a statement-tree.
632         (begin_catch_block): New function.
633         (finish_handler): Move a little RTL-generation logic here.
634         (finish_decl_cleanup): Allow cleanups for empty declarations.
635         (finish_named_return_value): Don't pushdecl when not doing
636         semantic analysis.
637         (expand_stmt): Don't do semantic analysis for variable
638         declarations.  Handle START_CATCH_STMT.  Call expand_label
639         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
640         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
641         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
642         RETURN_INIT and function try blocks.
643         
644         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
645         x_scope_stmt_stack.  Add x_in_charge_parm.
646         (current_eh_spec_try_block): New macro.
647         (current_scope_stmt_stack): Likewise.
648         (current_in_charge_parm): Likewise.
649         * decl.c (start_function): Initialize current_in_charge_parm.
650         (finish_function): Use current_in_charge_parm rather than looking
651         up __in_chrg.
652         * search.c (expand_indirect_vtbls_init): Likewise.
654         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
655         (TRY_BLOCK): Likewise.
656         (HANDLER): Likewise.
657         (START_CATCH_STMT): New tree node.
658         (SCOPE_STMT): Likewise.
659         * cp-tree.h (SCOPE_BEGIN_P): New macro.
660         (SCOPE_NULLIFIED_P): Likewise.
661         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
662         (struct lang_decl): Add saved_language_function.
663         (DECL_PENDING_INLINE_INFO): Adjust documentation.
664         (DECL_PENDING_INLINE_P): New macro.
665         (TYPE_TI_ARGS): Fix typo in comment.
666         (DECL_SAVED_TREE): Add to documentation.
667         (DECL_SAVED_FUNCTION_DATA): New macro.
668         (START_CATCH_TYPE): Likewise.
669         (SCOPE_END_P): New macro.
670         (declare_parm_level): Don't declare.
671         * decl.c (mark_lang_function): New function, split out from
672         mark_cp_function_context.
673         (save_function_data): New function.
674         (declare_parm_level): Remove.
675         (finish_function): Use save_function_data to squirrel away
676         important stuff for later use.
677         (mark_cp_function_context): Use mark_function_data.
678         (lang_mark_tree): Likewise.
679         * lex.c (begin_definition_of_inclass_inline): Set
680         DECL_PENDING_INLINE_P.
681         (store_pending_inline): Clear it.
682         * pt.c (tsubst_decl): Likewise.
684 1999-09-17  Nathan Sidwell  <nathan@acm.org>
686         * call.c (perform_implicit_conversion): Deal with error_mark_node.
688 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
690         * decl.c (warn_extern_redeclared_static): Don't get confused by
691         static member functions.
692         (duplicate_decls): Merge DECL_THIS_STATIC.
694         * decl.c (expand_static_init): Make sure assignments to local
695         statics actually occur.
697 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
699         * cp-tree.h (poplevel_class): Declare.
700         * class.c (popclass): Use poplevel_class, not poplevel.
701         * decl.c (poplevel_class): Don't make it static.  Don't return a
702         value.
703         (poplevel): Don't call poplevel_class; abort in a class
704         binding level is seen.
705         * semantics.c (finish_translation_unit): Use pop_everything.
706         * parse.y (member_init): Allow errors.
707         (pending_inline): Call finish_function.
708         * parse.c: Regenerated.
709         * Makefile.in (CONFLICTS): Adjust.
711 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
712         
713         * error.c: Reduce code duplication.
714         (dump_template_value): New function.
715         (dump_type_real): Use it.
716         (dump_decl): Likewise.
717         (dump_function_name): Likewise.
718         (dump_function_decl): Don't be too talkative about function return
719         type variety.
721 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
723         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
725         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
727 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
729         * decl2.c (finish_file): Also call check_global_declarations for
730         the pending_statics list.
732 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
734         * lex.c (cp_pragma_implementation): Allow #pragma implementation
735         in header files.
737 1999-09-15  Richard Henderson  <rth@cygnus.com>
739         * lex.c (mark_impl_file_chain): Follow the next chain.
741 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
743         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
744         problems with extern "C" functions redeclared as static.
745         (duplicate_decls): When a builtin is redeclared static, make the
746         new function have internal linkage.
747         
748 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
750         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
751         * pt.c (tsubst_copy): Likewise.
752         * tree.c (search_tree): Likewise.
753         (mapcar): Likewise.
755 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
757         * typeck2.c (ack): Don't declare progname.
759 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
761         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
762         filenames with ggc_alloc_string.
764 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
766         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
767         TARGET_EXPR.
768         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
769         the TARGET_EXPR.
770         * cvt.c (build_up_reference): Likewise.
771         * tree.c (build_cplus_new): Likewise.
772         (get_target_expr): Likewise.
773         
774 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
776         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
778 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
780         * cp-tree.h (build_target_expr): New function.
781         * call.c (build_conditional_expr): Use build_target_expr.
782         (convert_like): Likewise.
783         (build_over_call): Likewise.
784         * cvt.c (build_up_reference): Likewise.
785         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
786         (destroy_local_var): Here.
787         (build_target_expr): New function.
788         * tree.c (build_cplus_new): Use it.
789         (get_target_expr): Likewise.
791 1999-09-13  Nathan Sidwell  <nathan@acm.org>
793         * typeck.c (expr_sizeof): Don't decay arrays and functions.
794         Remove misleading comment.
795         (build_compound_expr): Don't decay arrays.
797 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
799         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
800         class rvalues again.
802 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
804         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
806         * g++spec.c: Include gcc.h.
807         (lang_specific_driver): Constify a char*.  Call xcalloc, not
808         xmalloc/bzero.  All calls to the function pointer parameter now
809         explicitly call `fatal'.
811 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
813         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
814         * cvt.c (ocp_convert): Complete the from and destination types.
815         Adjust warning about functions always being `true' in conditionals.
816         * decl.c (duplicate_decls): Don't play funny games with abort.
817         * error.c (dump_expr): Handle OVERLOADs.
818         * spew.c (probe_obstack): Remove.
819         * typeck.c (condition_conversion): Use perform_implicit_conversion.
820         
821 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
823         * cp-tree.h (auto_function, define_function): Adjust prototypes.
824         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
825         changed.
826         (auto_function): Likewise, for CODE arg.
827         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
828         (builtin_function): ... here.
830 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
832         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
833         (init_decl_processing): Don't set TREE_PERMANENT for the
834         error_mark_node.
835         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
836         (grokdeclarator): Likewise.
837         (grokparms): Don't check TREE_PERMANENT when building up lists.
838         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
839         (mark_inline_for_output): Likewise.
840         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
841         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
842         * lex.c (check_newline): Don't check ggc_p; it is always one.
843         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
844         * spew.c (yylex): Don't copy_node or probe_obstacks for
845         non-permanent CONSTANTs and STRINGs.
846         * tree.c (build_cplus_array_type_1): Don't fuss with
847         TREE_PERMANENT on ARRAY_TYPEs.
848         
849         * cp-tree.def (CLEANUP_STMT): New node.
850         * cp-tree.h (language_function): Add name_declared.
851         (current_function_name_declared): New macro.
852         (CLEANUP_DECL): New macro.
853         (CLEANUP_EXPR): Likewise.
854         (emit_local_var): Likewise.
855         (finish_decl_cleanup): New function.
856         * cvt.c (build_up_reference): Simplify.
857         (ocp_convert): Remove dead code.
858         * decl.c (start_decl): Remove call to add_decl_stmt.
859         (grok_reference_init): Adjust, to handle bindings temporaries to
860         references.  Remove dead code.
861         (initialize_local_var): Don't generate RTL for
862         declarations here, or build cleanups here.  Don't fuss with
863         obstacks.  Replace expand_start_target_temps calls with explicit
864         setting of stms_are_full_exprs_p.
865         (destroy_local_var): New function.
866         (emit_local_var): Likewise.
867         (cp_finish_decl): Use them, as appropriate.
868         (start_function): Announce template functions.
869         (store_parm_decls): Don't call declare_function_name here.
870         (finish_stmt): Don't start emit base-initialization code when just
871         building the statement-tree.
872         * init.c (create_temporary_var): Move add_decl_stmt call ...
873         (get_temp_regvar): Here.
874         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
875         cp_finish_decl would expect.  Don't call add_decl_stmt.
876         * semantics.c (begin_compound_stmt): Call declare_function_name,
877         if appropriate.
878         (finish_decl_cleanup): New function.
879         (expand_stmt): Use emit_local_var to output variables.          
880         (expand_body): Set current_funtion_name_declared.
881         
882 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
884         * cp-tree.h (finish_cleanup_try_block): New function.
885         * semantics.c (finish_cleanup_try_block): Add comment.
887 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
889         * cp-tree.h: Delete declarations for all tree nodes now moved to
890         global_trees.
891         * decl.c: Delete their definitions.
892         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
893         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
894         provide defaults.
895         (init_decl_processing): Call build_common_tree_nodes and
896         build_common_tree_nodes_2 instead of building their nodes here.
897         Don't add gc roots for them.
899 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
901         * cp-tree.h (language_function): Rename expanding_p to
902         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
903         (expanding_p): Adjust accordingly.
904         (TREE_VIA_PRIVATE): Fix typo in comment.
905         (DECL_REFERENCE_SLOT): Remove.
906         (SET_DECL_REFERENCE_SLOT): Likewise.
907         * decl.c (named_label_uses): Adjust. Remove chicken comment.
908         (push_overloaded_decl): Don't truncate the chain of bindings when
909         adding an overloaded function.
910         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
911         (initialize_local_var): Fix typo in comment.
912         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
913         * decl2.c (start_objects): Make the fact that we are expanding
914         the generated function right away explicit.
915         (start_static_storage_duration_function): Likewise.
916         (finish_file): Fix typo in comment.
917         * init.c (build_vec_init): Correct bugs in handling cleanups.
918         * semantics.c (maybe_convert_cond): New function.
919         (FINISH_COND): Always store the condition, even if there's
920         a declaration.
921         (finish_if_stmt_cond): Use maybe_convert_cond.
922         (finish_while_stmt_cond): Likewise.
923         (finish_do_stmt): Likewise.
924         (finish_for_cond): Likewise.
925         (expand_cond): Adjust.
926         
927         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
928         * init.c (perform_member_init): Remove obstack machinations.
929         (expand_cleanup_for_base): Likewise.
930         (finish_init_stmts): Mark the statement-expression as used.
931         * method.c (emit_thunk): Use tree-generating functions, not
932         RTL.
933         (do_build_copy_constructor): Likewise.
934         (do_build_assign_ref): Likewise.
935         (synthesize_method): Likewise.  Keep track of line numbers.
936         * pt.c (tsubst_expr): Handle various kinds of try blocks.
937         * semantics.c (expand_stmts): Remove.
938         (begin_function_try_block): Set FN_TRY_BLOCK_P.
939         (finish_function_try_block): Be careful rechaining 
940         function try blocks.
941         (expand_stmt): Loop through all the statements at a given level.
942         (exapnd_body): Be careful with line-numbers here too.  Prepare for
943         being called directly from the parser.
945         * cp-tree.h (finish_function): Adjust prototype.
946         * decl.c (finish_function): Return the function compiled.
947         * pt.c (instantiate_decl): Don't play games with obstacks.
948         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
949         (search_tree): Likewise.
950         * typeck.c: Fix typo in comment.
951         * typeck2.c (store_init_value): Add comment.
953         * cp-tree.h (CPTI_ATEXIT): New macro.
954         (atexit_node): Likewise.
955         * decl.c (destroy_local_static): New function, broken out from ...
956         (expand_static_init): Here.
958         * rtti.c (get_tinfo_var): These should always be global
959         (expand_si_desc): Use tree, not RTL, functions to generate code.
960         (expand_class_desc): Likewise.
961         (expand_ptr_desc): Likewise.
962         (expand_attr_desc): Likewise.
963         (expand_generic_desc): Likewise.
964         (synthesize_tinfo_fn): Likewise.
966 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
968         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
969         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
970         RECHAIN_STMTS. 
971         (RECHAIN_STMST_FROM_CHAIN): Likewise.
973         * parse.y (simple_stmt): Fix typo in last change.
975         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
976         (STMT_IS_FULL_EXPR_P): Likewise.
977         (STMT_LINENO_FOR_FN_P): Likewise.
978         (prep_stmt): New function.
979         (building_stmt_tree): Tweak for safety.
980         * pt.c (tsubst_expr): Use prep_stmt throughout.
981         (add_tree): Move it to semantics.c
982         * semantics.c (add_tree): Move it here.
983         (finish_expr_stmt_real): New function.
984         (finish_expr_stmt): Use it.
985         (finish_if_stmt_cond): Use FINISH_COND.
986         (finish_while_stmt_cond): Likewise.
987         (finish_for_cond): Likewise.
988         (finish_stmt_tree): Tweak line-number handling.
989         (prep_stmt): New function.
990         (expand_stmt): Use it.
991         
992         * cp-tree.h (begin_switch_stmt): Adjust prototype.
993         (finish_switch_cond): Likewise.
994         * parse.y (simple_stmt): Adjust accordingly.
995         * parse.c: Regenerated.
996         * pt.c (tsubst_expr): Adjust accordingly.
997         * semantics.c (expand_cond): New function.
998         (FINISH_COND): New macro.
999         (begin_switch_stmt): Build the SWITCH_STMT here.
1000         (finish_switch_stmt_cond): Not here.
1001         (expand_stmt): Adjust calls to begin_switch_stmt and
1002         finish_switch_cond.  Use expand_cond throughout.
1004         * dump.c (dequeue_and_dump): Dump types for constants.
1005         Describe DECL_ARG_TYPE more intuitively.
1006         Handle ARRAY_REF.
1008         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
1009         (lang_cleanup_tree): Remove.
1010         * lex.c (make_lang_type): Use ggc_alloc to allocate
1011         TYPE_LANG_SPECIFIC.
1013         Reorganize per-function data.
1014         * cp-tree.h (saved_scope): Add function_decl, bindings.
1015         (language_function): Rename binding_level to bindings.
1016         (cp_function_chain): Use the current_function, not the
1017         outer_function_chain.
1018         (current_class_ptr): Make it work, even when there's no 
1019         current function.
1020         (current_class_ref): Likewise.
1021         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
1022         macros.
1023         (clear_temp_name): Remove.
1024         * decl.c (check_function_type): New function, broken out from
1025         start_function.
1026         (current_binding_level): Adjust definition.
1027         (pushlevel): Simplify.
1028         (poplevel): Don't use named_label_uses when we're outside
1029         a function scope.
1030         (mark_saved_scope): Mark function_decl and bindings.
1031         (maybe_push_to_top_level): Don't unconditionally push a new
1032         function context.  Save bindings and the current_function_decl.
1033         Don't clear named_labels.
1034         (pop_from_top_level): Pop function context if appropriate.
1035         (init_decl_processing): Set init_lang_status and free_lang_status,
1036         rather than save_lang_status and restore_lang_status.
1037         (start_function): Take SF_* flags.  Don't clear per-function data.
1038         Reorder and simplify to use new per-function data code.  Add
1039         asserts.
1040         (store_parm_decls): Don't call init_function_start here.
1041         (finish_function): Adjust for new handling of per-function data.
1042         (push_cp_function_context): Simplify.
1043         (mark_cp_function_context): Change binding_level to bindings.
1044         * decl2.c (clear_temp_name): Remove.
1045         (start_objects): Use SF flags to start_function.
1046         (start_static_storage_duration_function): Likewise.
1047         * except.c (start_anon_func): Remove redundant calls to 
1048         push_function_context_to.  Use SF flags to start function.
1049         (end_anon_func): Remove redundant call to pop_function_context
1050         from.
1051         * lex.c (reinit_parse_for_function): Don't initialize per-function 
1052         data.
1053         * method.c (emit_thunk): Clear current_function after calling
1054         assemble_end_function.  Use SF flags for start_function.
1055         (synthesize_method): Use SF flags for start_function.
1056         * parse.c: Regenerated.
1057         * parse.y (fn.defpen): Likewise.
1058         (pending_inline): Clear current_function, even if something goes
1059         wrong.
1060         * pt.c (instantiate_decl): Use SF flags to start_function.
1061         Don't save and restore expanding_p.
1062         (add_tree): Handle the case where we are outside any function.
1063         (end_tree): Likewise.
1064         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
1065         * semantics.c (begin_function_definition): Likewise.
1066         (expand_body): Likewise.
1067         
1068 1999-09-09  Nathan Sidwell  <nathan@acm.org>
1070         * cp-tree.h (convert_to_void): Prototype new function.
1071         (require_complete_type_in_void): Remove prototype.
1072         * cvt.c (convert_to_void): New function.
1073         (ocp_convert): Use convert_to_void.
1074         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
1075         expressions.
1076         * typeck.c (require_complete_type_in_void): Remove function.
1077         (build_compound_expr): Use convert_to_void.
1078         (build_static_cast): Likewise.
1079         (build_c_cast): Likewise.
1080         * semantics.c (finish_expr_stmt): Do not decay full expressions.
1081         
1082         * typeck.c (build_x_compound_expr): Add FIXME.
1084 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1086         * cp-tree.h (scratch_tree_cons): Remove.
1087         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
1088         and perm_tree_cons with plain tree_cons.
1089         * class.c: Likewise.
1090         * decl.c: Likewise.
1091         * decl2.c: Likewise.
1092         * except.c: Likewise.
1093         * expr.c: Likewise.
1094         * init.c: Likewise.
1095         * lex.c: Likewise.
1096         * method.c: Likewise.
1097         * parse.y: Likewise.
1098         * pt.c: Likewise.
1099         * repo.c: Likewise.
1100         * rtti.c: Likewise.
1101         * search.c: Likewise.
1102         * typeck.c: Likewise.
1103         * parse.c: Regenerated.
1104         * tree.c (build_srcloc): Simplify.
1105         
1106 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1108         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1109         Remove next.
1110         (LANG_DECL_PERMANENT): Remove.
1111         * decl.c (duplicate_decls): Don't mess about with obstacks trying
1112         to free memory.
1113         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1114         * lex.c (free_lang_decl_chain): Remove.
1115         (build_lang_decl): Don't use obstacks.
1116         (retrofit_lang_decl): Likewise.
1117         (copy_lang_decl): Likewise.
1119         * cp-tree.h (saved_scope): Remove old_binding_level and 
1120         function_decl.  Tidy up.
1121         * decl.c (mark_saved_scope): Don't set them.
1122         (maybe_push_to_top_level): Clear memory.
1124         * decl.c (layout_var_decl): Change prototype.  Don't complete
1125         types for external objects.
1126         (check_initializer): Likewise.  Tidy.
1127         (initialize_local_var): Complete types here.
1128         (cp_finish_decl): Not here.  Reorganize a little.
1129         (grokvardecl): Don't complete types here.
1131         * decl.c (start_function): Clear last_dtor_insn and
1132         last_parm_cleanup_insn. 
1133         (push_cp_function_context): Just copy over a little of
1134         the old context, not all of it.
1136         * cp-tree.h (copy_to_permanent): Remove.
1137         (permanent_p): Likewise.
1138         * decl.c (building_typename_type): Don't use copy_to_permanent.
1139         (start_decl): Likewise.
1140         (grok_reference_init): Likewise.
1141         (cp_finish_decl): Likewise.
1142         * init.c (build_new_1): Don't use mapcar.
1143         (build_vec_delete_1): Don't use copy_to_permanent.
1144         (build_vec_init): Likewise.
1145         * parse.y (primary): Likewise.
1146         * parse.c: Regenerated.
1147         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1148         (lookup_template_class): Likewise.
1149         (tsubst_friend_function): Likewise.
1150         (instantiate_class_template): Likewise.
1151         (tsubst_decl): Likewise.
1152         (tsubst): Likewise.
1153         (instantiate_template): Likewise.
1154         (unify): Likewise.
1155         * rtti.c (get_tinfo_fn): Likewise.
1156         (build_dynamic_cast): Likewise.
1157         * semantics.c (finish_if_stmt_cond): Likewise.
1158         (finish_while_stmt_cond): Likewise.
1159         (finish_do_stmt): Likewise.
1160         (finish_for_cond): Likewise.
1161         (finish_for_expr): Likewise.
1162         (finish_cleanup): Likewise.
1163         (add_decl_stmt): Likewise.
1164         (finish_named_return_value): Likewise.
1165         (finish_qualified_call_expr): Likewise.
1166         * tree.c (perm_manip): Remove.
1167         (build_exception_variant): Don't use copy_to_permanent.
1168         (permanent_p): Remove.
1169         (copy_to_permament): Remove.
1170         (build_min_nt): Don't use copy_to_permanent.
1171         (build_min): Likewise.
1172         (min_tree_cons): Likewise.
1173         * typeckc.c (build_static_cast): Likewise.
1174         (build_reinterpret_cast): Likewise.
1175         (build_const_cast): Likewise.
1176         
1177 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1179         * decl.c (ggc_p): Set it to 1.
1180         (mark_saved_scope): Add prototype.
1182 1999-09-07  Richard Henderson  <rth@cygnus.com>
1184         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1185         * typeck.c (self_promoting_args_p): Delete.
1187 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
1189         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1190         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1192 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1194         * Makefile.in (tree.o): Depend on ggc.h.
1195         * class.c (make_method_vec): Remove.
1196         (free_method_vec): Likewise.
1197         (free_method_vecs): Remove.
1198         (add_method): Don't use them.
1199         * cp-tree.def (PTRMEM_CST): Make it longer.
1200         (TEMPLATE_PARM_INDEX): Make it shorter.
1201         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1202         (template_parm_index): Remove RTL field.
1203         (ptrmem_cst): Add RTL field.
1204         (finish_function): Removed parameter.
1205         (process_next_inline): Change prototype.
1206         (init_cplus_unsave): Rename to init_tree.
1207         (binding_init): Remove.
1208         * decl.c (free_binding_nodes): Remove.
1209         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
1210         (pop_binding): Don't use free_binding_nodes.
1211         (free_binding_vecs): Remove.
1212         (store_bindings): Don't use them.
1213         (pop_from_top_level): Likewise.
1214         (lookup_namespace_name): Simplify.
1215         (build_typename_type): Don't use obstack_free.
1216         (unqualified_namespace_lookup): Simplify.
1217         (lookup_name_real): Simplify.
1218         (start_function): Remove comment about leaks.
1219         (finish_function): Removed nested parameter.  Call
1220         expand_end_bindings even when building_stmt_tree.
1221         Call ggc_push_context and ggc_pop_context around
1222         rest_of_compilation, if necessary.
1223         (mark_cp_function_context): Handle a NULL language-context.
1224         (lang_mark_false_label_stack): Fix typo.
1225         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
1226         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
1227         pointer to method types.
1228         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
1229         * decl2.c (finish_objects): Adjust call to finish_function.
1230         (finish_static_store_duration_function): Likewise.
1231         (do_nonmember_using_decl): Remove call to binding_init.
1232         * except.c (end_anon_func): Adjust call to finish_function.
1233         * lex.c (mark_impl_file_chain): New function.
1234         (init_parse): Call init_tree, not init_cplus_unsave.
1235         Add GC roots.
1236         (cp_pramga_interface): Use xmalloc, not permalloc.
1237         (cp_pragma_implementation): Likewise.
1238         (begin_definition_of_inclass_inline): Simplify.
1239         (process_next_inline): Adjust prototype.
1240         (do_scoped_id): Don't call binding_init.
1241         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
1242         * method.c (emit_thunk): Adjust call to finish_function.
1243         (synthesize_method): Likewise.
1244         * parse.y (%union): Add a new `pi' variant.
1245         (PRE_PARSED_FUNCTION_DECL): Use it.
1246         (fn.defpen): Likewise.
1247         (fndef): Adjust call to finish_function.
1248         * pt.c (instantiate_decl): Likewise.
1249         * rtti.c (syntheisze_tinfo_fn): Likewise.
1250         * semantics.c (expand_body): Likewise.
1251         * tree.c: Include ggc.h.
1252         (mark_list_hash): New function.
1253         (binding_init): Remove.
1254         (init_cplus_unsave): Rename to ...
1255         (init_tree): This.  Add GC roots.
1256         
1257 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
1259         Get ready for garbage collection.
1260         * Makefile.in (CXX_TREE_H): Add varray.h
1261         (lex.o): Depend on ggc.h.
1262         (decl.o): Likewise.
1263         (decl2.o): Likewise.
1264         (method.o): Likewise.
1265         (search.o): Likewise.
1266         (pt.o): Likewise.
1267         (repo.o): Likewise.
1268         * class.c: Include ggc.h.
1269         (current_class_name): Remove.
1270         (current_class_type): Likewise.
1271         (current_access_specifier): Likewise.
1272         (previous_class_type): Likewise.
1273         (previous_class_values): Likewise.
1274         (class_cache_firstobj): Likewise.
1275         (current_lang_base): Likewise.
1276         (current_lang_stack): Likewise.
1277         (current_lang_stacksize): Likewise.
1278         (lang_name_c): Likewise.
1279         (lang_name_cplusplus): Likewise.
1280         (lang_name_java): Likewise.
1281         (current_lang_name): Likewise.
1282         (base_layout_decl): Likewise.
1283         (access_default_node): Likewise.
1284         (access_public_node): Likewise.
1285         (access_protected_node): Likewise.
1286         (access_private_node): Likewise.
1287         (access_default_virtual_node): Likewise.
1288         (access_public_virtual_node): Likewise.
1289         (access_protected_virtual_node): Likewise.
1290         (access_private_virtual_node): Likewise.
1291         (signed_zero_node): Likewise.
1292         (init_class_processing): Don't build base_layout_decl.
1293         (push_lang_context): Adjust now that current_lang_base is a varray.
1294         (pop_lang_context): Likewise.
1295         * cp-tree.h: Include varray.h.
1296         (cp_global_trees): Add access_default, access_public,
1297         access_protected, access_private, access_default_virtual,
1298         access_public_virtual, access_protected_virtual,
1299         access_private_virtual, ctor_identifier, delta2_identifier, 
1300         delta_identifier, dtor_identifier, in_charge_identifier,
1301         index_identifier, nelts_identifier, this_identifier,
1302         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
1303         lang_name_c, lang_name_cplusplus, lang_name_java,
1304         empty_except_spec, null, jclass, minus_one, terminate.
1305         (saved_scope): Move here from decl.c.  Define globals in terms of
1306         saved_scope: current_namespace, current_class_name,
1307         current_class_type, current_access_specifier, current_lang_stack,
1308         current_lang_base, current_lang_name, current_function_parms,
1309         current_template_parms, processing_template_decl,
1310         processing_specialization, processing_explicit_instantiation,
1311         previous_class_type, previous_class_values, class_cache_firstobj.
1312         (scope_chain): New variable.
1313         (init_pt): New function.
1314         * decl.c (current_namespace): Remove.
1315         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1316         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1317         (delta_identifier, delta2_identifier): Likewise.
1318         (pfn_or_delta2_identifier, tag_identifier): Likewise
1319         (vt_off_identifier, empty_except_spec, null_node): Likewise.
1320         (current_function_parms, current_lang_base): Remove.
1321         (current_lang_stack, previous_class_values): Remove.
1322         (class_binding_level): Macroize.
1323         (saved_scope): Remove.
1324         (current_saved_scope): Rename to scope_chain.
1325         (mark_saved_scope): Adjust for new scope structure.
1326         (maybe_push_to_top_level): Likewise.
1327         (pop_from_top_level): Likewise.
1328         (duplicate_decls): Adjust now that current_lang_base is a varray.
1329         (build_typename_type): Call ggc_add_tree_hash_table_root.
1330         (init_decl_processing): Call init_pt.  Call push_to_top_level to
1331         set up globals.  Add GC roots.
1332         (xref_basetypes): Adjust now that current_lang_base is a varray.
1333         * decl.h (this_identifier): Remove.
1334         (in_charge_identifier): Likewise.
1335         * decl2.c: Don't include varray.h.
1336         (current_namespace): Remove.
1337         (init_decl2): Add GC roots.
1338         * except.c (Terminate): Remove. 
1339         (init_exception_processing): Use terminate_node instead.
1340         (build_terminate_handler): Likewise.
1341         * init.c (nc_nelts_field_id): Remove.
1342         (minus_one): Likewise.
1343         (init_init_processing): Use minus_one_node and nelts_identifier
1344         instead.  Add GC roots.
1345         (jclass_node): Remove.
1346         (build_new_1): Use nelts_identifier.
1347         (build_vec_init): Likewise.
1348         (build_vec_delete): Likewise.
1349         * lex.c: Include ggc.h.
1350         (defarg_fn): Move declaration early.
1351         (defarg_parms): Likewise.
1352         (init_parse): Add GC roots.
1353         (handle_cp_pragma): Remove redundant declaration of
1354         pending_vtables.
1355         * method.c: Include ggc.h.
1356         (btypelist): Make it a varray.  All uses changed.
1357         (ktypelist): Likewise.
1358         (init_method): Add GC roots.
1359         * pt.c: Don't include varray.h.  Include ggc.h.
1360         (current_template_parms): Remove.
1361         (processing_template_decl): Likewise.
1362         (processing_specialization): Likewise.
1363         (processing_explicit_instantiation): Likewise.
1364         (init_pt): New function.
1365         * repo.c: Include ggc.h.
1366         (init_repo): Add GC roots.
1367         * search.c: Don't include varray.h.
1368         (_vptr_name): Remove.
1369         (lookup_field_1): Use vtpr_identifier instead.
1370         (expand_indirect_vtbls_init): Remove redundant declaration of
1371         in_charge_identifier.
1372         (init_search_processing): Use vptr_identifier.
1373         
1374 1999-09-05  Richard Henderson  <rth@cygnus.com>
1375             Bernd Schmidt <bernds@cygnus.co.uk>
1376             Mark Mitchell  <mark@codesourcery.com>
1378         * Makefile.in (parse.o): Depend on ggc.h.
1379         (decl2.o): Depend on ggc.h.
1380         (init.o): Depend on ggc.h.
1381         * cp-tree.h (init_decl2): Declare.
1382         (cp_parse_init): Likewise.
1383         * decl.c (ggc_p): Define to zero.
1384         (mark_saved_scope): New function.
1385         (init_decl_processing): Call cp_parse_init, and cp_decl2.
1386         Register GC roots.
1387         (expand_static_init): Add GC roots.
1388         * decl2.c: Include ggc.h.
1389         (init_decl2): New function.
1390         * init.c: Include ggc.h.
1391         (init_init_processing): Add GC roots.
1392         * parse.y: Include ggc.h.
1393         (cp_parse_init): New function.
1394         
1395 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
1397         * decl.c (init_decl_processing): Set mark_lang_status.
1398         (lang_mark_false_label_stack): Adjust prototype.
1399         * decl2.c (grok_function_init): Remove extraneous declaration of
1400         abort_fndecl.
1402         * Make-lang.in (cc1plus): Remove dependency on GGC.
1403         * Makefile.in (OBJS): Don't mention ggc-simple.o.
1404         (OBJDEPS): Don't mention ggc-simple.o.
1406         * Make-lang.in (cc1plus): Depend on $(GGC).
1407         * Makefile.in (OBJS): Add ggc-simple.o.
1408         (OBJDEPS): Likewise.
1409         * cp-tree.h (language_function): Rename members to `x_' versions;
1410         we now have x_named_labels, x_ctor_label, x_dtor_label,
1411         x_base_init_list, x_member_init_list, x_base_init_expr,
1412         x_current_class_ptr, x_current_class_ref, x_last_tree,
1413         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1414         x_result_rtx. 
1415         (dtor_label, ctor_label, current_base_init_list,
1416         current_member_init_list, base_init_expr, current_class_ptr,
1417         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1418         * decl.c: Include ggc.h.
1419         (last_dtor_insn): Adjust to use x_ names.
1420         (last_parm_cleanup_insn): Likewise.
1421         (original_result_rtx): Likewise.
1422         (named_labels): Likewise.
1423         (mark_binding_level): New function.
1424         (mark_cp_function_context): Likewise.
1425         (mark_false_label_stack): Likewise.
1426         (lang_mark_tree): Likewise.
1427         (lang_cleanup_tree): Likewise.
1428         
1429 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
1431         * Makefile.in (CXX_TREE_H): Include function.h.
1432         (decl.o): Don't depend on function.h.
1433         (decl2.o): Likewise.
1434         (typeck.o): Likewise.
1435         (init.o): Likewise.
1436         (method.o): Likewise.
1437         * cp-tree.h: Include function.h.
1438         (cp_function): Rename to language_function.  Remove next.
1439         (cp_function_chain): Make it a macro, not a variable.
1440         (push_cp_function_context): Don't declare.
1441         (pop_cp_function_context): Likewise.
1442         * decl.c: Don't include function.h.
1443         (push_cp_function_context): Make it static.  Make it suitable for
1444         a save_lang_status callback.
1445         (pop_cp_function_context): Likewise.
1446         (maybe_push_to_top_level): Call push_function_context_to, not
1447         push_cp_function_context.
1448         (pop_from_top_level): Call pop_function_context_from, not
1449         pop_cp_function_context.
1450         (init_decl_processing):  Set save_lang_status and
1451         restore_lang_status.  Call push_function_context_to, not
1452         push_cp_function_context.
1453         (cp_function_chain): Remove.
1454         * decl2.c: Don't include function.h.
1455         * except.c: Don't include function.h.
1456         (start_anon_func): Call push_function_context_to, not
1457         push_cp_function_context.
1458         (end_anon_func):  Call pop_function_context_from, not
1459         pop_cp_function_context.
1460         * init.c: Don't include function.h.
1461         * lex.c (begin_definition_of_inclass_inline): Call
1462         push_function_context_to, not push_cp_function_context. 
1463         (process_next_inline):  Call pop_function_context_from, not
1464         pop_cp_function_context.
1465         * method.c: Don't include function.h.
1466         (synthesize_method): Call push_function_context_to, not
1467         push_cp_function_context.  Call pop_function_context_from, not
1468         pop_cp_function_context.
1469         * typeck.c: Don't include function.h.
1470         
1471         * decl.c (expand_static_init): Tweak handling of static
1472         initializations for objects without constructors.
1474 1999-09-03  Nathan Sidwell  <nathan@acm.org>
1476         * typeck.c (build_indirect_ref): Reject dereference of pointer to
1477         void.
1479 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
1481         * cp-tree.h (cp_function): Move here, from decl.c.
1482         (cp_function_chain): Declare.
1483         (dtor_label): New macro, instead of variable.
1484         (ctor_label): Likewise.
1485         (current_base_init_list): Likewise.
1486         (current_member_init_list): Likewise.
1487         (base_init_expr): Likewise.
1488         (current_class_ptr): Likewise.
1489         (current_class_ref): Likewise.
1490         (last_tree): Likewise.
1491         (last_expr_type): Likewise.
1492         (current_function_returns_value): Likewise.
1493         (current_function_returns_null): Likewise.
1494         (current_function_just_assigned_this): Likewise.
1495         (current_function_parms_stored): Likewise.
1496         (temp_name_counter): Likewise.
1497         (static_labelno): Likewise.
1498         (expanding_p): Likewise.
1499         (stmts_are_full_exprs_p): Likewise.
1500         (in_function_try_handler): Likewise.
1501         (lang_type): Remove nested type_flags.  All uses changed.
1502         * call.c (ctor_label): Remove.
1503         (dtor_label): Likewise.
1504         * class.c (current_class_ptr): Remove.
1505         (current_class_ref): Likewise.
1506         * decl.c (static_labelno): Remove.
1507         (dtor_label): Likewise.
1508         (last_dtor_insn): New macro, instead of variable.
1509         (last_parm_cleanup_insn): Likewise.
1510         (original_result_rtx): Likewise.
1511         (in_function_try_handler): Remove.
1512         (named_label_uses): New macro, instead of variable.
1513         (named_labels): Likewise.
1514         (current_function_returns_value): Remove.
1515         (current_function_returns_null): Likewise.
1516         (current_function_assigns_this): New macro, instead of variable.
1517         (current_function_just_assigned_this): Likewise.
1518         (current_binding_level): Likewise.
1519         (init_decl_processing): Call push_cp_function_context.
1520         (cp_function): Move to cp-tree.h
1521         (cp_function_chain): Make it global.
1522         (temp_name_counter): Remove.
1523         (push_cp_function_context): Simplify.
1524         (pop_cp_function_context): Likewise.
1525         * decl2.c (temp_name_counter): Remove.
1526         * init_c (current_base_init_list): Likewise.
1527         (current_member_init_list): Likewise.
1528         (base_init_expr): Likewise.
1529         * method.c (static_labelno): Likewise.
1530         * pt.c (last_tree): Likewise.
1531         * semantics.c (expanding_p): Likewise.
1532         (stmts_are_full_exprs_p): Likewise.
1533         (last_expr_type): Likewise.
1534         * typeck.c (dtor_label): Likewise.
1535         (ctor_label): Likewise.
1536         
1537 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
1539         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
1540         (arg_assoc_class): Use arg_assoc_template_arg for template
1541         arguments. 
1542         (arg_assoc): Likewise.
1543         * pt.c (mangle_class_name_for_template): Allow member template
1544         template arguments.
1546 1999-09-02  Nathan Sidwell  <nathan@acm.org>
1548         * call.c (build_conditional_expr): Warn on enum mismatches.
1549         (convert_arg_to_ellipsis): Move non-pod check to after
1550         conversion.
1552 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1554         * gxx.gperf (hash, is_reserved_word): Add prototypes.
1556         * init.c (build_vec_init): Initialize variable `try_block'.
1558         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1559         Likewise for bzero/memset.
1560         (token_getch, token_put_back): Add static prototypes.  Remove
1561         `inline' from the definitions.
1562         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1564 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
1566         * cp-tree.h (lang_type): Move align into type_flags.
1567         (CLASSTYPE_ALIGN): Adjust accordingly.
1568         * call.c (direct_reference_binding): Remove misleading comment.
1570 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1572         * parse.y (language_string): Constify.
1574 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1576         * repo.c (getpwd): Don't prototype.
1577         * xref.c (getpwd): Likewise
1579 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1581         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1582         Remove hacks for stuff which now comes from libiberty.
1584 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
1586         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1588 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
1590         * cp-tree.h (begin_init_stmts): Declare.
1591         (finish_init_stmts): Likewise.
1592         * cvt.c (build_up_reference): Wrap the declaration of a temporary
1593         in a statement-expression so that we will see it when expanding
1594         tree structure later.
1595         * init.c (begin_init_stmts): Don't make it static.
1596         (finish_init_stmts): Likewise.
1598         * cp-tree.h (start_handler_parms): New function.
1599         (expand_start_catch_block): Take only one parameter.
1600         (start_handler_parms): New function.
1601         * decl.c (start_handler_parms): Define it.
1602         * except.c (process_start_catch_block): Take only one parameter.
1603         Don't call grokdeclarator here.
1604         (expand_start_catch_block): Don't call grokdeclarator here,
1605         either.
1606         * parse.y (handler_args): Adjust call to
1607         expand_start_catch_block.  Use start_handler_parms.
1608         * pt.c (push_template_decl_real): Make permanent lists have
1609         permanent elements.
1610         (tsubst_expr): Adjust calls to expand_start_catch_block
1611         appropriately.
1612         * semantics.c (expand_stmt): Likewise.
1613         
1614 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
1616         * pt.c (push_template_decl_real): Use template declaration from
1617         class type if it exists.
1619 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
1621         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1622         (maybe_inject_for_scope_var): Declare it.
1623         (initialize_local_var): Likewise.
1624         * decl.c (maybe_inject_for_scope_var): Make it global.
1625         (initialize_local_var): Likewise.  Move cleanup handling here,
1626         from cp_finish_decl.
1627         (make_rtl_for_nonlocal_decl): Use
1628         push_obstacks_nochange/pop_obstacks, rather than
1629         end_temporary_allocation/resume_temporary_allocation.
1630         (cp_finish_decl): Try to complete the type of a variable when it
1631         is declared.  Move cleanup-handling to initialize_local_var.
1632         (expand_static_init): Use tree-building code, rather than
1633         RTL-building code.
1634         * decl2.c (get_temp_name): Assert non-initializedness of
1635         temporaries.
1636         * init.c (create_temporary_var): Move RTL-assigning code to ...
1637         (get_temp_regvar): Here.
1638         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
1639         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
1640         call initialize_local_var to generate initialization code.
1641         
1642 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1644         * cp-tree.h (fndecl_as_string, type_as_string,
1645         type_as_string_real, args_as_string, decl_as_string,
1646         expr_as_string, code_as_string, language_as_string,
1647         parm_as_string, op_as_string, assop_as_string, cv_as_string,
1648         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1650         * errfn.c (cp_printer): Likewise.
1652         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1653         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1654         cp_file_of, code_as_string, language_as_string, parm_as_string,
1655         op_as_string, assop_as_string, args_as_string, cv_as_string):
1656         Likewise.
1658         * tree.c (lang_printable_name): Likewise.
1660 1999-08-28  Richard Henderson  <rth@cygnus.com>
1662         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1664 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
1666         * cp-tree.h (strip_array_types): New function.
1667         * decl.c (maybe_deduce_size_from_array_init): New function, split
1668         out from cp_finish_decl.
1669         (layout_var_decl): Likewise.
1670         (maybe_commonize_var): Likewise.
1671         (maybe_inject_for_scope_var): Likewise.
1672         (initialize_local_var): Likewise.
1673         (build_cleanup_on_safe_obstack): Likewise.
1674         (check_initializer): Likewise.
1675         (make_rtl_for_nonlocal_decl): Likewise.
1676         (cp_finish_decl): Use them.
1677         * typeck.c (strip_array_types): New function.
1678         
1679         * cp-tree.def (LABEL_STMT): New tree node.
1680         * cp-tree.h (LABEL_STMT_LABEL): New macro.
1681         (shadow_label): Remove.
1682         (declare_local_label): New function.
1683         (finish_label_decl): Likewise.
1684         * decl.c (make_label_decl): New function, split out from
1685         lookup_label.
1686         (shadowed_labels): Remove.
1687         (binding_level): Add shadowed_labels.
1688         (clear_binding_level): Remove.
1689         (push_binding_level): Just bzero the new binding level.
1690         (pushlevel): Fix indentation.
1691         (pop_label): New function.
1692         (pop_labels): Likewise, split out from poplevel.
1693         (poplevel): Pop local labels.  Use pop_labels.
1694         (maybe_push_to_top_level): Don't clear shadowed_labels.
1695         (lookup_label): Use make_label_decl.
1696         (shadow_label): Remove.
1697         (declare_local_label): New function.
1698         (define_label): Simplify.
1699         (start_function): Don't clear shadowed_labels.
1700         (cp_function): Remove shadowed_labels.
1701         (push_cp_function_context): Don't save shadowed_labels.
1702         (pop_cp_function_context): Don't restore it.
1703         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1704         * parse.y (label_decl): Use finish_label_decl.
1705         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1706         declarations.
1707         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1708         building_stmt_tree.
1709         (finish_label_decl): New function.
1710         (expand_stmt): Handle LABEL_STMTs and local label declarations.
1711         
1712 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
1714         * decl.c (lookup_label): Build labels on the permanent obstack
1715         when building statement trees.  Don't build RTL for labels when
1716         building statement trees.
1717         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1718         building statement trees.
1719         (finish_label_stmt): Likewise.
1720         (expand_stmt): Adjust accordingly.
1721         * pt.c (tsubst_expr); Likewise.
1722         (do_decl_instantiation): Robustify.
1723         
1724         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1725         * tree.c (build_cplus_new): Set it.
1726         * expr.c (cplus_expand_expr): Use it.
1727         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1728         
1729         * decl.c (store_parm_decls): Reset immediate_size_expand.
1730         (finish_function): Likewise.
1731         
1732         * tree.c (cplus_unsave_expr_now): Don't return a value.
1734         * semantics.c (do_poplevel): Always initialize the return value.
1736 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
1738         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1739         * tree.h (cplus_unsave_expr_now) : Same.
1741 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1743         * decl.c (grokdeclarator): Amend comment.
1744         * except.c (expand_start_catch_block): Call push_template_decl for
1745         catch-block parameters.
1746         * method.c (synthesize_method): Build an empty compound statement
1747         for the body of a constructor.
1749 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
1751         * tree.c (cp_build_qualified_type_real): If we're asking for the
1752         same quals we already have, just return.
1754 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1756         * cp-tree.def (SUBOBJECT): New tree node.
1757         * cp-tree.h (CLEANUP_P): New macro.
1758         (SUBOBJECT_CLEANUP): Likewise.
1759         (keep_next_level): Add parameter.
1760         (get_temp_regvar): Don't declare.
1761         (emit_base_init): Remove parameter.
1762         (expand_aggr_init): Rename to build_aggr_init.
1763         (expand_vec_init): Rename to build_vec_init.
1764         (do_pushlevel): Remove.
1765         (do_poplevel): Likewise.
1766         (finish_cleanup): New function.
1767         (finish_subobject): Likewise.
1768         (stmts_are_full_exprs_p): New variable.
1769         * decl.c (keep_next_level): Add parameter.
1770         (cp_finish_decl): Use build_aggr_init, not
1771         expand_aggr_init.  Use finish_expr_stmt to expand the code.
1772         (expand_static_init): Use tree-generating, not RTL-generating,
1773         functions to handle the initialization.
1774         (start_function): Remove dead code.  Always have a momentary
1775         obstack inside the function, even before hitting the first curly
1776         brace.
1777         (cplus_expand_expr_stmt): Move calls to
1778         expand_{start,end}_target_temps into semantics.c.
1779         (cp_function): Add stmts_are_full_exprs_p.
1780         (push_cp_function_context): Save it.
1781         (pop_cp_function_context): Restore it.
1782         * decl2.c (get_temp_regvar): Move to init.c.
1783         (do_static_initialization): Use build_{aggr,vec}_init.
1784         (do_static_destruction): Fix typo in comment.
1785         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1786         * except.c (expand_throw): Use create_temporary_var.
1787         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1788         * init.c (expand_vec_init_try_block): Remove.
1789         (expand_vec_init_catch_clause): Likewise.
1790         (get_temp_regvar): New function.
1791         (begin_init_stmts): Likewise.
1792         (finish_init_stmts): Likewise.
1793         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
1794         structure here.
1795         (emit_base_init): Likewise.  Remove unused parameter.
1796         (expand_virtual_init): Likewise.
1797         (expand_cleanup_for_base): Use finish_subobject.
1798         (expand_aggr_vbase_init_1): Simplify.
1799         (construct_virtual_bases): Use tree-generating functions to build
1800         up initialization.
1801         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
1802         (expand_default_init): Likewise.
1803         (expand_aggr_init_1): Likewise.
1804         (expand_vec_init): Rename to build_vec_init.
1805         * method.c (do_build_copy_constructor): Use tree-generating
1806         functions.  Don't call clear_last_expr.
1807         (do_build_assign_ref): Likewise.
1808         (synthesize_method): Call clear_last_expr here.
1809         * parse.y (base_init): Don't call clear_last_expr here.
1810         (nodecls): Likewise.
1811         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1812         * semantics.c (do_pushlevel): Move to here.
1813         (do_poplevel): Likewise.
1814         (stmts_are_full_exprs_p): New variable.
1815         (finish_expr_stmt): Handle logic for temoprary cleanup here.
1816         (finish_for_stmt): Use finish_expr_stmt.
1817         (finish_cleanup): New function.
1818         (finish_function_try_block): Fix indentation.
1819         (finish_subobject): New function.
1820         (setup_vtbl_ptr): Call keep_next_level here.
1821         (finish_stmt_expr): Handle a block with no scope inside the
1822         statement-expression.
1823         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
1824         SUBOBJECT.
1825         * tree.c (search_tree): Handle INIT_EXPR.
1826         (mapcar): Likewise.
1827         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1828         * typeck2.c (store_init_value): Change expand_aggr_init to
1829         build_aggr_init in comment.
1830         
1831 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1833         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1835 1999-08-25  Nathan Sidwell  <nathan@acm.org>
1837         * decl2.c (handle_class_head): Be graceful about additional
1838         scope qualifiers. Adjust comments to reflect reality.
1840 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
1842         * call.c (build_conditional_expr): Fix typo.
1843         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1844         lvalue before trying to mess with the sides.
1846         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1848 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
1850         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1852 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
1854         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1855         Return arbitrary pointer or NULL.
1856         (check_eh_spec): Call __throw_type_match_rtti_2.
1857         * tinfo.h (*::dcast): Return int.  Add valp parm.
1858         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
1859         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1860         (__throw_type_match_rtti): Now just a wrapper.
1862         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1863         (init_exception_processing): Don't initialize them.
1865 1999-08-23  Paul Burchard <burchard@pobox.com>
1867         * decl.c (check_default_argument): Fix typo.
1869 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
1871         * cp-tree.def (STMT_EXPR): Fix typo in node name.
1873         * dump.c (dump_next_stmt): New function.
1874         (dequeue_and_dump): Use it.
1875         
1876         * pt.c (tsubst_copy): Make sure to initialize return value for a
1877         STMT_EXPR, even when processing_template_decl.
1878         * semantics.c (finish_stmt_expr): A statement-expression whose
1879         last statement is not an expression-statement has type `void'.  
1880         
1881 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
1883         * semantics.c (finish_stmt_expr): Fix typo in comment.
1884         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1885         (mapcar): Likewise.
1886         * init.c (build_vec_delete_1): Make the children of a permanent
1887         BIND_EXPR permanent.
1888         * pt.c (register_specialization): Don't register a specialization
1889         more than once.
1890         
1891 1999-08-18  Andrew Haley  <aph@cygnus.com>
1893         * method.c (process_overload_item): Call build_mangled_C9x_name ()
1894         for all integer parameter types larger than long long.
1896 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1898         * pt.c (redeclare_class_template): Merge default template
1899         arguments in both directions.
1901         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
1902         compiler_error message.
1904 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
1906         * cp-tree.h: Declare flag_use_repository.
1907         * pt.c (do_decl_instantiation): Don't complain about duplicate
1908         instantiation with -frepo.
1909         (do_type_instantiation): Likewise.
1911         * pt.c (push_template_decl_real): Complain about everything
1912         that isn't a valid template.
1914         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1915         affect inlines.
1917 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1919         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1920         * decl2.c (build_expr_from_tree): Handle it.
1921         * error.c (dump_expr): Likewise.
1922         * pt.c (for_each_template_parm): Likewise.
1923         (tsubst_copy): Likewise.
1924         * tree.c (search_tree): Likewise.
1925         * semantics.c (finish_pseudo_destructor_call): Create it.
1926         
1927 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
1929         * search.c (setup_class_bindings): Robustify.
1930         * typeck.c (common_type): Use same_type_p, not pointer equality,
1931         to compare types.
1933         * cp-tree.h (build_lang_field_decl): Remove.
1934         * class.c (build_vtable): Replace calls to build_lang_field_decl
1935         with build_lang_decl.
1936         (prepare_fresh_vtable): Likewise.
1937         (finish_struct_1): Likewise.
1938         (init_class_processing): Likewise.
1939         * decl.c (push_using_decl): Likewise.
1940         (init_decl_processsing): Likewise.
1941         (grokvardecl): Likewise.
1942         (build_ptrmemfunc_type): Likewise.
1943         (grokdeclarator): Likewise.
1944         (build_enumerator): Likewise.
1945         * decl2.c (grok_x_components): Likewise.
1946         (do_class_using_decl): Likewise.
1947         * except.c (call_eh_info): Likewise.
1948         * init.c (init_init_processing): Likewise.
1949         * rtti.c (expand_class_decl): Likewise.
1950         * tree.c (build_base_fields): Likewise.
1951         (build_vbase_pointer_fields): Likewise.
1952         * lex.c (build_lang_decl): Build declarations on the permanent
1953         obstack if we're building statmeent trees.
1954         (retrofit_lang_decl): Handle both the full lang_decl and also the
1955         smaller lang_decl_flags here.
1956         (build_lang_field_decl): Remove.
1957         * pt.c (push_template_decl_real): Issue errors for variable
1958         declarations that are not static members.
1960 1999-08-18  Richard Henderson  <rth@cygnus.com>
1962         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1963         (mapcar): Likewise.
1965 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1967         * cp-tree.h (back_end_hook): New variable.
1968         * decl2.c (back_end_hook): Define it.
1969         (finish_file): If it's non-NULL, call it.
1971         * decl.c (add_decl_to_level): New function.
1972         (push_local_binding): Use it.
1973         (find_binding): Fix typo in comment.
1974         (pushdecl): Use add_decl_to_level.  Put templates on the
1975         corresponding namespace-scope binding levels.
1976         * dump.c (dequeue_and_dump): Print the specializations of a
1977         template.
1978         * pt.c (push_template_decl_real): Don't push a template multiple
1979         times.
1981 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1983         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1984         (CALL_DECLARATOR_QUALS): Likewise.
1985         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1986         * decl.c (grokdeclarator): Adjust to use them.
1987         * decl2.c (grokfield): Likewise.
1988         (reparse_absdcl_as_casts): Likewise.
1989         * lex.c (make_call_declarator): Likewise.
1990         (set_quals_and_spec): Likewise.
1991         * pt.c (tsubst): Likewise.
1992         * tree.c (mapcar): Remove special hack to handle third operand of
1993         a CALL_EXPR.
1995 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
1997         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1998         * class.c (build_vtable): Use build_lang_field_decl to build the
1999         VAR_DECLs for vtables.
2000         (prepare_fresh_vtable): Likewise.
2001         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
2002         CAN_HAVE_FULL_LANG_DECL_P.
2003         (push_using_decl): Use build_lang_decl to build USING_DECLs.
2004         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
2005         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
2006         (build_lang_field_decl): Likewise.
2007         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
2008         to copy.
2009         
2010         * cp-tree.def (STMT_EXPR): New tree node.
2011         * cp-tree.h (STMT_EXPR_STMT): New macro.
2012         (store_return_init): Change prototype.
2013         (finish_named_return_value): New function.
2014         (expand_stmt): Likewise.
2015         (expand_body): Likewise.
2016         (begin_stmt_tree): Likewise.
2017         (finish_stmt_tree): Likewise.
2018         (expanding_p): New variable.
2019         (last_expr_type): Likewise.
2020         (building_stmt_tree): New macro.
2021         * decl.c (start_function): Use building_stmt_tree, not
2022         processing_template_decl, where appropriate.
2023         (store_parm_decls): Likewise.
2024         (store_return_init): Move most of the body to semantics.c.
2025         (finish_function): Use building_stmt_tree.
2026         (finish_stmt): Clear last_expr_type here.
2027         (cp_function): Add expanding_p, last_tree, last_expr_type.
2028         (push_cp_function_context): Save them.
2029         (pop_cp_function_context): Restore them.
2030         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
2031         * error.c (dump_expr): Handle STMT_EXPR.
2032         * except.c (expand_start_catch_block): Use building_stmt_tree.
2033         Use add_decl_stmt.
2034         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
2035         (do_case): Move add_tree call to semantics.c.
2036         * parse.y (return_init): Use finish_named_return_value.
2037         (for.init.statement): Use finish_expr_stmt.
2038         * parse.c: Regenerated.
2039         * pt.c (do_pushlevel): Move to semantics.c.
2040         (do_poplevel): Likewise.
2041         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
2042         (tsubst_expr): Don't expand all the way to RTL here.  Handle
2043         RETURN_INIT and CTOR_INITIALIZER.
2044         (instantiate_decl): Call expand_body after tsubst'ing into
2045         DECL_SAVED_TREE.
2046         * semantics.c (expand_stmts): New function.
2047         (expanding_p): New variable.
2048         (last_expr_type): Likewise.
2049         (finish_expr_stmt): Use building_stmt_tree.
2050         (begin_if_stmt): Likewise.
2051         (finish_if_stmt_cond): Likewise.
2052         (finish_then_clause): Likewise.
2053         (begin_else_clause): Likewise.
2054         (finish_else_clause): Likewise.
2055         (begin_while_stmt): Likewise.
2056         (finish_while_stmt_cond): Likewise.
2057         (finish_while_stmt): Likewise.
2058         (finish_do_body): Likewise.
2059         (finish_do_stmt): Likewise.
2060         (finish_return_stmt): Likewise.
2061         (begin_for_stmt): Likewise.
2062         (fnish_for_init_stmt): Likewise.
2063         (finish_for_cond): Likewise.
2064         (finish_for_expr): Likewise.
2065         (finish_for_stmt): Likewise.
2066         (finish_break_stmt): Likewise.
2067         (finish_continue_stmt): Likewise.
2068         (finish_switch_cond): Likewise.
2069         (finish_switch_stmt): Likewise.
2070         (finish_case_label): Call add_tree here if necessary.
2071         (finish_goto_statement): Use building_stmt_tree.
2072         (begin_try_block): Likewise.
2073         (begin_function_try_block): Likewise.
2074         (finish_try_block): Likewise.
2075         (finish_function_try_block): Likewise.
2076         (finish_handler_sequence): Likewise.
2077         (finish_function_handler_sequence): Likewise.
2078         (begin_handler): Likewise.
2079         (finish_handler_parms): Likewise.
2080         (finish_handler): Likewise.
2081         (begin_compound_stmt): Likewise.
2082         (finish_compound_stmt): Likewise.
2083         (finish_asm_stmt): Likewise.
2084         (finish_label_stmt): Likewise.
2085         (finish_named_return_value): New function.
2086         (setup_vtbl_ptr): Moved here from decl2.c.
2087         (do_pushlevel): Moved here from pt.c.
2088         (do_poplevel): Likewise.
2089         (begin_stmt_expr): Use building_stmt_tree.
2090         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
2091         when building_stmt_tree.
2092         (begin_stmt_tree): New function.
2093         (finish_stmt_tree): Likewise.
2094         (expand_stmt): Likewise.
2095         (expand_body): Likewise.
2096         * tree.c (build_cplus_method_type): Make sure the argument types
2097         end up on the same obstack as the METHOD_TYPE.
2098         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2099         THROW_EXPR, STMT_EXPR.
2100         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
2101         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
2102         sorry, if an unsupported node is encountered.
2103         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2104         (c_expand_return): Don't call add_tree here.
2105         
2106 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
2108         * pt.c (check_default_tmpl_args): Don't check in local scopes.
2109         (tsubst_decl): Make sure the declaration is on a saveable
2110         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2111         variable.
2112         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2113         
2114 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
2116         Speed up Koenig lookup.
2117         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
2118         to return namespaces we've looked at.
2119         * decl2.c (lookup_using_namespace): Likewise.
2120         (add_function): Don't call ovl_member.
2121         (lookup_arg_dependent): Initialize k.namespaces to the list of 
2122         namespaces seen in unqualified lookup.
2123         * call.c (equal_functions): Move here from tree.c.
2124         (joust): Use it to handle duplicate candidates.
2125         * tree.c (ovl_member): Use ==.
2127 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2129         * cp-tree.def (DECL_STMT): Make it smaller.
2130         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2131         (lang_decl): ... here.  Add next.
2132         (DECL_SAVED_TREE): Adjust accordingly.
2133         (DECL_IMPLICIT_TYPEDEF_P): New macro.
2134         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2135         (DECL_STMT_DECL): Likewise.
2136         (create_implicit_typedef): New function.
2137         (maybe_push_decl): Likewise.
2138         (tsubst_default_argument): New function.
2139         (at_function_scope_p): Likewise.
2140         (add_decl_stmt): Likewise.
2141         (push_permanent_obstack): Likewise.
2142         * call.c (convert_default_arg): Use tsubst_default_argument.
2143         * class.c (add_method): Use push_permanent_obstack.
2144         (build_self_reference): Create a TEMPLATE_DECL for the
2145         self-reference, if necessary.
2146         * decl.c (pseudo_global_level_p): Only look at the current binding
2147         level.
2148         (push_binding): Use push_permanent_obstack.
2149         (create_implicit_typedef): New function.
2150         (pushtag): Use it.
2151         (duplicate_decls): Use push_permanent_obstack.
2152         (maybe_push_decl): New function.
2153         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
2154         (start_decl_1): Remove dead code.
2155         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
2156         pseudo_global_level_p.
2157         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2158         template.
2159         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
2160         pseudo_global_level_p.
2161         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2162         a template.
2163         (get_sentry): Use push_permanent_obstack.
2164         * dump.c (dequeue_and_dump): Enable DECL_STMT.
2165         * except.c (call_eh_info): Use push_permanent_obstack.
2166         (build_eh_type_ref): Likewise.
2167         (do_pop_exception): Likewise.
2168         (expand_eh_spec): Likewise.
2169         (alloc_eh_object): Likewise.
2170         (expand_throw): Likewise.
2171         * init.c (build_java_class_ref): Likewise.
2172         * lex.c (get_time_identifier): Likewise.
2173         (free_lang_decl_chain): Correct type.
2174         (retrofit_lang_decl): Adjust accordingly.
2175         (build_lang_field_decl): Likewise.
2176         * lex.h (free_lang_decl_chain): Likewise.
2177         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2178         * parse.c: Regenerated.
2179         * pt.c (tsubst_default_arguments): New function.
2180         (retrieve_local_specialization): Likewise.
2181         (register_local_specialization): Likewise.
2182         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
2183         pseudo_global_level_p to determine whether or not a template is
2184         primary.
2185         (lookup_template_class): Likewise.  Use create_implicit_typedef.
2186         (instantiate_class_template): Call tsubst_default_arguments for
2187         member functions, if appropriate.
2188         (tsubst_default_argument): New function.
2189         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
2190         * search.c (at_function_scope_p): New function.
2191         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2192         (finish_label_stmt): Likewise.
2193         (add_decl_stmt): New function.
2194         (begin_class_definition): Likewise.
2195         (finish_typeof): Likewise.
2196         * tree.c (copy_template_template_parm): Likewise.
2197         (copy_to_permanent): Likewise.
2198         (push_permanent_obstack): Define.
2199         (mark_addressable): Use it.
2200         * typeck.c (mark_addressable): Likewise.
2201         
2202 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
2204         * cp-tree.h (init_cplus_unsave): New.
2205         (cplus_unsave_expr_now): New.
2206         * lex.c (init_parse): Call init_cplus_unsave.
2207         * tree.c (init_cplus_unsave): New.
2208         (cplus_unsave_expr_now): New.
2210 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2212         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
2213         decl_constant_value to simplify array bounds.
2215 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
2217         * lang-options.h: Add -fms-extensions.
2218         * cp-tree.h: Declare flag_ms_extensions.
2219         * decl2.c: Define it.
2220         * class.c (instantiate_type): Don't complain about taking the address
2221         of a bound member function if -fms-extensions.
2222         * typeck.c (build_unary_op): Likewise.
2223         * decl.c (grokdeclarator): Or about implicit int.
2224         * init.c (resolve_offset_ref): Or about implicit '&'.
2226 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
2228         * cp-tree.h (minimal_parse_mode): Remove.
2229         (finish_label_stmt): New function.
2230         * decl.c (saved_scope): Remove minimal parse mode.
2231         (maybe_push_to_top_level): Don't save it.
2232         (pop_from_top_level): Don't restore it.
2233         (define_label): Split out template-handling code to semantics.c.
2234         (start_decl): Don't use minimal_parse_mode.
2235         (cp_finish_decl): Likewise.
2236         (start_function): Don't increment it.
2237         (store_return_init): Don't use it.
2238         (finish_function): Don't decrement it.
2239         * parse.y (label_colon): Use finish_label_stmt throughout.
2240         * parse.c: Regenerated.
2241         * pt.c (minimal_parse_mode): Don't define it.
2242         (tsubst_expr): Use finish_label_stmt.
2243         * semantics.c (finish_label_stmt): New function.
2245         * dump.c (queue): Be careful when computing bitmasks.
2246         (dequeue_and_dump): Describe binfos as binfos, not as
2247         vectors.
2248         
2249         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
2250         throughout.     
2251         * parse.c: Regenerated.
2252         
2253         * Make-lang.in (CXX_SRCS): Remove sig.c.
2254         * Makefile.in (CXX_OBJS): Remove sig.o.
2255         (sig.o): Remove.
2256         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
2257         (CPTI_SIGNATURE_TYPE): Likewise.
2258         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
2259         (opaque_type_node): Likewise.
2260         (signature_type_node): Likewise.
2261         (sigtable_entry_type): Likewise.
2262         (flag_handle_signatures): Likewise.
2263         (lang_type): Remove is_signature, is_signature_pointer,
2264         is_signature_reference, has_opaque_typedecls,
2265         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
2266         signature_pointer_to, signature_reference_to.
2267         (IS_SIGNATURE): Remove.
2268         (SET_SIGNATURE): Remove.
2269         (CLEAR_SIGNATURE): Remove.
2270         (IS_SIGNATURE_POINTER): Remove.
2271         (IS_SIGNATURE_REFERENCE): Remove.
2272         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
2273         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
2274         (CLASSTYPE_SIGNATURE): Remove.
2275         (SIGNATURE_TYPE): Remove.
2276         (SIGNATURE_METHOD_VEC): Remove.
2277         (SIGNATURE_POINTER_TO): Remove.
2278         (SIGNATURE_REFERENCE_TO): Remove.
2279         (lang_decl_flags): Remove is_default_implementation.  Rename
2280         memfunc_pointer_to to saved_tree.
2281         (IS_DEFAULT_IMPLEMENTATION): Remove.
2282         (DECL_MEMFUNC_POINTER_TO): Remove.
2283         (DECL_MEMFUNC_POINTING_TO): Remove.
2284         (DECL_SAVED_TREE): Adjust definition.
2285         (tag_types): Remove signature_type_node.
2286         (SIGNATURE_FIELD_NAME): Remove.
2287         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
2288         (SIGNATURE_OPTR_NAME): Likewise.
2289         (SIGNATURE_SPTR_NAME): Likewise.
2290         (SIGNATURE_POINTER_NAME): Likewise.
2291         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
2292         (SIGNATURE_REFERENCE_NAME): Likewise.
2293         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
2294         (SIGTABLE_PTR_TYPE): Likewise.
2295         (SIGTABLE_NAME_FORMAT): Likewise.
2296         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
2297         (SIGTABLE_TAG_NAME): Likewise.
2298         (SIGTABLE_VB_OFF_NAME): Likewise.
2299         (SIGTABLE_VT_OFF_NAME): Likewise.
2300         (finish_base_specifiers): Change prototype.
2301         (build_signature_pointer_type): Remove.
2302         (build_signature_reference_type): Remove.
2303         (build_signature_pointer_constructor): Remove.
2304         (build_signature_method_call): Remove.
2305         (build_optr_ref): Likewise.
2306         (append_signature_fields): Likewise.
2307         (signature_error): Likewise.
2308         * call.c (build_this): Remove signature support.
2309         (build_over_call): Likewise.
2310         (build_new_method_call): Likewise.
2311         * class.c (add_implicitly_declared_members): Likewise.
2312         (finish_struct_1): Likewise.
2313         (finish_struct): Likewise.
2314         * cvt.c (cp_convert_to_pointer): Likewise.
2315         (convert_to_pointer_force): Likewise.
2316         (ocp_convert): Likewise.
2317         * decl.c (sigtable_decl_p): Remove.
2318         (init_decl_processing): Remove support for signatures.
2319         (cp_finish_decl): Likewise.
2320         (grokdeclarator): Likewise.
2321         (grokparms): Likewise.
2322         (xref_tag): Likewise.
2323         (start_function): Likewise.
2324         (start_method): Likewise.
2325         * decl2.c (finish_sigtable_vardecl): Remove.
2326         (flag_handle_signatures): Remove.
2327         (lang_f_options): Remove handle-signatures.
2328         (grokfield): Remove support for signatures.
2329         (grokbitfield): Likewise.
2330         (finish_file): Likewise.
2331         (reparse_absdcl_as_casts): Likewise.
2332         * error.c (dump_type_real): Likewise.
2333         (dump_function_decl): Likewise.
2334         * friend.c (make_friend_class): Likewise.
2335         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2336         * hash.h: Regenerated.
2337         * init.c (build_new_1): Remove support for signatures.
2338         * lang-options.h: Remove -fhandle-signatures,
2339         -fno-handle-signatures. 
2340         * lex.c (init_parse): Remove support for signatures.
2341         (yyprint): Likewise.
2342         * lex.h (rid): Remove RID_SIGNATURE.
2343         * method.c (build_decl_overload_real): Remove support for
2344         signatures. 
2345         (hack_identifier): Likewise.
2346         * parse.y (base_class): Likewise.
2347         (base_class.1): Likewise.
2348         (access_specifier): Likewise.
2349         * search.c (lookup_member): Likewise.
2350         * semantics.c (finish_qualified_object_call_expr): Likewise.
2351         (finish_template_type_parm): Likewise.
2352         (begin_class_definition): Likewise.
2353         (finish_base_specifier): Likewise.
2354         * sig.c: Remove.
2355         * tree.c (build_cplus_method_type): Remove support for signatures.
2356         * typeck.c (require_complete_type): Likewise.
2357         (c_sizeof): Likewise.
2358         (c_alignof): Likewise.
2359         (build_object_ref): Likewise.
2360         (build_component_ref): Likewise.
2361         (build_indirect_ref): Likewise.
2362         (build_c_cast): Likewise.
2363         (build_modify_expr): Likewise.
2364         (convert_for_initialization): Likewise.
2365         * typeck2.c (signature_error): Remove.
2366         (store_init_value): Remove support for signatures.
2367         (digest_init): Likewise.
2368         (build_x_arrow): Likewise.
2369         (build_functional_cast): Likewise.
2370         * xref.c (GNU_xref_decl): Likewise.
2371         
2372 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2374         * lex.c (do_identifier): Remove unnecessary lookup of class field.
2376 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2378         * decl2.c (set_decl_namespace): Do not complain about non-matching
2379         decls if processing a template.
2381 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
2383         * decl.c (build_ptrmemfunc_type): Handle qualified
2384         pointer-to-member types here.
2385         * tree.c (cp_build_qualified_type_real): Simplify handling here.
2387 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2389         * lex.c (lang_identify): Likewise.
2391 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
2393         * Makefile.in: Update dependencies.
2394         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2395         NULL_RTX.
2396         * decl.c: Include "function.h"
2397         (cleanup_label, return_label): Delete declarations.
2398         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2399         (finish_function): Rename last_parm_insn variable to
2400         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
2401         * decl2.c: Include "function.h".
2402         (rtl_expr_chain): Delete declaration.
2403         * method.c: Include "function.h"
2404         * tree.c (build_vbase_pointer_fields): Don't initialize
2405         DECL_SAVED_INSNS with NULL_RTX.
2406         * typeck.c: Include "function.h"
2408 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
2410         * semantics.c (begin_function_try_block, finish_function_try_block,
2411         finish_function_handler_sequence): New fns.
2412         * parse.y (function_try_block): Use them.
2413         * pt.c (instantiate_decl): Likewise.
2415         * cp-tree.h: Declare in_function_try_handler.
2416         * decl.c: Define it.
2417         (start_function): Clear it.
2418         (struct cp_function, push_cp_function_context): Save it.
2419         (pop_cp_function_context): Restore it.
2420         * parse.y (function_try_block): Set and clear it.
2421         * except.c (expand_end_catch_block): Rethrow if we reach the end
2422         of a function-try-block handler in a ctor or dtor.
2423         * typeck.c (c_expand_return): Complain about returning from a
2424         function-try-block handler of a ctor.
2426         * parse.y (function_try_block): Call end_protect_partials
2427         before expand_start_all_catch.
2429 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
2431         * decl.c (struct binding_level): Add eh_region field.
2432         (push_binding_level): Set it.
2433         (define_label): Complain about jumping into an EH block.
2435         * ptree.c (print_lang_type): Print the real type of a PMF.
2436         Print what exceptions a fn type throws.
2438 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2440         * class.c (count_fields, add_fields_to_vec): Add static prototype.
2442         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2443         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2444         char*.
2446         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2447         Constify a char*.
2449         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2450         char*.
2452         * dump.c (queue_and_dump_index, dump_int, dump_string,
2453         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2454         a char*.
2455         (dump_stmt): Add static prototype.
2457         * errfn.c (cp_thing): Constify a char*.
2459         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2460         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2461         dump_expr): Constify a char*.
2463         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2464         read_line_number): Add static prototype.
2465         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2466         (real_yylex): Move label `letter' into the scope where it is used.
2468         * method.c (build_mangled_template_parm_index, build_overload_int,
2469         build_decl_overload_real, get_id_2): Constify a char*.
2471         * search.c (check_final_overrider): Make static.
2473         * typeck.c (composite_pointer_type): Constify a char*.
2475 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2477         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2478         we're looking at a class.
2480         * decl.c (lookup_name_real): Set the complain flag if we're
2481         looking for a namespace member.
2483         * lex.c (real_yylex): We can have a number with no digits.
2485         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2487         * search.c (binfo_from_vbase): New fn.
2488         * cp-tree.h: Declare it.
2489         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2490         from pointer to member of virtual base.  
2491         * typeck.c (get_delta_difference): Likewise.
2493 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
2495         * pt.c (tsubst): Use build_index_type to build in-template array
2496         index type.  Fixes g++.oliva/dwarf1.C.
2497         * decl.c (grokdeclarator): Likewise, just for consistency, as it
2498         doesn't seem to trigger the bug without it.
2500 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2502         * typeck2.c (add_exception_specifier): Use complete_type.
2504 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
2506         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2507         (dump_binary_op): Bulletproof.
2508         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2509         * tree.c (search_tree): Don't enumerate all the nodes of classes
2510         `1', `2', and `<'; handle them generically.  Don't be sorry about
2511         "unrecognized tree codes"; just abort.
2512         (no_linkage_check): Don't do linkage checks for templates.
2513         
2514         * tree.c (cp_build_qualified_type_real): Handle
2515         pointer-to-member-function types correctly.
2517 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
2519         * decl.c (pushdecl): Only give an error for shadowing a parm 
2520         from *this* function.
2522 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
2524         * typeck2.c: Update URLs and mail addresses.
2526 1999-08-04  Nathan Sidwell  <nathan@acm.org>
2528         * cp-tree.h (empty_except_spec): New global var.
2529         (compexcepttypes): Remove prototype.
2530         (comp_except_specs): Prototype new global function.
2531         (add_exception_specifier): Prototype new global function.
2532         * decl.c (empty_except_spec): Define new global var.
2533         (duplicate_decls): Use comp_except_specs, reword error message.
2534         (init_decl_processing): Initialize empty_except_spec.
2535         Adjust build_exception_variant calls.
2536         * parse.y (exception_specification_opt): Use empty_except_spec.
2537         (ansi_raise_identifier): Call check_for_new_type.
2538         (ansi_raise_identifiers): Use add_exception_specifier.
2539         * pt.c (tsubst): Use add_exception_specifier to build exception
2540         specifier.
2541         * search.c (check_final_overrider): New static function, broken
2542         out of get_matching_virtual. Check throw specifiers, reword
2543         diagnostics.
2544         (get_matching_virtual): Use check_final_overrider.
2545         * tree.c (build_exception_variant): Use comp_except_specs.
2546         * typeck.c (compexcepttypes): Remove.
2547         (comp_except_types): New static function, helper for
2548         comp_except_specs. Compare two types as exception specifiers.
2549         (comp_except_specs): New global function, compare two exception
2550         specifiers.
2551         (comptypes): Adjust for comp_except_specs.
2552         * typeck2.c (add_exception_specifier): New global function.
2553         
2554         * class.c (check_for_override): Reword error message.
2556 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2558         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2559         * cp-tree.h (struct lang_type): Added non_pod_class flag.
2560         (CLASSTYPE_NON_POD_P): New macro to access it.
2561         * class.c (finish_struct_1): Determine non-PODness.
2562         Check for arrays of pointers (-Weffc++).
2563         Remove array inspection duplicated code.
2564         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2565         Use CLASSTYPE_NON_POD_P.
2567 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2569         * class.c (duplicate_tag_error): Preserve template information.
2571 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2573         * decl.c (start_enum): Show location of previous definition.
2574         * parse.y (enumlist_opt): New reduction.
2575         (structsp): Simplify enum rules to use enumlist_opt.
2577 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2579         * lex.c (yyprint): Handle PFUNCNAME.
2581         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2582         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2584 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
2586         * decl.c (start_decl): Set attributes before duplicate_decls call.
2588 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2590         * Make-lang.in (CXX_SRCS): Add dump.c.
2591         * Makefile.in (CXX_OBJS): Add dump.o.
2592         (dump.o): New target.
2593         * cp-tree.h (DECL_CONV_FN_P): Document.
2594         (DECL_OVERLOADED_OPERATOR_P): New function.
2595         (TYPE_PTRMEM_CLASS_TYPE): New macro.
2596         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2597         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2598         (ASM_VOLATILE_P): New macro.
2599         (STMT_LINENO): Likewise.
2600         (cp_namespace_decls): New function.
2601         (dump_node_to_file): New function.
2602         * decl.c (cp_namespace_decls): New function.
2603         (walk_namespaces_r): Use it.
2604         (wrapup_globals_for_namespace): Likewise.
2605         * decl2.c (flag_dump_translation_unit): New variable.
2606         (lang_decode_option): Handle -fdump-translation-unit.
2607         (finish_file): If flag_dump_translation_unit is set, dump the
2608         translation unit.
2609         * dump.c: New file.
2610         * lang-options.h: Add -fdump-translation-unit.
2611         * pt.c (tsubst_template_parms): Robustify.
2612         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2613         (tsubst_expr): Use STMT_LINENO.
2614         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
2615         for invalid cv-qualifiers even while building templates.
2616         
2617 1999-08-02  Richard Henderson  <rth@cygnus.com>
2619         * call.c: Include defaults.h instead of expr.h.
2620         * decl.c: Likewise.
2621         * pt.c: Likewise.
2622         * typeck.c: Include defaults.h.
2624 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2626         * lex.c (errorcount, sorrycount): Don't declare.
2627         * repo.c (errorcount, sorrycount): Likewise.
2628         * typeck2.c (errorcount, sorrycount): Likewise.
2630 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
2632         * call.c (convert_default_arg, build_over_call): Change all uses of
2633         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2634         Ensure expr.h is included.
2635         * decl.c (grokparams): Ditto.
2636         * pt.c (tsubst_decl): Ditto.
2637         * typeck.c (convert_arguments): Ditto.
2639 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
2641         * class.c (mark_overriders): Fix order of args to overrides.
2642         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
2643         functions with the same name.
2645 1999-08-02  Richard Henderson  <rth@cygnus.com>
2647         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2649 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
2651         * call.c (build_conditional_expr): Fix typo in comment.
2653 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
2655         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2656         case_stack; use in_control_zone_p.
2657         * typeck.c (c_expand_return): Likewise.
2659 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
2661         * except.c (catch_clauses): Delete declaration.
2663 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
2665         * call.c (build_conditional_expr): Call convert_from_reference to
2666         avoid reference/non-reference type confusion.  Fix typo.
2668 1999-07-30  Richard Henderson  <rth@cygnus.com>
2670         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2671         * cp-tree.h (initializer_constant_valid_p): Remove.
2673 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
2675         * call.c (conditional_conversion): Don't build BASE_CONVs for
2676         conversions between things that have the same type.
2677         (build_conditional_expr): Tweak.
2678         (convert_like): Some BASE_CONVs really do require the generation
2679         of code.
2680         
2681         * init.c (perform_member_init): Don't go through build_modify_expr
2682         for simple initializations.
2684 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
2686         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2687         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2688         virtual functions and MI.  Simplify.
2690         * method.c: Remove prototype for largest_union_member.
2691         * pt.c (determine_specialization): Fix uninitialized warning.
2692         * lex.c (real_yylex): Likewise.
2694 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
2696         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2697         here too.
2699         * cp-tree.h (BINFO_VIRTUALS): Document new format.
2700         * class.c (modify_one_vtable): Change prototype accordingly.
2701         (modify_all_vtables): Likewise.
2702         (modify_all_direct_vtables): Likewise.
2703         (modify_all_indirect_vtables): Likewise.
2704         (build_vtable_entry_for_fn): New function.
2705         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2706         (modify_vtable_entry): Likewise.
2707         (add_virtual_function): Likewise.
2708         (build_vtbl_initializer): New function.
2709         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2710         (fixup_vtable_deltas1): Likewise.
2711         (fixup_vtable_deltas): Likewise.
2712         (override_one_vtable): Likewise.
2713         (finish_struct_1): Likewise.
2715         * error.c (dump_expr): Likewise.
2716         * search.c (get_abstract_virtuals_1): Likewise.
2717         (get_abstract_virtuals): Likewise.
2718         (expand_upcast_fixups): Likewise.
2719         * tree.c (debug_binfo): Likewise.
2720         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2721         __pure_virtual here.
2722         
2723 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2725         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2726         as per 1999-07-26 change.
2728         * typeck.c (c_sizeof): Don't allow non-static data members.
2729         (expr_sizeof): Likewise.
2731 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
2733         * input.c (feed_input): Only touch lineno and input_filename
2734         if !USE_CPPLIB.  Save the old values before setting the new ones.
2736         * input.c (feed_input): Add file, line parms.
2737         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2738         (real_yylex): Check linemode before input_redirected().
2740         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2741         from op new to warning.
2743 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2745         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2746         * call.c: All uses changed.
2747         * typeck.c: Likewise.
2749 1999-07-26  Nathan Sidwell  <nathan@acm.org>
2751         * exception.cc (__cplus_type_matcher): Match __eh_matcher
2752         prototype.
2754 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2756         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2757         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2758         (strip_top_quals): Declare.
2759         (ncp_convert): Likewise.
2760         (type_after_usual_arithmetic_converions): Likewise.
2761         (composite_pointer_type): Likewise.
2762         * call.c (strip_top_quals): Don't make it static.
2763         (promoted_arithmetic_type_p): New function.
2764         (conditional_conversion): Likewise.
2765         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2766         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
2767         for converting a type to itself.
2768         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2769         (implicit_conversion): Make sure the from and to types are
2770         complete.
2771         (add_builtin_candidate): Correct handling of ?: operator.
2772         (add_builtin_candidates): Improve documentation.
2773         (build_conditional_expr): New function.
2774         (can_convert): Implement in terms of can_convert_arg.
2775         (ncp_convert): New function.
2776         * typeck.c (type_after_usual_arithmetic_conversions): New
2777         function, split out from common_type.
2778         (composite_pointer_type): New function, split out from
2779         build_conditional_expr.
2780         (common_type): Use type_after_usual_arithmetic_conversions.
2781         Remove redundant attribute merging.
2782         (comptypes): Tidy.  Handle COMPLEX_TYPE.
2783         (build_binary_op_nodefault): Use null_ptr_cst_p.
2784         (build_conditional_expr): Remove.
2785         (convert_for_assignment): Use new conversion functions.
2786         
2787         * cp-tree.h (abstract_virtuals_error): Change declaration.
2788         * typeck2.c (abstract_virtuals_error): Check to see if an error
2789         ocurred, and return a boolean value accordingly.
2790         (build_functional_cast): Adjust accordingly.
2791         * class.c (finish_struct_1): Likewise.
2792         * cvt.c (ocp_convert): Likewise.
2793         * decl.c (cp_finish_decl): Likewise.
2794         (grokparams): Likewise.
2795         (grok_op_properties): Likewise.
2796         (start_function): Likewise.
2797         * init.c (build_new_1): Likewise.
2799         * pt.c (unify): Don't get confused by pointers-to-member functions.
2801         * search.c (build_cplus_new): Robustify.
2802         
2803 1999-07-24  Richard Henderson  <rth@cygnus.com>
2805         * gxx.gperf (__builtin_va_arg): New.
2806         * parse.y (VA_ARG): New token.
2807         (unary_expr): Recognize it.
2809 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
2811         * g++FAQ.texi: Deleted per Joe Buck's request.
2812         * Makefile.in: Corresponding changes.
2814 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
2816         * lex.c: Sync with C frontend.
2817         (whitespace_cr): New fn.
2818         (skip_white_space): Use it.
2819         (init_parse): Reorder.
2820         (yyprint): Support CONSTANT.
2821         (pragma_getc, pragma_ungetc): Bring back.
2822         (read_line_number): Change in_system_header directly.
2823         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2824         (parse_float): Update to C version.
2825         (yylex): Handle '$' under the letter case.
2826         Remove looking_for_typename handling.
2827         Support hex floating point constants.
2828         Follow C's lead for choosing type of integer constants.
2829         Rearrange stuff to match C frontend.
2830         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2831         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2833 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
2835         * call.c (reference_binding): Tweak.
2836         (mayble_handle_implicit_object): Use direct_reference_binding to
2837         create the right implicit conversion sequence.
2839 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
2841         * pt.c (convert_nontype_argument): Don't call decl_constant_value
2842         if we're converting to a reference type.
2844         * call.c (NEED_TEMPORARY_P): New macro.
2845         (standard_conversion): Set it, for derived-to-base conversions.
2846         (reference_related_p): New function.
2847         (reference_compatible_p): Likewise.
2848         (convert_class_to_reference): Likewise.
2849         (direct_reference_binding): Likewise.
2850         (reference_binding): Rework for standards-compliance.
2851         (convert_like): Adjust accordingly.
2852         (maybe_handle_ref_bind): Simplify; the right conversion sequences
2853         are now built up in reference_binding.
2854         (initialize_reference): New function.
2855         * cp-tree.h (ICS_USER_FLAG): Document.
2856         (ICS_THIS_FLAG): Likewise.
2857         (ICS_BAD_FLAG): Likewise.
2858         (NEED_TEMPORARY_P): Likewise.
2859         (cp_lvalue_kind): New type.
2860         (real_lvalue_p): Return it.
2861         * error.c (dump_expr): Provide more accurate representation for
2862         AGGR_INIT_EXPRs.
2863         * init.c (expand_default_init): Do not try to perform implicit
2864         conversions for a brace-enclosed initializer.
2865         * search.c (lookup_conversions): Document.
2866         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
2867         appropriately.
2868         (real_lvalue_p): Adjust accordingly.
2869         (lvalue_p): Likewise.
2870         (build_cplus_new): Don't allow the creation of an abstract class.
2871         * typeck.c (convert_for_initialization): Use initialize_reference.
2872         
2873 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
2875         * lex.c (real_yylex) : Correct the test for overflow when lexing
2876         integer literals.
2878 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
2880         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2881         not DECL_BUILT_IN, to determine if a function is internally declared.
2882         (duplicate_decls): Likewise.  Improve handling of builtins.
2883         (push_overloaded_decl): Remove special handling of builtins.
2885         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2887         * decl.c (grokdeclarator): Pull out decl_constant_value in
2888         templates, too.
2890         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2891         * cp-tree.h, pt.c, semantics.c: Adjust.
2892         * method.c (largest_union_member): Remove.
2894         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2896         * lex.c (token_getch, token_put_back): New fns.
2897         (real_yylex): Use them.
2899         * lex.c (lang_init): Generalize.
2900         (lang_init_options): Tell cpplib this is C++.
2901         (nextchar): Remove.  Replace uses with put_back.
2902         (skip_white_space): Handle linemode here.  Optimize for cpplib.
2903         (extend_token_buffer_to): New fn.
2904         (extend_token_buffer): Use it.
2905         (read_line_number, check_newline): Just deal with tokens.
2906         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
2907         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2908         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2909         * parse.y (PAREN_STAR_PAREN): Remove.
2910         * input.c: Don't use the putback machinery with cpplib.
2911         (sub_getch): Fold back into getch.
2912         (getch): Don't handle linemode here.
2913         (feed_input): Unget any text in the token buffer.
2915         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2916         nextyychar, nextyylval): Remove.
2918 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
2919             Jason Merrill  <jason@yorick.cygnus.com>
2921         * lex.c (indent_level): New variable.
2922         (init_parse): Set cpp_token to CPP_DIRECTIVE.
2923         (consume_string): Make this smart about USE_CPPLIB.
2924         (yyungetc): Use put_back function.
2925         (pragma_getc, pragma_ungetc): Functions deleted.
2926         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2927         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2928         pragma_ungetc.
2929         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2930         Also, clean up cases where we redundantly set token_buffer[0].
2931         (read_line_number): New fn.
2932         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2933         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2934         (sub_getch): Conditionalize out code that's not appropriate if
2935         USE_CPPLIB.
2936         (put_back): Rewrite in case USE_CPPLIB is defined.
2937         (input_redirected): Ditto.
2939 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2941         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2942         c_global_trees and accessor macros defined in c-common.h.
2943         (cp_tree_index): New enumeration.
2944         (cp_global_trees): Declare new array.  Add accessor macros for it, and
2945         delete declarations of tree nodes replaced by it.
2946         (builtin_function): Delete macro, add declaration for new function.
2947         Include c-common.h.
2948         * decl.c: Delete definitions for tree nodes that were replaced by
2949         cp_global_trees and c_global_trees.
2950         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2951         to generate the common builtins here.
2952         (builtin_function): New function.
2953         * decl2.c (abort_fndecl): Delete declaration.
2954         * except.c (expand_builtin_return_address): Delete declaration.
2955         (builtin_return_address_fndecl): Delete variable.
2956         (const_ptr_type_node): Delete declaration.
2957         * lex.c (cons_up_default_function): Delete declaration of
2958         void_list_node.
2959         * parse.y (void_list_node): Delete declaration.
2960         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2961         Delete variables.
2962         (const_string_type_node): Delete declaration.
2963         * search.c (abort_fndecl): Delete declaration.
2964         * Makefile.in: Update dependencies.
2966 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
2968         * pt.c (check_default_tmpl_args): Move test for missing default
2969         arguments here, from ...
2970         (end_template_parm_list): Here.
2972 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
2974         * decl.c (lookup_nested_type): Remove.
2975         (pushtag): Don't call it.
2977 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
2979         * Makefile.in (INTERFACE): Bump to 2.
2981 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
2982         
2983         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2984         instructions to gcc.gnu.org.  Removed e-mail address.
2986 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
2988         * pt.c (determine_specialization): Tighten error-checking.
2989         (end_template_parm_list): Likewise.
2991 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
2993         * pt.c (check_default_tmpl_args): Handle friends defined in the
2994         class just like member functions defined in the class.
2996 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2997             Jason Merrill  <jason@yorick.cygnus.com>
2999         * cp-tree.h (struct lang_decl): Added field for storing sorted
3000         FIELD_DECLs (used in TYPE_DECLs).
3001         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
3002         (DECL_SORTED_FIELDS): New macro.
3003         * class.c (method_name_cmp): New function.
3004         (finish_struct_methods): Modified to support sorting and searching
3005         methods.
3006         (finish_struct_anon): Changed code in inner loop to use ELT rather 
3007         than UELT (which required an extra indirection for every reference).
3008         (field_decl_cmp): New function to support sorting FIELD_DECLs.
3009         (finish_struct_1): Sort fields.
3010         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
3011         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
3012         Also, switch to using array indexing rather than a changing pointer.
3013         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
3014         DECL_SORTED_FIELDS.
3016 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
3018         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
3019         casts in system headers or extern "C" blocks.
3021         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
3022         errors to pedwarn.
3024 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
3026         * decl2.c (write_virtuals): Deleted declaration.
3027         * cp-tree.h (write_virtuals): Deleted extern declaration.
3028         * class.c (finish_struct_1): Removed #if 0'd code that mentions
3029         write_virtuals.
3030         * semantics.c (begin_class_definition): Rewrite code to not depend
3031         on write_virtuals.
3033         * lex.c (cp_pragma_interface): New function.
3034         (cp_pragma_implementation): Likewise.
3035         (handle_cp_pragma): Call them.
3037         * typeck.c (comptypes): Simplify C code in look_hard.
3039         * xref.c (PALLOC): Use xcalloc, not calloc.
3040         (SALLOC): Use xmalloc, not malloc.
3042         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
3044         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
3045         is NO_DEBUG.
3047         * decl.c (duplicate_decls): If a redeclaration doesn't match the
3048         initial declaration, then don't save the inline info and by all
3049         means don't mark the function as a builtin function.
3051         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
3052         CURRENT_CLASS_TYPE is 0.
3054         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
3055         NULL_TREE.
3057         * ptree.c (print_lang_type): Added vtable-needs-writing.
3059 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
3061         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
3063 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
3065         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3066         Merged into c-common.
3068 1999-07-05  Dave Brolley  <brolley@cygnus.com>
3070         * lex.c (errorcount): Declare it.
3071         (finish_parse): Update errorcount for when using CPPLIB.
3073 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
3075         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
3076         parameters.
3077         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
3078         * decl.c (push_class_binding): Use it.
3079         (lookup_name_real): Likewise.
3081 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
3083         * cp-tree.h (widest_integer_literal_type_node,
3084         widest_unsigned_literal_type) : New.
3085         * decl.c (widest_integer_literal_type_node,
3086         widest_unsigned_literal_type) : New.
3087         (init_decl_processing): Handle/use the two new types.
3088         * lex.c (real_yylex): Same.
3089         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3090         Same. 
3092 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
3094         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3095         to anonymous cv-qualified types.
3097 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
3099         * lex.c (real_yylex) : Change integer literal overflow handling to
3100         be like c-lex.c.
3102         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3104 1999-06-28  Richard Henderson  <rth@cygnus.com>
3106         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3108 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
3110         * error.c (dump_type_real): Handle TREE_LIST again.
3112         * typeck.c (comp_target_parms): Don't complain about 
3113         converting from () to (...) if !flag_strict_prototype.
3115         * decl.c (grokdeclarator): Update the names of all variants when
3116         de-anonymizing.
3118 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
3120         * init.c (expand_aggr_vbase_init): Rename to
3121         construct_virtual_bases.  Conditionalize construction here, 
3122         rather than ...
3123         (emit_base_init): Here.
3125 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
3127         * semantics.c (finish_asm_statement): Apply decay conversions to
3128         input operands.
3130         * decl.c (expand_static_init): When building an anonymous function
3131         for use with atexit, compute its body before and after entering
3132         the function.
3134         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3135         EXIT_EXPR.
3136         
3137 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
3139         * init.c (expand_aggr_vbase_init): Add flag parameter.
3140         (build_partial_cleanup_for): Remove, inlining into ..
3141         (expand_cleanup_for_base): ... here.  Take flag parameter.
3142         (emit_base_init): Pass the in_chrg parameter to
3143         emit_aggr_vbase_init. 
3144         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3145         
3146 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
3148         * decl2.c (import_export_decl): Use same_type_p, rather than
3149         relying on pointer-equality for types.
3151         * method.c (do_build_copy_constructor): Simplify.
3153         * call.c (build_method_call): Remove bogus code for two-argument
3154         delete.
3155         * init.c (build_new_1): Expand on comment, and remove dead code.
3157         * init.c (expand_cleanup_for_base): New function, split out
3158         from ...
3159         (emit_base_init): Here.
3160         (expand_aggr_vbase_init): Use it.
3162 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
3164         * cp-tree.h (class_cache_firstobj): Declare.
3165         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3166         * class.c (permanent_obstack): Remove declaration.
3167         (class_cache_firstobj): Make it global.
3168         (add_method): Don't use permanent_obstack directly.
3169         (pushclass): Only free the class_cache_obstack if we know how far
3170         back to free it.
3171         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3172         * decl.c: Remove dead comment.
3173         (saved_scope): Add class_cache_firstobj.
3174         (push_to_top_level): Save it.
3175         (pop_from_top_level): Restore it.
3176         (push_class_level_binding): Use push_cache_obstack, not
3177         maybe_push_cache_obstack.
3178         * search.c (push_class_decls): Likewise.
3179         
3180 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3182         * pt.c (tsubst_friend_function): Push into namespace of friend
3183         function before pushdecl'ing it.
3185 1999-06-14  Nathan Sidwell  <nathan@acm.org>
3187         * call.c (build_new_op): Remove REF_BIND from all operands.
3189 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
3191         * init.c (build_new_1): Look up operator delete even if there was
3192         no explicit new placement.
3194 1999-06-08  Nathan Sidwell  <nathan@acm.org>
3196         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3197         of ...
3198         (build_throw): ... here. Call it.
3199         (process_start_catch_block): Call it.
3201 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
3203         * search.c (convert_pointer_to_single_level): Reimplement without
3204         using get_binfo.
3206 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
3208         * method.c (is_back_referenceable_type): Back-reference bools when
3209         not squangling.
3211 1999-06-07  Dave Brolley  <brolley@cygnus.com>
3213         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
3214         * input.c (putback_buffer): New structure type.
3215         (putback): Replaces putback_char member.
3216         (putback): Replaces putback_char static variable.
3217         (feed_input): Use putback.
3218         (end_input): Use putback.
3219         (sub_getch): Use putback.
3220         (put_back): Use putback.
3222 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
3224         * decl.c (grokdeclarator): Fix typo in last change.
3226 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
3228         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
3229         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
3231 1999-06-04  Nathan Sidwell  <nathan@acm.org>
3233         * except.c (build_throw): Check throw expression validity.
3235 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
3237         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
3238         just because flag_signed_bitfields is false.
3240 1999-06-03  Nathan Sidwell  <nathan@acm.org>
3242         * semantics.c (begin_class_definition): Update the struct's
3243         location here ...
3244         * class.c (finish_struct): ... rather than here.
3246         * decl.c (make_typename_type): Don't rely on uninitialized
3247         variable.
3249 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3251         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
3253 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
3255         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
3256         and friends rather than messing with current_obstack directly.
3257         (cp_build_qualified_type_real): Rework ARRAY_TYPE
3258         allocation to match practice throughout the rest of the 
3259         compiler.
3261 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
3263         * lex.c (make_lang_type): Create TYPE_BINFO for
3264         TEMPLATE_TYPE_PARMs just like for non-template types.
3266         * decl.c (start_decl): Move checks on initialization to ...
3267         (cp_finish_decl): Here.  Tidy formatting slightly.
3269 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3271         * decl.c (add_binding): Don't complain about a redeclaration of a
3272         semantically identical typedef in a local scope.
3274 1999-05-28  Nathan Sidwell  <nathan@acm.org>
3276         * decl.c (complete_array_type): Allocate off same obstack. Fix
3277         DO_DEFAULT comment to match reality.
3279         * friend.c (make_friend_class): Fix diagnostic typo.
3281 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3283         * decl.c (lookup_namespace_name): Handle getting a
3284         TEMPLATE_ID_EXPR.
3285         (expand_static_init): Don't call pushdecl for implicitly declared
3286         `atexit' used to register destructors.
3288 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
3290         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
3291         intialize a vtable.
3293         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
3294         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
3295         by combining TEMPLATE_INFO and LEVEL into a single union.
3296         (DECL_TEMPLATE_INFO): Reformat.
3297         (DECL_SAVED_TREE): Document.
3298         (DECL_TEMPLATE_INJECT): Remove.
3299         * class.c (finish_struct): Remove code to deal with
3300         DECL_TEMPLATE_INJECT. 
3302         * decl.c (maybe_process_template_type_declaration): Handle all new
3303         types in templates uniformly.
3304         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
3305         DECL_CONTEXT.
3306         * pt.c (lookup_template_class): Inject template instantiations of
3307         forward-declarations.
3308         (instantiate_class_template): Remove code processing
3309         DECL_TEMPLATE_INJECT.
3310         
3311         * pt.c (lookup_template_class): Tweak lookup to find member
3312         templates.
3314         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3315         ASM_CV_QUAL.
3316         * semantics.c (finish_asm_stmt): Make strings permanent if they're
3317         used in a template.
3318         
3319 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
3321         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3322         parts of pointer to data member types.
3324 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
3326         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3327         and then make it look like `abort'.  Just use `abort' instead.
3328         
3329         * typeck.c (build_static_cast): Don't allow static_casts that cast
3330         away constness.
3331         (casts_away_constness_r): New function.
3332         (casts_away_constness): Likewise.
3334         * decl.c (lookup_tag): Remove code no longer needed after
3335         name-lookup improvements.
3336         * decl2.c (handle_class_head): Make error-recovery more robust.
3337         * friend.c (make_friend_class): Reject templated typename types.
3338         * lex.c (is_global): A template parameter isn't global.
3339         * parse.y (class_head): Robustify.
3340         * parse.c: Regenerated.
3341         
3342 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
3344         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3345         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
3346         
3347         * cp-tree.h (push_nested_namespace): Declare.
3348         (pop_nested_namespace): Likewise.
3349         * decl.c (push_nested_namespace): New function.
3350         (pop_nested_namespace): Likewise.
3351         * pt.c (instantiate_class_template): Use them.
3353         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3355         * cp-tree.h (cplus_expand_constant): Declare.
3356         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3357         converted from one pointer-to-object type to another.
3358         * expr.c (cplus_expand_constant): Don't make it static.
3359         * typeck.c (build_component_ref): Don't crash when presented with
3360         a component which is a TEMPLATE_DECL.
3361         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
3362         cast from a pointer-to-member constant to its own type does not
3363         result in a valid non-type template argument.
3365 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
3366             Nathan Sidwell  <nathan@acm.org>
3367         
3368         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3369         * cp-tree.h: Fix typo in documentation on pointers-to-members.
3370         (cp_build_qualified_type): Make it a macro.
3371         (cp_build_qualified_type_real): Declare.
3372         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
3373         problem with template parameters and restrict-qualification.
3374         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3375         * hash.h: Regenerated.
3376         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3377         the enumeration.
3378         (NORID): Remove definition.
3379         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3380         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
3381         (fn_type_unification): Check that the function type resulting from
3382         the deduction is legal.
3383         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3384         (unify): Use cp_build_qualified_type_real.
3385         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3386         (cp_build_qualified_type): Rename to ...
3387         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3388         and modify appropriately.
3389         
3390         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3391         reveal optimization opportunities.
3393         * pt.c (tsubst): Don't issue error messages when we're not
3394         complaining, even if we see a qualified function type.
3395         (check_cv_quals_for_unify): Don't allow a qualified function
3396         type.
3398 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3400         * class.c (instantiate_type): Downgrade errors for object-dependent
3401         memfn refs to pedwarn.
3403 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3405         * decl.c (grokdeclarator): Don't treat [] as indicating a
3406         zero-sized array in a typedef.
3408         * call.c (build_object_call): Don't look at DECL_NAME for a type.
3409         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3410         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3412         * pt.c (for_each_template_parm): Rework to match documentation.
3413         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3415 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3417         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3419         * class.c (finish_base_struct): Allow non-COM bases for COM classes
3420         except at the leftmost position.
3421         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3422         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3423         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3425         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3426         (build_cplus_new): Make sure that what we return is of the right type.
3428 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3430         * cp-tree.h (make_ptrmem_cst): New function.
3431         * expr.c (cplus_expand_constant): Split out from ...
3432         (cplus_expand_expr): Here.  Use cplus_expand_constant.
3433         (init_cplus_expand): Set lang_expand_constant.
3434         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3436         * tree.c (make_ptrmem_cst): Define.
3437         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3438         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3440 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3442         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3444         * decl2.c (start_static_storage_duration_function): Fix comment.
3445         (finish_file): Create static storage duration functions lazily.
3447 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3449         Implement anonymous structs.
3450         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3451         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3452         * class.c (finish_struct_1): Remove redundant check for anon struct.
3453         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3454         (check_tag_decl): Check for anonymous struct here.
3455         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3456         * init.c (sort_member_init, emit_base_init): Handle getting fields
3457         as well as names in current_member_init_list.
3458         (perform_member_init): Handle getting an anon aggr.
3459         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3460         (do_build_copy_constructor): Likewise.
3462 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3464         * tree.c (cp_build_qualified_type): Don't allow qualified function
3465         types.
3467 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
3469         * gxxint.texi: Fix typo.
3471 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3473         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3474         * class.c (finish_struct_1): Use CLASS_TYPE_P.
3475         * ptree.c (print_lang_type): Likewise.
3476         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3477         IS_AGGR_TYPE_CODE.
3478         * typeck2.c (digest_init): Likewise.
3480 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
3482         * call.c (joust): Compare the types of the conv ops, not the
3483         target types of the conversions.
3485 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3487         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3488         was not given.
3490 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
3492         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3493         * decl.c (grokfndecl): Don't allow inline declarations of friend
3494         template specializations, or friend template specializations with
3495         default arguments.
3496         * pt.c (tsubst): Handle substitution into array types that does
3497         not yield a fixed upper bound, even when not processing a
3498         template.
3499         (tsubst_copy): Deal with the fact that the second operand to a
3500         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3501         * search.c (marked_pushdecls_p): Don't descend into
3502         TEMPLATE_TYPE_PARMs and the like.
3503         (unmarked_pushdecls_p): Likewise.
3504         
3505         * call.c (build_over_call): Don't throw away
3506         initializations/copies of empty classes; use MODIFY_EXPR and
3507         INIT_EXPR as for non-empty classes.
3508         * class.c (finish_struct_1): Put the padding byte for an empty
3509         class on the TYPE_NONCOPIED_PARTS list for the class.
3511 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3513         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3514         indicate a reference to a field that is a qualified name.
3516 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
3518         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3519         ASM_OUTPUT_CONSTRUCTOR.
3521         * friend.c (do_friend): Add attrlist arg.  Remove support for
3522         getting a non-decl as 'decl'.
3523         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
3524         rtl.
3525         (grokdeclarator): Adjust.
3526         * cp-tree.h: Adjust.
3528 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3530         * cp-tree.h (permanent_p): New function.
3531         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3532         possibly complex tree node.
3533         * tree.c (mapcar): Adjust comments, and follow coding standards in
3534         conditional.
3535         (permanent_p): New function.
3537 1999-05-13  Per Bothner  <bothner@cygnus.com>
3539         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
3540         primitive Java types, if we actually see `extern "Java"'.
3542 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3544         * lang-specs.h: Pass -$ to the preprocessor.
3546 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
3548         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3549         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3550         (resolve_offset_ref): Don't handle a raw baselink.
3551         * cvt.c (build_expr_type_conversion): Likewise.
3552         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3553         convert_for_initialization): Likewise.
3554         * class.c (instantiate_type): Handle seeing a baselink under an
3555         OFFSET_REF.
3556         * error.c (dump_expr): Likewise.        
3557         * pt.c (for_each_template_parm): Likewise.
3558         (resolve_overloaded_unification): Likewise.
3559         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3560         * typeck.c (expr_sizeof): Also complain about other permutations
3561         of overloaded functions.
3563 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
3565         * init.c (resolve_offset_ref): Don't return a raw method.
3566         Use BASELINK_P.
3567         * typeck.c (decay_conversion): Don't handle a raw method.
3568         Resolve all OFFSET_REFs.
3569         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3570         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
3571         same_type_p for pmf bits.  Don't use build_binary_op to compare
3572         raw pointers to methods.
3573         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3574         to decide when to call resolve_offset_ref.
3575         (build_c_cast, convert_for_initialization): Likewise.
3576         * cvt.c (build_expr_type_conversion): Likewise.
3578 1999-05-06  Nathan Sidwell  <nathan@acm.org>
3580         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3582 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
3584         * decl2.c (start_objects): Don't let static constructors and
3585         destructors get inlined.
3587         * parse.y (nested_name_specifier): Make sure ordinary types are
3588         complete, just like template types.
3589         * parse.c: Regenerated.
3591         * pt.c (check_explicit_specialization): Improve error messages.
3593 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3595         * typeck.c (string_conv_p): Use same_type_p to check whether we
3596         try to convert between char and wchar_t.
3598 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
3600         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3601         lookup to error_mark_node here.
3602         (lookup_member): Revise documentation.  Add comments.  Don't set
3603         the TREE_TYPE to error_mark_node here, and don't build up an extra
3604         TREE_LIST for ambiguous lookups.
3605         (setup_class_bindings): Adjust accordingly.
3606         (push_class_decls): Revise out-of-date comments.
3607         
3608         * typeck.c (build_const_cast): Tighten checks for legality.
3610 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3612         * init.c (build_member_call): Lookup names coming from
3613         namespace-scoped LOOKUP_EXPR.
3615 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
3617         * gxxint.texi: Add documentation for 'I'.
3619 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3621         * tinfo.cc (operator==): Qualify type_info with std::.
3623 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
3625         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
3626         (DECL_COMDAT): Remove definition.
3628 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
3630         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3631         change.
3633 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
3635         * class.c (build_vtable): Use build_lang_decl when building
3636         vtables, not just build_decl.
3637         (prepare_fresh_vtable): Likewise.
3638         * decl.c (wrapup_globals_for_namespace): Mark vtables as
3639         DECL_EXTERNAL when calling wrapup_global_declarations.
3640         * decl2.c (priority_info_s): Add initializations_p and
3641         destructions_p members.
3642         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3643         when deciding what vtables to write out.
3644         (ssdf_decls): New variable.
3645         (ssdf_decls_used): Likewise.
3646         (start_static_storage_duration_function): Deal with being called
3647         multiple times.  Avoid inlining this function.
3648         (generate_inits_for_priority): Deal with reuse of priority map.
3649         (get_priority_info): Clear initializations_p and destructions_p.
3650         (do_static_initialization): Tweak comment.
3651         (do_static_destruction): Likewise.  Fix condition on sentries for
3652         destruction.
3653         (generate_ctor_or_dtor_function): Call all of the static storage
3654         duration functions.
3655         (generate_ctor_or_dtor_function_for_priority): Check
3656         initializations_p and destructions_p to see what priorities need
3657         initialization functions.
3658         (finish_file): Rework to generate multiple static storage duration
3659         functions, rather than just one.
3661         * typeck.c (build_const_cast): Tweak last change to handle
3662         templates correctly.
3664         * typeck.c (build_const_cast): Disallow use of const_cast to
3665         anything but a pointer or reference type.
3667 1999-04-30  Nathan Sidwell  <nathan@acm.org>
3669         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3670         signature type.
3672 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
3674         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3675         (finish_file): Indent comments properly.
3677 1999-04-29  Richard Henderson  <rth@cygnus.com>
3679         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3680         (do_static_destruction): Likewise.
3682 1999-04-29  Nathan Sidwell  <nathan@acm.org>
3684         * cp-tree.h (TYPE_NOTHROW_P): New macro.
3685         * decl2.c (delete_sanity): Warn on deleting void *.
3686         * init.c (build_new_1): Use TYPE_NOTHROW_P.
3687         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3688         throwing operator new.
3690 1999-04-28  Nathan Sidwell  <nathan@acm.org>
3692         * cp-tree.h (build_component_addr): Remove prototype.
3693         * typeck.c (build_component_addr): Make static. Remove MSG
3694         argument.
3695         (build_component_addr): Remove MSG parameter, clean up
3696         comment.
3697         (build_x_function_call): Use cp_error.
3698         (build_unary_op): Adjust call of build_component_addr.
3700 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
3702         * pt.c (tsubst_friend_class): Check for NULL.
3704 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
3706         * search.c (binfo_for_vtable): Initialize bfvi.var.
3708 1999-04-27  Nathan Sidwell  <nathan@acm.org>
3710         * rtti.c (build_x_typeid): Check rtti is enabled.
3712 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
3714         * search.c (is_subobject_of_p): Make sure we're looking at the
3715         right baseclasses.
3717 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
3719         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3721 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
3723         * decl2.c (finish_file): Tweak handling of extern inlines so that
3724         they are not unnecessarily put out.
3726         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3727         such as base classes.
3729 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
3731         * tree.c (build_exception_variant): Fix typo: use the chain of U,
3732         not trying V, while cycling through U.
3734 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
3736         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3737         preserves_first_arg.  Enlarge dummy accordingly.
3738         (DECL_TINFO_FN_P): New macro.
3739         (SET_DECL_TINFO_FN_P): Likeiwse.
3740         (DECL_RETURNS_FIRST_ARG): Remove.
3741         (DECL_PRESERVES_THIS): Likewise.
3742         (DECL_INIT_PRIORITY): New macro.
3743         (finish_struct_1): Change prototype.
3744         (cat_namespace_levels): Remove prototype.
3745         (vtable_decl_p): New prototype.
3746         (vtype_decl_p): Likewise.
3747         (sigtable_decl_p): Likewise.
3748         (walk_globals_pred): New typedef.
3749         (walk_globals_fn): Likewise.
3750         (walk_globals): New prototype.
3751         (walk_namespaces_fn): New typedef.
3752         (walk_namespaces): New prototype.
3753         (wrapup_globals_for_namespace): Likewise.
3754         (walk_vtables): Remove prototype.
3755         (walk_sigtables): Likewise.
3756         (instantiate_pending_templates): New prototype.
3757         * class.c (finish_struct_1): Don't return a value.
3758         * decl.h (pending_statics): Remove declaration.
3759         * decl.c (walk_namespaces_r): New function.
3760         (walk_globals_r): Likewise.
3761         (vtable_decl_p): Likewise.
3762         (vtype_decl_p): Likewise.
3763         (sigtable_decl_p): Likewise.
3764         (walk_namespaces): Likewise.
3765         (walk_globals_data): New type.
3766         (walk_globals): New function.
3767         (wrapup_globals_for_namespace): Likewise.
3768         (expand_static_init): Remove assertion.  Remove redundancy in
3769         conditional.  Don't put static data members in static_aggregates
3770         Tidy.
3771         (finish_function): Remove redundancy in conditional.  Don't set
3772         DECL_RETURNS_FIRST_ARG.
3773         (cat_namespace_levels): Remove.
3774         * decl2.c: Include splay-tree.h and varray.h.
3775         (priority_info_s): New structure.
3776         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
3777         conventions.
3778         (prune_vtable_vardecl): Likewise.
3779         (finish_sigtable_vardecl): Likewise.
3780         (setup_initp): Remove.
3781         (do_dtors): Remove.
3782         (do_ctors): Remove.
3783         (start_static_storage_duration_function): New function.
3784         (generate_inits_for_priority): Likewise.
3785         (finish_static_storage_duration_function): Likewise.
3786         (get_priority_info): Likewise.
3787         (do_static_initialization): Likewise.
3788         (do_static_destruction): Likewise.
3789         (do_static_initialization_and_destruction): Likewise.
3790         (generate_ctor_or_dtor_function): Likewise.
3791         (generate_ctor_and_dtor_functions_for_priority): Likewise.
3792         (pending_statics): Make it a varray.
3793         (pending_statics_used): New variable.
3794         (saved_inlines): Make it a varray.
3795         (saved_inlines_used): New variable.
3796         (finish_static_data_member): Change method of updating
3797         pending_statics.
3798         (mark_inline_for_output): Remove #if 0'd code.  Change method of
3799         updating saved_inlines.
3800         (walk_vtables): Remove.
3801         (walk_sigtables): Likewise.
3802         (import_export_decl): Use DECL_TINFO_FN_P.
3803         (pending_templates): Remove declaration.
3804         (maybe_templates): Likewise.
3805         (static_aggregates_initp): Likewise.
3806         (setup_initp): Likewise.
3807         (finish_objects): Simplify.
3808         (INITIALIZE_P_IDENTIFIER): New macro.
3809         (PRIORITY_IDENTIFIER): New macro.
3810         (SSDF_IDENTIFIER): New macro.
3811         (initialize_p_decl): New variable.
3812         (priority_decl): Likewise.
3813         (ssdf_decl): Likewise.
3814         (priority_info_map): Likewise.
3815         (finish_file): Recode output of static intializers and other
3816         file-scope finalization tasks.
3817         * error.c (OB_END_TEMPLATE_ID): New macro.
3818         (dump_type_real): Use it.
3819         (dump_decl): Likewise.
3820         (dump_function_name): Likewise.
3821         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3822         interface.
3823         (check_newline): Use walk_globals, not walk_vtables.
3824         * pt.c (pending_tempalte_expansions): Remove.
3825         (set_vardecl_interface_info): Likewise.
3826         (pending_templates): Make static.
3827         (maybe_templates): Likewise.
3828         (instantiate_class_template): Adjust call to finish_struct_1.
3829         (instantiate_pending_templates): New function.
3830         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3831         * tree.c (static_aggregates_initp): Remove.
3832         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3833         instead.
3834         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3836         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3837         with the RTL code RETURN.
3838         * hash.h: Regenerated.
3839         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3840         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3841         * parse.c: Regenerated.
3842         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
3843         it.
3844         (inline_parm_levels): New variable.
3845         (inline_parm_levels_used): Likewise.
3846         (maybe_begin_member_template_processing): Update them.
3847         (maybe_end_member_template_processing): Use them, rather than
3848         guessing how many levels to pop.
3850         * decl.c (make_typename_type): Tighten error-checking.
3852 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
3854         * cp-tree.h (build_binary_op): Remove unneeded parameter.
3855         * class.c (build_vrable_entry_ref): Adjust call to
3856         build_binary_op.
3857         * decl.c (expand_static_init): Likewise.
3858         (grokdeclarator): Likewise.
3859         (finish_function): Likewise.
3860         * decl2.c (delete_sanity): Likewise.
3861         (do_dtors): Likewise.
3862         (do_ctors): Likewise.
3863         * error.c (dump_type_suffix): Likewise.
3864         * expr.c (cplus_expand_expr): Likewise.
3865         * init.c (resolve_offset_ref): Likewise.
3866         (build_new): Likewise.
3867         (build_new_1): Likewise.
3868         (build_vec_delete_1): Likewise.
3869         (expand_vec_init_catch_clause): Likewise.
3870         (build_delete): Likewise.
3871         * pt.c (tsubst): Likewise.
3872         * rtti.c (synthesize_tinfo_fn): Likewise.
3873         * search.c (expand_upcast_fixups): Likewise.
3874         (expand_direct_vtbls_init): Likewise.
3875         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3876         (build_binary_op_nodefault): Likewise.
3877         (point_int_sum): Likewise.
3878         (pointer_diff): Likewise.
3879         (build_unary_op): Likewise.
3880         (build_modify_expr): Likewise.
3881         (get_delta_difference): Likewise.
3882         (build_ptrmemfunc): Likewise.
3883         (expand_ptrmemfunc_cst): Likewise.
3885 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
3887         * decl.c (grokfndecl): Always call cplus_decl_attributes.
3888         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3890 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
3892         * cp-tree.h (finish_static_data_member_decl): New function.
3893         * decl2.c (finish_static_data_member_decl): Split out from ...
3894         (grokfield): Here.
3895         * pt.c (instantiate_class_template): Use it here instead of
3896         trying to fake it.
3897         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3898         finish_static_data_member_decl will do that.  Explicit set
3899         DECL_EXTERNAL to match non-template processing.
3901 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
3903         * cp-tree.h (finish_class_definition): Add parameter.
3904         * parse.y (structsp): Use it.  Don't call pop_scope here.
3905         * parse.c: Regenerated.
3906         * semantics.c (finish_class_definition): Pop it here.
3908 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
3910         * decl.c (xref_tag): Revise handling of nested template
3911         declarations.
3912         * pt.c (check_explicit_specialization): Tweak handling of friend
3913         templates in template classes.
3914         (tsubst_friend_class): Handle friend declarations for nested
3915         member template classes.
3917 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
3919         * class.c (finish_struct): Remove unused variable.
3920         (pushclass): Likewise.
3921         (invalidate_class_lookup_cache): Likewise.
3922         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3923         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3924         doesn't get obliterated.
3925         (make_typename_type): Handle template classes correctly.
3927         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3928         (storetags): Declare.
3929         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3930         (pushclass): Likewise.  Use storetags to install tag declarations,
3931         not pushtag.
3932         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3933         * decl.c (storetags): Make it global.
3934         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3935         implicit typename declaration.
3936         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
3937         * method.c (hack_identifier): Likewise.
3938         * search.c (lookup_member): Likewise.
3940         * decl.c (warn_about_implicit_typename_lookup): New function.
3941         (lookup_name_real): Use it.  Rework handling of implicit typename
3942         extension.
3944 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
3946         * cp-tree.h (lookup_nested_field): Remove.
3947         * class.c (push_nested_class): Handle UNION_TYPEs.
3948         (pop_nested_class): Likewise.
3949         * decl.c (lookup_name_real): Don't call lookup_nested_field.
3950         (start_decl): Use push_nested_class, not just pushclass.
3951         (cp_finish_decl): Use pop_nested_class, not just popclass.
3952         * search.c (lookup_nested_field): Remove.
3954         * cp-tree.h (lang_type): Add documentation.
3955         * decl2.c (handle_class_head): Create template declarations here,
3956         as appropriate.
3957         * parse.y (class_head): Return whether or not we entered a new
3958         scope, as well as the type named.
3959         (named_class_head): Likewise.
3960         (named_complex_class_head_sans_basetype): Likewise.
3961         (structsp): Adjust accordingly.  Pop scope when required.
3962         * parse.c: Regenerated.
3963         * pt.c (check_default_tmpl_args): Robustify.
3964         (redeclare_class_template): Likewise.
3965         (instantiate_class_template): An instantiation of an
3966         anonymous union is itself an anonymous union.
3967         * semantics.c (begin_class_definition): Don't create template
3968         declarations here.
3970 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
3972         * parse.y (after_type_declarator_intern): New nonterminal.
3973         (after_type_declarator): Use it.
3974         (direct_after_type_declarator): Likewise.  Move above
3975         nonnested_type to fix reduce/reduce conflict resolution.
3976         (declmods): Reducing from just 'attributes' has EMPTY precedence.
3977         * Makefile.in (CONFLICTS): Update.
3979         * decl.c (define_label): Downgrade error for jumping over a
3980         non-POD decl to pedwarn.
3982 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
3984         * cp-tree.h (popclass): Change declaration.
3985         (pop_nested_class): Likewise.
3986         (poplevel_class): Remove declaration.
3987         * call.c (convert_default_argument): Pass no arguments to
3988         popclass.
3989         * class.c (finish_struct_1): Likewise.
3990         (finish_struct): Likewise.
3991         (popclass): Remove argument.  Simplify code accordingly.
3992         (pop_nested_class): Likewise.
3993         * decl.c (poplevel_class): Declare it here, and make it static.
3994         (poplevel): Handle class scopes.
3995         (poplevel_class): Don't take an rgument.  Simplify.
3996         (pop_everything): Pass no arguments to pop_nested_class.
3997         (cp_finish_decl): Pass no arguments to popclass.
3998         (grokdeclarator): Pass no arguments to pop_nested_class.
3999         (finish_function): Likewise.
4000         * decl2.c (grokfield): Likewise.
4001         (pop_scope): Pass no arguments to popclass.
4002         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
4003         * pt.c (instantiate_class_template): Move call to pushclass, and
4004         document.  Pass no arguments to popclass.
4005         (regenerate_decl_from_template): Likewise.
4007 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
4009         * typeck.c (build_unary_op): Handle taking the address of a unique
4010         bound non-static member function.
4012 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4014         * lang-options.h (-Wdeprecated): New flag.
4015         * decl2.c (warn_deprecated): New flag.
4016         (lang_decode_option): Deprecated this-is-variable,
4017         external-templates, alt-external-templates.
4018         Support -Wdeprecated.
4019         * errfn.c (cp_deprecated): New function.
4021 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
4023         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
4024         of the decls themselves.
4026         * pt.c (tsubst_function_type): Copy attributes over.
4028         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
4029         and com_interface.
4030         * cp-tree.h: Add prototype.
4031         * decl.c (init_decl_processing): Set valid_lang_attribute.
4033 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
4035         * class.c (finish_struct_1): Look at the const-ness of the field's
4036         type, not the TREE_READONLY-ness of the declaration.
4037         * method.c (synthesize_method): Likewise.
4038         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
4039         creating new declarations.
4041 1999-04-13  Mike Stump  <mrs@wrs.com>
4043         * decl2.c (import_export_decl): Because vtables always reference
4044         virtual functions, even if they are inlined, don't allow
4045         -fno-implement-inlines to not emit them, instead, emit them with
4046         the vtable.
4047         * decl.c (start_function): Likewise.
4049 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
4051         * cp-tree.h (struct lang_type): Add com_interface.
4052         (CLASSTYPE_COM_INTERFACE): New macro.
4053         * class.c (set_rtti_entry): COM interface classes have no RTTI
4054         entries in their vtables; adjust.
4055         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
4056         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
4057         finish_struct_1): Likewise.
4058         * decl2.c (mark_vtable_entries): Likewise.
4059         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
4060         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
4061         expand_upcast_fixups): Likewise.
4062         * tree.c (debug_binfo): Likewise.
4064         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
4065         * typeck.c (comptypes): If we get it, ignore attributes.
4066         * class.c (instantiate_type): Use BASELINK_P.  Change complain
4067         parameter to flags; 2 means ignore attributes.
4068         * call.c (build_op_delete_call): Pass it.
4070         * decl.c (xref_tag): Only complain once about using a typedef-name
4071         with 'struct'.  Downgrade to pedwarn.
4073         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
4075         * parse.y (absdcl_intern): New nonterminal.
4076         (absdcl, direct_abstract_declarator): Use it.
4078         * pt.c (lookup_template_class): Look through implict typename.
4080 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
4082         * friend.c (add_friend): Deal gracefully with error_mark_node.
4083         * method.c (build_overload_value): Handle pointers-to-members as
4084         template parameters.
4086         * decl.c (push_binding): Fix typo in comment.
4088 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
4090         * error.c (dump_type_real): If a typename is a template-id, put
4091         out the template arguments.
4092         (dump_expr): Handle TEMPLATE_ID_EXPR.
4093         * pt.c (lookup_template_class): Now that full arguments are
4094         available everywhere, remove code that tried to guess them.
4096 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
4098         * decl.c (make_typename_type): Complain if we don't find a type
4099         when trying to make a typename type for a non-template type.
4101 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
4103         * decl.c (start_decl): Pass attributes to grokdeclarator.
4104         (grokdeclarator): Handle attributes on constructor-syntax
4105         initializers.
4107 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
4109         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
4110         don't have types.
4112         * search.c (template_self_reference_p): Tweak.
4114 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
4116         * init.c (build_offset_ref): Don't build yet another weird data
4117         structure to describe overloaded functions.
4119 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
4121         * cp-tree.h (BASELINK_P): New macro.
4122         (SET_BASELINK_P): Likewise.
4123         * init.c (build_member_call): Remove needless assignment in if
4124         statement.
4125         * search.c (lookup_field_r): Fix handling when we are looking
4126         specifically for a type; these are not hidden by functions and
4127         variables.
4128         (lookup_member): Use SET_BASELINK_P.
4129         * tree.c (is_overloaded_fn): Use BASELINK_P.
4130         (really_overloaed_fn): Likewise.
4131         (get_first_fn): Likewise.
4133 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
4135         * decl.c (lookup_name_current_level): Tweak, and improve
4136         documentation.
4138         * class.c (maybe_fixup_vptrs): Remove declaration.
4139         (build_class_init_list): Likewise.
4140         * decl.c (pushdecl_class_level): Call check_template_shadow here
4141         ...
4142         (push_class_level_binding): ... not here.
4143         * search.c (dfs_push_type_decls): Only avoid
4144         template-self-reference TYPE_DECLs if they are from base classes.
4146 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
4148         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
4149         nodes.  Tidy.
4151 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
4153         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
4154         (finish_struct_1): Don't call build_class_init_list.
4156 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
4158         * tinfo.h (__class_type_info): Fix illegal declaration.
4160         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
4161         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
4162         (IDENTIFIER_CLASS_VALUE): Improve documentation.
4163         (is_properly_derived_from): Declare.
4164         (invalidate_class_lookup_cache): Likewise.
4165         (maybe_maybe_note_name_used_in_class): Likewise.
4166         (note_name_declared_in_class): Likewise.
4167         (push_using_decl): Remove duplicate declaration.
4168         (id_in_current_class): Remove declaration.
4169         (push_class_binding): Change prototype.
4170         (clear_identitifer_class_values): Declare.
4171         * call.c (is_properly_derived_from): Make it global.
4172         (build_new_function_call): Be careful about updating candidates.
4173         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
4174         asked to make illegal calls.
4175         * class.c: Include splay-tree.h.
4176         (class_stack_node): Add names_used slot.
4177         (check_member_decl_is_same_in_complete_scope): Remove.
4178         (add_method): Fix comment.  Push the declaration into class
4179         scope.
4180         (finish_struct_1): When popping the class, pop the bindings too.
4181         Remove check for data member/function member conflict.
4182         (finish_struct): Remove calls to
4183         check_member_decl_is_same_in_complete_scope.  Change calls to
4184         popclass.
4185         (pushclass): Clear names_used in the class stack entry.
4186         Use invalidate_class_lookup_cache to remove cached entries, rather
4187         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
4188         before entering a new class.  Remove dead code.  Don't mess with
4189         current_function_decl when pushing declarations.
4190         (invalidate_class_lookup_cache): New function, split out from ...
4191         (popclass): Here.  Clean up names_used on our way out.
4192         (instantiate_type): Adjust.
4193         (build_self_reference): Don't push the declaration here.
4194         (maybe_note_name_used_in_class): New function.
4195         (note_name_declared_in_class): Likewise.
4196         * decl.c (add_binding): Change prototype.
4197         (find_class_binding_level): New function.
4198         (innermost_nonclass_level): Likewise.
4199         (current_binding_level): Update documentation.
4200         (inner_binding_level): Remove.  Replace with current_binding_level
4201         throughout.
4202         (push_binding_level): Remove special handling of
4203         class_binding_level.
4204         (pop_binding_level): Likewise.  Use find_class_binding_level.
4205         (suspend_binding_level): Likewise.
4206         (global_bindings_p): Use innermost_nonclass_level.
4207         (toplevel_bindings_p): Likewise.
4208         (namespace_bindings_p): Likewise.
4209         (pseudo_global_level_p): Likewise.
4210         (push_binding): Clear INHERITED_VALUE_BINDING_P.
4211         (add_binding): Check for illegal multiple declarations.  Return a
4212         value indicating whether or not the new binding was legal.
4213         (push_local_binding): Skip over class binding levels.  Check
4214         return value from add_binding.
4215         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
4216         note_name_declared_in_class.
4217         (pushlevel_class): Remove "fake out the rest of the compiler"
4218         code.
4219         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
4220         (clear_identifier_class_values): New function.
4221         (pop_from_top_level): Use it.
4222         (pop_everything): Tweak.
4223         (maybe_process_template_type_declaration): Don't push the
4224         declaration for the template here.
4225         (pushtag): Don't push tag declarations into class scope here.
4226         (pushdecl): Apply DeMorgan's law for readability.
4227         (pushdecl_class_level): Remove special-case code for
4228         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
4229         (push_class_level_bindng): Deal with inherited bindings.
4230         (lookup_name_real): Remove special-case code for
4231         TYPE_BEING_DEFINED, and some implicit typename magic.
4232         (grokdeclarator): Handle COMPONENT_REF for a template function.
4233         (build_enumerator): Don't call pushdecl_class_level here.
4234         (id_in_current_class): Remove.
4235         * decl2.c (grokfield): Don't call pushdecl_class_level or
4236         check_template_shadow.
4237         * errfn.c (cp_file_of): Don't declare.
4238         (cp_line_of): Likewise.
4239         * error.c (dump_decl): Handle an OVERLOAD.
4240         (cp_file_of): Likewise.
4241         (cp_line_of): Likewise.
4242         * init.c (build_member_call): Handle a COMPONENT_REF.
4243         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
4244         pushdecl_class_level.
4245         * method.c (hack_identifier): Build COMPONENT_REFs for references
4246         to member templates as well as member functions.  Remove dead
4247         code.
4248         * parse.y (left_curly): Remove.
4249         (nonnested_type): Call maybe_note_name_used_in_class, not
4250         pushdecl_class_level.
4251         * parse.c: Regenerated.
4252         (nested_name_specifier_1): Likewise.
4253         * pt.c (check_explicit_specialization): Adjust, for robustness.
4254         (check_template_shadow): Handle OVERLOADs.
4255         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
4256         TEMPLATE_DECL, if appropriate.
4257         * search.c (envelope_add_decl): Remove.
4258         (dfs_pushdecls): Likewise.
4259         (dfs_compress_decls): Likewise.
4260         (dfs_push_decls): New function.
4261         (dfs_push_type_decls): Likewise.
4262         (setup_class_bindings): Likewise.
4263         (template_self_reference_p): Likewise.
4264         (lookup_field_r): Use it.
4265         (looup_member): Remove old comment.  Deal with ambiguity.
4266         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
4267         and remove envelope processing.
4268         * semantics.c (begin_class_definition): Let pushclass push
4269         declarations for base classes.
4270         (finish_member_declaration): Push declarations into class scope.
4271         * typeck.c (build_component_ref): Just put an OVERLOAD into the
4272         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
4273         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
4274         * Makefile.in (class.o): Depend on splay-tree.h.
4276 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
4278         * cvt.c (convert_pointer_to_real): Use same_type_p.
4279         * typeck.c (comp_target_types): Use same_type_p.
4281 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
4283         * semantics.c (begin_inline_definitions,
4284         finish_inline_definitions): Rename from finish_default_args and
4285         begin_inline_definitions, respectively, to something that isn't a
4286         total lie.  :)
4287         * parse.y (structsp): Adjust.
4289         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
4290         (list_hash_lookup): Likewise.
4291         (hash_tree_chain): Adjust.
4292         * pt.c (tsubst): Adjust.
4293         (tsubst_arg_types): Use plain hash_tree_cons.
4294         * cp-tree.h (hash_tree_cons_simple): Lose.
4295         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
4297 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4299         * Makefile.in (hash.h): Generate using gperf language 'C', not
4300         'KR-C', so gperf uses the `const' keyword on strings.
4302         * gxx.gperf (resword): Const-ify a char*.
4304 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
4306         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
4307         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
4308         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
4309         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
4310         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
4311         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
4312         tree.c: Adjust.
4314 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
4316         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
4318 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
4320         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
4322 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
4324         * cp-tree.h (add_friend): Declare.
4325         (add_friends): Likewise.
4326         * friend.c (add_friend): Make it global.  Don't add to
4327         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
4328         (add_friends): Make it global.
4329         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
4330         befriending class is a template.
4331         * parse.y (component_decl_1): Fix typo in comment.
4332         * parse.c: Regenerated.
4333         * pt.c (instantiate_class_template): Use add_friend and
4334         add_friends rather that duplicating some of their functionality
4335         here.
4337 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
4339         * call.c (build_field_call): Unify 'this' and non-'this' cases.
4341         * typeck.c (build_indirect_ref): Check for 'this' sooner.
4343 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4345         * call.c (op_error): Const-ify a char*.
4346         (add_candidate, source_type, add_warning): Add static prototype.
4347         (print_z_candidates): Const-ify a char*.
4349         * class.c (resolve_address_of_overloaded_function,
4350         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
4351         (get_vtable_name, finish_struct_1): Const-ify a char*.
4353         * cvt.c (convert_to_reference): Likewise.
4355         * decl.c (redeclaration_error_message, record_builtin_type,
4356         record_unknown_type, member_function_or_else, bad_specifiers):
4357         Likewise.
4358         (find_binding, select_decl, unqualified_namespace_lookup,
4359         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
4360         Add static prototype.
4361         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
4362         implicitly_declare, record_builtin_java_type, define_function,
4363         grok_op_properties, tag_name): Const-ify a char*.
4365         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
4366         (define_function, finish_builtin_type): Const-ify a char*.
4367         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
4368         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
4369         (file_name_nondirectory): Const-ify a char*.
4370         (init_filename_times): Don't prototype.
4371         (compiler_error): Prototype.
4372         (yyerror, init_repo): Const-ify a char*.
4373         (build_srcloc): Don't prototype.
4374         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
4375         Const-ify a char*.
4376         (warn_for_assignment): Don't prototype.
4377         (convert_for_initialization, readonly_error, check_for_new_type,
4378         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
4379         Const-ify a char*.
4381         * decl2.c (acceptable_java_type, output_vtable_inherit,
4382         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
4383         merge_functions, decl_namespace, validate_nonmember_using_decl,
4384         do_nonmember_using_decl): Add static prototype.
4385         (lang_f_options): Const-ify a char*.
4386         (finish_builtin_type): Likewise.
4387         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4388         prototype.
4390         * errfn.c: Include cp-tree.h.
4391         (cp_thing): Add static prototype.
4392         (compiler_error): Don't protoptype.
4393         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4394         passing it to `cp_thing'.
4396         * error.c (interesting_scope_p): Add static prototype.
4398         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4399         a char*.
4401         * init.c (compiler_error): Don't prototype.
4402         (member_init_ok_or_else): Const-ify a char*.
4403         (build_java_class_ref): Add static prototype.
4405         * lex.c (compiler_error): Don't prototype.
4406         (get_time_identifier, interface_strcmp, extend_token_buffer,
4407         handle_cp_pragma): Const-ify a char*.
4408         (is_global, init_filename_times): Add static prototype.
4409         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4410         (compiler_error): Change from fixed args to variable args.
4411         (yyerror): Const-ify a char*.
4413         * parse.y (cond_stmt_keyword): Const-ify a char*.
4414         (parse_decl): Add static prototype.
4416         * pt.c (template_args_equal, print_template_context): Likewise.
4417         (print_candidates, check_default_tmpl_args): Const-ify a char*.
4418         (instantiate_class_template): Likewise.
4420         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4422         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4423         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4425         * search.c (lookup_field_info, lookup_member): Likewise.
4426         (lookup_member): Cast the first argument of `bzero' to a PTR.
4428         * sig.c (compiler_error): Don't prototype.
4429         (build_signature_pointer_or_reference_nam): Const-ify a char*.
4430         (get_sigtable_name, build_member_function_pointer): Likewise.
4432         * tree.c (compiler_error): Don't prototype.
4433         (no_linkage_helper, build_srcloc): Add static prototype.
4434         (build_vbase_pointer_fields): Const-ify a char*.
4435         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4437         * typeck.c (compiler_error): Don't prototype.
4438         (convert_for_assignment): Const-ify a char*.
4439         (comp_cv_target_types): Add static prototype.
4440         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4441         build_component_addr, build_unary_op, convert_for_initialization):
4442         Const-ify a char*.
4444         * typeck2.c (ack): Add static prototype and change from fixed args
4445         to variable args.
4446         (readonly_error, check_for_new_type): Const-ify a char*.
4448         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4449         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4450         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
4451         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4452         gen_assign, GNU_xref_member): Const-ify a char*.
4454 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4456         * gxxint.texi: Remove old discussion on copying virtual bases.
4458 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
4460         * Make-lang.in: Remove all references to g++.o/g++.c.
4461         Link g++ from gcc.o.
4463 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4465         * decl2.c (comdat_linkage): Treat vtables like functions.
4467 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
4469         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4471 1999-03-25  Nathan Sidwell  <nathan@acm.org>
4473         * decl.c (init_decl_processing): Add `signed' type as a synonym
4474         for `int'.
4476 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4478         * typeck.c (common_type): Handle cv-qual unification for pointers
4479         to members.
4481         * decl.c (unqualified_namespace_lookup): Return error_mark_node
4482         on error.
4483         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4484         * lex.c (do_identifier): If we got error_mark_node, call
4485         lookup_name again.
4487 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4489         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4490         classes.
4492 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
4494         * decl.c (lookup_name_real): Do nested field lookup regardless of
4495         TYPE_BEING_DEFINED.
4497 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
4499         * cp-tree.h (lang_type): Remove has_assignment and
4500         has_real_assignment.  Add befriending_classes.
4501         (TYPE_HAS_ASSIGNMENT): Remove.
4502         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4503         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4504         (lang_decl): Document.
4505         (DECL_BEFRIENDING_CLASSES): New macro.
4506         (FRIEND_NAME): Move declaration to more obvious location.
4507         (FRIEND_DECLS): Likewise.
4508         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4509         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4510         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4511         (grok_op_properties): Likewise.
4512         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4513         (add_friend): Likewise.  Don't do weird things with assignment
4514         operators.  Update DECL_BEFRIENDING_CLASSES.
4515         (add_friends): Don't do weird things with assignment operators.
4516         (make_friend_class): Likewise.  Update
4517         CLASSTYPE_BEFRIENDING_CLASSES.
4518         * pt.c (instantiate_class_template): Don't set
4519         TYPE_HAS_ASSIGNMENT.
4520         (tsubst_copy): Substitute the TREE_TYPE for more unary
4521         expressions.
4522         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4523         * search.c (protected_accessible_p): New function.
4524         (friend_accessible_p): Likewise.
4525         (accessible_p): Use them.
4527 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4529         * pt.c (convert_nontype_argument): Don't create things that aren't
4530         PTRMEM_CSTs when applying a qualification conversion to a
4531         PTRMEM_CST.
4533 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4535         * Makefile.in (OBJS): Don't mention hash.o.
4536         (OBJDEPS): Likewise.
4538 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
4540         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4541         * decl.c (expand_static_init): Make sure we don't add any after
4542         then.
4544         * decl.c (cp_finish_decl): Move intelligence about handling
4545         DECL_COMDAT for variables from here...
4546         * decl2.c (comdat_linkage): ...to here.
4547         (maybe_make_one_only): Tweak.
4548         (import_export_decl): Call comdat_linkage for variables, too.
4549         (finish_file): Handle template statics properly.
4551 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
4553         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4554         Document internals of pointer-to-member-functions.
4555         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4556         (PFN_FROM_PTRMEMFUNC): Likewise.
4557         (build_type_conversion): Remove unused parameter.
4558         (build_ptrmemfunc1): Declare.
4559         (expand_ptrmemfunc_cst): New function.
4560         (delta2_from_ptrmemfunc): Likewise.
4561         (pfn_from_ptrmemfunc): Likewise.
4562         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4563         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
4564         (convert_to_reference): Remove unused parameter to
4565         build_type_conversion.
4566         (ocp_convert): Likewise.
4567         (build_user_type_conversion): Likewise.
4568         * error.c (dump_expr): Handle NULL pointer-to-member functions.
4569         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4570         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4571         open when handling pointer-to-member functions.
4572         * pt.c (convert_nontype_argument): Clean up error messages.  Be
4573         more stringent with pointers-to-members.
4574         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
4575         (build_unary_op): Tidy ever-so-slightly.
4576         (build_conditional_expr): Remove extra parameter to
4577         build_type_conversion.
4578         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4579         we're using.
4580         (expand_ptrmemfunc_cst): Define.
4581         (delta2_from_ptrmemfunc): Likewise.
4582         (pfn_from_ptrmemfunc): Likewise.
4584 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
4586         * init.c (build_member_call): Handle template-id expressions
4587         correctly.
4588         * typeck.c (build_x_function_call): Likewise.
4590 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
4592         * friend.c (make_friend_class): Avoid core dump when
4593         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4595 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
4597         * decl.c (start_function): Suppress normal linkage heuristics
4598         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4600 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
4602         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4603         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4605 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4607         * parse.y (named_complex_class_head_sans_basetype):
4608         Do not push a scope for error_mark_node.
4609         (maybe_base_class_list): Likewise.
4611         * decl.c (start_decl): Check for error_mark_node as a type.
4612         Detected by g++.brendan/array-refs.C.
4613         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
4614         (maybe_build_cleanup_1): Likewise.  Detected by
4615         g++.jason/incomplete1.C.
4617         * tree.c (build_dummy_object): Use void_zero_node instead of the
4618         error_mark_node.
4619         (is_dummy_object): Check for such a node.
4620         Detected by g++.bob/inherit1.C
4622 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
4624         * method.c (old_backref_index): Split out...
4625         (flush_repeats): From here.  Rename back from try_old_backref.
4626         (build_mangled_name): Put back some old-style repeat handling.
4628 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4630         * lex.c: Don't include setjmp.h.
4631         (parse_float): New static function.
4632         (pf_args): New struct.
4633         (real_yylex): Use them in call to `do_float_handler'.
4635 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
4637         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
4638         * tree.c (layout_basetypes): Not here.
4639         * search.c (dfs_search): Remove; no longer used.
4641 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4643         * decl2.c (validate_nonmember_using_decl): Issue sensible
4644         error-messages on bogus qualifiers.
4646 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
4648         * call.c (add_function_candidate): Fix uninitialized variable.
4650         * Makefile.in (search.o): Add dependency on varray.h.
4652 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
4654         * decl.c (duplicate_decls): Use same_type_p.
4655         * method.c (try_old_backref): Renamed from flush_repeats.  Use
4656         same_type_p.  Don't try to handle repeats.  Return success.
4657         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
4658         calls from old-style code, too.
4659         (check_ktype): Use same_type_p.
4660         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
4661         (build_qualified_name): Simplify logic.
4662         (process_overload_item): Strip typedefs and quals at the top.
4663         (build_mangled_name_for_type_with_Gcode): Remove call to
4664         type_canonical_variant.
4665         (build_mangled_name): Likewise.  Remove support for old-style
4666         repeats, which have been disabled since 2.7.2.  Don't mess with
4667         TREE_USED.
4668         (build_decl_overload_real): Don't mess with TREE_USED.
4670 1999-03-13  Nathan Sidwell  <nathan@acm.org>
4672         * error.c (cp_printers): Add 'F' escape character.
4673         (dump_type_real): Remove TREE_LIST (fnargs) printing.
4674         Functionality moved to dump_parameters.
4675         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
4676         (dump_function_decl): Extend meaning of V parameter.  Use
4677         dump_parameters and dump_exception_spec.
4678         (dump_parameters): New static function.
4679         (dump_exception_spec): New static function.
4680         (fndecl_as_string): Change argument semantics.  Use
4681         dump_function_decl directly.
4683         * sig.c (build_signature_table_constructor): Use cp_error.
4685 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4687         * semantics.c (finish_switch_cond): Handle error cases gracefully.
4688         Detected by g++.law/enum5.C.
4690         * typeck.c (build_modify_expr): Check for errors after resolving
4691         offsets.  Detected by g++.brendan/static1.C.
4693         * decl.c (complete_array_type): Ignore initial_value if it is an
4694         error.  Detected by g++.benjamin/17930.C.
4696         * typeck2.c (process_init_constructor): Return error if one argument
4697         is in error.  Detected by g++.benjamin/13478.C.
4699 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4701         * decl.c (select_decl): Allow class templates when we need types.
4702         * decl2.c (ambiguous_decl): Likewise.
4704 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4706         * lex.c (do_identifier): Correct call to enforce_access.
4707         * search.c (accessible_p): Tweak comment.
4709 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
4711         * semantics.c (begin_class_definition): Call build_self_reference.
4712         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
4714         * search.c (assert_canonical_unmarked): Fix typo in prototype.
4716         * search.c (dfs_canonical_queue): New function.
4717         (dfs_assert_unmarked_p): Likewise.
4718         (assert_canonical_unmarked): Likewise.
4719         (access_in_type): Use it.
4720         (accessible_p): Likewise.  Walk the whole tree when umarking.
4722         * sig.c (build_signature_table_constructor): Use accessible_p
4723         instead of compute_access.
4725 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4727         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
4729 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
4731         * cp-tree.h (flag_access_control): Declare.
4732         (TREE_VIA_PPUBLIC): Document.
4733         (DECL_NONSTATIC_MEMBER_P): New macro.
4734         (enforce_access): Return an indication of whether or not access
4735         was permitted.
4736         (build_self_reference): Change prototype.
4737         (compute_access): Replace with ...
4738         (accessible_p): New function.
4739         (dfs_walk): Change prototype.
4740         (dfs_unmark): Likewise.
4741         (markedp): Likewise.
4742         * call.c (enforce_access): Use accessible_p.
4743         * class.c (build_self_reference): Insert the declaration into the
4744         list of members for this type, and make it public.
4745         * decl.c (xref_basetypes): Avoid ill-timed recursion.
4746         * init.c (build_offset_ref): Use lookup_member, not three separate
4747         name-lookups.  Call enforce_access rather than checking for
4748         illegal accesses here.
4749         (resolve_offset_ref): Likewise.
4750         * lex.c (do_identifier): Likewise.
4751         * method.c (hack_identifier): Likewise.
4752         * parse.y (self_reference): Remove.
4753         (opt_component_decl_list): Don't use it.
4754         * parse.c: Regenerated.
4755         * pt.c (print_candidates): Generalize to handle lists of
4756         overloaded functions.
4757         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
4758         not set.
4759         (get_template_base): Use new calling convention for dfs_walk.
4760         * search.c: Include varray.h.  Add prototypes.
4761         (dfs_walk): Accept a data pointer to pass to the work functions.
4762         All callers changed.  All work functions changed.
4763         (breadth_first_search): Rename to bfs_walk, and make consistent
4764         with dfs_walk.
4765         (dfs_walk_real): New function.
4766         (canonical_binfo): New function.
4767         (context_for_name_lookup): Likewise.
4768         (shared_marked_p): Likewise.
4769         (shared_unmarked_p): Likewise.
4770         (lokup_field_queue_p): Likewise.
4771         (lookup_field_r): Generalize to handle both functions and fields.
4772         (lookup_field): Just call lookup_member.
4773         (lookup_fnfields): Likewise.
4774         (lookup_member): Move body of lookup_field here and generalize.
4775         (dfs_accessible_queue_p): Likewise.
4776         (dfs_accessible_p): Likewise.
4777         (dfs_access_in_type): Likewise.
4778         (access_in_type): Likewise.
4779         (compute_access): Remove, and replace with ...
4780         (accessible_p): New function.
4781         (vbase_types): Remove.
4782         (vbase_decl_ptr_intermediate): Likewise.
4783         (vbase_decl_ptr): Likewise.
4784         (vbase_init_result): Likewise.
4785         (closed_envelopes): Likewise.
4786         (bvtable): Likewise.
4788 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4790         * call.c (add_function_candidate): Check for proper number of args
4791         before checking the validity of those args.
4793 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
4795         * cp-tree.h (struct lang_type): Add anon_union field.
4796         (ANON_UNION_TYPE_P): Use it instead of examining type.
4797         (SET_ANON_UNION_TYPE_P): New macro.
4798         * decl.c (check_tag_decl): Use it.
4800         * search.c (compute_access): Handle non-type contexts earlier, and
4801         handle NULL_TREE.
4803         * tree.c (build_exception_variant): Use copy_to_permanent.
4805         * decl2.c (setup_initp): Give statics with no priority the default
4806         priority here.
4807         (do_dtors, do_ctors, finish_file): Remove special handling of
4808         non-prioritized statics.
4810 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
4812         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
4813         * decl.c (make_typename_type): Don't issue an error if an
4814         immediate lookup fails; it migt be resolved later.
4815         * friend.c (is_friend): Add comment.
4816         * search.c (breadth_first_search): Add POSTFN and DATA
4817         parameters.  Tidy.  All callers changed.
4818         (lookup_field_queue_p): New function.
4819         (lookup_field_r): Likewise.
4820         (lookup_field_post): Likewise.
4821         (lookup_field): Use them, via breadth_first_search, instead of
4822         duplicating logic.
4823         (compute_access): Robustify.
4824         (lookup_fnfield_info): New structure.
4826 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
4828         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4830 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
4832         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
4833         cc happy.
4835         * decl2.c (import_export_class): Also return if
4836         CLASSTYPE_INTERFACE_ONLY is set.
4838 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4840         * decl.c (push_overloaded_decl): Only overwrite the old binding if
4841         there was one.
4842         * decl2.c (do_local_using_decl): Fix loop termination.
4844 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
4846         * cp-tree.h (determine_specialization): Don't declare.
4847         * pt.c (determine_specialization): Make it static.  Eliminate
4848         complain parameter.  Note that decl is always non-NULL now, and
4849         simplify accordingly.
4851         * decl.c (maybe_push_to_top_level): Always call
4852         push_cp_function_context.
4853         (pop_from_top_level): Always call pop_cp_function_context.
4855 1999-02-26  Nathan Sidwell  <nathan@acm.org>
4857         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
4858         diagnostics.
4859         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
4860         * init.c (build_new_1): Extra arg to complete_type_or_else.
4861         (build_delete): Likewise.
4862         * typeck.c (require_complete_type): Likewise.
4863         (pointer_int_sum): Likewise.
4864         (pointer_diff): Likewise.
4865         (build_component_ref): Likewise.
4867         * typeck2.c (incomplete_type_error): Always use cp_error.
4868         Show declaration of undefined type, if appropriate.
4869         Deal with UNKNOWN_TYPE nodes.
4871         * typeck.c (require_complete_type): Use TYPE_SIZE as
4872         size_zero_node to mean incomplete type.
4873         (require_complete_type_in_void): New function.
4874         (build_compound_expr): Call complete_type_in_void for LHS.
4875         (build_c_cast): Call complete_type_in_void for void cast.
4876         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
4877         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
4878         require_complete_type_in_void.  Call it.
4879         * cp-tree.h (require_complete_type_in_void): Prototype new function.
4881         * typeck.c (convert_arguments): Use alternative format for
4882         function decls.  Don't require_complete_type here.  Simplify
4883         diagnostic printing.
4884         (convert_for_initialization): Don't require_complete_type on RHS yet.
4885         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
4887         * call.c (build_over_call): Cope with qualified void return type.
4888         * semantics.c (finish_call_expr): Likewise.
4889         * typeck.c (build_function_call_real): Likewise.
4890         (c_expand_return): Likewise.
4891         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
4893         * call.c (print_z_candidates): Use alternate print format, to be
4894         consistent with (pt.c) print_candidates.
4895         * method.c (hack_identifier): List candidate members.
4896         * search.c (lookup_field): Build ambiguous list, and show it, if
4897         ambiguous.
4899 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
4901         * typeck.c (decay_conversion): Don't confuse constant array
4902         variables with their initializers.
4904         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
4905         merging decls.
4906         * pt.c (regenerate_decl_from_template): Tweak for clarity.
4907         (instantiate_decl): Mark a decl instantiated before regenerating
4908         it to avoid recursion.
4909         * tree.c (mapcar): Don't call decl_constant_value unless we know
4910         something is TREE_READONLY_DECL_P.
4912         * class.c (check_for_override): Don't stop checking when we find
4913         the first overridden function.  Delete #if 0'd code.
4914         * search.c (get_matching_virtual): Likewise.
4916 1999-02-25  Richard Henderson  <rth@cygnus.com>
4918         * lang-specs.h: Define __FAST_MATH__ when appropriate.
4920 1999-02-24  Mike Stump  <mrs@wrs.com>
4922         * typeck.c (convert_for_assignment): Allow boolean integral constant
4923         expressions to convert to null pointer.
4925 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4927         * decl.c (lookup_namespace_name): Resolve namespace aliases.
4929         * class.c (push_nested_class): Allow namespaces.
4931         * decl2.c (set_decl_namespace): Add friendp parameter.
4932         * decl.c (grokfndecl): Pass it.
4933         (grokvardecl): Likewise.
4934         * cp-tree.h: Change declaration.
4936 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
4938         * pt.c (tsubst): Allow an array of explicit size zero.
4940 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
4942         * errfn.c: Change varargs code to look like toplev.c.
4944         * method.c (process_modifiers): Don't prepend 'U' for char or
4945         wchar_t.
4947 1999-02-20  Craig Burley  <craig@jcb-sc.com>
4949         * Make-lang.in (cplib2.ready): Don't consider updating
4950         cplib2 stuff if the current directory isn't writable, as
4951         it won't work (such as during a `make install').
4953 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
4955         * decl2.c (start_objects): Make file scope constructors and
4956         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4957         ASM_OUTPUT_DESTRUCTOR are defined.
4959 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
4961         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4962         (fn_type_unification): Adjust prototype.
4963         (lookup_fnfields_1): Declare.
4964         * call.c (add_template_candidate_real): Adjust call to
4965         fn_type_unification.
4966         * class.c (add_method): Don't allow duplicate declarations of
4967         constructors or destructors.
4968         (resolve_address_of_overloaded_function): Remove unused variable.
4969         Adjust call to fn_type_unification.
4970         * decl.c (grokfndecl): Be more robust in the face of illegal
4971         specializations.
4972         * decl2.c (check_classfn): Remove hokey handling of member
4973         templates.
4974         * pt.c (determine_specialization): Improve comments.  Adjust to
4975         handle template argument deduction as per the standard.
4976         (check_explicit_specialization): Fix comment spacing.  Handle
4977         type-conversion operators correctly.  Improve error-recovery.
4978         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4979         (get_bindings_real): Simplify handling of static members.
4980         * search.c (lookup_fnfields_1): Make it have external linkage.
4981         * typeck.c (compparms): Fix comment.
4982         (build_unary_op): Don't try to figure out which template
4983         specialization is being referred to when when the address-of
4984         operator is used with a template function.
4986 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4988         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4989         keyword to match an analogous change at the top level.
4991         * tree.c (lvalue_or_else): Likewise.
4993 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
4995         * decl.c (xref_basetypes): Comment.
4996         * pt.c (instantiate_class_template): Use xref_basetypes.
4998 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
5000         * cp-tree.h (tsubst): Change prototype.
5001         (tsubst_expr): Likewise.
5002         (tsubst_copy): Likewise.
5003         (type_unification): Remove prototype.
5004         * call.c (convert_default_arg): Adjust call to tsubst_expr.
5005         * class.c (resolve_address_of_overloaded_function): Just use
5006         fn_type_unification.
5007         * decl.c (grokdeclarator): Adjust call to tsubst.
5008         * method.c (build_template_parm_names): Likewise.
5009         * pt.c (GTB_VIA_VIRTUAL): New macro.
5010         (GTB_IGNORE_TYPE): Likewise.
5011         (resolve_overloaded_unification): Add `complain' parameter.
5012         (try_one_overload): Likewise.
5013         (tsubst_template_arg_vector): Likewise.
5014         (tsubst_template_parms): Likewise.
5015         (tsubst_aggr_type): Likewise.
5016         (tsubst_arg_types): Likewise.
5017         (tsubst_call_declarator_parms): Likewise.
5018         (unify): Remove explicit_mask.
5019         (type_unification_real): Likewise.
5020         (get_template_base_recursive): Likewise.
5021         (coerce_template_template_parms): Provide prototype.
5022         (tsubst_function_type): Likewise.
5023         (try_class_unification): New function.
5024         All callers changed to use new complain parameter.
5025         (get_template_base): Use try_class_unification.
5026         (unify): Adjust handling of classes derived from template types.
5027         (fn_type_unification): Substitute explicit arguments before
5028         unification.
5030 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5032         * decl.c (pushdecl): Remove dead code.
5034 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
5036         * decl2.c (finish_objects): Fix code I missed in previous change.
5038 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
5040         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
5041         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
5043         * pt.c (maybe_process_partial_specialization): Complain about
5044         'template <>' on non-specialization.
5046 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
5048         * decl.c (grokdeclarator): Catch wierd declarators.
5049         * decl2.c (finish_file): Don't abort because of namespace parsing
5050         failure.
5051         (check_decl_namespace): Remove.
5053 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
5055         * cp-tree.h (get_template_base): Don't declare.
5056         (dfs_walk): Declare.
5057         (dfs_unmark): Likewise.
5058         (markedp): Likewise.
5059         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
5060         targs to get_template_base.
5061         (get_template_base_recursive): Move here from search.c.  Check to
5062         see that the base found can be instantiated to form the desired
5063         type.
5064         (get_template_base): Likewise.
5065         (get_class_bindings): Simplify.
5066         * search.c (get_template_base_recursive): Move to pt.c.
5067         (get_template_base): Likewise.
5068         (markedp): Make it global.
5069         (dfs_walk): Likewise.
5070         (dfs_unmark): Likewise.
5072 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
5074         * pt.c (maybe_process_partial_specialization): Complain about
5075         specialization in wrong namespace.
5076         * tree.c (decl_namespace_context): New fn.
5078 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5080         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
5081         * pt.c (coerce_template_template_parms): Handle nested
5082         template template parameters.
5084 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
5086         * typeck2.c: Update email addresses.
5088 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5090         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
5091         turned off.
5093 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
5095         * lex.c (retrofit_lang_decl): Split out...
5096         (build_lang_decl): From here.
5097         * decl.c (pushdecl): Call it for functions generated by the middle
5098         end that don't have DECL_LANG_SPECIFIC.
5099         * cp-tree.h: Declare it.
5101         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
5102         (start_objects, finish_objects): Only use special
5103         init_priority code if the user specified a priority.
5104         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
5105         objects.
5107 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
5109         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
5110         mkstemp.o.  Get them from libiberty now.
5111         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
5113 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5115         * decl2.c (lang_decode_option): Use read_integral_parameter.
5117 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
5119         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
5120         before calling complete_type_or_else.
5122 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5124         * input.c (inline): Don't define, its handled by system.h.
5126 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
5128         * decl2.c: Don't define flag_no_ident here.  Don't process
5129         -f(no-)ident here.
5130         * cp-tree.h: Don't declare flag_no_ident here.
5131         * lang-specs.h: Map -Qn to -fno-ident.
5133 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
5135         * cp-tree.h (struct tree_binding): Replace scope field with a union.
5136         (BINDING_SCOPE): Adjust.
5137         * decl.c (BINDING_LEVEL): Adjust.
5139 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
5141         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
5142         member constants.
5144         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
5145         a ctor initializer.
5147         * tree.c (equal_functions): Fix name in prototype.
5149         * decl.c (push_local_binding): Add FLAGS argument.
5150         (pushdecl, push_overloaded_decl): Pass it.
5151         * decl2.c (do_local_using_decl): Likewise.
5152         * cp-tree.h: Adjust prototype.
5153         * decl.c (poplevel): Fix logic.
5155         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
5156         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
5157         (cat_namespace_levels): Don't loop forever.
5159 1999-01-25  Richard Henderson  <rth@cygnus.com>
5161         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
5163 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
5165         * class.c (resolve_address_of_overloaded_function): Mark the
5166         chosen function used.
5168         * call.c (build_call): Make sure that a function coming in has
5169         been marked used already.
5170         * decl.c (expand_static_init): Call mark_used instead of
5171         assemble_external.
5172         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
5173         alloc_eh_object, expand_throw): Likewise.
5174         * init.c (build_builtin_delete_call): Likewise.
5175         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
5176         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5177         expand_generic_desc): Likewise.
5179 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5181         * tree.c (equal_functions): New function.
5182         (ovl_member): Call it.
5184 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5186         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
5188 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5190         * decl.c (decls_match): Return 1 if old and new are identical.
5191         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
5193 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5195         * decl.c (start_function): Make member functions one_only on windows.
5196         * decl2.c (import_export_decl): Likewise.
5198         * decl.c (grokdeclarator): Don't complain about implicit int in
5199         a system header.  Change same-name field check to not complain in
5200         a system header instead of within extern "C".
5202 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5204         * cp-tree.h (PUSH_GLOBAL): New macro.
5205         (PUSH_LOCAL): Likewise.
5206         (PUSH_USING): Likewise.
5207         (namespace_bindings_p): Declare.
5208         (push_overloaded_decl): Likewise.
5209         * decl.c (push_overloaded_decl): Don't make it static.  Check for
5210         illegal declarations after using declarations here.
5211         (namespace_bindings_p): Likewise.
5212         (duplicate_decls): Don't consider declarations from different
5213         namespaces to be the same.
5214         (pushdecl): Use symbolic PUSH_ constants in calls to
5215         push_overloaded_decl.
5216         (push_overloaded_decl_1): Likewise.
5217         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
5218         (do_nonmember_using_decl): Check for illegal using declarations
5219         after ordinary declarations here.
5220         (do_local_using_decl): Call pushdecl to insert declarations.
5222 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
5224         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
5226 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5228         * tree.c (build_cplus_array_type_1): Don't call build_array_type
5229         for types involving template parameters.
5231         * cp-tree.h (PARM_DECL_EXPR): Delete.
5232         (convert_default_arg): Change prototype.
5233         (check_default_argument): Declare.
5234         (search_tree): Likewise.
5235         * call.c (convert_default_arg): Take the function to which the
5236         default argument belongs as a parameter, and do any necessary
5237         instantiation here, instead of ...
5238         (build_over_call): Here.
5239         * decl.c (local_variable_p): New function.
5240         (check_default_argument): Likewise, split out and tidied from ...
5241         (grokparms): Here.
5242         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
5243         * pt.c (tsubst_call_declarator_parms): New function.
5244         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
5245         with CALL_EXPRs, rather than trying to be clever.
5246         (tsubst): Use tsubst_call_declarator_parms.
5247         * tree.c (search_tree): Don't make it static.
5248         * typeck.c (convert_arguments): Use new interface to
5249         convert_default_arg.
5251 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
5253         * error.c (dump_function_decl): Don't print the argument types for
5254         a function when the verbosity level is negative.
5256         * call.c (build_over_call): Check format attributes at call-time.
5258         * pt.c (tsubst_copy): Fix comment.
5259         (unify): Don't allow unification with variable-sized arrays.
5261         * semantics.c (finish_stmt_expr): When processing a template make
5262         the BIND_EXPR long-lived.
5264 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
5266         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
5267         (import_export_vtable): Not here.
5269 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5271         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
5272         non-static member function.
5274 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5276         * class.c (instantiate_type): Only diagnose illegal address of member
5277         function if complaining.
5279         * decl.c (lookup_name_real): Remove duplicate code.
5281 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5283         * tree.c (copy_template_template_parm): Use permanent_obstack.
5285 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5287         * pt.c (unify): Remove restrictions on deduction of argument
5288         of template template parameters.
5290 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5292         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
5294         * class.c (resolve_address_of_overloaded_function): Show list of
5295         all candidates, when none of them match.
5297 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
5299         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
5300         definition of 'casting away const' in reinterpret_cast<>.
5302 1999-01-18  Graham  <grahams@rcp.co.uk>
5304         * cvt.c: Add include for decl.h, remove extern for
5305         static_aggregates which is now provided by decl.h.
5307         * Makefile.in (cvt.o): Add dependency for decl.h and missing
5308         dependencies for convert.h and flags.h.
5310 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5312         * decl2.c (do_dtors): Set current location to that of the
5313         decl, for sensible diagnostics and debugging.
5314         (check_classfn): Issue `incomplete type' error, if
5315         class is not defined.
5317 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5319         * cp-tree.h: Add prototype for bound_pmf_p.
5321 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5322             Manfred Hollstein <manfred@s-direktnet.de>
5324         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
5325         -Wreturn-type.
5327 1999-01-16  Nathan Sidwell  <nathan@acm.org>
5329         * cp-tree.h (struct lang_type): Added has_mutable flag.
5330         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
5331         (TYPE_HAS_MUTABLE_P): New macro to read it.
5332         (cp_has_mutable_p): Prototype for new function.
5333         * class.c (finish_struct_1): Set has_mutable from members.
5334         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
5335         it contains a mutable.
5336         * typeck.c (cp_has_mutable_p): New function.
5338 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
5340         * pt.c (process_template_parm): Ignore top-level qualifiers on
5341         non-type parameters.
5343         * decl.c (start_function): Use current_function_parms in the call
5344         to require_complete_type_for_parms, not the probably empty
5345         DECL_ARGUMENTS.
5347 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
5349         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
5351         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
5352         that we don't suppress the other copies.
5353         * lex.c (handle_cp_pragma): Likewise.
5355 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
5357         * decl.c (grokdeclarator): Undo 1998-12-14 change.
5358         * tree.c (build_cplus_array_type_1): Likewise.
5359         * pt.c (instantiate_class_template): Remove misleading comment.
5360         (tsubst_aggr_type): Substitute if there are template parameters,
5361         regardless of whether or not they use template arguments.
5362         (unify): Likewise, but for unification.
5364 1999-01-12  Richard Henderson  <rth@cygnus.com>
5366         * cp-tree.h (flag_permissive): Declare extern.
5368 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
5370         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
5371         here.
5372         (lang_type): Add is_partial_instantiation.  Decrease width of
5373         dummy.
5374         (PARTIAL_INSTANTIATION_P): New macro.
5375         (OPERATOR_TYPENAME_P): Remove.
5376         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
5377         OPERATOR_TYPENAME_P.
5378         (grok_op_properties): Likewise.
5379         * friend.c (do_friend): Handle friends that are member functions
5380         correctly.
5381         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
5382         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
5383         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
5384         any more partial instantiation than is absolutely necessary for
5385         implicit typename.  Set PARTIAL_INSTANTIATION_P.
5386         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5387         * semantics.c (begin_class_definition): Handle partial
5388         specializations of a type that was previously partially
5389         instantiated.
5391 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
5393         * g++spec.c (LIBSTDCXX): Provide default definition.
5394         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5396 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5398         * Make-lang.in (g++.o): Depend on prefix.h.
5400 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
5402         * tree.c (bound_pmf_p): New fn.
5403         * typeck.c (build_c_cast): Use it.
5405         * decl.c (grok_op_properties): Use same_type_p.
5407 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5409         * Makefile.in (cvt.o): Depend on toplev.h.
5411         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5413         * cvt.c: Include toplev.h.
5415         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5416         definitions.
5418         * init.c (expand_vec_init): Initialize variable `itype'.
5420         * lex.c (yyerror): Cast the argument passed to a ctype function to
5421         an unsigned char.
5423         * method.c (build_mangled_C9x_name): Wrap prototype and definition
5424         in "HOST_BITS_PER_WIDE_INT >= 64".
5426         * typeck.c (build_binary_op): Mark parameter `convert_p' with
5427         ATTRIBUTE_UNUSED.
5429 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
5431         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5432         * tree.c (build_exception_variant): Don't crash on empty throw
5433         specs.
5435 1998-12-18  DJ Delorie  <dj@cygnus.com>
5437         * cvt.c (convert_to_reference): Check for both error_mark_node
5438         and NULL_NODE after call to convert_for_initialization.
5440 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
5442         * error.c (interesting_scope_p): New fn.
5443         (dump_simple_decl): Use it.
5444         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5445         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5447 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
5449         * class.c (resolve_address_of_overloaded_function): Do conversion
5450         to correct type here, rather than ...
5451         (instantiate_type): Here.
5453         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5454         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5455         (decl_template_parm_p): Remove.
5456         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5457         parameter.
5458         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5459         * pt.c (push_inline_template_parms_recursive): Set it.
5460         (decl_template_parm_p): Remove.
5461         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5462         (process_template_parm): Set it.
5464 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
5466         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5467         if configured with cpplib.
5469 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
5471         * decl.c (poplevel): Make sure ns_binding is initialized.
5473         * decl.c (finish_function): Undo inadvertent change in previous
5474         patch.
5476 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
5478         * class.c (pushclass): Tweak handling of class-level bindings.
5479         (resolve_address_of_overloaded_function): Update pointer-to-member
5480         handling.
5481         (instantiate_type): Likewise.
5482         * cvt.c (cp_convert_to_pointer): Likewise.
5483         * decl.c (pop_binding): Take the DECL to pop, not just the name.
5484         Deal with `struct stat' hack.
5485         (binding_level): Add to documentation.
5486         (push_binding): Clear BINDING_TYPE.
5487         (add_binding): New function.
5488         (push_local_binding): Use it.
5489         (push_class_binding): Likewise.
5490         (poplevel): Adjust calls to pop_binding.
5491         (poplevel_class): Likewise.
5492         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5493         declarations to current binding level.
5494         (push_class_level_binding): Likewise.
5495         (push_overloaded_decl): Adjust handling of OVERLOADs in local
5496         bindings.
5497         (lookup_namespace_name): Don't crash when confronted with a
5498         TEMPLATE_DECL.
5499         (lookup_name_real): Do `struct stat' hack in local binding
5500         contexts.
5501         (build_ptrmemfunc_type): Adjust documentation.
5502         (grokdeclarator): Don't avoid building real array types when
5503         processing templates unless really necessary.
5504         (finish_method): Adjust calls to pop_binding.
5505         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5506         not reparse_decl_as_expr.
5507         (build_expr_from_tree): Deal with a template-id as the function to
5508         call in a METHOD_CALL_EXPR.
5509         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5510         (maybe_adjust_types_For_deduction): Don't do peculiar things with
5511         METHOD_TYPEs here.
5512         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
5513         pointer-to-member types where necessary.
5514         * tree.c (build_cplus_array_type_1): Don't avoid building real
5515         array types when processing templates unless really necessary.
5516         (build_exception_variant): Compare the exception lists correctly.
5518 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
5520         * cp-tree.def (CPLUS_BINDING): Update documentation.
5521         * cp-tree.h (LOCAL_BINDING_P): New macro.
5522         (lang_identifier): Rename local_value to bindings.
5523         (tree_binding): Make `scope' of type `void*', not `tree'.
5524         (BINDING_SCOPE): Update documentation.
5525         (IDENTIFIER_LOCAL_VALUE): Remove.
5526         (IDENTIFIER_CLASS_VALUE): Document.
5527         (IDENTIFIER_BINDING): New macro.
5528         (IDENTIFIER_VALUE): Likewise.
5529         (TIME_IDENTIFIER_TIME): Likewise.
5530         (TIME_IDENTIFIER_FILEINFO): Likewise.
5531         (IMPLICIT_TYPENAME_P): Likewise.
5532         (set_identifier_local_value): Remove.
5533         (push_local_binding): New function.
5534         (push_class_binding): Likewise.
5535         * class.c (pushclass): Update comments; use push_class_binding.
5536         * decl.c (set_identifier_local_value_with_scope): Remove.
5537         (set_identifier_local_value): Likewise.
5538         (push_binding): New function.
5539         (pop_binding): Likewise.
5540         (binding_level): Update documentation.  Remove shadowed.
5541         (BINDING_LEVEL): New macro.
5542         (free_binding_nodes): New variable.
5543         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
5544         BLOCK_VARs when doing for-scope extension.  Remove effectively
5545         dead code.
5546         (pushlevel_class): Tweak formatting.
5547         (poplevel_class): Adjust for new name-lookup scheme.
5548         (print_binding_level): Likewise.
5549         (store_bindings): Likewise.
5550         (pushdecl): Likewise.
5551         (pushdecl_class_level): Likewise.
5552         (push_class_level_binding): Likewise.
5553         (push_overloaded_decl): Update comments.  Adjust for new
5554         name-lookup scheme.
5555         (lookup_name_real): Likewise.
5556         (lookup_name_current_level): Likewise.
5557         (cp_finish_decl): Likewise.
5558         (require_complete_types_for_parms): Likewise.  Remove misleading
5559         #if 0'd code.
5560         (grok_parms): Likewise.  Don't call
5561         require_complete_types_for_parms here.
5562         (grok_ctor_properties): Don't treat templates as copy
5563         constructors.
5564         (grop_op_properties): Or as assignment operators.
5565         (start_function): Document.  Adjust for new name-lookup scheme.
5566         (finish_function): Likewise.
5567         * decl2.c (do_local_using_decl): Use push_local_binding.
5568         * lex.c (begin_definition_of_inclass_inline): New function, split
5569         out from ...
5570         (do_pending_inlines): Here, and ...
5571         (process_next_inline): Here.
5572         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5573         (init_filename_times): Likewise.
5574         (extract_interface_info): Likewise.
5575         (ste_typedecl_interface_info): Likewise.
5576         (check_newline): Likewise.
5577         (dump_time_statistics): Likewise.
5578         (handle_cp_pragma): Likewise.
5579         (do_identifier): Adjust for new name-lookup scheme.
5580         * parse.y (function_try_block): Return ctor_initializer_opt value.
5581         (fndef): Use it.
5582         (fn.defpen): Pass appropriate values to start_function.
5583         (pending_inline): Use functor_try_block value, and pass
5584         appropriate values to finish_function.
5585         * pt.c (is_member_template): Update documentation; remove handling
5586         of FUNCTION_DECLs.  As per name, this function should deal only in
5587         TEMPLATE_DECLs.
5588         (decl_template_parm_p): Change name of olddecl parameter to decl.
5589         (check_template_shadow): Adjust for new name-lookup scheme.
5590         (lookup_template_class): Likewise.
5591         (tsubst_decl): Tweak so as not to confuse member templates with
5592         copy constructors and assignment operators.
5593         (unify): Handle UNION_TYPEs.
5594         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5595         (lang_print_xnode): Adjust for new name-lookup scheme.
5596         * typeck.c (mark_addressable): Likewise.
5597         (c_expand_return): Likewise.
5599 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
5601         * decl.c (grokdeclarator): Allow field with same name as class
5602         in extern "C".
5604         * decl.c (lookup_name_real): Don't limit field lookup to types.
5605         * class.c (check_member_decl_is_same_in_complete_scope): No error
5606         if icv and x are the same.
5607         * lex.c (do_identifier): Tweak error message.
5609 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5611         * decl.c (start_enum): Use push_obstacks, not
5612         end_temporary_allocation.
5613         (finish_enum): Call pop_obstacks.
5615 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5617         * class.c (instantiate_type): Return error_mark_node rather than
5618         junk.
5620 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5622         * cp-tree.h (most_specialized_instantiation): New function.
5623         (print_candidates): Likewise.
5624         * class.c (validate_lhs): Remove.
5625         (resolve_address_of_overloaded_function): New function, split out
5626         and then substantially reworked, from ...
5627         (instantiate_type): Use it.  Simplify.
5628         * cvt.c (convert_to_reference): Complain when caller has indicated
5629         that's the right thing to do.  Don't crash if instantiate_type
5630         fails.
5631         * pt.c: Substitute `parameters' for `paramters' throughout.
5632         (print_candidates): Don't make it static.
5633         (most_specialized_instantiation): Split out from ...
5634         (most_specialized): Here.
5636 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
5638         * lex.c (lang_init_options): Initialize cpplib.
5639         * decl2.c (parse_options,cpp_initialized): Removed.
5640         (lang_decode_option): Move initialization of cpplib to
5641         lang_init_options.
5643 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5645         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
5646         well as the TYPE_DECL, when a typedef name is assigned to a
5647         previously anonymous type.
5649 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
5651         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
5652         __cp_eh_info for getting the eh info pointer.  Add table_index to
5653         field list.
5654         (push_eh_cleanup): Don't increment 'handlers' data field.
5655         (process_start_catch_block): Don't set the 'caught' field.
5657         * cp/exception.cc (CP_EH_INFO): New macro for getting the
5658         exception info pointer within library routines.
5659         (__cp_eh_info): Use CP_EH_INFO.
5660         (__start_cp_handler): Get exception info pointer, set caught field,
5661         and increment the handlers field.  Avoids this being done by handlers.
5662         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
5663         (uncaught_exception): Use CP_EH_INFO macro.
5665 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
5667         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
5669 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
5671         * lex.c (check_newline): Add support for \ as `natural'
5672         characters in file names in #line to be consistent with #include
5673         handling.  We support escape processing in the # 1 "..." version of
5674         the command.  See also support in cp/lex.c.
5676 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5678         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
5679         structure.
5681 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
5683         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
5685         * error.c (dump_simple_decl): Also print namespace context.
5686         (dump_function_decl): Likewise.
5688         * decl2.c (ambiguous_decl): Don't print old value if it's
5689         error_mark_node.
5691         * decl.c (lookup_name_real): Fix handling of local types shadowed
5692         by a non-type decl.  Remove obsolete code.
5693         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
5695         * lang-options.h: Add -fpermissive.
5696         * decl2.c: Likewise.
5697         * cp-tree.h: Add flag_permissive.
5698         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
5699         were specified, set flag_pedantic_errors.
5700         * call.c (build_over_call): Turn dropped qualifier messages
5701         back into pedwarns.
5702         * cvt.c (convert_to_reference): Likewise.
5703         * typeck.c (convert_for_assignment): Likewise.
5705 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
5707         * decl2.c (coerce_new_type): Use same_type_p.
5708         (coerce_delete_type): Likewise.
5710         * call.c (check_dtor_name): Return 1, not error_mark_node.
5712 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
5714         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
5715         if MULTIPLE_SYMBOL_SPACES.
5717         * pt.c (check_template_shadow): New fn.
5718         * decl2.c (grokfield): Use it.
5719         * decl.c (pushdecl): Likewise.
5720         (pushdecl_class_level): Likewise.
5721         (start_method): Likewise.
5722         (xref_tag): Don't try to use 't' if we're defining.
5724         * call.c (check_dtor_name): Just return an error_mark_node.
5725         * pt.c (lookup_template_class): Complain about using non-template here.
5726         * parse.y (apparent_template_type): Not here.
5728         * pt.c (check_explicit_specialization): Complain about specialization
5729         with C linkage.
5731         * lang-options.h: Add -f{no-,}implicit-inline-templates.
5733         * pt.c (convert_nontype_argument): Don't assume that any integer
5734         argument is intended to be a constant-expression.
5736 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
5738         * class.c (handle_using_decl): Fix comment.  Don't lookup
5739         constructors in base classes.
5740         (validate_lhs): Fix typo in comment.
5741         * search.c (lookup_field_1): Don't return a USING_DECL.
5743         * cp-tree.h (DECL_ACCESS): Improve documentation.
5745         * decl.c (expand_static_init): Don't set the initialization-done
5746         flag until the initialization is done.
5748 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
5750         * decl2.c (validate_nonmember_using_decl): Complain about using
5751         declarations for class members.
5753 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
5755         * typeck2.c (process_init_constructor): Use same_type_p.
5757         * decl.c (check_tag_decl): Don't warn about null decl inside a
5758         class.
5760         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
5761         UNIFY_ALLOW_NONE.
5762         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
5763         (resolve_overloaded_unification): Strip baselinks.
5765 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5767         * g++spec.c: Don't prototype xmalloc.
5769 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
5771         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
5773         * decl.c (check_tag_decl): Do complain about null friend decl at
5774         file scope.
5776 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5778         * lex.c (make_lang_type): Clear the whole struct lang_type, not
5779         only the first multiple of sizeof (int).
5781 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5783         * decl.c (start_decl): An explicit specialization of a static data
5784         member is only a definition if it has an initializer.
5786         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
5787         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
5788         cp_finish_decl.
5789         * init.c (expand_default_init): Check for DIRECT_BIND instead of
5790         DECL_ARTIFICIAL.
5792         * call.c (build_over_call): Use build_decl.
5794         * except.c (expand_throw): Just use convert, not
5795         build_reinterpret_cast.
5797         * lex.c (handle_generic_pragma): Use token_buffer.
5799         * decl.c (check_tag_decl): Don't complain about null friend decl.
5801 1998-11-24  Dave Pitts  <dpitts@cozx.com>
5803         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
5804         first position.
5805         * lex.c (check_newline): Use ISALPHA.
5806         (readescape): Use ISGRAPH.
5807         (yyerror): Use ISGRAPH.
5809 1998-11-24  Nathan Sidwell  <nathan@acm.org>
5811         * search.c (get_abstract_virtuals): Do not use initial
5812         CLASSTYPE_ABSTRACT_VIRTUALS.
5813         * typeck2.c (abstract_virtuals_error): Show location of abstract
5814         declaration.
5815         * call.c (build_new_method_call): Use
5816         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
5817         * class.c (finish_struct_bits): Don't bother working out whether
5818         get_abstract_virtuals will do anything, just do it.
5820 1998-11-24  Graham  <grahams@rcp.co.uk>
5822         * typeck.c (build_component_ref): Remove unused statement.
5824 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5826         * class.c (add_method): Catch invalid overloads.
5828         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
5829         * search.c (lookup_conversions): Handle getting real OVERLOADs.
5830         (add_conversions): Likewise.  Revert last change.
5831         * call.c (add_conv_candidate): Pass totype to add_candidate instead
5832         of fn.  Don't add a new candidate if the last one was for the same
5833         type.
5834         (print_z_candidates): Handle getting a type as a function.
5835         (joust): If we got two conversion candidates to the same type,
5836         just pick one.
5837         (build_object_call): Lose 'templates'.
5838         (build_user_type_conversion_1): Handle getting real OVERLOADs.
5840 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5842         * typeck2.c (process_init_constructor): If there are elements
5843         that don't have initializers and they need to have constructors
5844         run, supply them with initializers.
5846         * class.c (finish_struct_1): A class with a 0-width bitfield is
5847         still empty.
5849 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
5851         * pt.c (instantiate_class_template): Don't try to figure out what
5852         specialization to use for a partial instantiation.  Correct
5853         typos in a couple of comments.  Avoid calling uses_template_parms
5854         multiple times.
5856 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
5858         * method.c (process_overload_item): Add call to
5859         build_mangled_C9x_name for intTI_type_nodes.
5860         (build_mangled_C9x_name): Add prototype, define.
5861         * decl.c (init_decl_processing): Add names for
5862         TImode_type_node.
5864 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5866         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
5868         * class.c (finish_struct_1): Set things up for 0-width bitfields
5869         like we do for others.
5871         * decl.c (check_tag_decl): New fn.
5872         (shadow_tag): Split out from here.
5873         * decl2.c (grok_x_components): Call it.
5875 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
5877         * decl.c: Lose warn_about_return_type.
5878         (grokdeclarator): Always complain about implicit int, except for
5879         `main () { ... }'.
5881         * decl.c (tag_name): New fn.
5882         (xref_tag): Complain about using typedef-name after class-key.
5884         * init.c (expand_vec_init): Also keep going if from_array.
5886         * tree.c (is_overloaded_fn): Also handle the output of
5887         build_offset_ref.
5889         * decl.c (grokdeclarator): Use constructor_name when comparing
5890         field name against enclosing class.
5891         * class.c (finish_struct_anon): Likewise.
5893 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
5895         * decl.c (poplevel): Remove code to handle KEEP == 2.
5896         (finish_function): Don't confuse BLOCK-order when
5897         processing a destructor.
5899 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5901         * decl.c (require_complete_types_for_parms): Call layout_decl
5902         after we've completed the type.
5904 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5906         * decl2.c (validate_nonmember_using_decl): Allow using templates
5907         from the global namespace.
5909 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5911         Handle specifying template args to member function templates.
5912         * tree.c (build_overload): Always create an OVERLOAD for a template.
5913         * search.c (add_conversions): Handle finding an OVERLOAD.
5914         * decl2.c (check_classfn): Likewise.
5915         * lex.c (identifier_type): See through a baselink.
5916         * parse.y (do_id): Don't call do_identifier if we got a baselink.
5917         * class.c (instantiate_type, case TREE_LIST): Recurse.
5919         * decl.c (grokdeclarator): Allow a boolean constant for array
5920         bounds, odd as that sounds.
5922         * pt.c (unify): Be more strict about non-type parms, except for
5923         array bounds.
5924         (UNIFY_ALLOW_INTEGER): New macro.
5926 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
5928         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
5930 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
5932         * semantics.c (begin_class_definition): Call
5933         maybe_process_partial_specialization before push_template_decl.
5934         Don't call push_template_decl for a specialization.
5935         * search.c (lookup_field): Do return a member template class.
5936         * decl2.c (handle_class_head): Handle member template classes.
5938         * decl.c (grokdeclarator): A parm type need not be complete.
5940         * pt.c (convert_nontype_argument): Fix thinko.
5942 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5944         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5945         (global_delete_fndecl): New variable.
5946         * decl.c (global_delete_fndecl): Define it.
5947         (init_decl_processing): Set it.
5948         * init.c (build_builtin_delete_call): Use it.
5949         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5950         nodes.
5952 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5954         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5955         type.
5957         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5958         * call.c (build_object_call): Also support references to functions.
5959         * typeck.c (convert_for_initialization): Don't decay a function
5960         if the target is a reference to function.
5962         * search.c (add_conversions): Get all the overloads from a class.
5964         * decl.c (grok_ctor_properties): Complain about any constructor
5965         that will take a single arg of the class type by value.
5967         * typeck2.c (build_functional_cast): Can't create objects of
5968         abstract classes this way.
5969         * cvt.c (ocp_convert): Likewise.
5971         * decl.c (grokfndecl): Member functions of local classes are not
5972         public.
5974 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5976         * Make-lang.in (cc1plus): Add dependency on hash.o.
5978 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5980         * search.c (get_abstract_virtuals): Complain about virtuals with
5981         no final overrider.
5982         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5983         with no final overrider.
5984         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5985         on virtuals with no final overrider.
5987         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5989         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5990         after layout_type.
5992         * friend.c (do_friend): Don't set_mangled_name_for_decl.
5994         * class.c (finish_struct_anon): Complain about non-fields.
5995         * decl2.c (build_anon_union_vars): Likewise.
5997         * decl.c (grokdeclarator): Normal data members can't have the same
5998         name as the class, either.
5999         * class.c (finish_struct_anon): Neither can members of an
6000         anonymous union.
6002 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
6004         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
6005         (TYPE_BINFO): Likewise.
6006         (IS_AGGR_TYPE): Tweak.
6007         (SET_IS_AGGR_TYPE): New macro.
6008         (CLASS_TYPE_P): Tweak.
6009         (lang_type): Group mark bitfields together.  Remove linenum.
6010         (CLASSTYPE_SOURCE_LINE): Remove macro.
6011         (CLASSTYPE_MARKED_N): New macro.
6012         (SET_CLASSTYPE_MARKED_N): Likewise.
6013         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
6014         (CLASS_TYPE_MARKED_*): Use them.
6015         (SET_CLASSTYPE_MARKED_*): Likewise.
6016         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
6017         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6018         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
6019         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
6020         * class.c (class_cache_obstack): New variable.
6021         (class_cache_firstobj): Likewise.
6022         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
6023         (pushclass): Free the cache, when appropriate.
6024         (popclass): Tidy.
6025         (maybe_push_cache_obstack): Use class_cache_obstack.
6026         * decl.c (include hash.h).
6027         (typename_hash): New function.
6028         (typename_compare): Likewise.
6029         (build_typename_type): Check the hash table to avoid creating
6030         duplicates.
6031         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
6032         (grokdeclarator): Use CLASS_TYPE_P.
6033         (xref_basetypes): Likewise.
6034         (start_function): Likewise.  Don't put current_class_ref on the
6035         permanent obstack.
6036         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
6037         and TYPE_TI_ARGS.
6038         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
6039         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
6040         fields for types other than class types.  Do clear TYPE_ALIAS_SET
6041         for types other than class types, though.
6042         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
6043         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6044         * pt.c (process_template_parm): Don't set
6045         CLASSTYPE_GOT_SEMICOLON.
6046         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6047         Coerce arguments on the momentary obstack.
6048         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6049         (instantiate_class_template): Calculate template arguments on the
6050         momentary obstack.  Tidy.
6051         (tsubst_template_arg_vector): Use make_temp_vec.
6052         (tsubst_aggr_type): Put template arguments on the momentary
6053         obstack.
6054         (tsubst_decl): Likewise.
6055         (tsubst): Copy the array bounds index to the permanent obstack
6056         before building index types.  Use new macros.
6057         (unify): Use new macros.
6058         (do_type_instantiation): Likewise.
6059         * search.c (lookup_fnfields_1): Use new macros.
6060         (dfs_pushdecls): Build envelopes on the cache obstack.
6061         (dfs_compress_decls): Use new macros.
6062         (push_class_decls): Build on the cache obstack.
6063         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
6064         * sign.c (build_signature_pointer_or_reference_type): Use
6065         SET_IS_AGGR_TYPE.
6066         * tree.c (make_binfo): Check CLASS_TYPE_P.
6067         (copy_template_template_parm): Adjust.
6068         (make_temp_vec): Use push_expression_obstack.
6069         * typeck.c (complete_type): Use new macros.
6070         (comptypes): Likewise.
6072 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
6074         * pt.c (tsubst): Add diagnostics for invalid array, reference
6075         and pointer to member types.
6077 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6079         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
6081         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
6082         Simplify.
6084         * parse.y (structsp): Fix cut-and-paste error.
6086         * init.c (build_new): Complain about non-integral size.
6088         * parse.y (unary_expr): Complain about defining types in sizeof.
6090         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
6092         * rtti.c (build_x_typeid): Complain about typeid without
6093         including <typeinfo>.
6094         (get_typeid): Likewise.  Complain about typeid of incomplete type.
6095         (get_tinfo_fn_dynamic): Likewise.
6096         (get_typeid_1): Not static anymore.
6097         * except.c (build_eh_type_type): Use get_typeid_1.
6099         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
6100         ambiguous or private bases.  Fix warning for reference cast.
6102 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
6104         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
6105         * decl.c (duplicate_decls): Remove special-case code to deal with
6106         template friends, and just do the obvious thing.
6107         * pt.c (register_specialization): Tweak for clarity, and also to
6108         clear DECL_INITIAL for an instantiation before it is merged with a
6109         specialization.
6110         (check_explicit_specialization): Fix indentation.
6111         (tsubst_friend_function): Handle both definitions in friend
6112         declaration and outside friend declarations.
6113         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
6114         (regenerate_decl_from_template): Tweak accordingly.
6115         (instantiate_decl): Likewise.
6117 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6119         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
6120         member function reference to error.
6121         * cvt.c (ocp_convert): Complain about converting an overloaded
6122         function to void.
6124         * init.c (build_offset_ref): Just return a lone static member
6125         function.
6127         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
6128         not internal ones.
6130         * typeck.c (build_binary_op_nodefault): Improve error handling.
6132         * decl.c (grokfndecl): Complain about making 'main' a template.
6134         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
6136         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
6137         TYPE_DECL in a template.
6139 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
6141         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
6143         * decl.c (struct cp_function): Add named_label_uses.
6144         (push_cp_function_context): Save it.
6145         (pop_cp_function_context): Restore it.
6146         (define_label): Also complain about jumping into the scope of
6147         non-POD objects that don't have constructors.
6148         * tree.c (pod_type_p): New fn.
6150         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
6151         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
6152         (get_tinfo_fn): Not here.
6153         * repo.c (repo_get_id): Abort if we get called for an incomplete
6154         type.
6156 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
6158         * except.c (expand_throw): Make sure first argument to
6159         __cp_push_exception is of type `void*' to avoid spurious error
6160         messages.
6162 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
6164         * pt.c (try_one_overload): Take orig_targs again.  Only check for
6165         mismatches against them; we don't care what a previous call found.
6166         (resolve_overloaded_unification): Adjust.
6168         * search.c (lookup_field): Don't return anything for a non-type
6169         field from a dependent type.
6170         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
6171         in an array declarator.
6172         (start_decl): Push into the class before looking for the field.
6174 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
6176         * method.c (build_overload_value): Handle REFERENCE_TYPE.
6178 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6180         * decl.c (grokdeclarator): Allow namespace-scoped members if they
6181         are friends.
6183 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
6185         * pt.c (tsubst_decl): Don't mess with the global value of an
6186         un-mangled DECL_ASSEMBLER_NAME.
6188 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
6190         * decl.c (init_decl_processing): Remove CYGWIN conditional
6191         since CYGWIN is now able to deal with trapping signals.
6193 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6195         * cp-tree.h: Don't include gansidecl.h.
6196         * exception.cc: Include gansidecl.h (since we don't include config.h)
6197         * g++spec.c: Don't include gansidecl.h.
6199 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
6201         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
6202         size of dummy.
6203         (DECL_DEFINED_IN_CLASS_P): New macro.
6204         (TEMPLATE_PARMS_FOR_INLINE): Document.
6205         (check_static_variable_definition): New function.
6206         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
6207         appropriate.
6208         (check_static_variable_definition): Split out from ...
6209         (grokdeclarator): Here.
6210         * pt.c (check_default_tmpl_args): New function, split out from ...
6211         (push_template_decl_real): Here.
6212         (instantiate_template): Fix comment.
6214 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
6216         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
6217         (CP_TYPE_VOLATILE_P): Likewise.
6218         (CP_TYPE_RESTRICT_P): Likewise.
6220 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
6222         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
6224 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
6226         * class.c (instantiate_type): Be more helpful.
6228         * decl2.c (import_export_decl): Call import_export_class.
6230         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
6231         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
6232         * pt.c (tsubst_copy): Likewise.
6234 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
6236         * init.c (expand_vec_init): Fix off-by-one error.
6238 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
6240         * parse.y (apparent_template_type): New type.
6241         (named_complex_class_head_sans_basetype): Use it.
6242         * Makefile.in (CONFLICTS): One new conflict.
6243         * parse.c: Regenerated.
6245 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
6247         * cp-tree.h (COMPARE_STRICT): New macro.
6248         (COMPARE_BASE): Likewise.
6249         (COMPARE_RELAXED): Likewise.
6250         (COMPARE_REDECLARATION): Likewise.
6251         (same_type_p): Likewise.
6252         (same_or_base_type_p): Likewise.
6253         * call.c (standard_conversion): Use them, in place of comptypes
6254         with numeric arguments.
6255         (reference_binding): Likewise.
6256         (convert_like): Likewise.
6257         (build_over_call): Likewise.
6258         (is_subseq): Likewise.
6259         (is_properly_derived_from): Likewise.
6260         (compare_ics): Likewise.
6261         (joust): Likewise.
6262         * class.c (delete_duplicate_fields_1): Likewise.
6263         (resolves_to_fixed_type_p): Likewise.
6264         (instantiate_type): Likewise.  Remove #if 0'd code.
6265         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
6266         (pushdecl): Likewise.
6267         (lookup_name_real): Likewise.
6268         (grokdeclarator): Likewise.  Check for illegal array declarations.
6269         (grokparms): Likewise.
6270         (grok_op_properties): Likewise.
6271         * decl2.c (check_classfn): Likewise.
6272         * friend.c (is_friend): Likewise.
6273         (make_friend_class): Likewise.
6274         * init.c (expand_aggr_init): Likewise.
6275         (expand_vec_init): Likewise.
6276         * pt.c (is_member_template_class): Remove declaration.
6277         (is_specialization_of): Use COMPARE_* and new macros.
6278         (comp_template_parms): Likewise.
6279         (convert_nontype_argument): Likewise.
6280         (coerce_template_template_parms): Likewise.
6281         (template_args_equal): Likewise.
6282         (lookup_template_class): Likewise.
6283         (type_unification_real): Likewise.
6284         (unify): Likewise.
6285         (get_bindings_real): Likewise.
6286         * search.c (covariant_return_p): Likewise.
6287         (get_matching_virtual): Likewise.
6288         * sig.c (match_method_types): Likewise.
6289         * tree.c (vec_binfo_member): Likewise.
6290         (cp_tree_equal): Likewise.
6291         * typeck.c (common_type): Likewise.
6292         (comp_array_types): Likewise.  Get issues involving unknown array
6293         bounds right.
6294         (comptypes): Update comments.  Use new flags.
6295         (comp_target_types): Use new macros.
6296         (compparms): Likewise.
6297         (comp_target_parms): Likewise.
6298         (string_conv_p): Likewise.
6299         (build_component_ref): Likewise.
6300         (build_indirect_ref): Likewise.
6301         (build_conditional_expr): Likewise.
6302         (build_static_cast): Likewise.
6303         (build_reinterpret_cast): Likewise.
6304         (build_const_cast): Likewise.
6305         (build_modify_expr): Likewise.
6306         (convert_for_assignment): Likewise.
6307         (comp_ptr_ttypes_real): Likewise.
6308         (ptr_reasonably_similar): Likewise.
6309         (comp_ptr_ttypes_const): Likewise.
6311 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
6313         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
6315 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
6317         * decl2.c (delete_sanity): Pass integer_zero_node, not
6318         integer_two_node, to build_vec_delete.
6319         * init.c (build_array_eh_cleanup): Remove.
6320         (expand_vec_init_try_block): New function.
6321         (expand_vec_init_catch_clause): Likewise.
6322         (build_vec_delete_1): Don't deal with case that auto_delete_vec
6323         might be integer_two_node anymore.
6324         (expand_vec_init): Rework for initialization-correctness and
6325         exception-correctness.
6326         * typeck2.c (process_init_constructor): Make mutual exclusivity
6327         of cases more obvious.
6329 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
6331         * decl.c (lookup_name_real): OK, only warn if not lexing.
6332         Simplify suggested fix.
6334         * cp-tree.h (IDENTIFIER_MARKED): New macro.
6335         * search.c (lookup_conversions): Use breadth_first_search.
6336         (add_conversions): Avoid adding two conversions to the same type.
6337         (breadth_first_search): Work with base binfos, rather
6338         than binfos and base indices.
6339         (get_virtual_destructor): Adjust.
6340         (tree_has_any_destructor_p): Adjust.
6341         (get_matching_virtual): Adjust.
6343         * pt.c (push_template_decl_real): Generalize check for incorrect
6344         number of template parms.
6345         (is_member_template_class): #if 0.
6347 1998-10-29  Richard Henderson  <rth@cygnus.com>
6349         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
6350         last.
6352 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6354         * lex.c: Call check_newline from lang_init always.  After
6355         calling cpp_start_read, set yy_cur and yy_lim to read from the
6356         cpplib token buffer.
6358 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
6360         * class.c (instantiate_type): Don't consider templates for a normal
6361         match.
6363         * class.c (finish_struct_1): Don't complain about non-copy
6364         assignment ops in union members.
6366         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
6367         (prepare_fresh_vtable): Likewise.
6368         (finish_struct_1): Don't call import_export_class.
6369         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
6370         (finish_prevtable_vardecl): Lose.
6371         (finish_file): Don't call it.
6372         * pt.c (instantiate_class_template): Likewise.
6373         * cp-tree.h: Remove it.
6375         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
6376         * decl.c (finish_function): Not here.
6377         (start_function): Do set DECL_INITIAL.
6379         * pt.c (push_template_decl_real): Complain about default template
6380         args for enclosing classes.
6382         * call.c (add_function_candidate): Treat conversion functions
6383         as coming from the argument's class.
6384         * cp-tree.h (DECL_CONV_FN_P): New fn.
6385         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6386         * class.c (add_method): Use DECL_CONV_FN_P.
6387         * decl2.c (check_classfn): Likewise.
6388         * error.c (dump_function_name): Likewise.
6389         (dump_function_decl): Likewise.
6390         * pt.c (fn_type_unification): Likewise.
6391         * search.c (add_conversions): Likewise.
6393 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6395         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6396         * method.c (hack_identifier): Also check for using RESULT_DECL
6397         from outer context.
6399 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
6401         * decl.c (grokdeclarator): Use type_quals, rather than constp,
6402         consistently.
6404 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6406         * call.c (standard_conversion): instantiate_type here.
6407         (reference_binding): And here.
6408         (implicit_conversion): Not here.
6409         (build_op_delete_call): No need to cons up an OVERLOAD.
6410         * cvt.c (cp_convert_to_pointer): instantiate_type here.
6411         (convert_to_reference): And here.
6412         * decl.c (grok_reference_init): Not here.
6413         (grokparms): Or here.
6414         * typeck2.c (digest_init): Or here.
6415         * typeck.c (decay_conversion): Take the address of overloaded
6416         functions, too.
6417         (require_instantiated_type): Lose.
6418         (convert_arguments): Don't handle unknown types here.
6419         (build_c_cast): Likewise.
6420         (build_binary_op): Gut.
6421         (build_conditional_expr): Don't require_instantiated_type.
6422         (build_modify_expr): Likewise.
6423         (build_static_cast): Don't instantiate_type.
6424         (build_reinterpret_cast): Likewise.
6425         (build_const_cast): Likewise.
6426         (convert_for_initialization): Likewise.
6427         (build_ptrmemfunc): Use type_unknown_p.
6428         (convert_for_assignment): Also do default_conversion on overloaded
6429         functions.  Hand them off to ocp_convert.
6431 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
6433         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6434         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
6436         * class.c (finish_struct_1): Use build_cplus_array_type to build
6437         array types.
6438         * decl.c (init_decl_processing): Likewise.
6439         * except.c (expand_end_eh_spec): Likewise.
6440         * search.c (expand_upcast_fixups): Simplify very slightly.
6442 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6444         * decl.c (grokdeclarator): Complain about a variable using
6445         constructor syntax coming back null from start_decl.
6447         * friend.c (make_friend_class): Complain about trying to make
6448         a non-class type a friend.
6450         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6451         (start_function): Not here.
6453 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
6455         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6457 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6459         * typeck2.c (process_init_constructor): Only skip anonymous fields
6460         if they are bitfields.
6462         * cp-tree.def (TYPEOF_TYPE): New code.
6463         * error.c (dump_type_real): Handle it.
6464         * pt.c (tsubst): Likewise.
6465         * tree.c (search_tree): Likewise.
6466         * semantics.c (finish_typeof): New fn.
6467         * parse.y (typespec): Use it.
6468         * cp-tree.h: Declare it.
6470 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
6472         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6474 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6476         * typeck.c (convert_arguments): Don't handle pmf references
6477         specially.
6479         * init.c (build_member_call): Don't try to convert to the base type
6480         if it's ambiguous or pedantic.
6482         * typeck2.c (check_for_new_type): Only depend on pedantic for
6483         C-style casts.
6485 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
6487         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6488         non-converting constructors.
6490 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6492         * gxxint.texi: Correct documentation for n, N, Q, and B.
6494 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6496         * parse.y (condition): Convert VAR_DECL from reference to indirect
6497         reference.
6499 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
6501         * exception.cc (__cp_pop_exception): Free the original exception
6502         value, not the potentially coerced one.
6504 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
6506         * Makefile.in (hash.h): Run gperf when necessary.
6508         * cp-tree.h (CP_TYPE_READONLY): Remove.
6509         (CP_TYPE_VOLATILE): Likewise.
6510         (CP_TYPE_QUALS): New macro.
6511         (CP_TYPE_CONST_P): Likewise.
6512         (CP_TYPE_VOLATILE_P): Likewise.
6513         (CP_TYPE_RESTRICT_P): Likewise.
6514         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6515         (cp_build_type_variant): Rename to ...
6516         (cp_build_qualified_type): New function.
6517         (c_apply_type_quals_to_decl): Declare.
6518         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6519         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6520         (cp_type_qual_from_rid): New function.
6521         (compparms): Remove unused parameter.  All callers changed.
6522         (cp_type_quals): New function.
6523         (at_least_as_qualified_p): Likewise.
6524         (more_qualified_p): Likewise.
6526         * call.c (standard_conversion): Replace calls to
6527         cp_build_type_variant with cp_build_qualified_type.  Use
6528         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6529         compare them.  Use CP_TYPE_* macros to check qualifiers.
6530         (reference_binding): Likewise.
6531         (implicit_conversion): Likewise.
6532         (add_builtin_candidates): Likewise.
6533         (build_over_call): Likewise.
6534         * class.c (overrides): Compare all qualifiers, not just `const',
6535         on method declarations.
6536         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6537         (convert_pointer_to_real): Likewise.
6538         (type_promotes_to): Likewise.
6539         * decl.c (check_for_uninitialized_const_var): New function.
6540         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6541         (cp_finish_decl): Use check_for_uninitialized_const_var.
6542         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
6543         handle `restrict'.
6544         (grok_ctor_properties): Likewise.
6545         (grok_op_properties): Likewise.
6546         (start_function): Likewise.
6547         (rever_static_member_fn): Likewise.
6548         * decl2.c (grok_method_quals): Likewise.
6549         (grokfield): Likewise.
6550         * error.c (dump_readonly_or_volatile): Rename to ...
6551         (dump_qualifiers): New function.  Handle `restrict'.
6552         (dump_type_real): Use it.
6553         (dump_aggr_type): Likewise.
6554         (dump_type_prefix): Likewise.
6555         (dump_type_suffix): Likewise.
6556         (dump_function_decl): Likewise.
6557         (cv_as_string): Likewise.
6558         * gxx.gperf: Add __restrict and __restrict__.
6559         * gxxint.texi: Document `u' as used for `__restrict', and a few
6560         other previously undocumented codes.
6561         * hash.h: Regenerated.
6562         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6563         (build_member_call): Likewise.
6564         (build_new_1): Likewise.
6565         * lex.c (init_parse): Add entry for RID_RESTRICT.
6566         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6567         (cp_type_qual_from_rid): Define.
6568         * lex.h (enum rid): Add RID_RESTRICT.
6569         * method.c (process_modifiers): Deal with `restrict'.
6570         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6571         * parse.c: Regenerated.
6572         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6573         (tsubst_aggr_type): Likewise.
6574         (tsubst): Likewise.
6575         (check_cv_quals_for_unify): Likewise.
6576         (unify): Likewise.
6577         * rtti.c (init_rtti_processing): Likewise.
6578         (build_headof): Likewise.
6579         (get_tinfo_var): Likewise.
6580         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
6581         (expand_class_desc): Likewise.
6582         (expand_attr_desc): Likewise.
6583         (synthesize_tinfo_fn): Likewise.
6584         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
6585         (get_matching_virtual): Likewise.
6586         (expand_upcast_fixups): Likewise.
6587         * sig.c (build_signature_pointer_or_reference_name): Take
6588         type_quals, not constp and volatilep.
6589         (build_signature_pointer_or_reference_type): Likewise.
6590         (match_method_types): More CP_TYPE_QUALS conversion, etc.
6591         (build_signature_pointer_constructor): Likewise.
6592         (build_signature_method_call): Likewise.
6593         * tree.c (build_cplus_array_type): Likewise.
6594         (cp_build_type_variant): Rename to ...
6595         (cp_build_qualified_type): New function.  Deal with `__restrict'.
6596         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6597         (build_exception_variant): Likewise.
6598         (mapcar): Likewise.
6599         * typeck.c (qualif_type): Likewise.
6600         (common_type): Likewise.
6601         (comptypes): Likewise.
6602         (comp_cv_target_types): Likewise.
6603         (at_least_as_qualified_p): Define.
6604         (more_qualified_p): Likewise.
6605         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6606         (compparms): Likewise.
6607         (inline_conversion): Likewise.
6608         (string_conv_p): Likewise.
6609         (build_component_ref): Likewise.
6610         (build_indirect_ref): Likewise.
6611         (build_array_ref): Likewise.
6612         (build_unary_op): Likewise.
6613         (build_conditional_expr): Likewise.
6614         (build_static_cast): Likewise.
6615         (build_c_cast): Likewise.
6616         (build_modify_expr): Likewise.
6617         (convert_For_assignment): Likewise.
6618         (comp_ptr_ttypes_real): Likewise.
6619         (cp_type_quals): New function.
6621 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
6623         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6624         (CP_TYPE_VOLATILE): Likewise.
6625         * decl.c (grokdeclarator): Use them.
6626         * tree.c (canonical_type_variant): Likewise.
6628 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6630         * parse.y (named_class_head): Push into class while parsing the
6631         base class list.
6632         * decl2.c (push_scope, pop_scope): New functions.
6633         * cp-tree.h: Declare them.
6634         * init.c (build_new_1): Delay cleanup until end of full expression.
6636 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
6638         * typeck.c (build_component_ref): Use of a type here is an error.
6640 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
6642         Revamp references to member functions.
6643         * method.c (hack_identifier): Call build_component_ref for a
6644         reference to a member function.
6645         * typeck.c (build_component_ref): Only return a single function
6646         if it's static.  Otherwise, return a COMPONENT_REF.
6647         (build_x_function_call): Handle a COMPONENT_REF.
6648         (build_unary_op): Handle all unknown-type things.
6649         * decl2.c (arg_assoc): Handle COMPONENT_REF.
6650         * class.c (instantiate_type): Complain if the function we get is a
6651         nonstatic member function.  Remove code for finding "compatible"
6652         functions.
6653         * pt.c (tsubst_copy): Handle NOP_EXPR.
6654         * tree.c (build_dummy_object): New fn.
6655         (maybe_dummy_object): New fn.
6656         (is_dummy_object): New fn.
6657         * cp-tree.h: Declare them.
6658         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
6659         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
6660         * init.c (build_member_call): Use maybe_dummy_object and
6661         is_dummy_object.
6662         (build_offset_ref): Use maybe_dummy_object.
6663         (resolve_offset_ref): Use is_dummy_object.
6664         * typeck.c (build_x_function_call): Call build_dummy_object.
6665         (unary_complex_lvalue): Call is_dummy_object.
6667         * typeck.c (build_component_addr): Make sure field is a field.
6669         * call.c (build_new_op): Delete obsolete code.
6671         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
6673 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6675         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
6676         std if std is ignored.
6678 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6680         * decl.c (grokvardecl): Fix thinko.
6682         * decl.c (grokdeclarator): Embedded attrs bind to the right,
6683         not the left.
6685         * parse.y (fn.def2): Fix 'attrs' format.
6687 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6689         * Makefile.in (CONFLICTS): Update.
6690         * parse.y (expr_or_declarator_intern): New rule.
6691         (expr_or_declarator, direct_notype_declarator, primary,
6692         functional_cast): Use it.
6693         (notype_declarator_intern): New rule.
6694         (notype_declarator, complex_notype_declarator): Use it.
6696 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
6698         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
6699         (grokvardecl): Likewise.
6701 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6703         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
6704         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
6706         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
6708         * pt.c (process_partial_specialization): Cast 1st argument of
6709         `bzero' to (PTR).
6711         * tree.c (build_base_fields): Cast `base_align' to (int) when
6712         comparing against one.
6714 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6716         * decl.c (lookup_name_real): Handle template parameters for member
6717         templates where said parameters have the same name as the
6718         surrounding class.
6720         * decl.c (expand_static_init): Build cleanups before entering the
6721         anonymous function used to do them to avoid access-checking
6722         confusion.
6724         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
6725         accidentally removed by previous change, and make DECL_RTL here.
6726         * class.c (add_method): Don't make DECL_RTL here.
6728         * pt.c (for_each_template_parm): Don't examine uninstantiated
6729         default arguments.
6731 1998-10-16  Dave Brolley  <brolley@cygnus.com>
6733         * lex.c (real_yylex): Fix unaligned access of wchar_t.
6735 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6737         * class.c (add_method): Fix documentation to reflect previous
6738         changes.  Check for duplicate method declarations here.
6739         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
6740         correctly; such things never match.
6741         (grokfndecl): Don't look for duplicate methods here.
6742         * decl2.c (check_classfn): Don't assume names are mangled.
6743         Don't add bogus member function declarations to a class before the
6744         class type is complete.
6745         (grokfield): Reformat error message.
6746         * method.c (set_mangled_name_for_decl): Don't mangle names while
6747         processing_template_decl.
6749 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
6751         * typeck.c (build_indirect_ref): Complain about a pointer to data
6752         member, too.
6753         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
6754         data member.
6755         * init.c (resolve_offset_ref): Don't undo the above.
6757         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
6758         (struct lang_decl_flags): Add `bitfield'.
6759         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
6760         DECL_BIT_FIELD.
6761         * decl2.c (grokbitfield, grok_alignof): Likewise.
6762         * init.c (build_offset_ref): Likewise.
6763         * typeck.c (build_component_addr, expr_sizeof): Likewise.
6764         * cvt.c (build_up_reference): Don't crash if taking the address
6765         returns error_mark_node.
6767         * decl.c (grokfndecl): Also check ctype when checking for ::main().
6769 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
6771         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
6772         Do mangling here.
6773         (grokdeclarator): Instead of here.
6774         * friend.c (do_friend): Lose special handling of ::main and
6775         __builtin_*.
6776         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
6778         * spew.c (yylex): Clear looking_for_typename if we got
6779         'enum { ... };'.
6781 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
6783         * class.c (maybe_warn_about_overly_private_class): Improve error
6784         messages for class with only private constructors.
6786         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
6787         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
6788         (build_typename_type): New function.
6789         * decl.c (build_typename_type): Broken out from ...
6790         (make_typename_type): Use it.
6791         * search.c (lookup_field): Likewise.
6793 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6795         * pt.c (convert_nontype_argument): Check against type_referred_to.
6796         * decl.c (grokvardecl): Check for declarator name before building
6797         DECL_ASSEMBLER_NAME.
6799 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
6801         * pt.c (lookup_template_class): Add comment.
6802         (instantiate_class_template): Don't mark the _TYPE node for
6803         member class templates as an instantiation.
6805 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
6807         * decl.c (grokfndecl): Fix my thinko.
6809 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
6811         * tinfo2.cc (fast_compare): Remove.
6812         (before): Just use strcmp.
6813         * tinfo.cc (operator==): Just use strcmp.
6815 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
6817         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
6818         declarations.
6820 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
6822         * cp-tree.h (specializations_of_same_template_p): Remove.
6823         * search.c (get_template_base): Don't use it.
6824         (get_template_base_recursive): Likewise.
6825         * pt.c (specializations_of_same_template_p): Remove.
6826         (unify): Don't use it.
6827         (lookup_template_class): Find the correct parent when setting
6828         CLASSTYPE_TI_TEMPLATE.
6830 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6832         * tinfo.cc (operator==): Always compare names.
6834 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
6836         * decl.c (start_function): Fix cut-and-paste error.
6838 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6840         * inc/typeinfo: Add #pragma interface.
6841         (operator!=): Just call operator==.
6842         * tinfo.cc: Add #pragma implementation.
6843         (operator==): Move from inc/typeinfo and tinfo2.cc.
6844         Check __COMMON_UNRELIABLE instead of _WIN32.
6846         * typeck2.c (my_friendly_abort): Add URL.
6848 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6850         * decl.c (start_method): Added extra parameter for attributes.
6851         * cp-tree.h (start_method): Update prototype.
6852         * parse.y (fn.def2): Update start_method parameter list.
6854 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
6856         * cp-tree.h (specializations_of_same_template_p): Declare.
6857         * pt.c (specializations_of_same_template_p): New function.
6858         (unify): Use it.
6859         * search.c (get_template_base): Use it.
6860         (get_template_base_recursive): Likewise.
6862 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
6864         * decl2.c (start_objects): Add new variable `joiner' and
6865         initialize it properly.
6867 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
6869         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
6870         change to vtable types.
6872         * cvt.c (ocp_convert): Avoid infinite recursion caused by
6873         1998-10-03 change.
6875 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
6877         * pt.c (resolve_overloaded_unification): New fn.
6878         (try_one_overload): Likewise.
6879         (unify): Don't fail on unknown type.
6880         (type_unification_real): Likewise.  Use resolve_overloaded_unification
6881         to handle an overloaded argument.
6882         (template_args_equal): Split out...
6883         (comp_template_args): From here.
6884         (determine_specialization): Also allow a template with more
6885         parms than were explicitly specified.
6886         * cp-tree.h: Add template_args_equal.
6887         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
6889 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
6891         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
6892         change.
6894 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
6896         * typeck.c (unsigned_type): Only return TItype nodes when
6897         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6898         (signed_type): Likewise.
6899         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
6900         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6901         (init_decl_processing): Only create TItype nodes when
6902         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6903         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
6904         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6906 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6908         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
6909         (gxx.gperf): Update comments describing invocation flags.
6910         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
6912 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
6914         * class.c (finish_struct_1): Add commentary on previous change.
6916         * cp-tree.h (vtbl_ptr_type_node): New variable.
6917         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
6918         already of the right type.
6919         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
6920         Simplify code to grow vtable.
6921         * decl.c (vtbl_ptr_type_node): Define.
6922         (init_decl_processing): Initialize it.
6924 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
6926         * cp-tree.def (PTRMEM_CST): New tree node.
6927         * cp-tree.h (ptrmem_cst): New type.
6928         (lang_type): Remove local_typedecls.
6929         (dummy): Increase to 12 bits from 11.
6930         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
6931         (PTRMEM_CST_CLASS): New macro.
6932         (PTRMEM_CST_MEMBER): Likewise.
6933         (current_access_specifier): New variable.
6934         (current_class_type): Remove duplicate declaration.
6935         (finish_struct): Change prototype.
6936         (unreverse_member_declarations): New function.
6937         (pushdecl_class_level): Change prototype.
6938         (grok_enum_decls): Remove.
6939         (fixup_anonymous_union): New function.
6940         (grok_x_components): Change prototype.
6941         (tsubst_chain): Remove.
6942         (finish_member_template_decl): Likewise.
6943         (check_explicit_specialization): Fix indentation.
6944         (finish_class_definition): Change prototype.
6945         (finish_member_class_template): Likewise.
6946         (finish_member_declaration): New function.
6947         (check_multiple_declarators): Likewise.
6948         * class.c (class_stack_node_t): New type.
6949         (current_class_base): Remove.
6950         (current_class_stack): Change type.
6951         (current_access_specifier): New variable.
6952         (grow_method): Remove.
6953         (check_member_decl_is_same_in_complete_scope): Break out from
6954         finish_struct.
6955         (make_method_vec): New function.
6956         (free_method_vec): Likewise.
6957         (add_implicitly_declared_members): Break out from finish_struct_1.
6958         (free_method_vecs): New variable.
6959         (add_method): Rework for direct use from parser.
6960         (handle_using_decl): Watch for NULL_TREE while iterating through
6961         CLASSTYPE_METHOD_VEC.
6962         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6963         just do some error-checking.
6964         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6965         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
6966         (finish_struct): Change prototype.  Simplify; fields and methods
6967         are already set up at this point.
6968         (init_class_processing): Set up current_class_stack.
6969         (pushclass): Save current_access_specifier.
6970         (popclass): Restore it.
6971         (currently_open_class): Simplify.
6972         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6973         * decl.c (saved_scope): Add access_specifier.
6974         (maybe_push_to_top_level): Save it.
6975         (pop_from_top_level): Restore it.
6976         (maybe_process_template_type_declaration): Use
6977         finish_member_declaration.
6978         (pushtag): Likewise.
6979         (pushdecl_class_level): Don't return a value.
6980         (fixup_anonymous_union): Break out from grok_x_components.
6981         (shadow_tag): Use it.
6982         (xref_tag): Complain about using an elaborated type specifier to
6983         reference a template type parameter or typedef name.
6984         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6985         (current_local_enum): Remove.
6986         (build_enumerator): Call finish_member_declaration.
6987         (grok_enum_decls): Remove.
6988         * decl2.c (grok_x_components): Simplify.
6989         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6990         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6991         (merge_functions): Add to comment.
6992         (arg_assoc_type): Prototype.
6993         (arg_assoc): Pass as many arguments as there are parameters.
6994         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
6995         OFFSET_REF.
6996         * expr.c (cpls_expand_expr): Remove dead code.  Handle
6997         PTRMEM_CST.
6998         * friend.c (do_friend): Lookup friends when in nested classes.
6999         Change comments.
7000         * init.c (build_offset_ref): Do lookup even for classes that are
7001         only partially defined.
7002         (decl_constant_value): Remove dead code.
7003         * method.c (build_overload_value): Remove hack where by TYPE was
7004         not a TYPE.  Handle PTRMEM_CST.
7005         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
7006         should go.
7007         * parse.y (components, notype_components, component_decl,
7008         component_decl_1, component_declarator, component_declarator0):
7009         Now all are itype rather than ttype.  Rework to add members to
7010         classes on the fly.
7011         (typesqpecqual_reserved): Use check_multiple_declarators.
7012         (structsp): Update class to finish_class_definition.
7013         (do_xref_defn): Unsplit into named_class_head.
7014         (access_specifier): Set current_access_specifier.
7015         * pt.c (set_current_access_from_decl): New function.
7016         (finish_member_template_decl): Don't take the parameters.
7017         (comp_template_args): Make more robust.
7018         (lookup_template_class): Don't use current_local_enum.
7019         (for_each_template_parm): Handle PTRMEM_CST.
7020         (instantiate_class_template): Use set_current_access_from_decl,
7021         finish_member_declaration and unreverse_member_declarations.  Set
7022         lineno/input_filename before generating implicit member functions.
7023         (type_unification_real): Don't assume back-unification happens
7024         only for the last argument.
7025         (regenerate_decl_from_template): Call pushclass a bit earlier.
7026         (tsubst_chain): Remove.
7027         (tsubst_enum): Use set_current_access_from_decl.
7028         (set_mangled_name_for_template_decl): Fix indentation.
7029         * search.c (lookup_fnfields_1): Change iteration through
7030         CLASSTYPE_METHOD_VEC.
7031         (dfs_pushdecls): Likewise.
7032         (dfs_compress_decls): Likewise.
7033         (add_conversions): Likewise.
7034         * semantics.c (finish_class_definition): Don't take components.
7035         Change call to finish_struct.
7036         (finish_member_declaration): New function.
7037         (finish_member_class_template): Don't take template parameters.
7038         Change call to grok_x_components.  Call finish_member_template_decl.
7039         (check_multiple_declarators): New function.
7040         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
7041         a passed in fieldlist.
7042         * tree.c (search_tree): Handle PTRMEM_CST.
7043         (mapcar): Likewise.
7044         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
7045         INTEGER_CSTs, for pointer-to-data members.
7047         * call.c (resolve_args): Resolve template specializations, if
7048         possible.
7050 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7052         * Makefile.in (spew.o): Depend on toplev.h.
7054         * call.c (compare_ics): Initialize variables `deref_from_type2',
7055         `deref_to_type1' and `deref_to_type2'.
7057         * except.c (get_eh_type): Hide prototype and definition.
7058         (process_start_catch_block_old): Remove unused static prototype.
7060         * pt.c (tsubst_decl): Initialize variable `argvec'.
7062         * spew.c: Include toplev.h.
7064 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
7066         * pt.c (instantiate_decl): Do save and restore file position.
7068 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7070         * method.c (build_decl_overload_real): Clear
7071         numeric_output_need_bar after __.
7073 1998-10-05  Nathan Sidwell  <nathan@acm.org>
7075         * call.c (build_new_method_call): Issue 'incomplete type' error,
7076         if class is not defined.
7078 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7080         * call.c (build_object_call): Move declaration of variable
7081         `fn' into the scope where it is used.  Don't access variable
7082         `fn' when it is uninitialized, instead use `fns'.
7084 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7086         * errfn.c (cp_thing): Print buf as a string not as a printf format
7087         to avoid problems with the operator%.  Consequently, `%%' sequences
7088         in format are copied as `%' in buf.
7090 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
7092         * pt.c (pop_tinst_level): Call extract_interface_info.
7093         (instantiate_decl): Don't save and restore file position.
7095         * decl.c (cp_finish_decl): Make statics in extern inlines and
7096         templates common, if possible and the target doesn't support weak
7097         symbols.
7099         * decl.c (grokdeclarator): Remove redundant calls to
7100         build_type_variant and some duplicated code.
7101         * sig.c (build_signature_reference_type): Only take the type parm.
7102         (build_signature_pointer_type): Likewise.
7103         * tree.c (build_cplus_method_type): Adjust.
7104         * cp-tree.h: Update.
7106 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
7108         * call.c (build_over_call): Make pedwarns about dropped qualifiers
7109         into full-fledged errors.
7110         * cvt.c (convert_to_reference): Likewise.
7111         * typeck.c (convert_for_assignment): Likewise.
7113         * search.c (expand_upcast_vtables): In addition to unsetting
7114         TREE_READONLY, remove top-level const type qualifier.
7116 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
7118         * class.c (current_class_ptr, current_class_ref): Clarify
7119         documentation.
7120         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
7121         NOP type conversions.
7122         * decl.c (decls_match): Use comptypes directly; ignore
7123         qualifiers on the DECL.
7124         (duplicate_decls): Remove qualifier checks on DECL.
7125         (grokdeclarator): Make the type built up include top-level
7126         qualifiers.
7127         * decl2.c (do_dtors): Fix spelling error.
7128         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
7129         when printing type information.
7130         * init.c (build_new_1): Add documentation.  Deal with the fact
7131         that type of allocated memory now contains qualifiers.
7132         * lex.c (is_global): Improve error-recovery.
7133         * sig.c (build_member_function_pointer): Don't cast away const
7134         on fields of sigtable_entry_type.
7135         * tree.c (lvalue_type): Don't look at top-level qualifiers on
7136         expressions.
7137         * typeck.c (decay_conversion): Likewise.
7138         (build_component_ref): Make sure the type of the COMPONENT_REF
7139         contains top-level qualifiers, as appropriate.  Improve
7140         error-handling.
7141         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
7142         (build_array_ref): Likewise.
7143         (build_unary_op): Improve error-recovery.
7144         (unary_complex_lvalue): Make taking the address a bound member
7145         function an error, not a sorry.
7146         (build_conditional_expr): Look at the type qualifiers, not the
7147         qualifiers on the expression itself.
7149 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
7151         * decl2.c (merge_functions): Remove duplicates.
7153         * decl2.c: Add -f{no-,}implicit-inline-templates.
7154         (import_export_decl): Check it.
7156         * decl.c (lookup_name_real): Template parms also take precedence
7157         over implicit typename.  Only warn if yylex.
7159         * typeck.c (build_conditional_expr): Only fold if ifexp is an
7160         INTEGER_CST.
7162         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
7163         instead of linkage.
7165 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
7167         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
7168         * class.c (build_vbase_pointer): Use it.
7169         * rtti.c (expand_class_desc): Likewise.
7170         * tree.c (build_vbase_pointer_fields): Likewise.
7172 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
7174         * decl.c (start_decl): Add invocation of
7175         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7176         (start_function): Add invocation of
7177         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7179         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
7180         HANDLE_GENERIC_PRAGMAS.
7182 1998-09-28  Anthony Green  <green@cygnus.com>
7184         * semantics.c (finish_asm_stmt): Always permit volatile asms.
7186 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
7188         * decl.c (grokdeclarator): Tighten checks for invalid
7189         destructors.  Improve error-messages and error-recovery.
7190         * decl2.c (check_classfn): Don't assume that mangled destructor
7191         names contain type information.
7193 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
7195         * search.c (get_base_distance): Remove assert.
7197         * decl2.c (build_anon_union_vars): Don't process a field with no
7198         name.
7199         (finish_anon_union): Also complain about local anon unions with no
7200         members.
7202 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7204         * decl.c (lookup_namespace_name): If the name is a namespace,
7205         return it immediately.
7207 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7209         * cp-tree.h (define_case_label): Remove unused parameter.
7210         (check_java_method): Likewise.
7211         (grokclassfn): Likewise.
7212         (expand_aggr_init): Likewise.
7213         (build_x_delete): Likewise.
7214         (maybe_end_member_template_processing): Likewise.
7215         (unshare_base_binfos): Add prototype.
7216         (string_conv_p): Likewise.
7217         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
7219         * cvt.c (build_up_reference): Remove unused parameter
7220         `checkconst', all callers changed.
7221         (build_type_conversion): Mark parameter `code' with
7222         ATTRIBUTE_UNUSED.
7223         (build_expr_type_conversion): Initialize variable `conv'.
7225         * decl.c (push_namespace): Initialize variable `d'.
7226         (define_case_label): Remove unused parameter `decl', all callers
7227         changed.
7229         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
7230         `argc' with ATTRIBUTE_UNUSED.
7231         (grokclassfn): Remove unused parameter `cname', all callers
7232         changed.
7233         (check_java_method): Likewise for parameter `ctype'.
7234         (copy_assignment_arg_p): Mark parameter `virtualp' with
7235         ATTRIBUTE_UNUSED.
7236         (finish_prevtable_vardecl): Likewise for parameter `prev'.
7238         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
7240         * init.c (expand_aggr_init_1): Remove unused parameter
7241         `alias_this', all callers changed.
7242         (expand_aggr_init): Likewise.
7243         (expand_default_init): Likewise.
7244         (build_new_1): Initialize variable `susp'.
7245         (build_x_delete): Remove unused parameter `type', all callers
7246         changed.
7248         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
7249         ATTRIBUTE_UNUSED.
7250         (readescape): Use (unsigned) value in shift.
7251         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
7252         comparing to a signed quantity.
7254         * pt.c (maybe_end_member_template_processing): Remove unused
7255         parameter `decl', all callers changed.
7256         (check_explicit_specialization): Add braces around empty body in
7257         an else-statement.
7258         (current_template_args): Initialize variable `args'.
7259         (lookup_template_class): Likewise for variable `prev_local_enum'.
7260         (tsubst_decl): Likewise for variable `r'.
7261         (set_mangled_name_for_template_decl): Initialize variable
7262         `context'.
7264         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
7265         Likewise for variable `i'.
7266         (yylex): Initialize variable `trrr'.
7268         * typeck.c (compparms): Mark variable `strict' with
7269         ATTRIBUTE_UNUSED.
7271         * xref.c (simplify_type): Cast argument of ctype function to
7272         `unsigned char'.
7274 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
7276         * cp-tree.h (language_lvalue_valid): Remove.
7277         * decl.c (grokdeclarator): Don't disallow references to functions.
7278         * tree.c (lvalue_p_1): New function, combining duplicated
7279         code from ...
7280         (lvalue_p): Use it.
7281         (real_lvalue_p): Likewise.
7282         * typeck.c (language_lvalue_valid): Remove.
7283         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
7284         they don't have TREE_READONLY set.
7285         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
7287 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7289         * spew.c (yylex): Give diagnostic.
7290         * hash.h (is_reserved_word): Add export.
7291         * gxx.gperf: Likewise.
7292         * lex.h (rid): Add RID_EXPORT.
7293         * lex.c (init_parse): Likewise.
7295 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7297         * friend.c (do_friend): Make warning a full sentence.
7299 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7301         * parse.y (component_decl_list): Improve error-recovery.
7303 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7305         * decl.c (make_typename_type): Move error to point where name
7306         variable can be used by dump_type.
7308 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7310         * decl.c (grokfndecl): Improve error-recovery.
7311         * decl2.c (grokfield): Likewise.
7312         * pt.c (finish_member_template_decl): Likewise.
7314 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7316         * method.c (hack_identifier): Finding multiple members is always
7317         an error.
7319 1998-09-21  Per Bothner  <bothner@cygnus.com>
7321         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
7323 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
7325         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
7327 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
7329         * class.c (maybe_warn_about_overly_private_class): Reformat.
7331 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
7333         * exception.cc (__cplus_type_matcher): Realign some code.
7335 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
7337         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
7338         (tinfo2.o): Likewise.
7339         (exception.o): Likewise.
7340         (new.o): Likewise.
7341         (opnew.o): Likewise.
7342         (opnewnt.o): Likewise.
7343         (opvnew.o): Likewise.
7344         (opvnewnt.o): Likewise.
7345         (opdel.o): Likewise.
7346         (opdelnt.o): Likewise.
7347         (opvdel.o): Likewise.
7348         (opvdelnt.o): Likewise.
7350 1998-09-16  Richard Henderson  <rth@cygnus.com>
7352         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
7354 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
7356         * call.c (build_field_call): Handle static data members too.
7358         * typeck.c (comptypes): When comparing pointer types, check
7359         whether referred types match even in strictest modes.
7361 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
7363         * cp-tree.h: Revert previous change.
7364         (finish_struct_methods): Remove declaration.
7365         * class.c: Revert previous change.
7366         (maybe_warn_about_overly_private_class): New function.
7367         (finish_struct_methods): Declare here, and make static.  Remove
7368         unnecessary parameters.  Tidy slightly.  Use
7369         maybe_warn_about_overly_private_class.
7370         (finish_struct_1): Adjust.  Remove check for private constructors,
7371         now done elsewhere.
7372         (finish_struct): Adjust.
7374 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7376         * except.c (expand_start_catch_block): No need to check for new
7377         exception model.
7378         (process_start_catch_block_old): Deleted.
7379         (process_start_catch_block): Add call to start_decl_1().
7380         (expand_end_catch_block): Add call to end_catch_handler().
7381         * exception.cc (__cplus_type_matcher): Only check the exception
7382         language if there is an exception table.
7384 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7386         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7387         as used to prevent conflicts with virtual function tables.
7389 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
7391         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7392         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7393         * class.c (maybe_class_too_private_p): New function.
7394         (finish_struct_methods): Use it.
7395         (finish_struct_1): Likewise.
7396         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7397         appropriate.
7399         * pt.c (check_specialization_scope): Fix spelling error.
7400         (check_explicit_specialization): Remove code to handle explicit
7401         specializations in class scope; they are now correctly diagnosed
7402         as errors.
7404 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
7406         * decl.c (pushdecl): Don't copy types if the
7407         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7408         type.
7410 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7412         * class.c (get_enclosing_class): New function.
7413         (is_base_of_enclosing_class): Likewise.
7414         * cp-tree.h (get_enclosing_class): Declare.
7415         (is_base_of_enclosing_class): Likewise.
7416         * pt.c (coerce_template_parms): Use them.
7418 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
7420         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7421         null to decide whether to use it.
7423         * error.c (dump_type_real): Handle NAMESPACE_DECL.
7424         * parse.y (base_class.1): Avoid crash on error.
7426 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7428         * decl.c (make_typename_type): If context is a namespace, the code
7429         is in error.
7431 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
7433         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7435 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
7437         * cp-tree.h (anonymous_namespace_name): Declare.
7438         * decl.c: Define it.
7439         (push_namespace): Use anonymous_namespace_name, rather than local
7440         static anon_name.
7441         * error.c (dump_decl): If a namespace is named
7442         anonymous_namespace_name, call it {anonymous}.
7444         * decl.c (grokparms): Distinguish between references and pointers
7445         in error message.
7447 1998-09-08  Richard Henderson  <rth@cygnus.com>
7448             Mark Mitchell  <mark@markmitchell.com>
7450         * pt.c (process_partial_specialization): Consistently allocate
7451         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
7452         tpd.parms, where appropriate.
7454 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
7456         * Makefile.in (INCLUDES): Update after recent toplevel gcc
7457         reorganizations.
7459 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
7461         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7462         * class.c (finish_struct): Remove hackery to deal with explicit
7463         specializations in class scope.
7464         * decl.c (grokfndecl): Improve error-recovery.
7465         * decl2.c (grokfield): Likewise.
7466         * pt.c (check_specialization_scope): New function.
7467         (begin_specialization): Call it.
7468         (process_partial_specialization): New function, split out from
7469         push_template_decl.  Check partial specializations more
7470         stringently.
7471         (push_template_decl): Call it.
7472         (check_explicit_specialization): Don't attempt to handle explicit
7473         specializations in class scope.
7474         (template_parm_data): Document.  Add current_arg and
7475         arg_uses_template_parms.
7476         (mark_template_parm): Set it.
7477         (tsubst_arg_types): Remove unused variable.
7478         * semantics.c (begin_class_definition): Tweak.
7480 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
7482         * inc/typeinfo (type_info::type_info(const char*)): Make
7483         `explicit'.
7485         * cp-tree.h (hash_tree_cons_simple): New macro.
7486         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
7487         (coerce_template_parms): Use make_temp_vec, instead of
7488         make_tree_vec.  Document this behavior.
7489         (lookup_template_class): Likewise.
7490         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7491         Remove dead code (and add assertion to check its deadness).  Fix
7492         bug w.r.t. exception specifications.
7494 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
7496         * decl2.c (import_export_vtable): Always make artificials comdat.
7497         (import_export_decl): Likewise.
7498         * pt.c (mark_decl_instantiated): Likewise.
7500 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7502         * cp-tree.h (finish_globally_qualified_member_call_expr):
7503         Rename to ...
7504         (finish_qualified_call_expr).
7505         * semantics.c: Likewise.
7506         * parse.y (primary): Use it.
7507         * method.c (hack_identifier): Remove redundant code.
7509         * init.c (resolve_offset_ref): Call convert_from_reference to
7510         handle members of reference type.  Improve error recovery.
7512 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
7514         * cp-tree.h: Declare warn_nontemplate_friend.
7515         * decl2.c (lang_decode_option): Set.
7516         * lang-options.h: Add -Wnon-template-friend.
7517         * friend.c (do_friend): Use to toggle non-template function warning.
7519 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7521         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7522         corresponding INTEGER_CSTs when processing_template_decl.
7523         * pt.c (tsubst_enum): Tweak accordingly.
7525 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7527         * decl.c (pushdecl_class_level): Add warning here.
7528         (pushdecl): Tweak.
7530 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
7532         * cvt.c (convert_pointer_to_real): Tidy.
7533         * search.c (get_base_distance_recursive): Simplify.
7534         (get_base_distance): Likewise.
7536         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7537         parms.
7539 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
7541         * lex.c (check_newline):  Call HANDLE_PRAGMA before
7542         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
7543         if unknown pragmas are encountered.
7544         (handle_sysv_pragma): Interpret return code from
7545         handle_pragma_token ().  Return success/failure indication rather
7546         than next unprocessed character.
7547         (pragma_getc): New function: retrieves characters from the
7548         input stream.  Defined when HANDLE_PRAGMA is defined.
7549         (pragma_ungetc): New function: replaces characters back into the
7550         input stream.  Defined when HANDLE_PRAGMA is defined.
7552 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7554         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7555         * class.c (build_vtable_entry_ref): Likewise.
7557 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7559         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7560         * decl2.c (import_export_decl): Likewise.
7561         * pt.c (instantiate_decl): Use it.
7563 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7565         * decl.c (lookup_name_real): Also do implicit typename thing for
7566         artificial TYPE_DECLs.
7567         * search.c (lookup_field): Likewise.
7568         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7569         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7570         (enter_scope_of): Extract type from implicit typename.
7571         (begin_class_definition): Likewise.
7572         * lex.c (identifier_type): Handle implicit typename when checking
7573         for SELFNAME.
7575         * cp-tree.h: Declare flag_strict_prototype.
7576         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7577         -fstrict-prototype.
7578         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7579         specified, set it to the value of pedantic.
7581 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7583         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7585 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
7587         * decl.c (finish_enum): Handle member enums of classes declared in
7588         template functions.
7590         * decl2.c (grok_x_components): Strip attributes before calling
7591         groktypename.
7593 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
7595         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7596         -fenum-int-equivalence and -fno-nonnull-objects.
7597         * class.c (check_for_override): Remove support for -fall-virtual.
7598         (finish_struct_1): Likewise.
7599         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7600         * typeck.c (build_binary_op_nodefault): Likewise.
7601         * cvt.c (ocp_convert): Likewise.
7602         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7603         * class.c (build_vbase_path): Likewise.
7605 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
7607         * Makefile.in (INTERFACE): New, set to 1.
7609 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
7611         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7612         comparing with global_namespace.
7613         (dump_aggr_type): Likewise.
7615         * decl.c (grokfndecl): Issue error on declaration of friend
7616         templates with explicit template arguments.
7618         * pt.c (convert_template_argument): New function, split out
7619         from...
7620         (coerce_template_parms): Here.
7621         (tsubst): Attempt better error-recovery.
7623 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7625         * pt.c (decl_template_parm_p): Add checks for
7626         TEMPLATE_TEMPLATE_PARM.
7628 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7630         * lex.c (do_identifier): Fix thinko in previous change.
7632 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
7634         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
7635         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
7637 1998-08-28  Richard Henderson  <rth@cygnus.com>
7639         Add support for discarding unused virtual functions.
7640         * lang-options.h: Add -fvtable-gc.
7641         * cp-tree.h: Add flag_vtable_gc.
7642         * decl2.c (output_vtable_inherit): New fn.
7643         (finish_vtable_vardecl): Call it.
7644         * class.c (build_vtable_entry_ref): New fn.
7645         (build_vtbl_ref): Call it.
7647 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7649         * cp-tree.h (build_enumerator): Take the enumeration type as a
7650         parameter.
7651         * decl.c (finish_enum): Don't set the TREE_TYPE for the
7652         enumeration constant values if we're processing_template_decls.
7653         Don't set the type for the CONST_DECLs either; that's done in
7654         build_enumerator.
7655         (build_enumerator): Take the enumeration type as a
7656         parameter.
7657         * lex.c (do_identifier): Don't resolve enumeration constants while
7658         processing template declarations, even if they happen to be
7659         TEMPLATE_PARM_INDEXs.
7661         * parse.y (current_enum_type): New variable.
7662         (primary): Don't allow statement-expression in local classes just
7663         as we don't in global classes.
7664         (structsp): Use current_enum_type.
7665         (enum_list): Likewise.
7666         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
7667         finish_enum; they no longer occur.
7669         * cp-tree.h (finish_base_specifier): New function.
7670         * parse.y (base_class): Use it.
7671         * semantics.c (finish_base_specifier): Define it.
7673         * parse.y (structsp): Warn on use of typename outside of template
7674         declarations.
7676 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7678         * lex.c (handle_cp_pragma): Remove #pragma vtable.
7679         * lang-options.h: Remove +e options.
7680         * decl2.c (lang_decode_option): Likewise.
7681         (import_export_vtable): Don't check write_virtuals.
7682         (finish_vtable_vardecl, finish_file): Likewise.
7683         * search.c (dfs_debug_mark): Likewise.
7684         * semantics.c (begin_class_definition): Likewise.
7685         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
7687         * call.c (build_over_call): Check flag_elide_constructors.
7688         * decl2.c: flag_elide_constructors defaults to 1.
7689         * typeck.c (convert_arguments): Remove return_loc parm.
7690         (build_function_call_real): Adjust.
7692         * search.c: Tear out all mi_matrix and memoize code.
7693         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
7694         * lang-options.h: Remove documentation for -fhandle-exceptions,
7695         -fmemoize-lookups and -fsave-memoized.
7696         * cp-tree.h: Lose mi_matrix and memoize support.
7697         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
7698         * class.c: Lose struct class_level.
7699         (pushclass, popclass): Lose memoize support.
7700         * init.c (build_offset_ref): Likewise.
7702         Never change BINFO_INHERITANCE_CHAIN.
7703         * init.c (emit_base_init): Change modification of
7704         BINFO_INHERITANCE_CHAIN to an assert.
7705         * search.c (get_base_distance_recursive): Likewise.
7706         (get_base_distance): Likewise.
7707         (lookup_member): Likewise.
7708         (convert_pointer_to_single_level): Likewise.
7709         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
7710         (lookup_fnfields): Likewise.
7711         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
7712         (unshare_base_binfos): Don't call propagate_binfo_offsets.
7713         (layout_basetypes): Call propagate_binfo_offsets instead of
7714         unshare_base_binfos.
7715         * decl.c (xref_basetypes): Call unshare_base_binfos.
7716         * pt.c (instantiate_class_template): Likewise.
7717         * tree.c (reverse_path): Remove 'copy' parm; always make a
7718         temporary copy.
7719         * class.c (build_vbase_path): Just call it.
7720         * search.c (compute_access): Likewise.  Don't re-reverse.
7722 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7724         * class.c (build_vbase_path): Use reverse_path.
7725         (finish_base_struct): Move warnings for inaccessible bases to
7726         layout_basetypes.
7727         (modify_one_vtable): Remove check of TREE_USED (binfo).
7728         (fixup_vtable_deltas1): Likewise.
7729         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
7730         (xref_tag): Remove binfos parameter.
7731         (make_binfo): Remove chain parameter.
7732         (reverse_path): Add copy parameter.
7733         * decl.c (init_decl_processing): Change calls to xref_tag.
7734         (xref_tag): Remove binfos parameter.
7735         (xref_basetypes): Change calls to make_binfo.
7736         * decl2.c (grok_x_components): Change calls to xref_tag.
7737         (handle_class_head): Likewise.
7738         * friend.c (do_friend): Likewise.
7739         * lex.c (make_lang_type): Change calls to make_binfo.
7740         * parse.y (structsp): Change calls to xref_tag.
7741         (named_complex_class_head_sans_basetype): Likewise.
7742         (named_class_head): Likewise.
7743         * rtti.c (init_rtti_processing): Likewise.
7744         * search.c (compute_access): Change calls to reverse_path.
7745         (dfs_get_vbase_types): Change calls to make_binfo.
7746         (get_vbase_types): Remove dead code.
7747         * tree.c (unshare_base_binfos): Change calls to make_binfo.
7748         (layout_basetypes): Warn here about inaccessible bases.
7749         (make_binfo): Remove chain parameter.
7750         (reverse_path): Add copy parameter.
7752 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7754         * class.c: #if 0 complete_type_p.
7755         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
7756         * method.c (process_overload_item): Likewise.
7757         * typeck.c (comp_target_types): Likewise.
7759         Stop sharing binfos for indirect virtual bases.
7760         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
7761         (layout_basetypes): Likewise.
7762         (unshare_base_binfos): Copy vbases, too.
7763         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
7764         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
7765         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
7766         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
7767         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
7768         reference to BINFO_VIA_PUBLIC.
7769         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
7770         (push_class_decls): Use them.
7771         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
7772         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
7774 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7776         * decl.c (build_enumerator): Set DECL_CONTEXT for the
7777         CONST_DECLs.
7779 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
7781         * cp-tree.h (finish_enum): Change prototype.
7782         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
7783         VALUES parameter.  Don't try to compute mins/maxs if
7784         processing_template_decl.
7785         * parse.y (structsp): Use new calling sequence for finish_enum.
7786         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
7787         (lookup_template_class): Remove unused variables.  Tweak.
7788         Register enums on instantiation list before substituting
7789         enumeration constants.
7790         (tsubst_decl): Remove unused variables.
7791         (regenerate_decl_from_template): Likewise.
7793         * decl.c (duplicate_decls): Don't obliterate the
7794         DECL_TEMPLATE_INFO for a template if we're not replacing it with
7795         anything.
7797         * lex.c (do_identifier): Fix typo in comment.
7799 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7801         * errfn.c: Remove stdarg.h/varargs.h.
7802         * tree.c: Likewise.
7804 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
7806         * pt.c (tsubst_copy): Only do typename overloading on an
7807         IDENTIFIER_NODE that happens to look like a typename if it actually
7808         has a type for us to use.
7810 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7812         * typeck.c (comp_cv_target_types): Split out...
7813         (comp_target_types): From here.  Don't allow cv-qual changes under
7814         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
7815         (build_ptrmemfunc): Pass 1 to nptrs.
7816         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7818 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
7820         * search.c (dependent_base_p): Don't compare a binfo to
7821         current_class_type; use the TREE_TYPE of the binfo instead.
7823         * cp-tree.h (CLASS_TYPE_P): Revise definition.
7825 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7827         * decl.c (duplicate_decls): Don't complain about different
7828         exceptions from an internal decl even if pedantic.
7830         * typeck.c (convert_for_assignment): Converting from pm of vbase
7831         to derived is an error, not a sorry.
7833         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
7834         * class.c (fixed_type_or_null): Rename from
7835         resolves_to_fixed_type_p.  Return the dynamic type of the
7836         expression, if fixed, or null.
7837         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
7838         does not match the static type.
7839         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
7840         resolves_to_fixed_type_p again.
7842 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7844         * pt.c (tsubst_decl): Move special case code for dealing with
7845         tricky friend templates here from ...
7846         (regenerate_decl_from_template): Here.
7848 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7850         * decl.c (start_decl): Remove redundant linkage check.
7852 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
7854         * typeck.c (c_expand_return): Handle the case that valtype
7855         is wider than the functions return type.
7857 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7859         * cp-tree.h (CLASS_TYPE_P): New macro.
7860         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
7861         * pt.c (process_template_parm): Undo previous change.
7863 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
7865         * cp-tree.h: Declare.
7866         * pt.c (decl_template_parm_p): New function.
7867         * decl.c (pushdecl): Check decls for redeclaring template parms.
7868         (xref_tag): Make redeclaration an error, print decl.
7869         * decl2.c (grokfield): Check field_decls for redeclaration as well.
7871 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7873         * parse.y (primary): Fix up the type of string constants.
7875 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7877         * typeck.c (convert_for_initialization): Move check for odd uses
7878         of NULL to avoid duplicate warnings.
7880 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7882         * tree.c (lvalue_type): Fix for arrays.
7883         * typeck.c (string_conv_p): New fn.
7884         (convert_for_assignment): Use it.
7885         (build_unary_op): Use lvalue_type.
7886         * call.c (standard_conversion, convert_like): Use string_conv_p.
7887         (add_function_candidate): Use lvalue_type.
7888         * cvt.c (convert_to_reference): Likewise.
7889         * decl2.c (lang_decode_option): Ignore -traditional.
7890         * decl.c (init_decl_processing): flag_writable_strings inhibits
7891         flag_const_strings.
7893 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
7895         * lang-options.h (lang_options): Add fconst-strings to the list
7896         of valid options.
7897         * decl2.c (lang_f_options, lang_decode_option): Likewise.
7899 1998-08-24  Nathan Sidwell  <nathan@acm.org>
7901         * lex.c (real_yylex): Don't warn about long long constants if
7902         we're allowing long long.
7904 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7906         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
7907         accessing bindings directly.
7909         * search.c (my_tree_cons): Reimplement.
7911         * lang-specs.h: Remove __HONOR_STD.
7912         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
7914 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
7916         * decl.c (grokdeclarator): Complain about in-class initialization
7917         of aggregates and/or references.
7918         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
7919         TEMPLATE_TYPE_PARMs.
7921         * decl2.c (grok_array_decl): Add comment.
7922         (mark_used): Don't instantiate an explicit instantiation.
7923         * friend.c (make_friend_class): Remove bogus comment.  Fix check
7924         for partial specializations.
7925         * pt.c (check_explicit_specialization): Don't
7926         SET_DECL_EXPLICIT_INSTANTIATION here.
7927         (mark_decl_instantiated): Or here.
7928         (do_decl_instantiation): Do it here, instead.  Add checks for
7929         duplicate explicit instantiations, etc.  Tidy.
7930         (do_type_instantiation): Likewise.
7931         (instantiate_decl): Improve comments.  Complain about explicit
7932         instantiations where no definition is available.
7934         * cp-tree.h (ansi_null_node): Remove.
7935         * call.c (build_over_call): Warn about converting NULL to an
7936         arithmetic type.
7937         * cvt.c (build_expr_type_conversion): Likewise.  Use
7938         null_ptr_cst_p instead of expanding it inline.
7939         * decl.c (ansi_null_node): Remove.
7940         (init_decl_processing): Make null_node always have integral type.
7941         * except.c (build_throw): Warn about converting NULL to an
7942         arithmetic type.
7943         * lex.c (init_parse): Remove handling of ansi_null_node.
7944         * pt.c (type_unification_real): Don't convert NULL to void* type.
7945         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7946         (convert_for_assignment): Warn about converting NULL to an
7947         arithmetic type.
7948         (convert_for_initialization): Likewise.
7950 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7952         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7953         * pt.c (coerce_template_parms): Use no_linkage_check.
7954         * decl.c (grokvardecl): Likewise.
7955         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
7957         * method.c (process_overload_item): Remove useless code.
7959 1998-08-20  Per Bothner  <bothner@cygnus.com>
7961         Handle new'ing of Java classes.
7962         * init.c (build_class_classref):  New function.
7963         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
7964         constructor does not return this;  don't need to exception-protect.
7966         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
7967         * decl2.c (acceptable_java_type):  Handle template-derived types.
7969 1998-08-20  Per Bothner  <bothner@cygnus.com>
7971         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
7973 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
7975         * decl.c (duplicate_decls): Always merge the old and new patterns
7976         for templates, regardless of whether or not the new one has
7977         DECL_INITIAL.  Don't throw away specializations.  Merge
7978         DECL_SAVED_TREE.
7979         * pt.c (tsubst_decl): Use the right pattern when calculating the
7980         complete args for a new template instance.
7981         (do_decl_instantiation): Fix typo in comment.
7982         (regenerate_decl_from_template): Deal with tricky friend template
7983         case.
7984         (instantiate_decl): Likewise.
7986 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
7988         * init.c (build_builtin_delete_call): Add missing assemble_external
7989         call.
7991 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7993         * parse.y (notype_unqualified_id): Also accept ~A<int>.
7995 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
7997         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7998         arithmetic.
7999         * except.c (build_throw): Warn when NULL is thrown, even with
8000         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
8001         thrown expression.
8003         * cp-tree.h (ansi_null_node): New variable.
8004         * decl.c (ansi_null_node): New variable.
8005         (init_decl_processing): Initialize its type.
8006         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
8007         for null_node in non-ANSI mode.
8008         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
8009         place of null_node to avoid spurious errors.
8011 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
8013         * cp-tree.h (enter_scope_of): New function.
8014         * parse.y (complex_direct_notype_declarator): Use it.
8015         * semantics.c (enter_scope_of): New function.
8017 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
8019         * decl.c (grokparms): No, here.
8021         * decl.c (grokdeclarator): Catch parm with pointer to array of
8022         unknown bound here...
8023         * method.c (process_overload_item): ...not here.
8025         * gxxint.texi: Remove obsolete documentation of overloading code.
8027         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
8028         * class.c (finish_struct_bits): Likewise.
8030         * tree.c (lvalue_type): Fix for arrays.
8031         * typeck.c (build_unary_op): Use lvalue_type.
8032         * call.c (add_function_candidate): Likewise.
8033         * cvt.c (convert_to_reference): Likewise.
8035         * decl2.c (lang_decode_option): Ignore -traditional.
8037         * init.c (build_offset_ref): Don't mess with error_mark_node.
8038         * lex.c (do_scoped_id): Use cp_error.
8040         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
8042 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8044         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
8046 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
8048         * cp-tree.h (set_identifier_local_value): Provide prototype.
8050         * decl2.c (do_namespace_alias): Remove unused variables `binding'
8051         and `old'.
8053 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
8055         * Makefile.in: Rename BBISON to BISON so that it can be properly
8056         inherited from the parent makefile.
8058 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8060         * lang-options.h: Add -finit-priority.
8061         * decl2.c: Likewise.  Check flag_init_priority instead of
8062         USE_INIT_PRIORITY.
8064         * decl2.c (setup_initp): New fn.
8065         (start_objects, finish_objects, do_ctors): Handle init_priority.
8066         (do_dtors, finish_file): Likewise.
8068 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8070         * pt.c (tsubst_copy): Hush warning.
8072         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
8074 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
8076         * pt.c (print_template_context): Don't abort when instantiating a
8077         synthesized method.
8079         * decl.c (grokdeclarator): Issue errors on namespace qualified
8080         declarators in parameter lists or in class scope.
8082 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
8084         * pt.c (check_explicit_specialization): Don't abort on bogus
8085         explicit instantiations.
8087 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
8089         * typeck.c (require_complete_type): Use complete_type_or_else.
8090         (complete_type_or_else): Always return NULL_TREE on failure, as
8091         documented.
8093         * pt.c (tsubst_aggr_type): Prototype.
8094         (tsubst_decl): New function, split out from tsubst.  Set
8095         input_filename and lineno as appropriate.
8096         (pop_tinst_level): Restore the file and line number saved in
8097         push_tinst_level.
8098         (instantiate_class_template): Set input_filename and lineno as
8099         appropriate.
8100         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
8101         context for a TYPENAME_TYPE is complete.
8103         * decl2.c (grokbitfield): Issue errors on bitfields declared with
8104         function type.
8105         (do_dtors): As in do_ctors, pretend to be a member of the same
8106         class as a static data member while generating a call to its
8107         destructor.
8109         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
8110         conversions, even in complex virtual base class hierarchies.
8112 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
8114         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
8115         (TYPE_TEMPLATE_INFO): Likewise.
8116         (SET_TYPE_TEMPLATE_INFO): Likewise.
8117         (ENUM_TI_TEMPLATE): Likewise.
8118         (ENUM_TI_ARGS): Likewise.
8119         (lookup_nested_type_by_name): Remove.
8120         * decl.c (maybe_process_template_type_declaration): Handle enums.
8121         (start_enum): Don't check for primary-template enum declarations
8122         here.
8123         (finish_enum): Clean up, document.  Make sure template enum
8124         constants get the correct type.
8125         (build_enumerator): Copy initializers for template enumerations,
8126         too.
8127         (grok_enum_decls): Document.
8128         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
8129         better.  Build LOOKUP_EXPRs for local variables, even if they are
8130         TREE_PERMANENT.
8131         * pt.c (tsubst_enum): Remove field_chain parameter.
8132         (template_class_depth): Include the depth of surrounding function
8133         contexts.
8134         (push_template_decl): Check for primary-template enum declarations
8135         here.  Deal with enumeration templates.
8136         (lookup_template_class): Likewise.
8137         (for_each_template_parm): Likewise.
8138         (instantiate_class_template): Don't call tsubst_enum directly,
8139         call tsubst instead, to instantiate enums.  Deal with all
8140         field_chain issues here, not in tsubst_enum.
8141         (lookup_nested_type_by_name): Remove.
8142         (tsubst_aggr_type): Revise handling of enumeration types.
8143         (tsubst): Likewise.
8144         (tsubst_copy): Likewise.
8145         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
8147 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
8149         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
8150         uses template parameters.
8151         * method.c (build_template_parm_names): Use the full set of
8152         template arguments for tsubst'ing.
8153         (build_overload_identifier): Pass the full set of template
8154         arguments to build_template_parm_names, not just the
8155         innermost_args.
8156         * pt.c (TMPL_ARGS_DEPTH): Define using
8157         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
8158         (NUM_TMPL_ARGS): New macro.
8159         (add_outermost_template_args): Deal with the case where the outer
8160         args will be completely discarded.
8161         (coerce_template_parms): Use the full set of template arguments
8162         for tsubst'ing.  Simplify.  Add some asserts.  Improve
8163         error messages.
8164         (lookup_template_class): Pass the full set of template arguments
8165         to coerce_template_parms.
8166         (tsubst): Add assertion.
8167         (do_type_instantiation): Don't instantiate member template
8168         classes.
8170         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
8171         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
8173 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
8175         * method.c (set_mangled_name_for_decl): Change return type to void.
8177         * decl.c (lookup_name_real): A namespace-level decl takes priority
8178         over implicit typename.  Avoid doing the same lookup twice.
8180         * search.c (dependent_base_p): New fn.
8181         (dfs_pushdecls, dfs_compress_decls): Use it.
8183         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
8184         virtual functions if the type doesn't have any.
8186 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
8188         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
8189         uses template parameters.
8191 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
8193         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
8194         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
8195         * lex.c (do_identifier): Don't use a second argument, or a type,
8196         when building LOOKUP_EXPRs.
8197         (do_identifier): Likewise.
8198         (do_scoped_id): Likewise.
8199         * method.c (hack_identifier): Improve error message.
8200         * pt.c (lookup_template_function): Don't needlessly call
8201         copy_to_permanent or build_min.
8202         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
8203         necessary.
8204         (do_decl_instantiation): Improve error message.
8205         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
8206         (build_min): Copy the type to the permanent obstack, too.
8208 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
8210         * init.c (init_init_processing): Remove BI* handling.
8211         (build_builtin_call): Remove.
8212         (build_builtin_delete_call): New fn.
8213         (build_delete): Use it.
8215 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
8217         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
8218         (maybe_check_template_type): New function.
8219         * decl.c (maybe_process_template_type_declaration): New function,
8220         split out from pushtag  Call maybe_check_template_type.
8221         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
8222         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8223         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8224         * pt.c (template_class_depth_real): Generalization of ...
8225         (template_class_depth): Use it.
8226         (register_specialization): Use duplicate_decls for duplicate
8227         declarations of specializations.
8228         (maybe_check_template_type): New function.
8229         (push_template_decl_real): Fix comment.
8230         (convert_nontype_argument): Likewise.
8231         (lookup_template_class): Likewise.  Avoid an infinite loop on
8232         erroneous code.
8233         (tsubst_friend_function): Fix comment.
8234         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
8235         an IDENTIFIER_NODE.
8236         * semantics.c (begin_function_definition): Use
8237         reset_specialization to note that template headers don't apply
8238         directly to declarations after the opening curly for a function.
8240 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
8242         * decl.c (push_overloaded_decl): Use current_namespace instead of
8243         DECL_CONTEXT (decl) to determine where we go.
8245         * decl.c (lookup_name_real): Fix typo.
8247 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
8249         * friend.c (is_friend): Be lenient with member functions to deal
8250         with nested friends.
8252 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
8254         * class.c (finish_struct_1): Convert integer_zero_node to
8255         ssizetype before passing it to set_rtti_entry.
8256         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
8257         of any size to a pointer.
8259 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
8261         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
8262         (build_template_decl_overload): Remove.
8263         (set_mangled_name_for_decl): New function.
8264         (innermost_args): Remove is_spec parameter.
8265         (most_specialized, most_specialized_class): Remove declarations.
8266         (lookup_template_class): Add entering_scope parameter.
8267         (maybe_process_partial_specialization): New function.
8268         (finish_template_decl): Likewise.
8269         (finish_template_type): Likewise.
8270         * class.c (finish_struct): Clean up processing of member template
8271         specializations.
8272         * decl.c (pushtag): Fix formatting.
8273         (lookup_tag): Improve handling of pseudo-global levels.
8274         (make_typename_type): Adjust call to lookup_template_class.
8275         (shadow_tag): Use maybe_process_partial_specialization.
8276         (xref_tag): Improve handling of member friends.
8277         (start_function): Call push_nested_class before
8278         push_template_decl.  Don't call push_template_decl for
8279         specializations.
8280         * decl2.c (grok_x_components): Don't call xref_tag for
8281         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
8282         (grokclassfn): Use set_mangled_name_for_decl.
8283         (arg_assoc_class): Adjust call to innermost_args.
8284         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
8285         * error.c (dump_function_name): Improve printing of template
8286         function names.
8287         * friend.c (is_friend): Don't compare types of decls to determine
8288         friendship, unless flag_guiding_decls.
8289         (make_friend_class): Partial specializations cannot be friends.
8290         (do_friend): Use set_mangled_name_for_decl.  Call
8291         push_template_decl_real instead of push_template_decl.
8292         * method.c (build_decl_overload_real): Remove prototype.  Give it
8293         external linkage.
8294         (build_overload_identififer): Adjust call to innermost_args.
8295         (build_template_decl_overload): Remove.
8296         (set_mangled_name_for_decl): New function.
8297         * parse.y (.finish_template_type): New non-terminal.
8298         (template_def): Use finish_template_decl.  Use template_extdef
8299         instead of extdef.
8300         (template_extdef, template_datadef): New non-terminals, containing
8301         only those rules for things which can be templates.
8302         (datadef): Tidy.
8303         (template_type, self_template_type): Use .finish_template_type.
8304         (named_class_head): Use maybe_process_partial_specialization.
8305         * pt.c (mangle_class_name_for_template): Remove context parameter.
8306         (get_class_bindings): Remove outer_args parameter.
8307         (complete_template_args): Remove.
8308         (add_outermost_template_args): New function.
8309         (register_specialization): Return the specialization.
8310         (unregister_specialization): New function.
8311         (tsubst_template_parms): Likewise.
8312         (most_specialized, most_specialized_class): Prototype here as
8313         static.
8314         (original_template): Rename to most_general_template.
8315         (tsubst_template_parms): New function.
8316         (set_mangled_name_for_template_decl): Likewise.
8317         (TMPL_ARGS_DEPTH): New macro.
8318         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
8319         (TMPL_ARGS_LEVEL): New macro.
8320         (SET_TMPL_ARGS_LEVEL): Likewise.
8321         (TMPL_ARG): Likewise.
8322         (SET_TMPL_ARG): Likewise.
8323         (TMPL_ARGS_DEPTH): Likewise.
8324         (finish_member_template_decl): Use finish_template_decl.
8325         (maybe_process_partial_specialization): New function, split out
8326         from tsubst.
8327         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
8328         (maybe_begin_member_template_processing): Use new macros.
8329         (is_member_template): Likewise.
8330         (is_member_template_class): Likewise.
8331         (add_to_template_args): Likewise.  Deal with multiple levels of
8332         args.
8333         (maybe_process_partial_specialization): New function.
8334         (retrieve_specialization): Add consistency check.
8335         (determine_specialization): Return full argument list.
8336         (check_explicit_specialization): Tweak friend handling.  Use full
8337         argument lists.  Simplify.
8338         (current_template_args): Use new macros.
8339         (push_template_decl_real): Change ill-named mainargs to specargs.
8340         Check that a partial specialization actually specializes at least
8341         one parameter.   Improve friend handling.  Modify for full
8342         template arguments.
8343         (classtype_mangled_name): Don't mangle the names of
8344         specializations.
8345         (lookup_template_class): Add entering_scope parameter.  Use it to
8346         avoid finding a template type when an instantiation is required.
8347         Simplify.  Use full template arguments.
8348         (tsubst_friend_function): Use unregister_specialization.  Use new
8349         macros.  Use full template arguments.
8350         (tsubst_friend_class): Substitute, using tsubst_template_parms,
8351         into the template parameters before passing them to
8352         redeclare_class_template.
8353         (instantiate_class_template): Simplify.  Use full template
8354         arguments.  Adjust calls to get_class_bindings.  Use
8355         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
8356         (innermost_args): Use new macros.
8357         (tsubst_aggr_type): New function, split out from tsubst.
8358         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
8359         conventions for lookup_template_class.  Refine handling of partial
8360         instantiations.   Remove calls to complete_template_args.
8361         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
8362         and set_mangled_name_for_template_decl.
8363         (tsubst_copy): Use tsubst_aggr_type.
8364         (instantiate_template): Use full template arguments.
8365         (more_specialized): Improve formatting.
8366         (more_specialized_class): Adjust calls to get_class_bindings.
8367         (get_bindings_real): Don't call complete_template_args.
8368         (most_specialized): Don't overwrite input; create a new list.
8369         (most_specialized_class): Use most_general_template.
8370         (regenerate_decl_from_template): Use unregister_specialization.
8371         Use full template arguments.
8372         (instantiate_decl): Use full template arguments.
8373         (set_mangled_name_for_template_decl): New function.
8374         * semantics.c (begin_class_definition): Use
8375         maybe_process_partial_specialization.
8376         (finish_member_class_template): New function.
8377         (finish_template_decl): Likewise.
8378         (finish_template_type): Likewise.
8379         (typeck.c): Don't crash after issuing a compiler_error.
8380         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
8382 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
8384         * typeck2.c (build_functional_cast): Handle default-initialization.
8386         * call.c (build_over_call): Pass 1 to popclass.
8388         * parse.y (direct_notype_declarator): Add precedence declaration
8389         to notype_unqualified_id case.
8390         * Makefile.in (EXPECT): Adjust.
8392         * tree.c (ovl_member): Fix for single function in OVL.
8394 1998-07-27  Dave Brolley  <brolley@cygnus.com>
8396         * c-lex.c (yylex): Fix boundary conditions in character literal and
8397         string literal loops.
8399 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
8401         * decl.c (lookup_name_real): OK, do return the from_obj value
8402         unless got_object depends on template parms.
8404         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8406         * pt.c (coerce_template_parms): Also complain about local enums.
8408         * cp-tree.h: Add prototype for set_identifier_local_value.
8409         * decl.c (set_identifier_local_value_with_scope): Make static,
8410         prototype.
8411         * search.c (covariant_return_p): Likewise.
8412         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8414         * call.c (build_method_call): Only pull out the type of a destructor
8415         if it's a template type parm.
8416         * decl.c (lookup_name_real): Never return the from_obj value.
8418 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8420         * except.c (process_start_catch_block_old): Call start_decl_1 for
8421         catch parm.
8422         * decl.c (start_decl_1): Avoid duplicate error.
8424         * init.c (expand_default_init): Only perform the initialization if
8425         it will do something.
8427 1998-07-23  H.J. Lu  (hjl@gnu.org)
8429         * parse.y (base_class): Check for invalid base class.
8431 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8433         * decl2.c (import_export_template): Fold in...
8434         (import_export_class): ...to here.  Handle dllimport/export.
8436         * class.c (build_vtable): Pass at_eof to import_export_vtable.
8437         (prepare_fresh_vtable): Likewise.
8438         * decl2.c (import_export_class): Split out...
8439         (finish_prevtable_vardecl): From here.
8440         * class.c (finish_struct_1): Call import_export_class if at_eof.
8442         * decl.c (start_function): #if 0 mysterious code I wrote and have
8443         forgotten why.
8444         * rtti.c (get_tinfo_fn): If this is for a class type, set
8445         DECL_CONTEXT.
8447 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
8449         * inc/exception: Change terminate and unexpected to ().
8451         * parse.y (named_class_head_sans_basetype_defn): A
8452         named_class_head_sans_basetype followed by '{' or ':' is a defn.
8454 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
8456         * tree.c (canonical_type_variant): New fn to handle arrays.
8457         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8458         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
8459         * method.c (process_overload_item): Use build_overload_value for
8460         arrays.
8462 1998-07-20  Dave Brolley  <brolley@cygnus.com>
8464         * lex.c (mbchar.h): #include it.
8465         (GET_ENVIRONMENT): New macro.
8466         (init_parse): Set character set based on LANG environment variable.
8467         (real_yylex): Handle multibyte characters in character literals.
8468         (real_yylex): Handle multibyte characters in string literals.
8470 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
8472         * lex.c (do_identifier): Look for class value even if we don't
8473         have a global value.  Do implicit declaration if parsing is 2.
8474         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8475         lookup.
8477 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
8479         * decl.c (pushtag): Revert previous change.
8480         * pt.c (lookup_template_class): Don't put out debugging
8481         information for types that use template parameters.
8483         * decl.c (pushtag): Don't put out debugging information for
8484         compiler-generated typedefs.
8486         * error.c (dump_type_real): Don't crash when presented with
8487         intQI_type_node or the like.
8489         * semantics.c (finish_translation_unit): Fix spelling error in
8490         comment.
8492 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
8494         * decl.c (lookup_name_real): Pull out single function here.
8495         (select_decl): Not here.
8496         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8498         * decl.c (qualify_lookup): Tweak again.
8500         * pt.c (lookup_template_class): Don't mess with the context of the
8501         instantiation.
8502         * decl2.c (current_decl_namespace): Remove special handling for
8503         templates.
8505         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8506         a member template specialization.
8508         * tree.c (ovl_member): Use decls_match to compare functions.
8509         * decl.c (decls_match): Check the context of a function.
8511         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8512         in Koenig lookup support rules.
8513         * semantics.c (finish_call_expr): Handle the new cases.
8515         * typeck.c (build_x_function_call): Handle overloaded methods.
8517         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8519 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8521         * semantics.c (finish_object_call_expr): Revert previous change.
8522         * call.c (build_new_method_call): Likewise.  Instead, convert
8523         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8525 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8527         * decl.c (qualify_lookup): Handle templates.
8529         * decl2.c (do_using_directive): Don't pass ancestor.
8530         * decl.c (push_using_directive): Calculate ancestor.
8532         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8533         * decl.c (pushdecl): Move type shadowing handling from here...
8534         (duplicate_decls): ...to here.
8535         * decl.c (set_identifier_local_value_with_scope): New fn.
8536         (pushdecl): Use it.
8537         (set_identifier_local_value, lookup_type_current_level): New fns.
8538         * decl2.c (do_local_using_decl): Handle types and binding level
8539         stuff properly.
8541         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8542         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8543         (lookup_namespace_name): Likewise.
8544         * typeck.c (build_unary_op): Not here anymore.
8546         * decl2.c (do_class_using_decl): Make sure we get an identifier.
8547         * class.c (handle_using_decl): Ignore TYPE_DECLs.
8549         * decl.c (qualify_lookup): New fn.
8550         (lookup_name_real): Use it.
8552 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8554         * decl2.c (add_using_namespace): When directly using a namespace
8555         that was indirect before, promote it.
8557         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8558         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8559         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8560         * decl.c (select_decl): Replace two flag parameters by one.
8561         (unqualified_namespace_lookup): Likewise, pass flag.
8562         (lookup_flags): New function.
8563         (lookup_name_real): Compute flags, pass them.
8564         (lookup_namespace_name): Call with zero-flag.
8565         * decl2.c (ambiguous_decl): Add flag parameter, complain only
8566         according to flags.
8567         (lookup_using_namespace, qualified_lookup_using_namespace):
8568         Add flag parameter, pass them through.
8569         * lex.c (do_scoped_id): Call with zero-flag.
8571 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8573         * typeck.c (convert_for_assignment): Use comptypes.
8575 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8577         * semantics.c (finish_object_call_expr): Move test for the
8578         function called being a TYPE_DECL to ...
8579         * call.c (build_new_method_call): Here.
8581 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8583         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8584         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8586         * lex.c (looking_for_typename): Don't initialize.
8588         * decl2.c (ambiguous_decl): Clarify error message.
8590         * decl.c (push_using_directive): Iterate over namespaces used
8591         indirectly.
8593 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8595         * decl2.c (add_using_namespace): Iterate over namespaces used
8596         indirectly.
8598         * decl.c (lookup_name_real): Accept namespace aliases as locals.
8599         (cat_namespace_levels): Ignore aliases.
8600         (duplicate_decls): Ignore duplicate aliases.
8601         * decl2.c (do_namespace_alias): Process block level namespace
8602         aliases.  Store alias with pushdecl.  Remove odr errors.
8603         * parse.y (namespace_alias): New non-terminal.
8604         (extdef): Use it.
8606 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8608         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8609         Handle TEMPLATE_TYPE_PARM.
8610         (arg_assoc): Rewrite.
8612         * pt.c (complete_template_args): Don't look at the context unless
8613         we have to.
8615         * method.c (build_decl_overload_real): Fix namespace handling.
8617         * typeck.c (build_unary_op): Extract a lone function from an
8618         OVERLOAD.
8620         * call.c (build_scoped_method_call): Handle getting a namespace
8621         for basetype in a destructor call.
8622         (check_dtor_name): Handle enums.
8624         * parse.y (using_directive): New nonterminal.
8625         (extdef, simple_stmt): Use it.
8627 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8629         * decl2.c (add_function): Move error message ...
8630         (arg_assoc_namespace): ... from here.
8632 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8634         * parse.y (namespace_qualifier): Fix multiple level handling.
8635         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
8636         (arg_assoc): Don't skip the first argument of a function.
8638 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
8640         * search.c (my_tree_cons): Clean up.
8642 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8644         * call.c (joust): Don't warn about "confusing" conversions to the
8645         same type.
8647 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8649         * class.c (push_nested_class): Complain about namespaces.
8650         * decl.c (start_decl): Enter the object's namespace.
8651         (cp_finish_decl): Leave it.
8652         (grokdeclarator): Likewise.
8653         * decl2.c (check_decl_namespace): New function.
8654         (finish_file): Call it.
8655         * parse.y (complex_direct_notype_declarator): Set complexity
8656         of namespace-qualified ids to -1, enter the namespace.
8658         * method.c (build_template_decl_overload): Expect _DECL as first
8659         parameter.  Put context temporarily into current_namespace.
8660         * pt.c (check_explicit_specialization): Change caller.
8661         (tsubst): Likewise.
8663         * init.c (build_offset_ref): Call mark_used and
8664         convert_from_reference for namespace members.
8666 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8668         * search.c (my_tree_cons): The bitfield is at index 2.
8670 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
8672         * lang-options.h: Format changed to work with new --help support
8673         in gcc/toplev.c
8675 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8677         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
8678         Do Koenig lookup in CALL_EXPR.
8679         (arg_assoc): Handle error_mark.
8680         * lex.c (is_global): New function.
8681         (do_identifier): Expect arguments for Koenig lookup.
8682         * parse.y (primary): Add rules for calls of unqualified function calls.
8683         (do_id): Change call of do_identifier.
8684         * pt.c (finish_stmt_expr): Likewise.
8685         * semantics.c (finish_id_expr): Likewise.
8686         (finish_call_expr): Add integer parameter to indicate
8687         argument-dependent lookup.
8689         * decl.c (struct binding_level): New field using_directives.
8690         (push_using_decl): Not sorry anymore.
8691         (push_using_directive): New function.
8692         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
8693         (unqualified_namespace_lookup): New function, code from ...
8694         (lookup_name_real): ... here.
8695         * decl2.c (lookup_using_namespace): Pass using list instead of
8696         initial scope.
8697         (validate_nonmember_using_decl): New function.
8698         (do_nonmember_using_decl): New function.
8699         (do_toplevel_using_decl): Use them.
8700         (do_local_using_decl): New function.
8701         (do_using_directive): Support block-level directives.
8702         * parse.y (simple_stmt): Support using declarations and
8703         directives.
8704         (namespace_qualifier, namespace_using_decl): New non-terminals.
8706         * xref.c (classname): New function.
8707         (GNU_xref_hier): Change class and base parameters to tree.
8708         * decl.c (xref_baseypes): Change caller.
8709         * friend.c (make_friend_class): Likewise.
8711 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8713         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
8714         comparison.
8716         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
8717         template template parameter, record its use.
8718         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
8719         its template arguments if exists.
8721         * pt.c (coerce_template_template_parms): New function equivalent
8722         to coerce_template_parms when IS_TMPL_PARM is true.
8723         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
8724         all callers changed.
8726         (coerce_template_parms): Access ARGLIST properly when creating a
8727         new vector.  Only accept implicit TYPE_DECL as valid argument for
8728         a template template parameter when it is a base class of
8729         current_class_type.  Don't display error message when COMPLAIN is
8730         false.
8732 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
8734         * repo.c (get_base_filename): Use file_name_nondirectory.
8735         (open_repo_file): Likewise.
8736         * cp-tree.h (file_name_nondirectory): Add prototype.
8738 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
8740         * friend.c (do_friend): Pull the identifier out of declarator.
8741         Use cp_error and friends.
8742         * decl2.c (qualified_lookup_using_namespace): Fix call to
8743         purpose_member.
8744         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
8745         (grokvardecl): Use DECL_CLASS_SCOPE_P.
8746         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
8747         * class.c (warn_hidden): Fix for OVERLOAD.
8748         From grahams@rcp.co.uk:
8749         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
8750         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
8752 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
8754         * g++.1 (-traditional): Remove duplicated documentation.
8756 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
8758         * method.c (flush_repeats): Add nrepeats parameter.
8759         (issue_nrepeats): Likewise.
8760         (is_back_referenceable_type): New function.  Don't back-reference
8761         TEMPLATE_TYPE_PARMs as well as simple types like integers.
8762         (build_mangled_name_for_type): Likewise.
8763         (build_mangled_name_for_type_with_Gcode): Likewise.
8764         (lasttype): Remove.
8765         (nrepeats): Likewise.
8766         (Nrepeats): Likewise.
8767         (start_squangling): Don't clear the variables removed above.
8768         (end_squangling): Likewise.
8769         (flush_repeats): Tidy.  Use nrepeats parameter rather than
8770         Nrepeats global.
8771         (issue_nrepeats): Likewise, but with nrepeats global.  Use
8772         is_backreferenceable_type.
8773         (build_overload_nested_name): Tidy.  Add comment.  Use
8774         build_mangled_name_for_type.
8775         (build_underscore_int): Comment.
8776         (build_overload_scope_ref): Use build_mangled_name_for_type.
8777         (build_overload_int): Likewise.
8778         (build_template_template_parm_names): Tidy.
8779         (build_template_parm_names): Use build_mangled_name_for_type.
8780         (build_overload_identifier): Add comments.
8781         (build_mangled_name_for_type_with_Gcode): Split out from
8782         build_mangled_name.
8783         (build_mangled_name_for_type): Use it.
8784         (build_mangled_name): Rework to use build_mangled_name_for_type
8785         and to not use global nrepeats/Nrepeats.  Tidy.
8786         (process_modifiers): Tidy.
8787         (check_btype): Use is_backreferenceable_type.  Add comment.
8788         Rename `node' to `type'.
8789         (process_overload_item): Set numeric_output_need_bar here.
8790         Use build_mangled_name_for_type.  Tidy.
8791         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
8792         build_mangled_name_for_type.
8794         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
8795         for TYPE_DECLs.
8797 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
8799         * cp-tree.h (warn_long_long): Define.
8800         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
8801         warning "ANSI C++ does not support `long long'".
8802         * decl2.c (warn_long_long): Define.
8803         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
8805 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
8807         * decl.c (xref_tag): Handle attributes between 'class' and name.
8808         * parse.y (aggr): Likewise.
8809         * semantics.c (finish_class_definition): Likewise.
8810         * Makefile.in (EXPECTED): Adjust.
8812         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
8813         * decl2.c: Define them.
8814         (lang_decode_option): Handle them.
8815         * lang-options.h: Add -foptional-diags.
8816         * class.c (finish_struct): Don't complain about multiple meanings of
8817         name if -fno-optional-diags.
8818         * decl.c (pushdecl_class_level): Likewise.
8819         * lex.c (real_yylex): Check warn_multichar.
8821 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
8823         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
8825         * tree.c (make_binfo): Fix length.
8827 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
8829         * decl2.c (lang_decode_option): Remove warn_template_debugging.
8830         * lang-options.h: Likewise.
8832 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8834         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
8835         (process_start_catch_block): Likewise for variables
8836         `false_label_rtx', `call_rtx' and `return_value_rtx'.
8838 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
8840         * tree.c (build_srcloc): Make sure we allocate this node on the
8841         permanent obstack.
8843 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
8845         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
8846         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
8847         (lang_specific_driver): Only add -lm automatically if need_math is
8848         nonzero.
8850 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
8852         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
8854 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8856         * Makefile.in (EXPR_H): New dependency variable.
8857         (decl2.o): Depend on $(EXPR_H).
8858         (typeck.o): Likewise.
8859         (init.o): Likewise.
8860         (expr.o): Likewise.
8862 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
8864         * decl.c (start_enum): Put local enums on permanent_obstack.
8866 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
8868         * cp-tree.h (c_get_alias_set): Declare.
8869         * decl.c (init_decl_processing): Set lang_get_alias_set.
8871 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
8873         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
8874         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
8875         flag for all function decls which are in the exception table.
8876         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
8877         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
8878         code is emitted for any referenced rtti function.
8880 1998-06-25  Dave Brolley  <brolley@cygnus.com>
8882         * lang-specs.h: Use new | syntax to eliminate
8883         string concatenation.
8885 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
8887         * cp-tree.h (CP_DECL_CONTEXT): New macro.
8888         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
8889         * method.c (build_overload_nested_name): Likewise.
8890         * sig.c (build_signature_pointer_or_reference_type): Don't set
8891         DECL_CONTEXT.
8893 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8895         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
8896         * cp-tree.h (FROB_CONTEXT): New macro.
8897         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
8898         * decl.c (namespace_binding): Replace NULL_TREE with
8899         global_namespace.
8900         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
8901         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
8902         Likewise.
8903         * decl.c (pushtag): Use FROB_CONTEXT.
8904         (pushdecl, make_typename_type, define_function, grokdeclarator):
8905         Likewise.
8906         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
8907         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
8908         Likewise.
8909         * decl2.c (decl_namespace): Return global_namespace if no context.
8910         * method.c (build_overload_nested_name): Expect null as context.
8911         * pt.c (mangle_class_name_for_template): Do nothing for null
8912         contexts.
8913         (lookup_template_class): Allow for null id_context.
8915 1998-06-25  Richard Henderson  <rth@cygnus.com>
8917         * method.c (emit_thunk): Set current_function_is_thunk for the
8918         ASM_OUTPUT_MI_THUNK case as well.
8920 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8922         * exception.cc (__cplus_type_matcher): Get a match_info pointer
8923         instead of an exception table entry as a parameter.
8925 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8927         * parse.y (function_try_block): Don't call start_catch_handler.
8928         * except.c (call_eh_info): Remove coerced field from declaration.
8929         (build_eh_type_type_ref): New function to create an address of a
8930         rtti function for the new style exception tables.
8931         (expand_start_catch_block): Split function, this contains the
8932         common part.
8933         (process_start_catch_block_old): New function to perform the rest
8934         of expand_start_catch_block under old style exceptions.
8935         (process_start_catch_block_old): New function to perform the rest
8936         of expand_start_catch_block under new style exceptions.
8937         (expand_end_catch_block): Only pop the false label off the stack under
8938         the old style of exceptions.
8939         * semantics.c (finish_try_block): Don't call start_catch_handler.
8940         * exception.cc (struct cp_eh_info): Add original_value field.
8941         (__cplus_type_matcher): Perform type matching on the original exception
8942         value, and if we have a match, set the current value.
8943         (__cp_push_exception): Set the original exception value.
8945 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
8947         * call.c (joust): Fix confusing conversion warning.
8949         * call.c (build_op_delete_call): Add placement parm.  Check
8950         LOOKUP_SPECULATIVELY.
8951         * cp-tree.h, decl2.c, init.c: Adjust.
8952         * decl.c (finish_function): Use it.
8954         * pt.c (tsubst): Diagnose creating void fields or variables.
8956 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8958         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8960         * cp-tree.h (check_dtor_name): Add prototype.
8962         * init.c (expand_member_init): Remove unused variables
8963         `ptr_type_node', `parm' and `rval'.
8965         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8966         in call to fprintf.
8967         (lang_print_xnode): Likewise.
8969         * typeck2.c (enum_name_string): Cast argument to sprintf to long
8970         and use %ld specifier.
8972         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8973         specifier in call to fprintf.
8974         (GNU_xref_member): Cast argument to sprintf to int.
8976 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
8978         * typeck2.c (pop_init_level): Warn about implicit zero initialization
8979         of struct members.
8981 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8983         * cp-tree.h: Prototype function `check_java_method'.
8985 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8987         * class.c (finish_struct): Make conflicting use of id a pedwarn.
8988         * decl.c (pushdecl_class_level): Likewise.
8990 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8992         * pt.c (convert_nontype_argument): Issue an error when presented
8993         with an integer (real) constant that cannot be simplified to an
8994         INT_CST (REAL_CST).
8996         * cp-tree.h (c_get_alias_set): Remove declaration added in
8997         1998-06-13 change that should never have been checked in.
8999 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9001         * typeck.c (build_binary_op_nodefault): Change % in format strings
9002         to %%.
9004         * decl.c (grokvardecl): Don't build_static_name for decls that
9005         aren't at namespace scope.
9007         * init.c (perform_member_init): Catch default-initialization of
9008         references.
9010 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
9012         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
9014 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9016         * method.c (hack_identifier): Complain about getting a namespace
9017         or class template.
9018         * typeck.c (decay_conversion): Remove check for namespaces.
9019         * typeck2.c (incomplete_type_error): Likewise.
9020         * parse.y (template_arg): Add PTYPENAME expansion.
9022 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
9024         * decl.c (grokvardecl): Don't build external assembler names for
9025         TYPENAMEs in other namespaces as there is no declarator.
9026         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
9027         info from DECL_CONTEXT if it is NULL.
9029 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
9031         * call.c (check_dtor_name): Split out.
9032         (build_scoped_method_call): Use it.
9033         (build_method_call): Use it.
9034         * init.c (build_offset_ref): Use it.
9036         * typeck.c (build_static_cast): Fix handling of pointers to members.
9038         * decl.c (finish_function): Just return nothing from a constructor.
9039         * typeck.c (c_expand_return): Complain about returning a void
9040         expression from a destructor.
9042 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
9044         * class.c (alter_access): Accept a BINFO explaining how to get
9045         from the entity whose accessed is being altered to the type doing
9046         the altering.
9047         (handle_using_decl): New function containing code split out from ...
9048         (finish_struct_1): Here.
9050         * cp-tree.h (complete_type_or_else): Declare.
9051         * init.c (build_new_1, build_delete): Use it.
9052         * typeck.c (require_complete_type): Use complete_type, rather than
9053         expanding it inline.
9054         (complete_type_or_else): New function.
9055         (build_component_ref): Use it.
9056         (pointer_int_sum): Make sure the type pointed to is complete.
9057         (pointer_diff): Likewise.
9059         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
9060         types.
9062         * search.c (get_matching_virtual): Note that member templates
9063         cannot override virtual functions.
9065 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
9067         * pt.c (check_explicit_specialization): If DECLARATOR turned into
9068         an error_mark_node from lookup_template_function, return the same.
9069         (determine_specialization): Also make sure TEMPLATE_ID isn't an
9070         error_mark_node, before we try to read its operands.
9071         * decl.c (grokdeclarator): If we got an error_mark_node from
9072         check_explicit_specialization, just return it right back.
9074 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
9076         * class.c (instantiate_type): Don't treat template-ids that don't
9077         specify any template arguments as equivalent to ordinary
9078         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
9079         pointer-to-members for member templates.  Tidy slightly.
9080         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
9081         * init.c (build_offset_ref): Handle template-ids like ordinary
9082         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
9083         offset part of the OFFSET_REF.
9084         * typeck.c (build_unary_op): Change check for unknown types to
9085         look for OFFSET_REFs, not SCOPE_REFs.
9087 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
9089         * pt.c (is_member_template_class): New function.
9090         (push_template_decl_real): Use it.
9092 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
9094         * friend.c (do_friend): Add support for nested classes using
9095         member functions of the enclosing class as friends.
9097 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
9099         * call.c (convert_default_arg): Make global, not static.
9100         (convert_arg_for_ellipsis): Split out from ...
9101         (build_over_call): Here.
9102         * cp-tree.h (convert_default_arg); Declare.
9103         (convert_arg_to_ellipsis): Likewise.
9104         (do_member_init): Remove.
9105         * init.c (do_member_init): Remove; this code is dead.
9106         (expand_member_init): Remove much of this code; it is dead.
9107         * typeck.c (convert_arguments): Use convert_default_arg and
9108         convert_arg_for_ellipsis, rather than duplicating here.
9110         * call.c (convert_like): Don't fail silently if
9111         build_user_type_conversion fails.  Always return error_mark_node
9112         for failure.
9114 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9116         * search.c (covariant_return_p): Complain about ambiguous base.
9118         * typeck.c (build_component_ref): Diagnose ref to nested type.
9120 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9122         * decl.c (grokparms): Check that INIT isn't an error_mark_node
9123         before giving error about invalid type for default arg.
9125 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9127         * call.c (build_method_call): Fix thinko.
9129 1998-06-10  Dave Brolley  <brolley@cygnus.com>
9131         * decl2.c (lang_decode_option): New argc/argv interface.
9132         * cp-tree.h (lang_decode_option): New argc/argv interface.
9133         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
9134         specified for cpplib-enabled compilers.
9135         * lex.c (lang_init): Don't check_newline for cpplib.
9136         (init_parse): Don't initialize cpplib here.
9138 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9140         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
9141         piece before checking DECL_MUTABLE_P.
9143 1998-06-10  John Carr  <jfc@mit.edu>
9145         * tree.c (debug_binfo): Make printf format match arguments.
9147         * error.c (OB_PUTI): Make printf format match arguments.
9149 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9151         * init.c (perform_member_init): Handle default-initialization.
9153         * except.c (build_throw): Handle throwing NULL.
9155         * typeck.c (build_x_function_call): Use resolve_offset_ref.
9157         * search.c (compute_access): Only strip an anonymous union
9158         for a FIELD_DECL.
9160         * call.c (add_builtin_candidates): Tweak.
9162         * cvt.c (build_expr_type_conversion): Restore code for conversion
9163         from class types.
9164         * decl2.c (delete_sanity): Use it.  Clean up.
9166         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
9168 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
9170         * typeck.c (c_expand_return): Don't warn about void expressions on
9171         return statements in functions returning void.
9173 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
9175         * pt.c (fn_type_unification): Revise documentation.  Tidy.
9176         (type_unification): Likewise.
9178 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
9180         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
9181         expand_end_catch.
9182         * parse.y (function_try_block): Rename expand_start_catch, and delete
9183         expand_end_catch.
9184         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
9185         expand_end_catch.
9187 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
9189         * search.c (lookup_member): New fn.
9190         * class.c (finish_struct_1): Use it.
9191         * decl.c (lookup_name_real): Use it.
9193 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9195         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
9197         * cp-tree.h: Add prototype for `maybe_print_template_context' and
9198         `maybe_make_one_only'.
9200         * decl.c (auto_function): Remove unused variable `decl'.
9202         * decl2.c: Include dwarf2out.h and dwarfout.h.
9204         * lex.c: Remove redundant declarations of `set_float_handler' and
9205         `asm_out_file'.
9207 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
9209         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
9210         time flag.  Call __cp_eh_info instead of __cp_exception_info.
9211         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
9212         (__cp_exception_info): Return offset into cp_eh_info structure to
9213         match what use to be the start of this structure.
9214         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
9215         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
9216         compile time flag.
9217         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
9218         __cp_eh_info instead of __cp_exception_info.
9220 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
9222         * decl.c (cp_finish_decl): Disable inlining of extern inlines
9223         with static variables.
9225 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
9227         * init.c (build_offset_ref): Correct previous change to use build,
9228         not build_min.
9230 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
9232         * class.c (instantiate_type): Handle pointer-to-members where the
9233         member is a template.
9234         * init.c (build_offset_ref): Likewise.
9235         * typeck.c (build_unary_op): Likewise.
9237 1998-06-07  Richard Henderson  <rth@cygnus.com>
9239         * lex.c (lang_init_options): New function.
9240         (lang_init): Remove flag_exceptions == 2 hack.
9242 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9244         * search.c (envelope_add_decl): Tweak for implicit typename.
9246         * call.c (joust): Also warn about confusing conversion op/constructor
9247         overload resolution.
9249         * spew.c (yylex): Also return the TYPE_DECL if got_object.
9250         Don't clear got_object after '~'.
9251         * call.c (build_scoped_method_call): Tweak destructor handling.
9252         (build_method_call): Likewise.
9253         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
9254         TYPE_MAIN_VARIANT for destructors.
9255         * semantics.c (finish_object_call_expr): Complain about calling a
9256         TYPE_DECL.
9258 1998-06-05  Per Bothner  <bothner@cygnus.com>
9260         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
9261         Define - update needed by gcc.c change.
9263 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9265         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
9267 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9269         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
9270         * decl.c (lookup_name_real): Add namespaces_only parameter.
9271         If set, return only NAMESPACE_DECLs.
9272         (select_decl): Likewise.
9273         (identifier_type_value): Give additional parameter.
9274         (lookup_name_nonclass): Likewise.
9275         (lookup_name): Likewise.
9276         (find_binding): Skip namespace aliases.
9277         (binding_for_name): Likewise.
9278         (push_namespace): Check for namespace aliases.
9279         (lookup_name_namespace_only): New function.
9280         (begin_only_namespace_names, end_only_namespace_names): New functions.
9281         * decl2.c (set_decl_namespace): Skip namespace aliases.
9282         (do_using_directive): Likewise.
9283         (do_namespace_alias): Produce namespace aliases, fix alias
9284         redeclaration.
9285         * error.c (dump_decl): Support SCOPE_REF.
9286         * parse.y (extdef): Wrap lookup with namespace_only for namespace
9287         aliases and using declarations.
9289 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
9291         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
9293         * error.c (dump_expr): Clean up NEW_EXPR case.
9295 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9297         Suggested by Brendan Kehoe
9298         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
9299         treat it as using ::decl.
9301         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
9303         * tree.c (mapcar): Support NEW_EXPR.
9305         * error.c (dump_expr): Support NEW_EXPR.
9307 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
9309         * method.c (make_thunk): Use overload machinery to make name.
9310         * search.c (covariant_return_p): New fn.
9311         (get_matching_virtual): Use it.
9313         * init.c (build_new_1): Fix check for void.
9315 1998-06-01  Per Bothner  <bothner@cygnus.com>
9317         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
9318         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
9319         java_int_type_node, java_long_type_node, java_float_type_node,
9320         java_double_type_node, java_char_type_node, java_boolean_type_node):
9321         New "primitive" types, with predefined names __java_byte etc.
9322         (record_builtin_java_type):  New function.
9323         (init_decl_processing):  Make Java types with record_builtin_java_type.
9324         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
9325         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
9326         (grokfndecl):  Call check_java_method for Java classes.
9327         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
9328         (process_overload_item):  Match types against specific
9329         java_XX_type_node types, rather than using is_java_type.
9330         * class.c (finish_struct_1):  Don't add default copy constructor
9331         or operator= if TYPE_FOR_JAVA.
9332         (pop_lang_conext):  Restore strict_prototyp proper if Java.
9333         * decl2.c (acceptable_java_type, check_java_method):  New functions.
9334         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
9335         (tsubst):  Move common statement after if statement.
9336         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
9338 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
9340         * pt.c (for_each_template_parm): Use first_rtl_op.
9342         * tree.c (build_cplus_array_type_1): Also check index_type for
9343         template parms.
9345 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
9347         * pt.c (tsubst): Always copy BINFO_BASETYPES.
9349 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
9351         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
9352         TYPE_SIZE_UNIT too.
9354 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
9356         * decl.c (grokdeclarator): Don't complain about in-class
9357         initialization of static consts if we don't really know the type
9358         of the variable.
9360 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
9362         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
9363         * method.c (build_destructor_name): New fn.
9364         * decl2.c (maybe_retrofit_in_chrg): Split out...
9365         (grokclassfn): From here.  Reorganize.
9366         * decl.c (grok_ctor_properties): Make sure ctors for types with
9367         vbases have the in_chrg parm.
9368         * pt.c (instantiate_class_template): Update
9369         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
9370         grok_*_properties.
9371         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
9373 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
9375         * pt.c (instantiate_decl): Make test for whether or not static
9376         variables should be instantiated early match its comment.
9378 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
9380         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
9381         a member.
9382         (start_function): Call check_default_args.
9383         * decl2.c (grokfield): Don't call check_default_args.
9384         (check_default_args): Use cp_error_at.
9385         * lex.c (do_pending_defargs): Call check_default_args.
9387 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
9389         * call.c (build_method_call): Make sure get_type_value returns
9390         something before we try to use its TYPE_MAIN_VARIANT.
9391         (build_scoped_method_call): Likewise.
9393 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
9395         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9396         initialize an array.
9398         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9399         DECL_VIRTUAL_P.
9401         * friend.c (do_friend): Clarify template warning.
9403 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
9405         * decl.c (shadow_label): Don't treat decls as identifiers.
9406         (maybe_push_to_top_level): Clear shadowed_labels.
9408         * pt.c (instantiate_decl): Reset lineno and filename after calling
9409         regenerate_decl_from_template.
9411         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9412         error_mark_node.
9414 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
9416         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9418 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9420         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9421         (convert_nontype_argument): Handle cases when nontype template
9422         parameters become classes after substitution.
9424 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9426         * friend.c (is_friend): Use comptypes, rather than == to compare
9427         types.  Modify for new representation of template friends.
9428         (make_friend_class): Likewise.
9429         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
9430         (instantiate_class_template): Deal with template friends.
9432         * decl.c (store_parm_decls): Remove redundant call to
9433         expand_main_function.
9435 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9437         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9438         DECL_USE_TEMPLATE.
9440 1998-05-26  Per Bothner  <bothner@cygnus.com>
9442         * language_as_string:  Handle lang_java.
9444 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
9446         * decl.c (pushdecl): Don't copy the type_decl.
9448 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9450         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9451         current_class_type.
9452         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9454         * parse.y (complex_direct_notype_declarator): Use $1 to access
9455         scope of notype_qualified_id.
9457 1998-05-26  Dave Brolley  <brolley@cygnus.com>
9459         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9460         (init_parse): Initialize cpplib interface.
9462         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9463         empty continuation.
9465 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9467         * decl.c (pushtag): Avoid crashing on erroneous input.
9469 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9471         * decl.c (push_namespace): Only produce one unique name for
9472         anonymous namespaces.
9473         (get_unique_name): Remove.
9475 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
9477         * call.c (tourney): Don't do any extra comparisons.
9479         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9481         * cp-tree.h (processing_template_parmlist): Declare.
9482         * decl.c (pushtag): Don't call push_template_decl when we
9483         shouldn't.
9484         * pt.c (processing_template_parmlist): New variable.
9485         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9486         (complete_template_args): Use it.
9487         (add_to_template_args): Likewise.
9488         (innermost_args): Likewise.
9489         (tsubst): Likewise.
9490         (begin_template_parm_list): Use processing_template_parmlist.
9491         (end_template_parm_list): Likewise.
9493         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9494         * decl.c (grokdeclarator): Use it.
9495         * decl2.c (grok_x_components): Likewise.
9496         * init.c (initializing_context): Likewise.
9497         * method.c (do_build_copy_constructor): Likewise.
9498         (do_build_assign_ref): Likewise.
9499         * search.c (compute_access): Likewise.
9500         * typeck.c (build_component_ref): Likewise.
9502         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9503         unnamed type a typedef name "for linkage purposes".
9505         * pt.c (lookup_template_class): Don't look at
9506         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9508         * method.c (build_overload_int): Handle error cases gracefully.
9510         * pt.c (instantiate_decl): Handle static member variables
9511         correctly.
9513         * pt.c (tsubst): Use the tsubst'd type when producing new
9514         TEMPLATE_PARM_INDEX nodes.
9516 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
9518         * tree.c (cp_tree_equal): Handle pointers to member functions.
9520         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
9521         sure the type of the REF_BIND is a reference type.
9522         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9523         target_type for clarity.
9525         * parse.y (xcond): Move call to condition_conversion ...
9526         * semantics.c (finish_for_cond): Here.
9527         * parse.c: Regenerated.
9529 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
9531         * decl.c (push_namespace): Namespaces have type void.
9532         * typeck2.c (incomplete_type_error): Complain about namespace
9533         used as expression.
9534         * typeck.c (decay_conversion): Likewise.
9536 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9538         * error.c (dump_expr): Support namespaces.
9540 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
9542         * cp-tree.def: Add SRCLOC.
9543         * cp-tree.h: Add struct tree_srcloc and accessor macros.
9544         * tree.c (build_srcloc, build_srcloc_here): New fns.
9545         * pt.c (add_pending_template): Use build_srcloc_here.
9546         (push_tinst_level): Update last_template_error_tick before erroring.
9547         (instantiate_decl): Restore lineno and input_filename before
9548         calling add_pending_template.
9549         * decl2.c (finish_file): Set up lineno and input_filename for
9550         pending templates.
9552 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9554         * decl.c (lang_print_error_function): New fn.
9555         (init_decl_processing): Set print_error_function to use it.
9556         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9558         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9559         ICS_BAD_FLAG.
9561         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9562         copy-initialization.
9564         * class.c (build_vtable_entry): Use int_fits_type_p.
9565         (build_vtable): Pass a signed offset to build_vtable_entry.
9566         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9567         set_rtti_entry): Likewise.
9569 1998-05-22  Per Bothner  <bothner@cygnus.com>
9571         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
9572         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
9574 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9576         * pt.c (print_template_context): Use fprintf instead of cp_error.
9578         * pt.c (determine_specialization): Just return an error_mark_node.
9579         Also print the decl we want in error messages.  If we complain,
9580         return error_mark_node.
9581         (tsubst_friend_function): Set lineno and input_filename so
9582         error messages will be useful.
9583         (instantiate_template): Just return an error_mark_node.
9584         (check_explicit_specialization): Don't mess with a returned
9585         error_mark_node.
9587         * pt.c (print_template_context): Add new argument.
9588         (maybe_print_template_context): New fn.
9589         (push_tinst_level): Increment tinst_level_tick.
9590         (pop_tinst_level): Likewise.
9591         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
9592         xrealloc instead of xmalloc.
9594         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9596 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9598         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9599         if the template we looked up is the same as the one we already
9600         have.
9602 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
9604         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9605         (cpp_reader,parse_in): Add for cpplib.
9606         (check_newline): Call handle_sysv_pragma with new interface.
9607         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9609         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9610         (sub_getch): Call GETC for cpplib.
9612         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9613         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9615         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9617 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9619         * decl2.c (maybe_make_one_only): New fn.
9620         (import_export_vtable): Use it.
9621         (import_export_decl): Likewise.
9622         * pt.c (mark_decl_instantiated): Likewise.
9624 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
9626         * decl2.c (find_representative_member): Rename to ...
9627         (build_anon_union_vars): New function.
9628         (finish_anon_union): Fix stupidity of previous change.
9630 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9632         * decl.c (grokfndecl): Handle definition of specialization in
9633         friend declaration.
9635         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
9637 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9639         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
9640         to look for type declarations.
9641         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
9642         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
9643         (finish_member_class_template): Declare.
9644         * decl.c (pushtag): Put member class templates on the
9645         CLASSTYPE_TAGS list, just as for ordinary member classes.
9646         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
9647         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
9648         IDENTIFIER_NAMESPACE_VALUEs.
9649         * parse.y (component_decl): Move code to ...
9650         * semantics.c (finish_member_class_template): New function.
9651         Don't put member class templates on the list of components for a
9652         class.
9653         * parse.c: Regenerated.
9654         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
9655         In fact, don't use DECL_CONTEXT at all here.
9657 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9659         * decl.c (record_unknown_type): New function.
9660         (init_decl_processing): Call it for the unknown and global type
9661         nodes.
9663 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9665         * decl2.c (find_representative_member): New function.
9666         (finish_anon_union): Use it.
9668         * cp-tree.h (MAIN_NAME_P): New macro.
9669         (DECL_MAIN_P): Likwise.
9670         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
9671         (grokfndecl): Use the new macros.
9672         (grokdeclarator): Likewise.
9673         (start_function): Likewise.
9674         (store_parm_decls): Likewise.
9675         (finsh_function): Likewise.
9676         * friend.c (do_friend): Likewise.
9677         * typeck.c (build_function_call_real): Likewise.
9678         (build_unary_op): Likewise.
9680 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
9682         * decl2.c (start_objects, finish_objects, do_dtors,
9683         do_ctors): Split out from...
9684         (finish_file): ...here.
9686 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
9688         * tree.c (is_overloaded_fn): Don't abort on placeholders from
9689         push_class_decls.
9691 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
9693         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
9695         * error.c (dump_expr): Handle an ARROW_EXPR.
9697 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
9699         * decl.c (saveable_obstack): Declare.
9700         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
9701         declare, if necessary.
9703 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
9705         * call.c (compare_qual): Remove.
9706         (is_subseq): Tweak.
9707         (is_properly_derived_from): New function.
9708         (maybe_handle_ref_bind): Likewise.
9709         (maybe_handle_implicit_object): Likewise.
9710         (compare_ics): Modify substantially to bring into conformance with
9711         the standard.
9712         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
9713         (comp_cv_qualification): Declare.
9714         (comp_cv_qual_signature): Likewise.
9715         * typeck.c (comp_cv_qualification): Likewise.
9716         (comp_cv_qual_signature): Likewise.
9718 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9720         * Makefile.in (parse.o): Depend on toplev.h.
9722         * class.c (typecode_p): Remove prototype and definition.
9724         * cp-tree.h (currently_open_class, is_empty_class, member_p):
9725         Add prototype.
9727         * decl.c (push_overloaded_decl_top_level): Remove prototype and
9728         definition.
9730         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
9731         in call to `cp_thing'.
9732         (cp_warning): Likewise for function pointer `warning'.
9734         * except.c (do_function_call): Remove prototype and definition.
9735         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
9737         * method.c (is_java_type): Add prototype and make it static.
9739         * parse.y: Include toplev.h.
9741         * pt.c (type_unification): Remove unused variable `arg'.
9742         (instantiate_decl): Likewise for `save_ti'.
9744         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
9746 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
9748         * init.c (build_member_call): Handle template_ids.
9749         * parse.y (primary): Add global_scope template_id.
9751 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
9753         * decl2.c (get_sentry): Use end_temporary_allocation.
9754         Don't declare permanent_obstack.
9756 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
9758         * parse.y (.finish_new_placement): New non-terminal.
9759         (unary_expr, new_type_id): Use it.
9760         * parse.c: Regenerated.
9762 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
9764         * pt.c (redeclare_class_template): Say where the original definition
9765         of the template-parameter's default argument appeared.
9767 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
9769         * call.c (build_over_call): Tweak empty class handling.
9771         * decl.c (make_typename_type): Use currently_open_class.
9773         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
9775 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9777         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
9778         for a type unless it is one.
9780         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
9782 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
9784         * Makefile.in (program_transform_name, objdir): Define.
9786         * Makefile.in (BISON): Use bison from the build tree if it exists.
9787         (FLEX): Likewise.
9789 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9791         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
9793         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
9795 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
9797         * call.c (build_scoped_method_call): Likewise.
9799 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
9801         * init.c (build_new_1): Call suspend_momentary around the creation
9802         of values that must be saved for exception handling.
9803         * parse.y (.build_new_placement): New non-terminal.
9804         (unary_expr, new_placement): Use it.
9805         * parse.c: Regenerated.
9807 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
9809         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
9810         old and new types.
9812         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
9813         canonical type.
9815         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
9817 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
9819         * decl.c (start_decl): Revert problem change.
9821         * Makefile.in (CONFLICTS): Fix.
9823 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9825         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
9827 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
9829         * class.c (finish_struct_1): Use BINFO_SIZE.
9831         * decl.c (start_decl): Use 'tem'.
9833 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
9835         * exception.cc: Include eh-common.h.
9836         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
9837         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
9838         (__cp_push_exception): Initialize eh_info struct as well.
9839         * except.c: Remove local structs and include eh-common.h.
9840         (init_exception_processing): Set language and version codes.
9841         (call_eh_info): Add presence of eh_info to runtime description of
9842         struct cp_eh_info.
9843         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
9844         * semantics.c (finish_try_block): Call start_catch_block() and
9845         end_catch_block().
9846         * parse.y (function_try_block): Call start_catch_block() and
9847         end_catch_block().
9849 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
9851         * typeck.c (original_type): New function.
9852         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
9853         to see if they're actually the same.
9854         * cp-tree.h (original_type): Declare.
9856 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9858         * Makefile.in (lex.o): Depend on output.h.
9860         * call.c (add_function_candidate): Remove unused variable `cand'.
9861         (add_conv_candidate): Likewise.
9862         (build_builtin_candidate): Likewise.
9864         * cp-tree.h: Add prototype for `types_overlap_p'.
9866         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
9868         * decl2.c (merge_functions): Remove unused variables `tmp' and
9869         `tempn'.
9871         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
9872         (code_as_string): Likewise.
9873         (language_as_string): Likewise.
9874         (parm_as_string): Likewise.
9875         (op_as_string): Likewise.
9876         (assop_as_string): Likewise.
9877         (cv_as_string): Likewise.
9879         * lex.c: Include output.h.
9881         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
9883         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
9884         ATTRIBUTE_UNUSED.
9886         * tinfo.cc (__class_type_info::dcast): Change the type of variable
9887         `i' from int to size_t.
9889         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
9890         ATTRIBUTE_UNUSED.
9892 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
9894         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
9895         DECL_NAMESPACE_SCOPE_P.
9896         (lang_decl_name): Likewise.
9897         * pt.c (tsubst_friend_function, tsubst): Likewise.
9898         * decl.c (pushdecl, redeclaration_error_message, start_decl,
9899         cp_finish_decl, start_function): Likewise.
9900         * class.c (finish_struct_1): Likewise.
9901         * call.c (build_over_call): Likewise.
9902         (compare_ics): Use DERIVED_FROM_P.
9904 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
9906         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
9907         * method.c (build_mangled_name): Use it.
9908         (build_decl_overload_real): Likewise.
9910         * error.c (dump_simple_decl): New function, broken out from ...
9911         (dump_decl): Use it.
9913 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
9915         * ptree.c (lang_print_xnode): Add missing `break'.
9917         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
9919         * call.c (add_template_candidate): Adjust for changes to
9920         fn_type_unification.
9921         (add_template_candidate_real): Likewise.
9922         (add_template_conv_candidate): Likewise.
9923         (build_user_type_conversion_1): Likewise.
9924         (build_new_function_call): Likewise.
9925         (build_object_call): Likewise.
9926         (build_new_op): Likewise.
9927         (build_new_method_call): Likewise.
9928         * class.c (instantiate_type): Likewise.
9929         * cp-tree.h (unification_kind_t): New type.
9930         (fn_type_unification): Adjust prototype.
9931         (type_unificaiton): Likewise.
9932         * pt.c (UNIFY_ALLOW_NONE): New macro.
9933         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
9934         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
9935         (UNIFY_ALLOW_DERIVED): Likewise.
9936         (unify): Change prototype.
9937         (maybe_adjust_types_for_deduction): New function.
9938         (check_cv_quals_for_unify): Likewise.
9939         (determine_specialization): Adjust.
9940         (fn_type_unification): Likewise.
9941         (type_unification): Likewise.
9942         (type_unification_real): Likewise.  Use
9943         maybe_adjust_types_for_deduction.  Fix mishandling of
9944         back-unification of template functions passed as arguments.  Pass
9945         appropriate combination of UNIFY_ALLOW_* to unify.
9946         (unify): Remove unused NTPARMS parameter.  Use
9947         check_cv_quals_for_unify.  Remove bogus code that allowed
9948         too-generous unification in order to adhere more closely to standard.
9949         (get_bindings_real): Adjust.
9950         (get_class_bindings): Likewise.
9952         * method.c (build_overload_identifier): Only use the innermost
9953         template arguments when mangling.
9954         * pt.c (tsubst_template_argument_vector): New function.
9955         (complete_template_args): Deal with the situation where the
9956         extra_args contain more than one level of arguments.
9957         (lookup_template_class): Deal with member template classes, which
9958         may have more than one level of arguments.
9959         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9960         Improve handling of member template classes.  Use
9961         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
9962         tsubst_template_argument_vector where appropriate.
9963         (regenerate_decl_from_template): Break out from ...
9964         (instantiate_decl): Here.
9966         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9967         * parse.h: Regenerated.
9968         * parse.c: Really regenerated.
9970         * cp-tree.h (finish_unary_op_expr): New function.
9971         (finish_id_expr): Likewise.
9972         (begin_new_placement): Likewise.
9973         (finish_new_placement): Likewise.
9974         (finish_declarator): Likewise.
9975         (finish_translation_unit): Likewise.
9976         (finish_parmlist): Likewise.
9977         (begin_class_definition): Likewise.
9978         (finish_class_definition): Likewise.
9979         (finish_default_args): Likewise.
9980         (finish_inline_definitions): Likewise.
9981         * parse.y (GCC_ASM_KEYWORD): Remove.
9982         (TYPENAME_ELLIPSIS): Likewise.
9983         * parse.c: Regenerated.
9984         Use new functions in semantics.c in the actions for many rules.
9985         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9986         * hash.h: Regenerated.
9987         * semantics.c (finish_expr_stmt): Allow NULL expr.
9988         (finish_unary_op_expr): New function, containing
9989         code previously in parse.y.
9990         (finish_id_expr): Likewise.
9991         (begin_new_placement): Likewise.
9992         (finish_new_placement): Likewise.
9993         (finish_declarator): Likewise.
9994         (finish_translation_unit): Likewise.
9995         (finish_parmlist): Likewise.
9996         (begin_class_definition): Likewise.
9997         (finish_class_definition): Likewise.
9998         (finish_default_args): Likewise.
9999         (finish_inline_definitions): Likewise.
10001 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
10003         * typeck.c (build_c_cast): Don't decay arrays and functions to
10004         pointer type when converting to a class type.
10006 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
10008         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
10009         (DECL_CLASS_SCOPE_P): Likewise.
10011 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
10013         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
10014         * decl2.c (constructor_name_full): Likewise.
10016 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
10018         * tree.c (mapcar): Add OVERLOAD support.
10020         * init.c (resolve_offset_ref): We must use basetype_path before we
10021         destroy it with a call to convert_pointer_to.
10023 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10025         * class.c (currently_open_class): New fn.
10026         * decl.c (lookup_name_real): Use it.
10027         * search.c (lookup_field): Likewise.
10029 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10031         * cp-tree.def (OVERLOAD): New node.
10032         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
10033         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
10034         (NAMESPACE_BINDING): Remove.
10035         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
10036         namespace_binding.
10037         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
10038         Define.
10039         (tree_overload): New struct.
10040         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
10041         (REAL_IDENTIFIER_TYPE_VALUE): Define.
10042         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
10043         (lang_decl_flags): Remove in_namespace.
10044         (lang_decl): Remove chain.
10045         (DECL_CHAIN, DECL_NAMESPACE): Remove.
10046         (flag_honor_std): Declare extern.
10047         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
10048         namespace_binding, set_namespace_binding,
10049         lookup_function_nonclass, cat_namespace_levels,
10050         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
10051         scratch_ovl_cons, ovl_member, build_overload): Declare.
10052         (decl_list_length, get_namespace_id, current_namespace_id,
10053         overloaded_globals_p): Remove.
10054         (lookup_using_namespace, qualified_lookup_using_namespace): Change
10055         return type.
10056         (push_scratch_obstack): New macro.
10057         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
10058         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
10059         convs, fns.
10060         (build_new_function_call): Iterate using OVL_CHAIN.
10061         Print DECL_NAME in when reporting ambiguities.
10062         (build_object_call): Iterate using OVL_NEXT for fns, convs.
10063         (build_new_op): Call lookup_function_nonclass.
10064         Iterate using OVL_NEXT.
10065         (build_op_delete_call): Change detection of members.
10066         Do not wrap TREE_LIST around fields and single global functions.
10067         (build_over_call): Don't push a class level if the context is a
10068         namespace.
10069         (build_new_method_call): Iterate using OVL_NEXT.
10070         * class.c (add_method): Chain overloaded members using
10071         build_overload.  Remove copying of method.
10072         (grow_method): When iterating through the obstack, expect OVERLOAD
10073         nodes.  Chain overload members.
10074         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
10075         nodes in call to get_baselinks.
10076         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
10077         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
10078         fdecls that are OVERLOAD nodes.
10079         (validate_lhs): New function.
10080         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
10081         code.  Use DECL_NAME in error messages.  Split code between global
10082         and member function processing.
10083         * decl.c (global_type_node): New static variable.
10084         (in_std): New global.
10085         (struct binding_level): New field usings.
10086         (resume_binding_level): Assert that we are not in a class.
10087         (toplevel_bindings_p): Just check for namespace_p or
10088         pseudo_global.
10089         (resume_level): Remove.
10090         (find_binding): New function.
10091         (binding_for_name): Call it.
10092         (namespace_binding, set_namespace_binding): New functions.
10093         (push_namespace): Associate binding level with new namespace,
10094         resume_binding_level for existing namespace.  Remove old code.
10095         Fake std by counting.
10096         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
10097         (maybe_push_to_top_level): Save current namespace.
10098         (pop_from_top_level): Restore saved namespace.
10099         (pop_namespace): Call suspend_binding_level.  Remove old code.
10100         (cat_namespace_levels): New function.
10101         (set_identifier_type_value_with_scope): For namespace bindings,
10102         set BINDING_TYPE, and use global_type_node.
10103         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
10104         (identifier_type_value): New function.
10105         (pushtag): If no context, use current_namespace.
10106         (duplicate_decls): Don't process DECL_CHAIN.
10107         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
10108         already set.  Never reset it to NULL_TREE.  Lookup global variables
10109         in their namespace.  Push overloaded templates if they are on
10110         namespace level.
10111         (pushdecl_namespace_level): New function.
10112         (pushdecl_top_level): Implement using pushdecl_namespace_level.
10113         (pushdecl_using_decl): New function.
10114         (overloaded_globals_p): Remove.
10115         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
10116         them.  Use namespace_binding and set_namespace_value.
10117         (redeclaration_error_message): Complain if the declarations come
10118         from different namespaces.
10119         (lookup_tag): On namespace level, look in the BINDING_TYPE.
10120         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
10121         old code.
10122         (select_decl): New function.
10123         (lookup_name_real): Call it for qualified and unqualified lookup.
10124         Pass tree_bindings from the stack.
10125         If prefer_type is 1, also accept namespaces.
10126         (lookup_function_nonclass): New function.
10127         (init_decl_processing): Set the binding level of the global
10128         namespace to global_binding_level.
10129         Build a proper type list for __builtin_apply.
10130         Initialize std_node to "fake std" if flag_honor_std is set.
10131         Initialize global_type_node.
10132         Allocated bad_alloc in namespace std if flag_honor_std.
10133         (define_function): Set the DECL_CONTEXT to the current_namespace.
10134         (start_decl): A namespace is not considered as a context here.  If
10135         the DECL_CONTEXT is a namespace, push the decl.
10136         (cp_finish_decl): Check for namespaces used as initializers.
10137         (grokfndecl): Add namespace parameter.  Remove processing of
10138         DECL_CHAIN.
10139         (grokvardecl): Add namespace parameter.
10140         (grokdeclarator): Process SCOPEs that are namespaces.  For
10141         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
10142         (start_function): Check for contexts that are namespaces.
10143         Set context for declarations that have not been pushed.
10144         (store_parm_decls): Check for ::main only.
10145         (finish_function): Likewise.
10146         (start_method): Check for contexts that are namespaces.
10147         (start_method): Remove DECL_CHAIN processing.
10148         * decl2.c (flag_honor_std): Declare.
10149         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
10150         (decl_namespace_list): New static global.
10151         (grok_x_components): Ignore namespaces as type contexts.
10152         (check_classfn): Expect OVERLOAD nodes.
10153         (grokfield): Remove DECL_CHAIN processing.
10154         (finish_file): Call cat_namespace_levels.
10155         (merge_functions): New function.
10156         (ambiguous_decl): Rewrite.
10157         (lookup_using_namespace): Produce tree_bindings.
10158         (qualified_lookup_using_namespace): Likewise.
10159         (set_decl_namespace, decl_namespace, current_decl_namespace,
10160         push_decl_namespace, pop_decl_namespace): New functions.
10161         (arg_lookup): New struct.
10162         (add_function, arg_assoc_namespace, arg_assoc_class,
10163         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
10164         New functions.
10165         (get_namespace_id, current_namespace_id): Remove.
10166         (do_toplevel_using_decl): Rewrite.
10167         (do_class_using_decl): Complain about namespace qualifiers.
10168         (do_using_directive): Sorry if not on namespace level.  Complain
10169         about unknown namespaces.
10170         * error.c (dump_aggr_type): Check for namespace contexts.
10171         * except.c (init_exception_processing): Push terminate into std.
10172         * friend.c (is_friend): A namespace is not a context, here.
10173         * init.c (expand_member_init): Remove DECL_CHAIN processing.
10174         (build_offset_ref): Process OVERLOAD nodes.
10175         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
10176         * lex.c (identifier_type): Loop using OVL_CHAIN.
10177         (see_typename): Set looking_for_typename to 2.
10178         (real_yylex): Likewise.
10179         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
10180         (do_scoped_id): Expect OVERLOAD nodes.
10181         Change calling convention for qualified_lookup_using_namespace.
10182         (build_lang_decl): Don't set in_namespace anymore.
10183         * method.c (typevec_size): New global.
10184         (build_overload_nested_name): Return if global_namespace.
10185         Otherwise, always expect a declaration context.
10186         (build_qualified_name): Likewise.
10187         Make sure we don't write beyond typevec_size.
10188         (build_decl_overload_real): Likewise.
10189         Allocate one extra slot for the namespace.
10190         (hack_identifier): Mark code dead.
10191         Process OVERLOAD and NAMESPACE_DECL nodes.
10192         * parse.y (program): Pop namespaces until in global namespace.
10193         (extdef): In a using-declaration, don't discard the identifier if
10194         there is no declaration.
10195         (left_curly): Ignore type contexts which are namespaces.
10196         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
10197         used as scope.
10198         * pt.c (template_class_depth): Expect types to be namespaces.
10199         (determine_specialization): Simplify by expecting OVERLOAD nodes.
10200         (push_template_decl): Push into namespace level.
10201         Reset ctx if it is a namespace.
10202         Set DECL_CONTEXT to current_namespace if not set already.
10203         Ignore real contexts that are namespaces.
10204         (mangle_class_name_for_template): Skip global_namespace.
10205         Mangle other namespaces as declarations.
10206         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
10207         (lookup_template_class): Push into namespace of context.
10208         If the context is a namespace, set it to global_namespace.
10209         Use id_context for mangling.
10210         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
10211         (tsubst_friend_function): Ignore namespace contexts.
10212         Push into namespace level.
10213         (tsubst): Handle NAMESPACE_DECL nodes.
10214         Remove DECL_CHAIN processing.
10215         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
10216         * ptree.c (print_lang_identifier): Print bindings.
10217         (lang_print_xnode): Print OVERLOAD nodes.
10218         * rtti.c (init_rtti_processing): Push type_info into std.
10219         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
10220         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
10221         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
10222         lookup_fnfields_here): Likewise.
10223         Process all nodes, instead of going through TREE_CHAIN.
10224         * sig.c (build_signature_pointer_or_reference_type): Set context
10225         to global_namespace.
10226         (build_signature_table_constructor): Expect OVERLOAD nodes.
10227         * spew.c (yylex): Save old setting of looking_for_typename.
10228         * tree.c (decl_list_length): Remove.
10229         (binding_init): New function.
10230         (count_functions): Rewrite.
10231         (is_overloaded_fn): Expect OVERLOAD nodes.
10232         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
10233         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
10234         ovl_member): New functions.
10235         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
10236         (type_unknown_p): Likewise.
10237         (require_instantiated_type): Likewise.
10238         (build_component_ref): Declare code dead.
10239         (build_x_function_call): Create and expect OVERLOAD nodes.
10240         (build_function_call_real): Check for ::main only.
10241         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
10242         (convert_for_assignment): Check for TREE_LIST before accessing
10243         TREE_VALUE.
10244         * decl.c (duplicate_decls): Check for namespace bindings instead
10245         of global bindings.
10246         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
10247         lookup_name_current_level, start_decl, xref_tag,
10248         finish_enum): Likewise.
10249         * init.c (build_offset_ref): Likewise.
10250         * search.c (lookup_field): Likewise.
10251         (lookup_fnfields): Likewise.
10252         (dfs_debug_mark): Likewise.
10253         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
10254         (poplevel_class, pop_from_top_level): Likewise.
10255         * decl2.c (finish_method): Likewise.
10256         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
10257         * decl.c (record_builtin_type): Likewise.
10258         (init_decl_processing, grokfndecl): Likewise.
10259         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
10260         (make_lang_type): Likewise.
10261         * parse.y (make_thunk): Likewise.
10262         * pt.c (tsubst): Likewise.
10263         * tree.c (debug_binfo): Likewise.
10264         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
10265         tinfo2.cc, inc/new.h: Add std qualifications.
10266         * inc/new: Wrap with namespace std if __HONOR_STD.
10267         * inc/typeinfo: Likewise.
10269 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
10271         * call.c (build_user_type_conversion_1): Handle second_conv
10272         properly for templates.
10274 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
10276         * method.c (build_decl_overload_real): Set TREE_USED flag to
10277         zero for build_type_variants nodes as well.
10279 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
10281         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
10283 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
10285         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
10286         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
10287         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
10288         xref.o): Add toplev.h dependencies.
10290 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
10292         * errfn.c (cp_error, cp_warning): Remove declarations for
10293         error and warning respectively.
10295 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10297         * error.c: Convert to using ctype macros defined in system.h.
10298         * method.c: Likewise.
10299         * xref.c: Likewise.
10300         * lex.c: Likewise.  Also remove redundant system header stuff.
10302 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
10304         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
10305         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
10306         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
10307         xref.c: Add include of toplev.h.
10309 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
10311         * tree.c (perm_manip): Also regenerate the RTL of an extern.
10312         (copy_to_permanent): Use end_temporary_allocation.
10314 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
10316         * init.c (expand_vec_init): The initialization of each array
10317         element is a full-expression.
10319 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
10321         * method.c (build_mangled_name): Add a call to build_type_variant
10322         to get the right type.
10324 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
10326         * Makefile.in: Add .SUFFIXES.
10328         * cp-tree.def: Remove NAMESPACE_DECL.
10330 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
10332         * call.c (build_over_call): Do evaluate arg even if it has empty
10333         class type.
10334         * decl.c (start_function): Don't push a member function.
10336 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
10338         * Makefile.in (g++FAQ.info): Put -o option before input file.
10340 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
10342         * gxxint.texi: Add info for squangling codes K and B.
10344 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
10346         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
10347         the expression in templates.
10348         (finish_stmt_expr): Likewise.
10350 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
10352         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
10354 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
10356         * decl.c (maybe_push_to_top_level): Always clear
10357         current_template_parms and processing_template_decl.
10358         (pushtag): Remove check of current_class_type and some comments,
10359         since maybe_push_to_top_level no longer creates confusion.
10361 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
10363         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
10364         (DECL_CLASS_TEMPLATE_P): Likewise.
10365         (DECL_PRIMARY_TEMPLATE): Likewise.
10366         (PRIMARY_TEMPLATE_P): Use it.
10367         (push_template_decl_real): New function.
10368         (redeclare_class_template): Take new template parameters as
10369         input.
10370         (is_specialization_of): New function.
10371         (comp_template_args): Declare.
10372         * decl.c (pushtag): Handle friend template classes.
10373         (xref_tag): Likewise.  Use new calling convention for
10374         redeclare_class_template.
10375         * decl2.c (grok_x_components): Handle friend templates.
10376         * friend.c (is_friend): Use is_specialization_of where
10377         appropriate.  Deal with friend class templates.
10378         (make_friend_class): Let a class template be friends with itself.
10379         * pt.c (comp_template_args): Remove declaration.
10380         (tsubst_friend_class): New function.
10381         (push_template_decl_real): New function.
10382         (push_template_decl): Use it.
10383         (redeclare_class_template): Adjust for new calling convention.
10384         (comp_template_args): Give it external linkage.
10385         (instantiate_class_type): Use tsubst_friend_class to deal
10386         with friend templates.
10387         * typeck.c (comptypes): Use comp_template_args, rather than
10388         expanding it inline.
10389         * parse.y (component_decl): Handle a nested template type
10390         like other component type declarations.
10392         * pt.c (check_explicit_specialization): Handle overloaded
10393         constructors correctly.
10395         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10396         (lookup_template_class): Use it.
10398 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10400         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
10401         * cp-tree.h: Add WRAPPER support.
10402         * call.c (add_candidate): Split out from add_*_candidate fns.
10403         (build_over_call): Take the candidate instead of function and args.
10404         Enforce access control here.  Emit overload warnings here.
10405         (add_warning): New fn.
10406         (joust): Add WARN parm.  If not set, call add_warning instead of
10407         printing a warning.  Re-enable some warnings.
10408         (tourney): Pass it.
10409         (convert_like): Adjust.
10410         (build_new_op): Adjust.
10411         (build_new_function_call): Adjust.
10412         (build_user_type_conversion_1): Adjust.
10413         (USER_CONV_FN): Adjust.
10414         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10415         build_int_wrapper): New fns.
10417 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
10419         * pt.c (unify): Fix typo in previous change.
10421 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10423         * error.c (dump_type_real): Declare canonical_name.
10425         * typeck.c (comp_target_types): Fix PMFs.
10427 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
10429         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10430         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10431         TEMPLATE_DECL.
10433         * pt.c (tsubst): Decrease the template-level of
10434         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
10435         TEMPLATE_PARM_INDEX.
10436         (template_decl_level): New function.
10437         (unify): Make sure to record unifications for template
10438         parameters, even when the parameters exactly match the arguments.
10439         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10440         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
10441         aren't from the level we're currently working on.
10443 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
10445         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10447         * decl2.c (check_member_template): Set DECL_IGNORED for member
10448         class templates, too.
10450         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10452 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10454         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10456 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
10458         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10459         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10460         (init_decl_processing): Handle TI types.
10461         * typeck.c (unsigned_type, signed_type): Handle TI types.
10463 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
10465         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10466         New local added_libraries.  Increment count when add library to
10467         arglist.
10469 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
10471         * cp-tree.h (type_as_string_real): New function.
10472         * pt.c (mangle_class_name_for_template): Use it.
10473         * error.c (dump_aggr_type): Change prototype.
10474         (dump_type_prefix): Likewise.
10475         (dump_type_suffix): Likewise.
10476         (dump_type_real): Convert from dump_type.  If desired, the
10477         "canonica" name of a typedef, i.e., the name of the underlying
10478         type, can be printed.
10479         (dump_type): Call dump_type_real.
10481 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
10483         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10485         * typeck.c (comp_target_types): Tweak pedantic case.
10486         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
10487         Return -1 or 1 instead of 1 or 2.
10488         (compparms): Remove STRICT handling.
10489         (convert_for_assignment): Fix handling of pmfs.
10491 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
10493         * typeck.c (comp_target_types): Handle references like pointers.
10494         (comp_target_parms): Note that return code from comp_target_types
10495         can be negative to indicate failure.
10497 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10499         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10500         which requires a working target compiler to build.
10502 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
10504         * tree.c (avoid_overlap): Add prototype.
10506         * spew.c (num_tokens): Add prototype.
10507         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10509         * search.c (dfs_check_overlap): Add prototype.
10510         (dfs_no_overlap_yet): Likewise.
10512         * pt.c (original_template): Add prototype.
10513         (inline_needs_template_parms): Likewise.
10514         (push_inline_template_parms_recursive): Likewise.
10515         (retrieve_specialization, register_specialization): Likewise.
10516         (print_candidates, reduce_template_parm_level): Likewise.
10517         (build_template_decl, mark_template_parm): Likewise.
10518         (tsubst_friend_function, get_bindings_real): Likewise.
10520         * method.c (start_squangling): Add prototype.
10521         (end_squangling, check_ktype, issue_ktype): Likewise.
10522         (build_overloaded_scope_ref, check_btype): Likewise.
10523         (build_mangled_template_parm_index): Likewise.
10525         * lex.c (init_cpp_parse): Add prototype.
10526         (handle_cp_pragma, handle_sysv_pragma): Likewise.
10527         (reduce_cmp, token_cmp): Likewise.
10529         * except.c (call_eh_info): Add prototype.
10530         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10531         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10533         * decl2.c (is_namespace_ancestor): Add prototype.
10534         (namespace_ancestor, add_using_namespace): Likewise.
10535         (ambiguous_decl): Likewise.
10537         * decl.c (indent): Add prototype.
10539         * call.c (add_template_candidate_real): Add prototype.
10541 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
10543         * decl2.c (build_expr_from_tree): Just return a PMF.
10545 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
10547         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10548         when doing initializations.
10550         * pt.c (unify): Use comptypes to compare type args.
10552 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
10554         * decl.c (duplicate_decls): Fix check for when it's safe to free
10555         the new decl.
10557         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10558         to type_as_string.
10560 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
10562         * pt.c (build_template_parm_index): Add prototype.
10564         * search.c (my_tree_cons): Don't clear words outside the
10565         newly allocated node.
10567 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
10569         * lex.c (init_parse): Now returns char* containing the filename.
10571 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
10572                           Jeff Law   <law@cygnus.com>
10574         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10575         than a pointer.
10577 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10579         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10581 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10583         * decl.c (duplicate_decls): Don't warn for redundant decls if
10584         friend: let add_friend take care of it.
10586 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10588         * sig.c (build_signature_pointer_constructor): Don't set
10589         TREE_HAS_CONSTRUCTOR for a signature pointer.
10590         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10591         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10592         here, too.
10593         * typeck.c (build_unary_op): Only allow taking the address of a
10594         real constructor.
10595         * typeck2.c (digest_init): Simplify.
10596         (store_init_value): Don't pedwarn about using { } for pmfs.
10598 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
10600         * cp-tree.h (start_decl):  Update prototype.
10601         * decl.c (start_decl):  Like the C version, new parameters
10602         for the attributes.  Call cplus_decl_attributes here,
10603         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
10604         (grokdeclarator):  Pass NULL for new start_decl arguments.
10605         * pt.c (tsubst_expr):  Likewise.
10606         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
10607         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10608         * lex.c (build_lang_decl): Add lang_name_java.
10609         * class.c (push_lang_context): Add lang_name_java.
10610         * method.c (build_mangled_name): Check for is_java_type.
10612 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10614         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10615         * call.c (build_scoped_method_call): Check for TREE_CODE for
10616         VOID_TYPE instead of type ==  void_type_node.
10617         (build_method_call): Likewise.
10618         * decl.c (lookup_name_real): Likewise.
10619         (grokdeclarator): Likewise.
10620         (start_decl): Likewise.
10621         (grokparms): Likewise.
10622         (start_function): Likewise.
10623         (finish_function): Likewise.
10624         (start_method): Likewise.
10626 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
10628         * lex.c (finput): New variable.
10629         (init_cpp_parse):  Renamed from init_parse.
10630         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
10631         (finish_parse): New function.
10632         * cp-tree.h (init_lex, init_parse): Remove declarations.
10634 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10636         * call.c (build_call): Still evaluate the actual argument.
10637         * class.c (is_empty_class): Update for -fnew-abi.
10639         * decl2.c: -fnew-abi implies -fsquangle.
10641         * method.c (do_build_assign_ref): Don't do anything to copy
10642         an empty class.
10643         (do_build_copy_constructor): Likewise.
10644         * call.c (build_over_call): Likewise.
10646 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10648         * tree.c (avoid_overlap): Return a value.
10650 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
10652         * method.c (check_btype): Add missing argument to xrealloc.
10653         (check_ktype): Likewise.
10655 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10657         Implement empty base optimization.
10658         * class.c (finish_struct_1): Add vbase fields earlier.  Set
10659         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
10660         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
10661         (types_overlap_p): New fn.
10662         * tree.c (avoid_overlap): New fn.
10663         (build_base_fields): Use it to avoid overlapping empty bases.
10664         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
10666         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
10668         Re-implement allocation of base class subobjects.
10669         * tree.c (unshare_base_binfos): New fn.
10670         (layout_basetypes): Use it.  Now handles offsets of both virtual and
10671         non-virtual bases, after layout_type.
10672         (layout_vbasetypes): Remove.
10673         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
10674         (build_vbase_pointer_fields): Split out from old layout_basetypes.
10675         * class.c (finish_base_struct): Lose offset handling code.
10676         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
10677         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
10678         * cp-tree.h: Adjust.
10680 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
10682         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
10683         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
10684         * class.c (duplicate_tag_error): Likewise.
10685         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
10686         * tree.c (layout_vbasetypes): Update from layout_record, remove
10687         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
10688         (layout_basetypes): Likewise.
10690 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
10692         * class.c, Make sure system.h is included just after config.h.
10693         Delete lingering stdio and errno references too.
10694         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
10696 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
10698         * friend.c (is_friend): Fix access control for local classes.
10700         * class.c (is_empty_class): New fn.
10701         * call.c (build_call): Don't pass empty class objects to a function.
10703 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
10705         * call.c (build_over_call): Do name resolution for default
10706         arguments of function templates in the scope of the templates.
10708 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
10710         * call.c: Include system.h.  Remove includes, declarations and
10711         defines provided by system.h.
10712         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
10713         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
10714         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
10715         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
10716         * typeck2.c, xref.c: Likewise.
10717         * Makefile.in: Dependencies updated as appropriate.
10718         * Make-lang.in: Likewise.
10720 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
10722         * pt.c (fn_type_unification): Allow incomplete unification without
10723         an immediate error message.
10725 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10727         * tree.c (member_p): New fn.
10728         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
10729         initializing class members.
10731         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
10732         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
10734         * call.c (build_method_call): Handle non-scoped destructors, too.
10735         * pt.c (tsubst_copy): Likewise.
10737         * pt.c (print_template_context): Split out...
10738         (push_tinst_level): ...from here.
10740         * friend.c (is_friend): Don't pass a type to decl_function_context.
10742         * typeck.c (convert_for_initialization): Always hand off
10743         conversions to class type.
10745 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10747         * friend.c (is_friend): Local classes have the same access as the
10748         enclosing function.
10750 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
10752         * typeck.c (expand_target_expr): Delete dead function.
10754         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
10756         * repo.c (save_string): Delete dead function.
10758         * method.c (thunk_printable_name): Delete dead function.
10760         * lex.c (yynextch): Delete dead function.
10762         * expr.c (tree_extract_aggr_init): #if 0 out.
10764         * except.c (do_unwind): Delete dead function.
10765         (easy_expand_asm): Likewise.
10767         * cvt.c (build_conversion_type_1): Delete dead function.
10769         * cp-tree.h (push_expression_obstack): Declare.
10771         * call.c (source_type): #if 0 out.
10773         * class.c (alter_access): Remove unused label.  Add braces
10774         around empty else clause.
10776         * lex.c (yyprint): Fix argument to printf.
10778 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
10780         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
10782         * pt.c (instantiate_class_template): Make sure template
10783         arguments are permanent.
10784         * init.c (resolve_offset_ref): Don't go looking around in
10785         template types.
10787         * semantics.c: Add routines to handle expressions, and some
10788         declaration processing.
10789         * parse.y: Use them.
10790         (current_class_depth): Move declaration to cp-tree.h.
10791         * parse.c: Regenerated.
10792         * cp-tree.h: Use them.
10793         (current_class_depth): Declare.
10794         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
10796 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
10798         * error.c (dump_decl): Be a bit more explicit with template
10799         type arguments, when verbose.
10801 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
10803         * inc/exception: Reorder closing braces.
10805 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
10807         * pt.c (redeclare_class_template): New function.
10808         * cp_tree.h (redeclare_class_template): Declare it.
10809         * decl.c (xref_tag): Use it.
10811 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
10813         * call.c (build_over_call): Check IS_AGGR_TYPE, not
10814         TYPE_LANG_SPECIFIC.
10815         * typeck.c (convert_arguments): Likewise.
10817         * decl.c (grokdeclarator): Remove const and volatile from type after
10818         setting constp and volatilep.
10820         * class.c (finish_struct_1): Don't warn about bool bitfield larger
10821         than one bit.
10823 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
10825         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
10827 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
10829         * call.c (build_object_call): Complain about ambiguous operator(),
10830         rather that crashing.
10831         (build_new_op): Likewise.
10832         (build_op_delete_call): Likewise.
10834 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
10836         * cvt.c (perform_qualification_conversions): Use comp_target_types
10837         instead of comp_ptr_ttypes.
10839 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
10841         * cp-tree.h (enforce_access): Declare.
10842         * call.c (enforce_access): Make it extern, not static.
10843         * class.c (alter_access): Use enforce_access; modify code for ISO
10844         compliance, rather than ARM rules.
10846 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10848         * cp-tree.h: Fix typo.
10850 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
10852         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
10853         if (aggregate_value_p (type)).
10855         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
10857 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
10859         * tree.c (mapcar): When dealing with a DECL, use it's constant
10860         value, if any.
10861         * pt.c (lookup_template_class): Don't mangle the names of template
10862         classes whose arguments are unknown.
10864         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
10866 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
10868         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
10870 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
10872         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
10873         boolean_type_node to 1.
10875 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
10877         * error.c (dump_expr): Remove unused variable `l'.
10879         * pt.c (for_each_template_parm): New function, created by
10880         converting uses_template_parms.
10881         (tree_fn_t): New typedef.
10882         (uses_template_parms): Use it.
10883         (mark_template_parm): New function.
10884         (push_template_decl): Check that the argument list of a partial
10885         specialization uses all the template parameters.
10887         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
10888         with it; we might want it for debugging.
10889         * cp-tree.h (type_unification): Change interface.
10890         * class.c (finish_struct_1): Skip nested template types, just like
10891         ordinary nested types.
10892         (instantiate_type): Use new interface to type_unification.
10893         * lex.c (init_lex): Add __sz as opname for sizeof.
10894         * method.c (build_overload_scope_ref): New function.
10895         (build_overload_int): Handle complex expressions.  Set
10896         numeric_output_need_bar if necessary.
10897         (build_overload_value): Handle non-PARM_DECL nodes; this
10898         routine is now used by build_overload_int.  Remove some
10899         assignments to numeric_output_need_bar.  Use
10900         build_overload_scope_ref.
10901         (build_qualified_name): Note that some template mangled names end
10902         with digits, and set numeric_output_need_bar appropriately.  Use
10903         build_underscore_int.
10904         * pt.c (unify): Change interface.
10905         (type_unification_real): Likewise.
10906         (determine_specialization): Use new interfaces.
10907         (tsubst): Deal gracefully with situations in which the argument
10908         vector is not fully filled.
10909         (fn_type_unification): Use new interfaces.
10910         (type_unification): Likewise.  Remove NOP_EXPR hack.
10911         (type_unification_real): Likewise.
10912         (unify): Likewise.  Deal with unification of complex expressions.
10914 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10916         * pt.c (complete_template_args): Initialize skip properly.
10918         * decl.c (make_typename_type): Revert.
10919         (make_implicit_typename): Remove.
10920         (lookup_name_real): Don't call it.  Call lookup_field if we see a
10921         TYPE_DECL from a template base.
10922         * search.c (lookup_field): Do implicit typename stuff.
10924 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
10925                           Geoff Noer    <noer@cygnus.com>
10927         * Makefile.in: Various fixes for building cygwin32 native toolchains.
10928         * Make-lang.in: Likewise.
10930 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10932         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
10934 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
10936         * decl.c (make_implicit_typename): Rewrite removed code.
10937         (make_typename_type): Call it if the type we look up comes from
10938         a base that uses template parms.
10940         * pt.c (complete_template_args): Rewrite.
10941         (tsubst, FUNCTION_DECL): Use it.
10943 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
10945         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
10946         c_expand_asm_operands () if output_operands, input_operands or
10947         clobbers is not NULL_TREE.
10949 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10951         * pt.c (complete_template_args): New function.
10952         (get_bindings): Deal with specializations of function templates
10953         with return type containing parameters from outer class
10954         templates.
10955         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10956         substitute arguments and compose a new type.
10958 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
10960         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10961         FUNCTION_DECLs.
10963 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10965         * decl.c (make_implicit_typename): Lose useless code.
10967         * call.c (standard_conversion): Handle A* -> const A* properly.
10969         * pt.c (get_bindings_real): Rename from get_bindings.  Add
10970         check_rettype parm.
10971         (get_bindings): Pass 1.
10972         (get_bindings_overload): Pass 0.
10974 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
10976         * pt.c (check_explicit_specialization): When reverting a static
10977         member function, also remove the `this' parameter from
10978         last_function_parms.
10980 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10982         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10983         a function context.
10985         * decl.c (store_bindings): Use free_binding_vecs.
10986         (pop_from_top_level): Likewise.
10988 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
10990         * decl.c (make_implicit_typename): Only change the type of a
10991         TYPENAME_TYPE.
10993 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
10995         * semantics.c: New file, containing routines to perform the
10996         semantic phase of parsing.
10997         * parse.y: Use it.
10998         * pt.c (tsubst_expr): Likewise.
10999         * cp-tree.h: Declare the various functions in semantics.c.
11000         Provide macros to access _STMT tree nodes.
11001         * cp-tree.def: Add ASM_STMT tree node.
11002         * Makefile.in, Make-lang.in: Add dependencies on and for
11003         semantics.c.
11005 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
11007         * pt.c (push_template_decl): Only check primary templates.
11009         * pt.c (check_explicit_specialization): Complain about default args
11010         in explicit specialization.
11012         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
11013         constructor_declarator.
11015 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
11017         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
11018         has no overloaded operator ->.
11020         * call.c (build_field_call): Don't crash when presented with a
11021         field that is actually a nested type.
11023         * decl.c (pushtag): Deal with friend class injection in local
11024         classes.
11026         * call.c (build_object_call): Don't crash if OBJ is a
11027         pointer-to-member-function.
11029 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11031         * pt.c (push_template_decl): Complain about template with C linkage,
11032         anonymous template class.
11034 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11036         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
11037         * search.c: Likewise.
11039         * lex.c (do_pending_defargs): Only call
11040         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
11042         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
11044 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
11046         * parse.y: Deal with CONSTRUCTORS in new_initializers.
11048 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
11050         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
11051         closely mimics the behavior in parse.y.
11052         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
11053         into a compound statement.
11055 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11057         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
11058         * pt.c (inline_needs_template_parms): New fn.
11059         (original_template): New fn.
11060         (push_inline_template_parms_recursive): New fn.
11061         (maybe_begin_member_template_processing): Use them.
11062         (maybe_end_member_template_processing): Likewise.
11063         (is_member_or_friend_template): Rename to is_member_template.
11064         Member functions of local classes are never member templates.
11066 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11068         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
11069         added in the class scope to catch redefinition error.
11071         * pt.c (reduce_template_parm_level): Also copy
11072         the DECL_TEMPLATE_PARMS field.
11074 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
11076         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
11077         reduced-level template type parameter.
11079 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11081         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
11082         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
11083         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
11084         * decl.c (duplicate_decls): Propagate it.
11085         * typeck2.c (abstract_virtuals_error): Use two loops to emit
11086         abstract virtual functions and virtual functions which need a
11087         final overrider separately.
11089 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11091         * lang-specs.h: Properly put brackets around array elements in
11092         initializer.
11094         * typeck.c (build_binary_op_nodefault): Correctly place parens around
11095         && and || in expression.
11097 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11099         * call.c (default_parm_conversions): Remove prototype definition.
11100         (build_method_call): Remove unused variable result.
11102         * cvt.c (ocp_convert): Remove unused variable conversion.
11104         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
11106         * except.c (do_unwind): #if 0 definition of unused variables fcall
11107         and next_pc.
11109         * expr.c (extract_scalar_init): #if 0 prototype and function
11110         definition.
11112         * init.c (expand_aggr_init_1): Remove unused variable init_type.
11113         (build_new_1): Remove unused variable t.
11115         * pt.c (instantiate_class_template): Remove unused variable newtag;
11116         cast called function return value to void.
11117         (do_decl_instantiation): Remove unused variables name and fn.
11119         * tree.c (get_type_decl): Add default return to shut up compiler from
11120         complaining control reaches end of non-void function.
11122         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
11124 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11126         * call.c (default_parm_conversions): Remove prototype definition.
11127         (build_method_call): Remove unused variable result.
11128         (build_over_call): Add default case in enumeration switch.
11130 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11132         * decl2.c (lang_decode_option): Change j's type to size_t.
11134         * tree.c (layout_vbasetypes): record_align and desired_align are of
11135         type unsigned int; const_size and nonvirtual_const_size likewise.
11137 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
11139         * parse.y (new_initializer): Make sure all initializers are
11140         lists.
11142 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
11144         * decl2.c (import_export_decl): Mark tinfo functions for
11145         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
11147 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
11149         * method.c: Fix typo.
11151 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11153         * method.c: Include "system.h" to get stdlib.h, stdio.h,
11154         ctype.h, string.h, etc.
11155         (issue_nrepeats): Add default case in enumeration switch.
11156         (check_btype): Likewise.
11157         (process_overload_item): Likewise.
11159         * Makefile.in (method.o): Depend on system.h.
11161 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11163         * lex.c (do_scoped_id): Fix parenthesizing.
11165 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
11167         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
11168         FLAG_RTTI is unset, initialize type info machinery and continue
11169         with FLAG_RTTI enabled.
11170         (get_typeid): Likewise.
11172 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11174         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
11175         from B.
11177 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
11179         * pt.c (finish_member_template_decl): Deal more gracefully with
11180         invalid declarations.
11182 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
11184         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
11185         cp-tree.h: Clean up more old overloading code, old RTTI code, and
11186         some formatting quirks.
11188         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
11189         method.c, pt.c, ptree.c, typeck.c: Remove support for
11190         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
11191         * class.h: Remove.
11192         * Makefile.in: Adjust.
11194         * pt.c (unify): Don't allow reduced cv-quals when strict.
11196         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
11197         *type_unification* and unify.
11199 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
11201         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
11202         (nested_name_specifier): And add it before this use.
11203         (typename_sub0): And this use.  Also add use without the keyword.
11204         (typename_sub1): Likewise.
11205         * pt.c (instantiate_class_template): Don't actually instantiate
11206         anything if our type uses template parms.
11208 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
11210         * decl.c (start_function): Don't call temporary_allocation for a
11211         nested function.
11213 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11215         * pt.c (instantiate_class_template): Don't mess with friends if
11216         our type uses template parms.
11218 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11220         * parse.y (nested_name_specifier): Use explicit_template_type.
11221         (typename_sub): Allow a template_type, an explicit_template_type,
11222         or an implicit template type at the end.
11223         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
11224         * decl.c (make_typename_type): Handle template-id where the name
11225         is a TEMPLATE_DECL.
11226         * call.c (build_scoped_method_call): Handle member template
11227         destructor call.
11228         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
11229         destructor is represented by the type.
11231         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
11232         * parse.y (nested_name_specifier): Add 'template' case.
11233         (explicit_template_type): New rule.
11234         (typename_sub): Use it.
11235         * decl.c (make_typename_type): Handle getting a template-id for NAME.
11236         * pt.c (tsubst): Likewise.
11238 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11240         * pt.c (add_to_template_args): Fix thinko.
11241         (instantiate_class_template): Call it later.
11243         * pt.c (get_class_bindings): Add outer_args parm.
11244         (most_specialized_class): Likewise.
11245         (instantiate_class_template): Pass it.
11246         (more_specialized_class): Likewise.
11247         (lookup_template_class): Get context from template if none
11248         was specified.
11249         (finish_member_template_decl): Don't do anything with a
11250         partial specialization.
11251         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
11252         AGGREGATE_TYPE_P.
11253         * class.c (finish_struct): Member class templates have already been
11254         checked for name clashes.
11255         * decl.c (pushdecl_with_scope): Handle pushing at class level.
11257 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11259         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
11260         (tsubst, *_PARM): Support multiple levels of template classes.
11261         (instantiate_class_template): Look up the pattern from the
11262         original template.
11263         (lookup_template_class): Handle getting a template for d1.
11264         (push_template_decl): Correct setting of 'primary'.
11265         (reduce_template_parm_level): Add 'levels' parm.
11266         (finish_member_template_decl): Support member class templates.
11267         (template_class_depth): Handle multiple levels.
11268         * parse.y (component_decl_1, fn.def2): Remove member template case.
11269         (component_decl): Add member template cases.
11270         * decl2.c (check_member_template): We now handle member template
11271         classes.
11272         * decl.c (pushtag): Handle member templates.
11273         * method.c (do_inline_function_hair): Don't touch
11274         IDENTIFIER_GLOBAL_VALUE.
11275         * init.c (build_offset_ref): If name isn't an identifier, just
11276         return it.
11277         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
11279         * typeck.c (get_delta_difference): Do adjust for conversions to
11280         and from virtual base.
11282 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
11284         * typeck.c (get_delta_difference): Give hard error for conversion
11285         from virtual base.
11287         * cp-tree.h: Tweak formatting.
11289 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
11291         * decl.c (push_namespace): Handle redeclaration error.
11293         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
11294         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
11295         (NAMESPACE_BINDING): New macro.
11296         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
11297         * *.c: Use them.
11299         * pt.c (push_template_decl): Use innermost_args.
11301         * decl.c (get_unique_name): Tweak from earlier in the name.
11303 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11305         * cp-tree.def: Add CPLUS_BINDING node.
11306         * cp-tree.h (tree_binding): New struct.
11307         (BINDING_SCOPE, BINDING_VALUE): New macros.
11308         (current_namespace, global_namespace): Declare extern.
11309         (struct lang_decl_flags): New field in_namespace.
11310         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
11311         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
11312         (TREE_INDIRECT_USING): New macro.
11313         * decl2.c (current_namespace, global_namespace): Declare.  The
11314         value is a NAMESPACE_DECL now, not a TREE_LIST.
11315         (is_namespace_ancestor, namespace_ancestor): New static functions.
11316         (add_using_namespace, ambiguous_decl): Likewise.
11317         (lookup_using_namespace): New support function for lookup_name.
11318         (qualified_lookup_using_namespace): New support function for
11319         do_scoped_id and lookup_namespace_name.
11320         (get_namespace_id): Mark as obsolete.
11321         (current_namespace_id): Likewise.
11322         (do_namespace_alias): Implement.
11323         (do_using_directive): Implement as call to add_using_namespace.
11324         * decl.c (binding_for_name): New function.
11325         (push_namespace, pop_namespace): Implement.
11326         (push_decl): Don't install a FUNCTION_DECL in the global branch.
11327         (lookup_namespace_name): Implement using qualified lookup.
11328         (lookup_name_real): For global scoping, lookup in
11329         global_namespace.  For namespace scoping, lookup in given
11330         namespace.  For unscoped lookup, iterate over namespace,
11331         considering using directives.
11332         (init_decl_processing): Initialize global_namespace.
11333         (grokvardecl): Build assembler name as static name for globals.
11334         (grokdeclarator): Remove old namespace mangling.
11335         (xref_tag): When installing a global binding for the
11336         tag, make sure we have an identifier.
11337         * method.c (build_overload_nested_name): Mangle namespaces.
11338         (build_qualified_name): Likewise.
11339         (build_decl_overload_real): Likewise.
11340         * lex.c (build_lang_decl): Set namespace for new declaration to
11341         current_namespace.
11342         (do_scoped_id): Find global names in global or current
11343         namespace, or using qualified namespace lookup, depending on
11344         context.
11345         * init.c (build_member_call): When scope is namespace, use
11346         build_x_function_call instead.
11347         (build_offset_ref): When scope is namespace, collapse processing
11348         to lookup_namespace_name instead.
11349         * error.c (dump_decl): Support NAMESPACE_DECL.
11350         * decl.c (pushdecl): Bind globals to current namespace.
11351         (push_overloaded_decl): Likewise.
11352         (lookup_tag): Likewise.
11353         (lookup_name_current_level): Likewise.
11354         (xref_tag): Likewise.
11355         (start_function): Likewise.
11356         * lex.c (do_identifier): Likewise.
11357         (identifier_typedecl_value): Likewise.
11358         (real_yylex): Likewise.
11359         * method.c (do_inline_function_hair): Likewise.
11360         * parse.y (unscoped): Likewise.
11361         * pt.c (check_explicit_specialization): Likewise.
11362         (lookup_template_class): Likewise.
11363         * rtti.c (call_void_fn): Likewise.
11364         * sig.c (build_sigtable): Likewise.
11365         * ptree.c (lang_print_xnode): New function.
11367 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
11369         * pt.c (instantiate_class_template): Don't instantiate if pedantic
11370         and the args use template parms.
11372         * pt.c (push_tinst_level): If the instantiation uses template parms,
11373         fail silently.
11374         * decl.c (xref_basetypes): Do call complete_type for basetypes
11375         that involve template parameters.
11377 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11379         * typeck2.c (process_init_constructor): Fix labeled init check.
11381 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11383         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
11384         argument to tsubst and friends.
11386         * pt.c (tsubst, FUNCTION_DECL): Tidy.
11388         * typeck.c (build_x_function_call): Handle static member function
11389         templates like non-templates.  Handle friend templates like normal
11390         function templates.
11391         * pt.c (tsubst, *_PARM): Don't use orig_level.
11392         (get_bindings): Don't call add_to_template_args.
11393         (instantiate_template): Likewise.
11394         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11395         * ptree.c (print_lang_type): Print index/level for template parms.
11397 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
11399         * Make-lang.in (cc1plus): Note that cc1plus depends on
11400         cp/cp-tree.h and cp/cp-tree.def.
11402         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11403         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11404         position in a template parameter list.
11405         * cp-tree.h (template_parm_index): New structure, used as the tree
11406         structure for a TEMPLATE_PARM_INDEX.
11407         (TEMPLATE_PARM_IDX): New macro.
11408         (TEMPLATE_PARM_LEVEL): Likewise.
11409         (TEMPLATE_PARM_DESCENDANTS): Likewise.
11410         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11411         (TEMPLATE_PARM_DECL): Likewise.
11412         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11413         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11414         (TEMPLATE_TYPE_DECL): Likewise.
11415         (TEMPLATE_CONST_IDX): Remove.
11416         (TEMPLATE_CONST_LEVEL): Likewise.
11417         (TEMPLATE_CONST_SET_INFO): Likewise.
11418         (TEMPLATE_TYPE_SET_INFO): Likewise.
11419         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11420         node.
11421         (TEMPLATE_TYPE_LEVEL): Likewise.
11422         * decl.c (decls_match): Call comp_template_parms, rather than
11423         expanding it inline.
11424         (duplicate_decls): If two template declarations are being merged,
11425         then their TEMPLATE_INFOs should be merged as well.
11426         (grokfndecl): Save template-id information when declaring a friend
11427         with explicit template arguments.  Pass arguments to
11428         check_explicit_specialization via correct convention; at some
11429         point check_explicit_specialization changed, but these call-sites
11430         did not.
11431         (grokdeclarator): Tidy up slightly.
11432         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
11433         two template functions with the same DECL_ASSEMBLER_NAME the same,
11434         since the names are not yet mangled.
11435         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11436         TEMPLATE_CONST_PARM.
11437         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
11438         decl for a non-type parameter, rather than printing `<tparm ...>'.
11439         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11440         (do_friend): Deal with template friends.
11441         * lex.c (do_pending_inlines): Call
11442         maybe_begin_member_template_processing, rather than
11443         conditionally calling begin_member_template_processing.
11444         (process_next_inline): Likewise.  Call
11445         maybe_end_member_template_processing, rather than
11446         conditionally calling end_member_template_processing.
11447         (do_pending_defargs): Likewise.
11448         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11449         TEMPLATE_CONST_PARM.
11450         * method.c (build_mangled_template_parm_index): New function.
11451         (build_overload_value): Use it.
11452         (build_overload_name): Likewise.
11453         * pt.c (finish_member_template_decl): Allow friend declarations.
11454         (template_class_depth): New function.
11455         (is_member_template): Rename, and modify, to become...
11456         (is_member_or_friend_template): New function.
11457         (end_member_template_processing): Rename, and modify, to become...
11458         (maybe_end_member_template_processing).
11459         (build_template_parm_index): New function.
11460         (reduce_template_parm_level): New function.
11461         (process_template_parm): Modify to use build_template_parm_index.
11462         (push_template_decl): Deal with friend templates.
11463         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11464         TEMPLATE_CONST_PARM.
11465         (tsubst_friend_function): New function.
11466         (instantiate_class_template): Generate the DECL_FRIENDLIST
11467         for a new instantiation by using tsubst_friend_function rather
11468         than just tsubst.
11469         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11470         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11471         appropriate new macros.  Use reduce_template_parm_level to
11472         generate lower-level template parameters.  Handle tsubst'ing into
11473         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
11474         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11475         templates.  Similarly for the template parameters for a new
11476         template.
11477         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
11478         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
11479         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11480         (get_bindings): Call add_to_template_args if necessary.
11481         (instantiate_decl): Handle instantiations of friend templates.
11482         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11483         TEMPLATE_TYPE_PARM as a list of fields; it's not!
11484         * spew.c (yylex): Do a little manual constant propagation to
11485         clarify the code.
11487 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
11489         * error.c: Include sys/types.h.
11491 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
11493         * method.c (build_mangled_name): Start CPP directives in column zero.
11495 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11497         * typeck2.c (process_init_constructor): Sorry about non-trivial
11498         labeled initializers.
11499         * parse.y (initlist): Re-enable labeled initializers.
11501 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11503         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11504         all callers changed.  Rely on the new parameter instead of arg
11505         being a TREE_LIST when determine whether we are working inside
11506         template template parameter.  Clean up is_type test.
11508 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11510         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11511         * typeck2.c (initializer_constant_valid_p): Allow conversions
11512         between pointers and references.
11514 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
11516         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11517         if pedantic || warn_pointer_arith.
11519 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11521         * pt.c (unify): Handle TEMPLATE_DECL.
11523 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
11525         * cp-tree.h (strip_attrs): Remove decl.
11527 1998-02-18  Doug Evans  <devans@cygnus.com>
11529         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11530         Update olddecl's attributes too.
11531         (strip_attrs): Remove function.
11532         * typeck.c (common_type): Call merge_machine_type_attributes.
11534 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
11536         * parse.y (initdcl0_innards): New grammar symbol.
11537         (nomods_initdecls, nomods_initdcl0): Change type from itype to
11538         none, since the resulting value is never used.
11539         (parse_decl): New function.
11540         (datadef): Remove redundant actions.
11541         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11542         * parse.c: Regenerated.
11544 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11546         * parse.y (simple_stmt): Use getdecls() to check for decl.
11548 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11550         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11551         macros.
11552         (c++.install-common): Install c++filt properly as native or as cross
11553         variant.
11554         (c++.uninstall): Add c++filt.
11556 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11558         * call.c (standard_conversion): Fix multi-level ptr conversions.
11560 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
11562         * init.c (build_new): Propagate error_mark_node up.
11564 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
11566         * parse.y (simple_stmt): If the condition isn't a declaration,
11567         start the controlled block after the test.
11569 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11571         * call.c (build_over_call): Convert builtin abs, labs and fabs to
11572         tree-codes.
11573         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11574         builtins.
11576 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11578         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11580 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11582         * cp-tree.h: Add access_protected_virtual_node.
11583         * class.c (init_class_processing): Initialize it.
11584         * decl.c (xref_basetypes): Use it.
11585         * parse.y (base_class_access_list): Likewise.
11587         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11588         (c++.install-common): Install c++filt.
11590 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11592         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11594 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
11596         * call.c (reference_binding): Use comptypes when comparing
11597         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11599 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
11601         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11602         (really_overloaded_fn): Move check here from is_overloaded_fn.
11603         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11605 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
11607         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11608         conversions.
11610 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
11612         * cp-tree.h (push_template_decl): Return the decl passed in, or an
11613         equivalent duplicate.
11614         * decl.c (pushtag): Use the return value from push_template_decl.
11615         (duplicate_decls): When duplicating a template declaration, merge
11616         the DECL_TEMPLATE_RESULTs as well.
11617         (make_implicit_typename): Don't try to dive into typename types to
11618         find a context for making a new implicit typename.
11619         (start_decl): Use the return value from push_template_decl.
11620         (grokdeclarator): Complain about declarations list `const operator
11621         int'.  Since we don't correctly handle in-class initializations of
11622         non-static data members, complain about this (now illegal)
11623         practice.  Issue an error for initializations of non-const statics
11624         since that is illegal as well, and since we don't handle that case
11625         correctly either.
11626         (start_function): Use the return value from push_template_decl.
11627         (start_method): Likewise.
11628         * decl2.c (grokfield): Likewise.  Since the change to
11629         grokdeclarator ensures that all initialized fields are in fact
11630         static, remove a redundant test for TREE_PUBLIC.
11631         * parse.y (initlist): Disable labeled initializers since they do
11632         not work as per the documentation, and since they do not use the
11633         same syntax as the C front end.
11634         * pt.c (push_template_decl): Return the decl passed in, or an
11635         equivalent duplicate.
11636         (lookup_template_class): When searching in a nested context,
11637         use the right arguments.
11638         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
11639         * typeck.c (build_component_ref): Assign the correct type to the
11640         result of build_vfn_ref.
11642 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
11644         * pt.c (convert_nontype_argument): Fix typo.
11645         (check_explicit_specialization): Allow old-style specialization
11646         of class template members.
11648 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
11649                           Manfred Hollstein  <manfred@s-direktnet.de>
11651         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
11652         when deciding to override DECL_ASSEMBLER_NAME.
11654 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
11656         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
11657         * cp-tree.h (flag_do_squangling): Add declaration.
11658         * lang-options.h: Add -fsquangle and -fno-squangle.
11659         * method.c: Add macros and static variables for squangling.
11660         (build_overload_name): Rename to build_mangled_name, add logic for B
11661         compression, and split into process_modifiers and
11662         process_overload_item.
11663         (process_modifiers): New function, to handle constant, reference,
11664         and pointer types.
11665         (process_overload_item): New function, handles issue of type codes.
11666         (build_overload_name): New function, start squangling and call
11667         build_mangled_name.
11668         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
11669         (start_squangling): New function to initialize squangling structs.
11670         (end_squangling): New function to destroy squangling structs.
11671         (nrepeats): Rename variable to Nrepeats.
11672         (issue_nrepeats): New function for issuing 'n' type repeats.
11673         (check_ktype): New function to check for type K name compression.
11674         (build_overload_nested_name): Add a check for K name compression.
11675         (build_qualified_name): Add a check for K name compression and don't
11676         use DECL_ASSEMBLER_NAME when squangling is on.
11677         (check_btype): New function, checks for B type compression.
11678         (build_static_name, build_decl_overload_real): Initiate squangling.
11679         (build_typename_overload, build_overload_with_type): Initiate
11680         squangling
11682 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
11684         * method.c (make_thunk): Avoid name buffer overflow.
11686 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
11688         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
11689         don't define them yet.
11691         * parse.y (nomods_initdcl0): Add constructor_declarator case.
11693 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11695         * config-lang.in (diff_excludes): Use basename only.
11697 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11699         * tinfo2.cc: Add tinfo for signed char.
11701 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
11703         * search.c (compute_access): Handle protected constructors in derived
11704         classes as accessible.
11706 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
11708         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
11709         Call convert_from_reference sooner.
11711 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
11713         * cvt.c (ocp_convert): Obtain the constant values from constant
11714         decls even if the destination type is the same as the type of the
11715         decl.
11717         * decl2.c (finish_file): Make sure that static inlines with
11718         definitions are not marked DECL_EXTERNAL before returning.
11720 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11722         * decl.c: Lose arg_looking_for_template.
11723         (lookup_name_real): Likewise.
11724         * parse.y: Lose processing_template_arg, template_arg1.
11725         (primary): Likewise.
11726         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
11728 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11730         * error.c (dump_decl): Fix type of default arguments for template
11731         template parameters and nontype template parameters.
11732         * parse.y (template_parm): Handle invalid default template
11733         template arguments here.
11735         * parse.y (template_parm): Use template_arg instead of PTYPENAME
11736         for default template template argument.
11737         * pt.c (coerce_template_parms): Merge default template argument
11738         codes.  Can treat RECORD_TYPE as template name if it is implicitly
11739         created.  Fix argument index in error message.
11740         * typeck.c (comptypes): Merge template argument comparison codes in
11741         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
11743 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
11745         * lex.c (file_name_nondirectory): Also check for '/'.
11747 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
11749         * parse.y (primary): Deal with statement-expressions in
11750         templates.
11751         * pt.c (tsubst_copy): Handle BIND_EXPR.
11752         * tree.c (mapcar): Likewise.
11754         * call.c (add_template_candidate_real): Pass extra parameter to
11755         fn_type_unification.
11756         * cp-tree.h (fn_type_unification): Add parameter.
11757         * pt.c (fn_type_unification): Add additional parameter to deal with
11758         static member functions.
11759         (get_bindings): Deal with static member functions.
11761         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
11762         (revert_static_member_fn): Declare.
11763         * decl.c (revert_static_member_fn): Remove declaration.  Change
11764         linkage from internal to external.
11765         (cp_finish_decl): Deal with virtual functions in classes local to
11766         template functions.
11767         * decl2.c (finish_file): Don't forget to emit increment/decrement
11768         expressions in initializers for file-scope variables.
11769         * parse.y (typename_sub2): If the typename doesn't names a
11770         template, rather than a type, issue an error message.
11771         * pt.c (check_explicit_specialization): Handle specializations of
11772         static member functions.
11773         (coerce_template_parms): Handle offset references to lists of
11774         member functions.
11775         * search.c (note_debug_info_needed): Don't crash when handed a
11776         type which is being defined.
11777         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
11778         that can happen with some illegal code.
11780 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11782         * call.c (user_harshness): Initialize `code' to 0.
11783         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
11784         (null_ptr_cst_p): Add parentheses around && within ||.
11785         (standard_conversion): Likewise.
11786         (z_candidate): Likewise.
11787         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
11788         (build_object_call): Likewise for `mem_args'.
11789         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
11790         default case in enumeration switch.
11792         * class.c (build_vtable_entry): Add explicit braces to avoid
11793         ambiguous `else'.
11794         (build_class_init_list): Likewise.
11795         (finish_struct_1): Initialize `width' to 0.
11796         (instantiate_type): Initialize `name' to NULL_TREE.  Add
11797         explicit braces to avoid ambiguous `else'.
11799         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
11800         `else'.
11802         * decl.c (grok_reference_init): Eliminate unused parameter, all
11803         callers changed.
11804         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
11805         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
11806         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
11807         (grokdeclarator): Add parentheses around && within ||.  Add
11808         explicit braces to avoid ambiguous `else'.
11809         (grokparms): Initialize `type' to NULL_TREE.
11810         (xref_tag): Remove unused label `just_return'.
11811         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
11812         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
11813         (hack_incomplete_structures): Add parentheses around assignment
11814         used as truth value.
11816         * decl2.c (coerce_delete_type): Hide definition of `e3'.
11818         * error.c: Include <stdlib.h>.
11819         (dump_expr): Change the type of `i' to size_t.  Remove unused
11820         label `error'.
11822         * except.c (init_exception_processing): Remove unused variable `d'.
11823         (expand_throw): Likewise for `label'.
11825         * friend.c (add_friends): Add explicit braces to avoid ambiguous
11826         `else'.
11828         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
11829         (sort_base_init): Likewise for `binfo'.
11830         (expand_member_init): Likewise for `rval'.
11831         (build_member_call): Add parentheses around assignment used as
11832         truth value.
11833         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
11834         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
11835         `old_immediate_size_expand' to 0.
11836         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
11837         (build_vec_delete_1): Remove unused variable `block'.
11838         (expand_vec_init): Initialize `itype' to NULL_TREE.
11840         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
11841         declaration of `index' and `rindex' with autoconf macros.
11842         (reinit_parse_for_expr): Remove unused variables
11843         `look_for_semicolon' and `look_for_lbrac'.
11844         (cons_up_default_function): Initialize `args' to NULL_TREE.
11845         (readescape): Initialize `firstdig' to 0.
11846         (real_yylex): Add parentheses around assignment used as truth value.
11848         * method.c: Include <strings.h> if we don't have <string.h>.
11849         Protect declaration of `index' with autoconf macro.
11851         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
11852         Initialize `type' to NULL_TREE.
11853         (structsp): Remove unused variable `id'.
11855         * pt.c (coerce_template_parms): Add explicit braces to avoid
11856         ambiguous `else'.
11857         (lookup_template_class): Initialize `template' to NULL_TREE.
11858         (instantiate_class_template): Remove unused variable `name' and `e'.
11859         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
11860         (do_poplevel): Initialize `saved_warn_unused' to 0.
11861         (type_unification): Remove unused varable `parm'.
11862         (unify): Likewise for `j'.
11864         * repo.c (init_repo): Add parentheses around assignment used as
11865         truth value.
11866         (finish_repo): Remove unused varable `p'.
11868         * search.c (get_binfo): Initialize `type' to NULL_TREE.
11869         (get_base_distance): Likewise.
11870         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
11871         and `new_v' to NULL_TREE.
11872         (lookup_fnfields): Likewise for `rval_binfo_h'.
11873         (breadth_first_search): Add parentheses around assignment used as
11874         truth value.
11875         (get_template_base): Initialize `type' to NULL_TREE.
11877         * sig.c (append_signature_fields): Initialize `last_mfptr' to
11878         NULL_TREE.
11879         (build_signature_table_constructor): Likewise for
11880         `last_rhs_field', `pfn' and `vt_off'.
11881         (build_sigtable): Likewise for `init'.
11883         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
11884         (propagate_binfo_offsets): Likewise for `delta'.
11885         (hash_tree_cons): Initialize hashcode to 0.
11886         (can_free): Likewise for `size'.
11887         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
11889         * typeck.c (convert_sequence): Hide prototype.
11890         (common_type): Add explicit braces to avoid ambiguous `else'.
11891         (comp_target_types): Likewise.
11892         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
11893         (build_function_call_real): Add explicit braces to avoid ambiguous
11894         `else'.
11895         (convert_arguments): Initialize `called_thing' to 0.
11896         (convert_for_initialization): Initialize `savew' and `savee' to 0.
11898         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
11899         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
11900         (build_x_arrow): Likewise for `last_rval'.
11902         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
11904 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
11906         * decl.c (init_decl_processing): Use set_sizetype.
11907         * decl2.c (sizetype): Don't declare.
11908         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
11909         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
11910         (build_component_addr, unary_complex_lvalue): Likewise.
11911         * rtti.c (expand_class_desc): Likewise.
11912         * class.c (get_vfield_offset): Likewise.
11914 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
11916         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
11917         early to avoid bogus error.  Handle overloaded function
11918         names provided as template arguments correctly.
11919         (coerce_template_parms): Don't mishandle overloaded functions when
11920         dealing with template template parameters.
11921         (lookup_template_class): Issue an error message, rather than
11922         crashing, when the TYPE_DECL provided is not a template type.
11924 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11926         * class.c (instantiate_type): Don't just return a known type if
11927         it's wrong.
11929 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
11931         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
11932         since that code could never be reached.
11934         * error.c (dump_decl): Avoid aborting in the midst of printing an
11935         error message about an illegal template declaration.
11937         * parse.y (structsp): Print an error message, rather than crashing,
11938         when a class-head does not name a class.
11940         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
11941         template arguments as a g++ extension.
11943         * cp-tree.def (ALIGNOF_EXPR): New tree code.
11944         * decl2.c (grok_alignof): If processing_template_decl, just store
11945         the expression.
11946         * typeck.c (c_alignof): Likewise.
11947         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11948         * error.c (dump_expr): Likewise.
11949         * pt.c (tsubst_copy): Likewise.
11950         * tree.c (cp_tree_equal): Likewise.
11951         * pt.c (uses_template_parms): Correctly determine whether or not a
11952         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11953         folding can be done.
11955         * cp-tree.h (grok_enum_decls): Remove type parameter.
11956         * decl.c (grok_enum_decls): Likewise.
11957         * decl2.c (grok_x_components): Call grok_enum_decls
11958         unconditionally, since it will do nothing if there is no
11959         current_local_enum.  Use the new calling sequence.
11960         * pt.c (tsubst_enum): Use the new calling sequence for
11961         grok_enum_decls.
11963         * decl.c (start_function): Make member functions of local classes
11964         in extern inline functions have comdat linkage here...
11965         (grokdeclarator): Rather than here.
11967 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
11969         * pt.c (convert_nontype_argument): Use decl_constant_value.
11971 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
11973         * call.c (add_template_candidate_real): New function.
11974         (add_template_candidate): Use it.
11975         (add_template_conv_candidate): Likewise.
11976         (joust): Pass extra argument to more_specialized.
11977         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11978         (is_local_class): Remove.
11979         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11980         * cp-tree.h (is_local_class): Remove.
11981         (perform_array_to_pointer_conversion): Likewise.
11982         (finish_member_template_decl): Add.
11983         (check_explicit_specialization): Return a tree, not an int.
11984         (more_specialized): Take additional argument.
11985         (get_bindings): Likewise.
11986         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11987         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11988         (perform_array_to_pointer_conversion): Remove.
11989         * decl.c (saved_scope): Add processing_specialization,
11990         processing_explicit_instantiation fields.
11991         (maybe_push_to_top_level): Save them.
11992         (pop_from_top_level): Restore them.
11993         (grokfndecl): Use new return value from
11994         check_explicit_specialization.
11995         (start_decl): Don't check flag_guiding_decls before pushing
11996         decls.
11997         (cp_finish_decl): Remove previous (bogus) change.
11998         (grok_declarator): Use decl_function_context rather than
11999         is_local_class.
12000         * decl2.c (finish_file): Pass extra argument to get_bindings.
12001         (build_expr_from_tree): Let build_x_component_ref check
12002         validity of arguments rather than doing it here.
12003         * lex.c (cons_up_default_function): Remove code fooling with
12004         processing_specialization, processing_explicit_instantiation
12005         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
12006         * method.c (build_overload_identifier): Mangle local classes in
12007         template functions correctly.
12008         * parse.y (finish_member_template_decl): Move to pt.c.
12009         * pt.c (finish_member_template_decl): Moved here from parse.y.
12010         (print_candidates): New function.
12011         (determine_specialization): Change interface.  Properly look for
12012         most specialized versions of template candidates.
12013         (check_explicit_specialization): Fully process explicit
12014         instantiations.
12015         (push_template_decl): Avoid looking at CLASSTYPE fields in
12016         FUNCTION_DECLS.
12017         (determine_overloaded_function): Remove.
12018         (convert_nontype_argument): Change name from
12019         convert_nontype_parameter.  Use determine_overloaded_function
12020         instead of instantiate_type.
12021         (mangle_class_name_for_template): Handle type contexts as well as
12022         function contexts.
12023         (classtype_mangled_name): Likewise.
12024         (lookup_template_class): Likewise.
12025         (tsubst): Likewise.
12026         (more_specialized): Take explict template arguments as a
12027         parameter.
12028         (most_specialized): Likewise.
12029         (get_bindings): Likewise.  Check that return types match before
12030         proclaiming a function a match.
12031         (do_decl_instantiation): Remove code searching for function to
12032         instantiate; that is now done in check_explicit_specialization.
12033         (add_maybe_template): Pass extra argument to get_bindings.
12034         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
12035         implementation.
12036         * typeck.c (build_component_ref): Check for invalid arguments.
12038 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
12040         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
12041         return_target and call_target are equivalent.
12043         * pt.c (type_unification_real): Just accept function parms that
12044         don't use any template parms.
12046 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12048         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
12049         unset DECL_NOT_REALLY_EXTERN.
12051         * parse.y (typename_sub*): Fix std::.
12053 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12055         * error.c (dump_decl): Fix type default template args.
12056         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
12058 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
12060         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
12061         (file_name_nondirectory): Use.
12063 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12065         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
12066         that are not really present.  Substitute default arguments in
12067         template template arguments.  Correctly convert TEMPLATE_DECL to
12068         TEMPLATE_TEMPLATE_PARM.
12069         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
12070         are no longer treated specially here.
12071         * parse.y (template_template_parm): Fix copy error.
12072         * decl.c (grokdeclarator): Warn about missing `typename' for nested
12073         type created from template template parameters.
12074         * parse.y (bad_parm): Likewise
12076         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
12077         (push_nested_class): Likewise.
12078         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
12079         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
12080         (copy_template_template_parm): Declare.
12081         * decl.c (arg_looking_for_template): New variable.
12082         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
12083         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
12084         node if arg_looking_for_template is nonzero.
12085         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
12086         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
12087         (grokdeclarator): Handle TEMPLATE_DECL.
12088         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
12089         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
12090         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
12091         (dump_decl): Handle unnamed template type parameters.
12092         Handle template template parameters.
12093         (dump_function_name): Handle template template parameters.
12094         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
12095         Handle TEMPLATE_TEMPLATE_PARM.
12096         * method.c (build_template_template_parm_names): New function.
12097         (build_template_parm_names): Handle TEMPLATE_DECL.
12098         (build_overload_nested_name, build_overload_name):
12099         Handle TEMPLATE_TEMPLATE_PARM.
12100         * parse.y (maybe_identifier): New nonterminal.
12101         (template_type_parm): Use it.
12102         (template_template_parm, template_arg1): New nonterminal.
12103         (template_parm): Add template_template_parm rules.
12104         (template_arg): Set processing_template_arg.
12105         (template_arg1): Rules moved from template_arg.
12106         (primary, nonnested_type): Set arg_looking_for_template if we are
12107         processing template arguments.
12108         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
12109         (process_template_parm): Handle template template parameters.
12110         (coerce_template_parms, comp_template_args): Likewise.
12111         (mangle_class_name_for_template, lookup_template_class): Likewise.
12112         (uses_template_parms): Handle TEMPLATE_DECL and
12113         TEMPLATE_TEMPLATE_PARM.
12114         (current_template_args): Handle TEMPLATE_DECL.
12115         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
12116         * search.c (dfs_walk, dfs_record_inheritance):
12117         Handle TEMPLATE_TEMPLATE_PARM.
12118         * tree.c (copy_template_template_parm): New function.
12119         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
12120         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
12122 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
12124         * decl.c (start_decl): Don't allow duplicate definitions of static
12125         data members.
12127         * call.c (build_user_type_conversion_1): Handle user-defined
12128         template conversion operators correctly.
12130         * decl2.c (build_expr_from_tree): Issue an error message if the
12131         object in a COMPONENT_REF is a TEMPLATE_DECL.
12133         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
12135         * class.c (is_local_class): New function.
12136         * cp-tree.h (is_local_class): Declare it.
12137         (last_tree): Likewise.
12138         (begin_tree): Likewise.
12139         (end_tree): Likewise.
12140         (lookup_template_class): Change prototype.
12141         * decl.c (cp_finish_decl): Check for NULL where necessary.
12142         Consider FUNCTION_DECLS to declare objects with top-level binding,
12143         when calling make_decl_rtl.
12144         (grokdeclarator): Give members of local classes internal linkage.
12145         (start_function): Remove declaration of last_tree.
12146         (finish_function): Set flag_keep_inline_functions around call to
12147         rest_of_compilation if we are processing a member function in a
12148         local class.
12149         (start_method): Call push_template_decl for member functions of
12150         local classes in template functions.
12151         * decl2.c (import_export_decl): Don't give external linkage to
12152         instantiations of templates with internal linkage.
12153         * parse.y (last_tree): Remove declaration.
12154         (template_type): Pass extra parameter to lookup_template_class.
12155         (self_template_type): Likewise.
12156         (structsp): Move call to reset_specialization into left_curly.
12157         (left_curly): Call reset_specialization, and begin_tree.
12158         * pt.c (saved_trees): New variable.
12159         (mangle_class_name_for_template): Change prototype.  Use
12160         additional function context to name local classes in templates
12161         correctly.
12162         (classtype_mangled_name): Pass the context.
12163         (push_template_decl): Handle local classes and templates, and
12164         member functions for such classes.
12165         (convert_nontype_parameter): Fix handling of pointer-to-member
12166         constants.
12167         (lookup_template_class): Handle local classes in templates.
12168         (tsubst): Likewise.  Don't assume that template instantiations
12169         have external linkage; pay attention to the template declaration.
12170         (mark_decl_instantiated): Likewise.
12171         (begin_tree): New function.
12172         (end_tree): Likewise.
12174         * decl.c (xref_basetypes): Don't call complete_type for basetypes
12175         that involve template parameters; that can lead to infinite
12176         recursion unnecessarily.
12178         * pt.c (register_specialization): Do not register specializations
12179         that aren't ready to be registered yet.
12180         (check_explicit_specialization): Handle explicit specialization of
12181         constructors and destructors.
12182         (build_template_decl): New function.
12183         (push_template_delc): Handle out-of-class specializations of
12184         member templates.
12186         * pt.c (check_explicit_specialization): Set up the template
12187         information before registering the specialization.
12188         (coerce_template_parms): Fix thinko.
12189         (tsubst): Handle specializations of member templates correctly.
12191         * class.c (finish_struct_methods): Remove calls to
12192         check_explicit_specialization from here.
12193         (finish_struct): And insert them here.
12194         * cp-tree.h (perform_qualification_conversions): New function.
12195         (perform_array_to_pointer_conversion): Likewise.
12196         (begin_explicit_instantiation): Likewise.
12197         (end_explicit_instantiation): Likewise.
12198         (determine_specialization): Renamed from
12199         determine_explicit_specialization.
12200         (comp_template_parms): New function.
12201         (processing_explicit_instantiation): New variable.
12202         * cvt.c (perform_qualification_conversions): New function.
12203         (perform_array_to_pointer_conversion): Likewise.
12204         * decl.c (duplicate_decls): Don't consider template functions
12205         alike unless they have the same parameters.  Refine handling of
12206         instantiation/specialization mismatches.
12207         (start_decl): Don't call pushdecl for template specializations,
12208         since they don't affect overloading.
12209         (start_function): Likewise.
12210         (grokfndecl): Call check_explicit_specialization a little later.
12211         Don't call duplicate_decls for memberm template specializations.
12212         (grokdeclarator): Don't update template_count for classes that are
12213         themselves specializations.  Remove use of `2' as parameter to
12214         grokfndecl since that value isn't used.
12215         * lex.c (cons_up_default_function): Save and restore
12216         processing_explicit_instantiation around calls to grokfield.
12217         * parse.y (finish_member_template_decl): New function.
12218         (component_decl_1): Use it.
12219         (fn.def2): Likewise.
12220         (template_arg_list_opt): New nonterminal.
12221         (template_type): Use it.
12222         (self_template_type): Likewise.
12223         (template_id): Likewise.
12224         (object_template_id): Likewise.
12225         (notype_template_declarator): Likwise.
12226         (begin_explicit_instantiation): Likewise.
12227         (end_explicit_instantiation): Likewise.
12228         (explicit_instantiation): Use them.
12229         * pt.c (coerce_template_parms): Add parameters.
12230         (processing_explicit_instantiation): New variable.
12231         (convert_nontype_parameter): New function.
12232         (determine_overloaded_function): Likewise.
12233         (begin_explicit_instantiation): Likewise.
12234         (end_explicit_instantiation): Likewise.
12235         (retrieve_specialization): Likewise.
12236         (register_specialization): Likewise.
12237         (processing_explicit_specialization): Removed.
12238         (determine_specialization): Handle specializations of member
12239         functions of template class instantiations.
12240         (check_explicit_specialization): Refine to conform to standard.
12241         (comp_template_parms): New function.
12242         (coerce_template_parms): Call convert_nontype_parameter.
12243         (tsubst): Refine handling of member templates.  Use
12244         register_specialization.
12245         (instantiate_template): Use retrieve_specialization.
12246         (do_decl_instantiation): Likewise.
12247         (instantiate_decl): Likewise.
12248         (type_unification): Improve handling of explict template
12249         arguments.
12250         * tree.c (mapcar): Return error_mark_node, rather than aborting,
12251         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
12252         * typeck.c (build_unary_op): Call determine_specialization, rather
12253         than determine_explicit_specialization.
12255 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
12257         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
12259 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12261         * error.c (dump_decl): For enum tags, output the tag, not its value.
12263 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
12265         * decl.c (init_decl_processing): Only call init_rtti_processing
12266         FLAG_RTTI is set.
12268 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
12270         * init.c (build_new_1): Split out from build_new.
12271         (build_new): Just return a NEW_EXPR.
12272         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
12274         * decl2.c (get_temp_regvar): Tweak.
12276         * cp-tree.h (TREE_CALLS_NEW): Comment out.
12277         * class.c (resolves_to_fixed_type_p): Remove use.
12278         * method.c (build_opfncall): Likewise.
12279         * call.c (build_new_op): Likewise.
12281 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
12283         * exception.cc (__eh_alloc, __eh_free): New fns.
12284         (__cp_push_exception, __cp_pop_exception): Use them.
12285         (__uncatch_exception): Call terminate here if no exception.
12286         * except.c (build_terminate_handler): New fn.
12287         (expand_start_catch_block): Use it.
12288         (expand_exception_blocks): Likewise.
12289         (alloc_eh_object): New fn.
12290         (expand_throw): Use it.  Protect exception init with terminate.
12291         * typeck.c (build_modify_expr): Remove code that ignores trivial
12292         methods.
12294 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12296         * call.c (add_builtin_candidate): Add default case in enumeration
12297         switch.
12298         (build_new_op): Likewise.
12299         (convert_like): Likewise.
12300         * cvt.c (build_expr_type_conversion): Likewise.
12301         * tree.c (real_lvalue_p): Likewise.
12302         (lvalue_p): Likewise.
12303         (cp_tree_equal): Likewise.
12304         * typeck.c (comptypes): Likewise.
12305         (build_component_ref): Likewise.
12306         (build_function_call_real): Likewise.
12307         (build_binary_op_nodefault): Likewise.
12308         (build_unary_op): Likewise.
12309         (build_modify_expr): Likewise.
12310         * typeck2.c (initializer_constant_valid_p): Likewise.
12312 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
12314         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
12316 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
12318         * pt.c (coerce_template_parms): Make sure to digest_init if
12319         possible.
12321         * decl.c (duplicate_decls): Make the newdecl virtual if the
12322         olddecl was, just as is done with other attributes of olddecl.
12324 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12326         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
12327         address of an OFFSET_REF.
12329         * cp-tree.def: Add AGGR_INIT_EXPR.
12330         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
12331         AGGR_INIT_EXPR where appropriate.
12332         * expr.c (cplus_expand_expr): Likewise.  Simplify.
12334         * decl2.c (finish_file): Remove call to register_exception_table.
12336 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12338         * pt.c (instantiate_class_template): Don't do injection when
12339         processing_template_decl is true, as pollutes current_binding_level
12340         for base classes.
12342 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
12344         * pt.c (maybe_fold_nontype_arg): Add prototype.
12346 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12348         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
12349         * error.c (dump_expr): Likewise.
12351 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12353         * typeck.c (build_function_call_real): Remove "inline called before
12354         definition" pedwarn.
12356         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
12358 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12360         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
12362         * pt.c (type_unification_real): Change __null to type void* with
12363         a warning.
12365 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
12367         * call.c (implicit_conversion): Don't call
12368         build_user_type_conversion_1 with a NULL expr, since it will
12369         crash.
12371         * pt.c (unify): Don't try to unify array bounds if either array is
12372         unbounded.
12374 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12376         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
12377         Replace extern decls with casts.
12379         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
12380         Update last_parm_cleanup_insn.
12381         (store_after_parms): Remove.
12382         * cp-tree.h: Adjust.
12384 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12386         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12387         (finish_file): Check DECL_COMDAT instead of weak|one_only.
12388         (import_export_vtable): Use make_decl_one_only instead of
12389         comdat_linkage for win32 tweak.
12390         (import_export_decl): Likewise.
12391         * pt.c (mark_decl_instantiated): Likewise.
12393         * decl2.c (finish_file): Lose handling of templates in pending_statics.
12395 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
12397         * decl2.c (finish_file): Lose call to expand_builtin_throw.
12398         * except.c (expand_builtin_throw): Remove.
12399         * cp-tree.h: Remove ptr_ptr_type_node.
12400         * decl.c: Likewise.
12402 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
12404         * decl.c (ptr_ptr_type_node): Define.
12405         (init_decl_processing): Initialize it.
12406         * cp-tree.h: Declare it.
12407         * exception.cc (__cp_exception_info): Use __get_eh_info.
12408         (__cp_push_exception): Likewise.
12409         (__cp_pop_exception): Likewise.
12411         From Scott Snyder <snyder@d0sgif.fnal.gov>:
12412         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12413         saved_pc.
12414         (init_exception_processing): Removed saved_pc initialization.
12416 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
12418         * pt.c (instantiate_decl): Defer all templates but inline functions.
12420 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12422         * init.c (expand_vec_init): Don't fold a list of parameters.
12424         * decl.c (copy_args_p): Handle copy elision for types with virtual
12425         bases.
12426         * call.c (build_over_call): Likewise.
12428 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
12430         * pt.c (lookup_template_function): Copy the template arguments,
12431         not just the list containing them, to the permanent obstack.
12433 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
12435         * except.c (expand_start_catch_block): suspend_momentary for the
12436         terminate handler.
12438         * error.c (dump_decl): Handle LOOKUP_EXPR.
12440 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
12442         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12443         permanent obstack if we are processing a template decl.
12444         * typeck.c (build_static_cast): Likewise.
12445         (build_const_cast): Likewise.
12446         (build_reinterpret_cast): Likewise.
12448         * pt.c (coerce_template_parms): Coerce some expressions, even
12449         when processing_template_decl.
12451 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12453         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12454         handling of pointer difference expressions.
12456         * typeck.c (comp_target_types): Comparison of function/method types
12457         is independent of nptrs.
12459 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
12461         * pt.c (tsubst): Avoid creating pointer to reference and
12462         reference to reference types.
12464 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12466         * parse.y (do_id): New nonterminal.
12467         (template_id): Use it.
12469 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12471         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12472         * spew.c (yylex): Don't do_identifier here.
12473         * decl2.c (build_expr_from_tree): Revert last change.
12475         * decl2.c (build_expr_from_tree): Expand the name for a method call.
12476         * parse.y (object_template_id): Don't try to take the DECL_NAME.
12478 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
12480         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12481         alloc_expr.
12482         * call.c (build_op_delete_call): Adjust.
12484         * except.c (expand_end_catch_block): Lose rethrow region.
12485         (expand_start_catch_block): Likewise.
12486         (expand_end_catch_block): Don't expand_leftover_cleanups.
12488 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12490         * pt.c (tsubst): Remove tree_cons call (places redundant info into
12491         DECL_TEMPLATE_INSTANTIATION).
12493 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12495         * tree.c (is_overloaded_fn): Handle getting a fn template.
12496         (really_overloaded_fn): Likewise.
12497         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12498         * pt.c (check_explicit_specialization): Tweak.
12499         (determine_explicit_specialization): Tweak.
12501         * tree.c, cp-tree.h (get_target_expr): New fn.
12503 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
12505         * pt.c (check_explicit_specialization): Fix misspelling in
12506         diagnostic: `preceeded'.
12507         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12508         `conversiona'.
12510 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
12512         * pt.c (determine_explicit_specialization): Avoid an internal
12513         error for bad specializations.
12515         * method.c (build_overload_value): Handle SCOPE_REF.
12517 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
12519         * class.c (prepare_fresh_vtable): Enable even more complex MI
12520         vtable names.
12522 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12524         * exception.cc (__check_eh_spec): Optimize a bit.
12526         * exception.cc (__cp_pop_exception): Lose handler arg.
12527         * except.c (do_pop_exception): Likewise.
12528         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12529         (expand_end_catch_block): Likewise.
12531 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12533         * pt.c (check_explicit_specialization): Complain about using a
12534         template-id for a non-specialization.
12536 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
12538         * repo.c: Prototype rindex only if needed.
12539         * xref.c: Likewise.
12541 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12543         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12545 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12547         * typeck.c (build_const_cast): Handle references here instead of
12548         handing off to convert_to_reference.
12550         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12551         TerminateFunctionCall.
12552         (init_exception_processing): Likewise.  Terminate et al are now
12553         the fns, not ADDR_EXPRs.
12554         (various): Lose redundant assemble_external calls.
12555         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12557         * cp-tree.h (struct lang_decl_flags): Add comdat.
12558         (DECL_COMDAT): New macro.
12559         * decl.c (duplicate_decls): Propagate it.
12560         (cp_finish_decl): Handle it.
12561         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12563         * class.c: Remove static pending_hard_virtuals.
12564         (add_virtual_function): Take pointers to pending_virtuals
12565         and pending_hard_virtuals.
12566         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
12568 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
12570         * decl2.c (import_export_vtable): If we support one_only but not
12571         weak symbols, mark instantiated template vtables one_only.
12572         (import_export_decl): Likewise for tinfo functions.
12573         (finish_vtable_vardecl): Also write out vtables from explicitly
12574         instantiated template classes.
12575         * pt.c (mark_class_instantiated): Revert last change.
12577         * except.c (expand_throw): Call mark_used on the destructor.
12579 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
12581         * lex.c (lang_init): Enable flag_exceptions by default if no
12582         command line switch was specified.
12584 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
12586         * pt.c (unify): Handle `void' template parameters in
12587         specializations.
12589 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
12591         * rtti.c (build_dynamic_cast): Handle template case here.
12592         (build_dynamic_cast_1): Not here.
12594         * typeck2.c (digest_init): Make copies where appropriate.
12596         * decl2.c (delete_sanity): resolve_offset_ref.
12598         * except.c: Call terminate without caching so many bits.
12600         * except.c (expand_start_catch_block): Fix catching a reference
12601         to pointer.
12603 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12605         * init.c (build_new): Copy size to the saveable obstack.
12607         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12608         TRY_CATCH_EXPR for now.
12610 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12612         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12613         has DECL_LANG_SPECIFIC.
12615         * exception.cc (struct cp_eh_info): Add handlers field.
12616         (__cp_push_exception): Initialize it.
12617         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
12618         (__throw_bad_exception): Remove.
12619         * except.c (call_eh_info): Add handlers field.
12620         (get_eh_handlers): New fn.
12621         (push_eh_cleanup): Increment handlers.
12623 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12625         * except.c (expand_start_eh_spec): Use the try/catch code.
12626         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
12627         doing everything inline.
12628         (init_exception_processing): throw_type_match now takes
12629         const void pointers.
12630         * exception.cc (__check_eh_spec): New fn.
12631         * inc/exception: Neither terminate nor unexpected return.
12632         * decl.c: Make const_ptr_type_node public.
12633         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
12635         * except.c (expand_start_catch_block): We only need the rethrow
12636         region for non-sjlj exceptions.
12637         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
12639 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
12641         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
12642         (various.o): Likewise.
12643         * inc/new: Add placement deletes.  Add throw specs for default new.
12644         * new.cc (set_new_handler): Move here from libgcc2.
12645         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
12646         (new): Move from libgcc2.  Throw bad_alloc.
12647         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
12648         * decl.c (init_decl_processing): Update exception specs on new and
12649         delete.
12651         * method.c (build_decl_overload_real): Don't mess with global
12652         placement delete.
12654         * init.c (build_new): Check for null throw spec, not nothrow_t.
12656         * decl.c (duplicate_decls): Don't complain about different exceptions
12657         from an internal declaration.
12659         * call.c (build_op_delete_call): Fix check for member fns again.
12661         * decl2.c (import_export_decl): Interface hackery affects
12662         virtual synthesized methods.
12664 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12666         * decl.c (start_decl): Don't just complain about a mismatched
12667         scope, fix it.
12669         * decl.c (make_implicit_typename): Handle case where t is not
12670         actually from context.
12671         * tree.c (get_type_decl): Lose identifier case.
12672         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
12673         * parse.y (nonnested_type): Just use lookup_name.
12674         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
12676 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
12678         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
12679         T was built in C language context (for example, by
12680         output_func_start_profiler).
12682 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
12684         * decl.c (make_implicit_typename): New fn.
12685         (lookup_name_real): Use it.  Use current_class_type as the context.
12687 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
12689         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
12691 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12693         * friend.c (do_friend): Warn about non-template friends in templates.
12695         * call.c (build_op_delete_call): Fix handling of inherited delete.
12697         * search.c (dfs_record_inheritance): Ignore template type parms.
12699 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
12701         * call.c (build_new_op): Fix copy error.
12702         (build_op_new_call): New fn.
12703         (build_op_delete_call): New fn.
12704         * cp-tree.h: Declare them.
12705         * init.c (build_new): Use them.  Support placement delete.
12706         (build_x_delete): Use build_op_delete_call.
12707         (build_delete): Likewise.
12708         * decl2.c (delete_sanity): Likewise.
12709         (coerce_delete_type): Don't complain about placement delete.
12711 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12713         * call.c (build_new_function_call): Remove unused 'obj' parm.
12714         * cp-tree.h, typeck.c: Adjust.
12716         * init.c (build_new): Make the cleanup last longer.
12717         (expand_vec_init): Call do_pending_stack_adjust.
12719 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
12721         * pt.c (do_type_instantiation): Fix typo.
12722         (mark_class_instantiated): If we support one_only but not weak
12723         symbols, don't mark this as known.
12725         * init.c (build_new): Handle vec delete in EH cleanup.
12727 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12729         * call.c (build_method_call): Call complete_type before checking
12730         for destructor.
12732 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
12734         * decl.c (add_block_current_level): Delete.
12735         * init.c (build_vec_delete_1): Delete build_block and
12736         add_block_current_level calls.
12738 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
12740         * init.c (build_new): Handle freeing allocated memory when the
12741         constructor throws.
12743         * call.c (build_new_method_call): Fix flags arg.
12745         * pt.c (do_type_instantiation): Don't try to instantiate
12746         member templates.
12747         (mark_decl_instantiated): If we support one_only but not
12748         weak symbols, mark this one_only.
12749         * decl2.c (import_export_vtable): Don't defer handling of vtables
12750         if MULTIPLE_SYMBOL_SPACES.
12752 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12754         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
12756 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
12758         * except.c (do_pop_exception): Return a value.
12760 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
12762         * call.c (build_new_method_call): Handle getting a
12763         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
12764         if we got template parms.
12765         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
12766         not just the args.
12767         * decl2.c (build_expr_from_tree): Tweak last change.
12768         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
12769         (maybe_fold_nontype_arg): Split out from tsubst_copy.
12770         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
12772 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
12774         * pt.c (tsubst_copy): Handle explicit template arguments in
12775         function calls.
12776         * typeck.c (build_x_function_call): Likewise.
12777         * decl2.c (build_expr_from_tree): Lookup function name if it
12778         hasn't been done.
12780         * pt.c (tsubst): Instantiate template functions properly when
12781         template parameter does not appear in function arguments and return
12782         type.
12783         (comp_template_args): Handle member templates required by tsubst.
12785 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12787         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
12788         previous change.
12790 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12792         * pt.c (coerce_template_parms): Tweak error message.
12794         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
12795         return type defaults to `int', even if there are storage-class
12796         specifiers.
12798 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12800         Complete nested exception support.
12801         * except.c (do_pop_exception): Split out...
12802         (push_eh_cleanup): From here.  Handle the EH region by hand.
12803         (expand_start_catch_block): Add a new level for the catch parm.
12804         Move the rethrow region outside the two cleanup regions.
12805         Protect the initializer for the catch parm with terminate.
12806         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
12807         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
12808         popping off the middle of the stack.
12809         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
12810         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
12811         (build_cplus_new): Only wrap CALL_EXPRs.
12812         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
12813         the constructor call.
12815 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12817         * Make-lang.in (c++.distdir): Make inc subdirectory.
12819 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12821         * decl2.c (finish_file): Put back some code.
12823 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12825         * decl2.c (finish_file): Remove redundant code.
12826         * method.c (emit_thunk): Don't let the backend defer generic thunks.
12828 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
12830         * except.c (call_eh_info): Split out...
12831         (push_eh_info): From here.
12832         (expand_builtin_throw): Use it.
12833         (expand_start_catch_block): Move region start back.
12835 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
12837         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
12838         (real_yylex): Record wide strings using target endianness, not host.
12840 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
12842         * repo.c (rindex): Add decl unconditionally.
12843         (get_base_filename, open_repo_file): Don't cast rindex.
12844         * xref.c (rindex): Add decl unconditionally.
12845         (index): Remove unused decl.
12846         (open_xref_file): Don't cast rindex.
12848 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12850         * class.c (build_vbase_path): Propagate the result type properly.
12852 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
12854         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
12855         remaining use of saved_throw_type with a call to get_eh_type.
12857 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
12859         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
12860         (file_name_nondirectory): New function, doing the same as the macro.
12861         (set_typedecl_interface_info): Use it instead of the macro.
12862         (check_newline): Likewise.
12863         (handle_cp_pragma): Likewise.
12865         * repo.c (get_base_filename): Cast result of rindex to char*.
12866         (open_repo_file): Likewise.
12867         * xref.c (open_xref_file): Likewise.
12868         * error.c (dump_char): Make its arg int, not char.
12870         * except.c (push_eh_info): Pass the number of fields - 1 down, not
12871         the exact number of fields.
12873 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
12875         Support for nested exceptions.
12876         * tinfo2.cc (__is_pointer): New fn.
12877         * exception.cc (struct cp_eh_info): Define.
12878         (__cp_exception_info, __uncatch_exception): New fns.
12879         (__cp_push_exception, __cp_pop_exception): New fns.
12880         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
12881         Lose empty_fndecl.
12882         (init_exception_processing): Likewise.  __eh_pc is now external.
12883         (push_eh_info): New fn.
12884         (get_eh_{info,value,type,caught}): New fns.
12885         (push_eh_cleanup): Just call __cp_pop_exception.
12886         (expand_start_catch_block): Use push_eh_info.  Start the eh region
12887         sooner.
12888         (expand_end_eh_spec): Use push_eh_info.
12889         (expand_throw): Call __cp_push_exception to set up the exception info.
12890         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
12891         when we rethrow.
12892         (expand_builtin_throw): Don't refer to empty_fndecl.
12894 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
12896         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
12898 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
12900         * method.c (build_template_parm_names, build_decl_overload_real):
12901         Add static to definitions.
12902         * pt.c (add_to_template_args, note_template_header,
12903         processing_explicit_specialization, type_unification_real): Likewise.
12904         ({determine,check}_explicit_specialization): Use a single string for
12905         error messages.
12907 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12909         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
12910         (expand_end_catch_block): Likewise.
12911         (expand_end_eh_spec): Likewise.
12913 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
12915         * decl.c (duplicate_decls): Handle template specializations
12916         correctly.
12917         * error.c (dump_function_name): Fix printing of specializations of
12918         member functions that are not member templates.
12919         * cp-tree.h (processing_specialization): Make global.
12920         * pt.c (processing_specialization): Likewise.
12921         * lex.c (cons_up_default_function): Save and restore
12922         processing_specialization to avoid confusion.
12924 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12926         * decl.c (init_decl_processing): Give null_node unknown* type.
12927         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
12928         (common_type): Likewise.
12929         * error.c (args_as_string): Recognize null_node.
12931 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12933         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
12934         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
12936         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
12938         * Make-lang.in (g++): Include prefix.o.
12940 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
12942         * pt.c (determine_explicit_specialization): Initialize "dummy"
12943         to keep Purify quiet.
12945 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12947         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12948         (build_overload_int): Not here.
12950 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
12952         * class.c (build_type_pathname): Remove.
12953         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12955 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
12957         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12958         &&label GNU extension.
12960 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
12962         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12963         so as to avoid incorrect manglings.
12964         * method.c (build_decl_overload_real): Don't mangle return types
12965         for constructors.
12967 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12969         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12970         scratch_tree_cons): Define as macros for now.
12971         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12972         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12973         typeck2.c: Use them and the expression_obstack variants.
12975 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12977         * decl.c (store_return_init): Allow classes with explicit ctors to
12978         be used with the named return values extension.
12980 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
12982         * pt.c (instantiate_decl): Fix previous change.
12984 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12986         * pt.c (tsubst): Fix thinko.
12987         (instantiate_decl): Really use the original template.
12989         * call.c (build_new_method_call): Use simple constructor_name for
12990         error messages.
12992 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
12994         * method.c (build_underscore_int): Don't use ANSI specific
12995         features.
12997 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12999         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
13000         for our key method; it might have been inlined by -O3.
13002 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
13004         * decl.c (make_typename_type): Do not try to call lookup_field for
13005         non-aggregate types.
13007 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
13009         * typeck.c (build_reinterpret_cast): Tweak.
13011 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13013         * typeck.c (build_reinterpret_cast): Converting a void pointer
13014         to function pointer with a reinterpret_cast produces a warning
13015         if -pedantic is issued.
13017 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13019         * typeck.c (c_expand_return): Don't warn about returning a
13020         reference-type variable as a reference.
13022 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13024         * method.c (build_static_name): Fix typo.
13026 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
13028         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
13029         OLDDECL before we try to do DECL_USE_TEMPLATE.
13031 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13033         * decl.c (duplicate_decls): Don't warn about template instances.
13035         * typeck.c (mark_addressable): Lose ancient code that unsets
13036         DECL_EXTERNAL.
13038         * pt.c (do_decl_instantiation): Lose support for instantiating
13039         non-templates.
13041         * call.c (build_new_function_call): Fix handling of null explicit
13042         template args.
13043         (build_new_method_call): Likewise.
13045 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
13047         * method.c (build_underscore_int): Fix typo.
13049 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
13051         * tree.c (print_lang_statistics): #if 0 call to
13052         print_inline_obstack_statistics until its definition is checked in.
13054 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13056         * decl2.c (finish_file): Move dump_tree_statistics to end.
13058         * pt.c (instantiate_decl): Look for the original template.
13059         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
13060         of member templates.
13062 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13064         * Makefile.in (g++FAQ.*): New rules.
13065         (CONFLICTS): Update.
13066         * g++FAQ.texi: Moved from libg++.
13068         * parse.y (PFUNCNAME): Only specify the type once.
13070 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
13072         * lex.c (real_yylex): Clean up the code to fully behave the way
13073         the c-lex.c parser does for complex and real numbers.
13075 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13077         * method.c (build_decl_overload_real): Reformat.
13079 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
13081         * method.c (synthesize_method): If at_eof, determine our linkage.
13083 1997-09-29  Paul Eggert  <eggert@twinsun.com>
13085         * lex.c (real_yylex): Treat `$' just like `_', except issue a
13086         diagnostic if !dollars_in_ident or if pedantic.
13088         * lang-specs.h (@c++): -ansi no longer implies -$.
13090         * decl2.c (lang_decode_option):
13091         -traditional and -ansi now do not mess with
13092         dollars_in_ident.
13094 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
13096         * Makefile.in (parse.o, decl.o): Also depend on
13097         $(srcdir)/../except.h $(srcdir)/../output.h.
13098         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
13099         $(srcdir)/../except.h $(srcdir)/../output.h.
13100         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
13101         ../insn-codes.h.
13103         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
13105         * expr.c (cplus_expand_expr): Make it static.
13107         * decl2.c, init.c, typeck.c: Include "expr.h".
13108         (expand_expr): Use proper values when calling the function.
13110 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13112         * lang-options.h: New -Wold-style-cast flag.
13113         * cp-tree.h (warn_old_style_cast): New variable.
13114         * decl2.c (warn_old_style_cast): Likewise.
13115         (lang_decode_option): Support -Wold-style-cast.
13116         (reparse_absdcl_as_casts): Produce old-style-cast warning.
13118 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13120         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
13121         TREE_USED, reset value based on already_used.
13123         * init.c (expand_member_init): Revert change.
13125 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13127         * cp-tree.h, decl.c, decl2.c, pt.c:
13128         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
13130         * decl2.c (lang_decode_option): Add missing ;.
13132 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13134         * friend.c (do_friend): Disable injection for all template-derived
13135         decls.
13136         * decl2.c (lang_decode_option): Handle -fguiding-decls.
13137         * parse.y (notype_template_declarator): New nonterminal.
13138         (direct_notype_declarator): Use it.
13139         (complex_direct_notype_declarator): Likewise.
13140         (object_template_id): Accept any kind of identifier after TEMPLATE.
13141         (notype_qualified_id): Don't add template declarators here.
13143 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
13145         * call.c (add_template_candidate): Add explicit_targs parameter.
13146         (build_scoped_method_call): Use it.
13147         (build_overload_call_real): Likewise.
13148         (build_user_type_conversion_1): Likewise.
13149         (build_new_function_call): Likewise.
13150         (build_object_call): Likewise.
13151         (build_new_op): Likewise.
13152         (build_new_method_call): Likewise.
13153         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
13154         (build_new_method_call): Likewise.
13156         * class.c (finish_struct_methods): Add specialization pass to
13157         determine which methods were specializing which other methods.
13158         (instantiate_type): Handle TEMPLATE_ID_EXPR.
13160         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
13162         * cp-tree.h (name_mangling_version): New variable.
13163         (flag_guiding_decls): Likewise.
13164         (build_template_decl_overload): New function.
13165         (begin_specialization): Likewise.
13166         (reset_specialization): Likewise.
13167         (end_specialization): Likewise.
13168         (determine_explicit_specialization): Likewise.
13169         (check_explicit_specialization): Likewise.
13170         (lookup_template_function): Likewise.
13171         (fn_type_unification): Add explicit_targs parameter.
13172         (type_unification): Likewise.
13174         * decl.c (duplicate_decls): Add smarts for explicit
13175         specializations.
13176         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
13177         specializations.
13178         (grokfndecl): Call check_explicit_specialization.
13180         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
13181         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
13182         (check_classfn): Handle specializations.
13184         * error.c (dump_function_name): Print specialization arguments.
13186         * friend.c (do_friend): Don't call pushdecl for template
13187         instantiations.
13189         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
13191         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
13192         and -fno-guiding-decls.
13194         * lex.c (identifier_type): Return PFUNCNAME for template function
13195         names.
13197         * method.c (build_decl_overload_real): New function.
13198         (build_template_parm_names): New function.
13199         (build_overload_identifier): Use it.
13200         (build_underscore_int): New function.
13201         (build_overload_int): Use it.  Add levels for template
13202         parameters.
13203         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
13204         (build_overload_nested_names): Handle template type parameters.
13205         (build_template_decl_overload): New function.
13207         * parse.y (YYSTYPE): New ntype member.
13208         (nested_name_specifier): Use it.
13209         (nested_name_specifier_1): Likewise.
13210         (PFUNCNAME): New token.
13211         (template_id, object_template_id): New non-terminals.
13212         (template_parm_list): Note specializations.
13213         (template_def): Likewise.
13214         (structsp): Likewise.
13215         (fn.def2): Handle member template specializations.
13216         (component_decl_1): Likewise.
13217         (direct_notype_declarator): Handle template-ids.
13218         (component_decl_1): Likewise.
13219         (direct_notype_declarator): Handle template-ids.
13220         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
13222         * pt.c (processing_specializations): New variable.
13223         (template_header_count): Likewise.
13224         (type_unification_real): New function.
13225         (processing_explicit_specialization): Likewise.
13226         (note_template_header): Likewise.
13227         (is_member_template): Handle specializations.
13228         (end_template_decl): Call reset_specialization.
13229         (push_template_decl): Handle member template specializations.
13230         (tsubst): Likewise.
13231         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
13232         (instantiate_template): Handle specializations.
13233         (instantiate_decl): Likewise.
13234         (fn_type_unification): Handle explicit_targs.
13235         (type_unification): Likewise.  Allow incomplete unification
13236         without an error message, if allow_incomplete.
13237         (get_bindings): Use new calling sequence for fn_type_unification.
13239         * spew.c (yylex): Handle PFUNCNAME.
13241         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
13242         (really_overloaded_fn): Likewise.
13243         (get_first_fn): Handle function templates.
13245         * typeck.c (build_x_function_call): Use really_overloaded_fn.
13246         Handle TEMPLATE_ID_EXPR.
13247         (build_x_unary_op): Likewise.
13248         (build_unary_op): Likewise.
13249         (mark_addressable): Templates whose address is taken are marked
13250         as used.
13252 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13254         * decl.c (init_decl_processing): Declare __builtin_constant_p as
13255         accepting any kind of type, not only int.
13257 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13259         * search.c (get_matching_virtual): Notice virtual bases when sorrying
13260         about covariant returns.
13262         * parse.y (member_init): Also imply typename here.  Remove ancient
13263         extension for initializing base members.
13265 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13267         Handle multi-level typenames and implicit typename in base list.
13268         * parse.y (typename_sub{,[0-2]}): New rules.
13269         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
13270         (nonnested_type): New rule.
13271         (complete_type_name): Use it.
13272         (base_class.1): Use typename_sub and nonnested_type.
13273         (nested_name_specifier): Don't elide std:: here.
13274         * decl.c (make_typename_type): Handle getting a type for NAME.
13275         (lookup_name_real): Turn std:: into :: here.
13277         Rvalue conversions were removed in London.
13278         * call.c (is_subseq): Don't consider lvalue transformations.
13279         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
13280         (joust): Re-enable ?: kludge.
13282 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
13284         * decl.c (start_function): Up warning of no return type to be a
13285         pedwarn.
13287 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13289         * init.c (expand_member_init): Don't set TREE_USED.
13290         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
13291         set,don't clear TREE_USED wholesale.
13293 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
13295         * call.c (build_over_call): Do require_complete_type before
13296         build_cplus_new.
13298 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13300         * search.c (lookup_field): Call complete_type in all cases.
13302         * decl.c (finish_function): Just warn about flowing off the end.
13304 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13306         * decl.c (grokparms): Don't bash a permanent list node if we're
13307         in a function.
13309 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
13311         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
13313 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13315         * call.c (build_new_op): Give better error for syntactically
13316         correct, but semantically invalid, use of undeclared template.
13318         * call.c (compare_qual): Handle pmfs.
13320         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
13321         after the exception spec.
13323 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13325         * call.c (null_ptr_cst_p): Integer type, not integral type.
13327         * call.c (joust): Disable warnings until they can be moved to the
13328         right place.
13330 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
13332         * Makefile.in, config-lang.in:  Convert to autoconf.
13334 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13336         * decl.c (lookup_name_real): Add implicit 'typename' to types from
13337         base classes.
13339         * pt.c (most_specialized_class): Fix typo.
13340         (tsubst): Move constant folding to TREE_VEC case.
13342 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
13344         * pt.c (do_poplevel): Don't warn about unused local variables
13345         while processing_template_decl since we don't always know whether
13346         or not they will need constructing/destructing.
13348         * pt.c (uses_template_parms): Check the values of an enumeration
13349         type to make sure they don't depend on template parms.
13351         * decl.c (make_typename_type): Don't lookup the field if the
13352         context uses template parms, even if we're not
13353         processing_template_decl at the moment.
13355         * pt.c (coerce_template_parms): Avoid looking at the
13356         TYPE_LANG_DECL portion of a typename type, since there won't be
13357         one.
13358         (tsubst): Do constant folding as necessary to make sure that
13359         arguments passed to lookup_template_class really are constants.
13361 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13363         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
13364         * decl2.c (finish_file): Only register exception tables if we
13365         need to.
13367         * decl.c (init_decl_processing): Add __builtin_[fs]p.
13369 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13371         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
13373 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
13375         * error.c (dump_decl): Avoid crashing when presented with a
13376         uninitialized constant, as can occur with a template parameter.
13377         (dump_expr): Make sure that there are enough levels of
13378         current_template_parms before we start diving through them.
13380 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
13382         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
13383         c-typeck.c.
13385 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13387         * except.c (expand_throw): Call build_delete for all
13388         exception types, not just objects with destructors.
13390 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
13392         * decl.c (current_local_enum): Remove static.
13393         * pt.c (tsubst_enum): Save and restore value of current_local_enum
13394         in case template is expanded in enum decl.
13395         (instantiate_class_template): Use new tsubst_enum signature.
13396         (tsubst_expr): Likewise.
13398 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
13400         * pt.c (begin_member_template_processing): Take a function as
13401         argument, not a set of template arguments.  Use the template
13402         parameters, rather than the arguments.  Handle non-type parameters
13403         correctly.  Push a binding level for the parameters so that multiple
13404         member templates using the same parameter names can be declared.
13405         (end_member_template_processing): Pop the binding level.
13406         (push_template_decl): Mark member templates as static when
13407         appropriate.
13409         * lex.c (do_pending_inlines): Pass the function, not its template
13410         arguments, to begin_member_template_processing.
13411         (process_next_inline): Likewise.
13412         (do_pending_defargs): Likewise.
13414         * error.c (dump_expr): Obtain the correct declaration for a
13415         TEMPLATE_CONST_PARM.
13417         * call.c (add_template_conv_candidate): New function.
13418         (build_object_call): Handle member templates, as done in the other
13419         build_ functions.
13421 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
13423         * decl.c (replace_defag): Undo previous change.
13424         * lex.c (do_pending_defargs): Deal with member templates.
13426         * pt.c (is_member_template): Avoid crashing when passed a
13427         non-function argument.
13429 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13431         * class.c (grow_method): Remove check for redeclaration.
13433 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
13435         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13436         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13437         (PRIMARY_TEMPLATE_P): Use it.
13438         * call.c (build_overload_call_real): Use it.
13439         * class.c (instantiate_type): Likewise.
13440         * decl.c (decls_match): Likewise.
13441         * method.c (build_overload_identifier): Likewise.
13442         * pt.c (push_template_decl): Likewise.
13443         (classtype_mangled_name): Likewise.
13444         (lookup_template_class): Likewise.
13446         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13447         DECL_NTPARMS to conform to usage elsewhere.
13448         * call.c (add_template_candidate): Likewise.
13449         * class.c (instantiate_type): Likewise.
13450         * pt.c (instantiate_template): Likewise.
13451         (get_bindings): Likewise.
13453         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13454         is_member_template.
13456         * pt.c (unify): Undo changes to allow multiple levels of template
13457         parameters.
13458         (type_unification): Likewise.
13459         (fn_type_unification): Likewise.
13460         (get_class_bindings): Likewise.
13461         * cp-tree.h (Likewise).
13463         * decl.c (replace_defarg): Check that the type of the default
13464         parameter does not invlove a template type before complaining
13465         about the initialization.
13467         * error.c (dump_expr): Deal with template constant parameters in
13468         member templates correctly.
13470         * pt.c (is_member_template): Deal with class specializations
13471         correctly.
13472         (tsubst): Handle "partial instantiation" of member templates
13473         correctly.
13475 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
13477         * pt.c (type_unification): Change calling sequence to allow for
13478         multiple levels of template parameters.
13479         (tsubst_expr): Likewise.
13480         (tsubst): Likewise.
13481         (tsubst_copy): Likewise.
13482         (instantiate_template): Likewise.
13483         (unify): Likewise.
13484         * call.c (build_overload_call_real): Use it.
13485         (add_builtin_candidate): Use it.
13486         (build_new_method_call): Use it.
13487         * class.c (instantiate_type): Use it.
13488         * decl.c (grokdeclarator): Use it.
13489         * decl2.c (finish_file): Use it.
13490         * method.c (build_overload_identifier): Use it.
13492         * call.c (add_template_candidate):  Add additional parameter for
13493         the function return type.  Call fn_type_unification istead of
13494         type_unification.
13495         (build_user_type_conversion_1): Handle member templates.
13496         (build_new_function_call): Likewise.
13497         (build_new_op): Likewise.
13498         (build_new_method_call): Likewise.
13500         * class.c (grow_method): Don't give an error message indicating
13501         that two member templates with the same name are ambiguous.
13502         (finish_struct): Treat member template functions just like member
13503         functions.
13505         * cp-tree.h (check_member_template): Add declaration.
13506         (begin_member_template_processing): Likewise.
13507         (end_member_template_processing): Likewise.
13508         (fn_type_unification): Likewise.
13509         (is_member_template): Likewise.
13510         (tsubst): Change prototype.
13511         (tsubst_expr): Likewise.
13512         (tsubst_copy): Likewise.
13513         (instantiate_template): Likewise.
13514         (get_bindings): Likewise.
13516         * decl.c (decls_match): Handle multiple levels of template
13517         parameters.
13518         (pushdecl): Handle template type params just like other type
13519         declarations.
13520         (push_class_level_binding): Return immediately if the
13521         class_binding_level is NULL.
13522         (grokfndecl): If check_classfn() returns a member_template, use
13523         the result of the template, not the template itself.
13525         * decl2.c (check_member_template): New function.  Check to see
13526         that the entity declared to be a member template can be one.
13527         (check_classfn): Allow redeclaration of member template functions
13528         with different types; the new functions can be specializations or
13529         explicit instantiations.
13531         * error.c (dump_decl): Handle multiple levels of template
13532         parameters.
13533         (dump_function_decl): Update to handle function templates.
13535         * lex.c (do_pending_inlines): Set up template parameter context
13536         for member templates.
13537         (process_next_inline): Likewise.
13539         * method.c (build_overload_identifier): Adjust for multiple levels
13540         of template parameters.
13542         * parse.y (fn.def2): Add member templates.
13543         (component_decl_1): Likewise.
13545         * pt.c (begin_member_template_processing): New function.
13546         (end_member_template_processing): Likewise.
13547         (is_member_template): Likewise.
13548         (fn_type_unification): Likewise.
13549         (current_template_parms): Return a vector of all the template
13550         parms, not just the innermost level of parms.
13551         (push_template_decl): Deal with the possibility of member
13552         templates.
13553         (lookup_template_class): Likewise.
13554         (uses_template_parms): Likewise.
13555         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13556         TEMPLATE_CONST_PARM to deal with multiple levels of template
13557         arguments.   Add processing of TEMPLATE_DECL to produce new
13558         TEMPLATE_DECLs from old ones.
13559         (do_decl_instantiation): Handle member templates.
13561         * search.c (lookup_fnfields_1): Handle member template conversion
13562         operators.
13564         * tree.c (cp_tree_equal): Check the levels, as well as the
13565         indices, of TEMPLATE_CONST_PARMs.
13567         * typeck.c (comptypes): Check the levels, as well as the indices,
13568         fo TEMPLATE_TYPE_PARMs.
13569         (build_x_function_call): Treat member templates like member
13570         functions.
13572 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13574         * typeck.c (c_expand_return): Always convert_for_initialization
13575         before checking for returning a pointer to local.
13577         * pt.c (type_unification): If strict and the function parm doesn't
13578         use template parms, just compare types.
13580 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
13582         * method.c (build_overloaded_value): Replace direct call
13583         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13585 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13587         * typeck.c (convert_arguments): Don't arbitrarily choose the first
13588         of a set of overloaded functions.
13590 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13592         * lex.c (real_yylex): Don't elide __FUNCTION__.
13594         * method.c (build_overload_value): Add in_template parm.
13595         (build_overload_int): Likewise.
13596         (build_overload_identifier): Pass it.
13598         * decl.c (duplicate_decls): Don't bash a previous template
13599         definition with a redeclaration.
13601         * pt.c (unify): float doesn't match double.
13603         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13604         TYPE_DECL.  Handle getting non-template types.
13605         * parse.y (explicit_instantiation): Use typespec instead of
13606         aggr template_type.
13608 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
13610         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13612 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
13614         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13615         (compare_ics): Likewise.
13617 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13619         * call.c (joust): Warn about choosing one conversion op over
13620         another because of 'this' argument when the other return type is
13621         better.
13622         (source_type): New fn.
13624         * call.c (build_new_op): Strip leading REF_BIND from first operand
13625         to builtin operator.
13627         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
13628         use its RTL.
13630 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13632         * call.c (null_ptr_cst_p): Remove support for (void*)0.
13634 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
13636         * typeck.c (expand_target_expr): Make definition match declaration.
13638         * class.c (get_basefndecls): Make definition match declaration.
13640 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
13642         * input.c (sub_getch): Eventually give up and release the input file.
13644         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
13645         right place.
13647         * call.c (joust): Tweak message.
13649 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
13651         * error.c (type_as_string): Put const/volatile on template type
13652         parameters where appropriate.
13654 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
13656         * call.c (strictly_better): Make arguments unsigned ints.
13658 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
13660         * lex.c (real_yylex): Refer to __complex instead of complex.
13662 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
13664         * lex.c (real_yylex): Don't use getc directly.
13666 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13668         * call.c (is_subseq): Don't try to be clever.
13670 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13672         * parse.y, pt.c: Include "except.h".
13673         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
13674         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
13675         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
13676         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
13677         prototyping.
13679 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13681         * decl2.c (mark_vtable_entries): Instead of replacing pure
13682         virtuals with a reference to __pure_virtual, copy the decl and
13683         change the RTL.
13685 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13687         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
13689         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
13691         * pt.c (instantiate_class_template): Call repo_template_used
13692         before finish_prevtable_vardecl.
13694         * call.c (is_subseq): New fn.
13695         (compare_ics): Use it.
13697         * repo.c (finish_repo): Don't crash on no args.
13699         * parse.y (named_complex_class_head_sans_basetype): Handle
13700         explicit global scope.
13701         * decl2.c (handle_class_head): New fn.
13703         * pt.c (unify): Add CONST_DECL case.
13705 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13707         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
13709         * cp-tree.h (report_type_mismatch): Add prototype.
13710         * call.c (build_overload_call_real): Remove erroneous fourth
13711         argument to report_type_mismatch.
13712         (build_user_type_conversion_1): Remove erroneous second arg to
13713         tourney.
13714         (build_new_function_call): Likewise.
13715         (build_object_call): Likewise.
13716         (build_new_op): Likewise.
13717         (build_new_method_call): Likewise.
13719 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13721         * error.c (dump_decl): Don't bother processing a function with no
13722         DECL_LANG_SPECIFIC.
13724         * method.c (emit_thunk): Call init_function_start in the macro case.
13726 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13728         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
13729         defined and used to set flag_vtable_thunks.
13731 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13733         * parse.y: Don't clear the inlines from their obstack until they've
13734         all been processed.
13736         * decl.c (duplicate_decls): Don't complain about exception
13737         specification mismatch if flag_exceptions is off.
13739 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
13741         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
13743 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
13745         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
13746         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
13747         Include <stdio.h> before include files that formerly used STDIO_PROTO.
13749         * decl.c, g++spec.c, lex.c, method.c, repo.c:
13750         Include "config.h" first, as per autoconf manual.
13752 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13754         * decl.c (duplicate_decls): Tweak wording.
13755         * lex.c (do_pending_defargs): Don't die if we see a default arg
13756         that isn't a DEFAULT_ARG.
13757         * error.c (dump_expr): Handle DEFAULT_ARG.
13759         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
13760         * lang-options.h: Add -fhandle-exceptions.
13762         * class.c (build_vtable): Vtables are artificial.
13763         (prepare_fresh_vtable): Likewise.
13765 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13767         * cvt.c (ocp_convert): After converting to the target type, set
13768         LOOKUP_NO_CONVERSION.
13770         * call.c (joust): Warn about potentially confusing promotion rules
13771         with -Wsign-promo.
13772         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
13774 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
13776         * exception.cc: Declare __terminate_func with noreturn attribute.
13778 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
13780         * parse.y: Break out eat_saved_input, handle errors.
13781         (function_try_block): Use compstmt instead of compstmt_or_error.
13783 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13785         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
13787 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13789         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
13790         existence of cc1plus check whether $(LANGUAGES) contains C++.
13792 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13794         * method.c (do_build_copy_constructor): When copying an anonymous
13795         union member loop around to handle nested anonymous unions.  Use
13796         the offset of the member relative to the outer structure, not the
13797         union.
13799 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13801         * call.c (resolve_args): New fn.
13802         (build_new_function_call): Use it.
13803         (build_object_call): Likewise.
13804         (build_new_method_call): Likewise.
13806 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13808         * call.c (build_over_call): tsubst all default parms from templates.
13810 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13812         * decl.c (struct cp_function): Add static_labelno.
13813         (push_cp_function_context): Save it.
13814         (pop_cp_function_context): Restore it.
13816 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13818         * typeck.c (build_component_ref_1): Convert from reference.
13820 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13822         * parse.y (current_declspecs, prefix_attributes): Initialize to
13823         NULL_TREE.
13825         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
13826         before we try to force it to be a TREE_LIST.
13827         (decl): Make sure $1.t is non-nil.
13829 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13831         * pt.c (uses_template_parms): Handle template first-parse codes.
13833         * decl.c (cp_finish_decl): Only warn about user-defined statics.
13835 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13837         * pt.c (unify): Handle BOOLEAN_TYPE.
13839         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
13840         * pt.c (tsubst): Don't set it.
13841         * call.c (build_over_call): Use uses_template_parms.
13843 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13845         * method.c (build_overload_nested_name): Use static_labelno
13846         instead of var_labelno.
13847         (build_qualified_name): New fn.
13848         (build_overload_name): Split out from here.
13849         (build_static_name): Use build_qualified_name.
13850         * decl.c (cp_finish_decl): Statics in extern inline functions
13851         have comdat linkage.
13852         (start_function): Initialize static_labelno.
13854 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13856         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
13857         before "all member functions in class [] are private".
13859 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13861         * lex.c (do_scoped_id): convert_from_reference.
13862         * init.c (build_offset_ref): Likewise.
13864 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13866         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
13868 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13870         * typeck.c (get_member_function_from_ptrfunc): Promote index
13871         before saving it.
13873 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13875         * tree.c (layout_basetypes): Move non-virtual destructor warning.
13876         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
13878 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13880         * decl.c (grokdeclarator): Call add_defarg_fn for the function
13881         type, too.
13882         * lex.c (add_defarg_fn): Adjust.
13883         (do_pending_defargs): Adjust.  Don't skip the first parm.
13885 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13887         * decl.c (build_enumerator): Global enumerators are also readonly.
13889         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
13890         (build_dynamic_cast): Call it and convert_from_reference.
13892         * lex.c (add_defarg_fn): New fn.
13893         (snarf_defarg): Don't add to defarg_types.
13894         (do_pending_defargs): Lose defarg_types.  All fns we process now
13895         have defargs.
13896         * decl.c (grokfndecl): Call add_defarg_fn.
13898         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
13899         * cp-tree.def: Add DEFAULT_ARG.
13900         * spew.c (yylex): Call snarf_defarg as appropriate.
13901         * parse.y: New tokens DEFARG and DEFARG_MARKER.
13902         (defarg_again, pending_defargs, defarg, defarg1): New rules.
13903         (structsp): Use pending_defargs.
13904         (parms, full_parm): Use defarg.
13905         * lex.c (init_lex): Initialize inline_text_firstobj.
13906         (do_pending_inlines): Never pass the obstack to feed_input.
13907         (process_next_inline): Call end_input instead of restore_pending_input.
13908         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
13909         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
13910         * input.c (end_input): New fn.
13911         (sub_getch): At the end of some fed input, just keep returning EOF
13912         until someone calls end_input.
13913         Remove 'obstack' field from struct input_source.
13914         * decl.c (grokparms): Handle DEFAULT_ARG.
13915         (replace_defarg): New fn.
13916         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
13918 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13920         * call.c (implicit_conversion): If nothing else works, try binding
13921         an rvalue to a reference.
13923 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
13925         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
13926         ifndef for Cygwin32 to include SIGSEGV.
13928 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13930         * class.c (finish_struct_1): Only complain about pointers without
13931         copy stuff if there are any constructors.
13933         * rtti.c (build_dynamic_cast): Call complete_type on the types.
13935         * decl.c (grokfndecl): If the function we chose doesn't actually
13936         match, die.
13938         * decl2.c (grokclassfn): Don't specify 'const int' for the
13939         artificial destructor parm.
13941         * pt.c (type_unification): If we are called recursively, nothing
13942         decays.
13944 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
13946         * decl.c (init_decl_processing): Stop trying to catch signals
13947         other than SIGABRT since the Cygwin32 library doesn't support
13948         them correctly yet.  This fixes a situation in which g++ causes
13949         a hang on SIGSEGVs and other such signals in our Win32-hosted
13950         tools.
13952 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
13954         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13956 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13958         * typeck2.c (store_init_value): Always return the value if our
13959         type needs constructing.
13961         * method.c (hack_identifier): Convert class statics from
13962         reference, too.
13964 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13966         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13968 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
13970         * typeck.c (c_expand_return): Make sure we clean up temporaries at
13971         the end of return x;
13973 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13975         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13977 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
13979         * except.c (expand_builtin_throw): Add support
13980         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13982 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13984         * repo.c (extract_string): Null-terminate.
13986         * cp-tree.h (TI_SPEC_INFO): New macro.
13987         (CLASSTYPE_TI_SPEC_INFO): New macro.
13988         * pt.c (push_template_decl): Correctly determine # of template parms
13989         for partial specs.
13991         * call.c (compare_ics): Really fix 'this' conversions.
13993         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13994         non-template fn.
13996         * pt.c (push_template_decl): Complain about mismatch in # of
13997         template parms between a class template and a member template.
13999 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14001         * method.c (synthesize_method): You can't call
14002         function_cannot_inline_p after finish_function.
14003         * decl.c (finish_function): Turn on flag_inline_functions and turn
14004         off DECL_INLINE before handing a synthesized method to the
14005         backend.
14007 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14009         * method.c (synthesize_method): Remove July 30 change to never set
14010         DECL_INLINE if at_eof.
14012 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
14014         * xref.c (GNU_xref_member): Ensure that the node has a
14015         decl_lang_specific part before checking DECL_FRIEND_P.
14017 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14019         * pt.c (instantiate_class_template): Diagnose non-class types used
14020         as bases.
14022 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14024         * typeck.c (build_conditional_expr): Use convert_for_initialization
14025         instead of convert_and_check.
14027 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14029         * parse.y (typespec): Don't pedwarn for typeof.
14031 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
14033         * repo.c (finish_repo): Only check changes if we would write a
14034         repo file.
14036         * call.c (compare_ics): Fix handling of 'this' conversions.
14038         * pt.c (do_decl_instantiation): Support static data too.  Rename
14039         from do_function_instantiation.
14040         * cp-tree.h: Adjust.
14041         * parse.y: Adjust.
14043         * repo.c (extract_string): New fn.
14044         (get_base_filename): Use it.
14045         (init_repo): Compare old args with current args.
14047 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
14049         * Makefile.in, Make-lang.in: Protect C-ls with a comment
14050         character, idea from Paul Eggert <eggert@twinsun.com>.
14052 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
14054         * typeck.c (c_expand_return): Be more persistent in looking for
14055         returned temps.
14057         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
14058         pointer to reference.
14060         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
14062 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14064         * init.c (build_member_call, build_offset_ref):
14065         Use do_scoped_id instead of do_identifier.
14067         * cvt.c (convert): Remove bogosity.
14069 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14071         * cvt.c (build_up_reference): Do checks of ARGTYPE and
14072         TARGET_TYPE before trying to use get_binfo.
14074 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
14076         * cvt.c (build_up_reference): Call get_binfo to get access control.
14078         * decl2.c (import_export_decl): If we don't support weaks, leave
14079         statics undefined.
14081 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
14083         * except.c (expand_builtin_throw): Add support for machines that
14084         cannot access globals after throw's epilogue when
14085         -fno-sjlj-exceptions is used.
14087 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14089         * parse.y: 'std::' becomes '::'.
14090         * lex.c (real_yylex): Remove 'namespace' warning.
14091         * init.c (build_member_call): Ignore 'std::'.
14092         (build_offset_ref): Likewise.
14093         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
14094         (do_toplevel_using_decl): Ignore 'using std::whatever'.
14095         * decl.c (push_namespace): Just sorry.
14096         (pop_namespace): Nop.
14097         (init_decl_processing): Declare std namespace.
14099 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14101         * search.c (push_class_decls): A name which ambiguously refers to
14102         several instantiations of the same template just refers to the
14103         template.
14105 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
14107         * decl.c (build_enumerator): Fix problem with unsigned long
14108         enumerated values being smashed to ints, causing overflow
14109         when computing next enumerated value (for enum values around
14110         MAX_VAL).
14112 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14114         * typeck.c (build_component_ref): Only call mark_used on a decl.
14116 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14118         * typeck.c (build_c_cast): Make the check for a ptr to function
14119         more specific before possible default_conversion call.
14121 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
14123         * except.c (expand_exception_blocks): Simplify and fix and make
14124         sure we don't end a region in a sequence, as expand_end_bindings
14125         doesn't like it.
14127 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
14129         * except.c (init_exception_processing): Mark terminate as not
14130         returning so that the optimizer can optimize better.
14132 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
14134         * cvt.c (convert): Don't do any extra work, if we can avoid it
14135         easily.
14137 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
14139         * *.[chy]: Change cp_convert to ocp_convert, change convert to
14140         cp_convert.  convert is now reserved for the backend, and doesn't
14141         have the semantics a frontend person should ever want.
14143 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14145         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
14146         Lose -traditional support.
14148 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14150         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
14152         * parse.y (self_reference): Do it for templates, too.
14153         * class.c (pushclass): Don't overload_template_name; the alias
14154         generated by build_self_reference serves the same purpose.
14156         * tree.c (list_hash): Make static, take more args.
14157         (list_hash_lookup): Likewise.
14158         (list_hash_add): Make static.
14159         (list_hash_canon): Lose.
14160         (hash_tree_cons): Only build a new node if one isn't already in the
14161         hashtable.
14162         (hash_tree_chain): Use hash_tree_cons.
14163         * cp-tree.h: Adjust.
14164         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
14165         of calling lookup_name.
14167 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14169         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
14170         doesn't refer to the CONST_DECLs.
14172 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
14174         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
14175         is bigger.
14176         (expand_class_desc): Convert the last argument to a sizetype.
14178 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14180         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
14181         __real__): Add reswords.
14182         * hash.h: Regenerate.
14183         * lex.h (rid): Add RID_COMPLEX.
14184         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
14185         * lex.c (init_lex): Add building of RID_COMPLEX.
14186         (real_yylex): General cleanup in line with what c-lex.c also has,
14187         sans the cruft for traditional; add handling of SPEC_IMAG, complex
14188         types, and imaginary numeric constants.
14189         * parse.y (REALPART, IMAGPART): Add tokens.
14190         (unary_expr): Add REALPART and IMAGPART rules.
14191         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
14192         * decl.c (complex_{integer,float,double,long}_type_node): Define
14193         types.
14194         (init_decl_processing): Set up the types.
14195         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
14196         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
14197         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14198         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
14199         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
14200         COMPLEX_TYPE case.
14201         * method.c (build_overload_name): Add handling of the different
14202         COMPLEX_TYPEs, prefixing them with `J'.
14203         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
14204         as a template parm.
14205         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
14206         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
14207         (mapcar): Handle COMPLEX_CST.
14208         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
14209         (common_type): Add code for complex types.
14210         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14211         (convert_for_assignment): Likewise.
14212         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
14214 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14216         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
14217         tsubst_expr, as it might try to do overload resolution.
14219 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14221         * pt.c (instantiate_class_template): Oops.
14223 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14225         * cp-tree.def: Add TAG_DEFN.
14226         * pt.c (tsubst_enum): New fn.
14227         (instantiate_class_template): Use it.
14228         (tsubst_expr): Support TAG_DEFN.
14229         (tsubst): Support local enums.
14230         (tsubst_copy): Likewise.
14231         * decl.c (finish_enum): Likewise.
14232         (start_enum): If this is a local enum, switch to permanent_obstack.
14234 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
14236         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
14237         (finish_function): Put the base init code for constructors just
14238         after the parm cleanup insns.
14239         (struct cp_function): Add last_parm_cleanup_insn.
14240         (push_cp_function_context): Likewise.
14241         (pop_cp_function_context): Likewise.
14243 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14245         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
14247 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14249         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
14250         for THUNK_FNDECL before we switch to temporary allocation.
14252 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14254         * call.c (build_new_op): Handle null arg2 for ?:.
14256 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
14258         * except.c (expand_exception_blocks): Ensure that we flow through
14259         the end of the exception region for the exception specification.
14260         Move exception region for the exception specification in, so that
14261         it doesn't protect the parm cleanup.  Remove some obsolete code.
14262         * decl.c (store_parm_decls): Likewise.
14263         (finish_function): Likewise.
14265 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14267         * init.c (build_new): Fix nothrow handling.
14269 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14271         * init.c (emit_base_init): Don't warn about the initialization
14272         list for an artificial member.
14274 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14276         * expr.c (do_case): Handle !START case for the error msg.
14278 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14280         * decl2.c, lang-options.h: New option -Weffc++.
14281         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
14282         to -Weffc++.
14284         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
14285         to MULTIPLE_SYMBOL_SPACES.
14287 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14289         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
14291         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
14293         * typeck.c (c_expand_return): Don't complain about returning void
14294         to void in an artificial function.
14295         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
14296         don't set DECL_RESULT, set DECL_ARTIFICIAL.
14297         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
14299 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
14301         * init.c (init_decl_processing): Add support for setjmp/longjmp based
14302         exception handling.
14303         * except.c (init_exception_processing): Likewise.
14304         (expand_end_catch_block): Likewise.
14305         (expand_exception_blocks): Likewise.
14306         (expand_throw): Likewise.
14307         * exception.cc (__default_terminate): Likewise.
14309         * init.c (perform_member_init): Use new method of expr level
14310         cleanups, instead of cleanups_this_call and friends.
14311         (emit_base_init): Likewise.
14312         (expand_aggr_vbase_init_1): Likewise.
14313         (expand_vec_init): Likewise.
14314         * decl.c (cp_finish_decl): Likewise.
14315         (expand_static_init): Likewise.
14316         (store_parm_decls): Likewise.
14317         (cplus_expand_expr_stmt): Likewise.
14318         * decl2.c (finish_file): Likewise.
14320         * Make-lang.in (exception.o): Ok to compile with -O now.
14322         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
14323         we know it will be done later by the backend.
14325         * decl2.c (lang_f_options): Remove support for short temps.
14326         * lang-options.h: Likewise.
14328 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14330         * tree.c (varargs_function_p): New fn.
14331         * method.c (emit_thunk): Replace broken generic code with code to
14332         generate a heavyweight thunk function.
14334 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
14336         * pt.c (process_template_parm): pedwarn about floating-point parms.
14338         * decl.c (grokdeclarator): inline no longer implies static.
14340         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
14342 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14344         * class.c (check_for_override): The signature of an overriding
14345         function is not changed.
14347         * call.c (build_over_call): Move setting of conv into the loop.
14348         Note: this change, along with the related changes of the 18th thru
14349         the 20th of April, fix an infinite loop problem in conversions.
14351 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14353         * call.c (build_user_type_conversion_1): Really ignore rvalue
14354         conversions when looking for a REFERENCE_TYPE.
14356         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
14357         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
14358         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
14359         (build_unary_op): Likewise.
14360         * call.c (build_over_call): See through a CONVERT_EXPR around the
14361         ADDR_EXPR for on a temporary.
14362         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
14363         the ADDR_EXPR for a local variable.
14365 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
14367         * call.c (build_user_type_conversion_1): If we're trying to
14368         convert to a REFERENCE_TYPE, only consider lvalue conversions.
14369         (build_new_function_call): Print candidates.
14370         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
14371         (reference_binding): Binding a temporary of a reference-related type
14372         is BAD.
14374 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14376         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
14377         * tinfo2.cc (type_info::before): Likewise.
14379 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
14381         * call.c (implicit_conversion): Oops.
14383 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14385         * call.c (implicit_conversion): Try to find a reference conversion
14386         before binding a const reference to a temporary.
14388 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
14390         * exception.cc (__default_unexpected): Call terminate by default,
14391         so that if the user overrides terminate, the correct function will
14392         be called.
14394 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
14396         * parse.y (left_curly): Avoid trying to use any fields of
14397         error_mark_node, as there aren't any.
14399 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14401         * lex.c (do_identifier): Avoid breaking on overloaded methods
14402         as default arguments.
14404 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
14406         * call.c (add_template_candidate): Initialize the variable "dummy".
14408 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
14410         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
14411         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
14413 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14415         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
14416         (debug_binfo): Delete decl, not needed.
14418         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
14419         promotes_to_aggr_type): Delete fns.
14420         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
14421         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
14422         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
14424         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
14426         * friend.c (is_friend_type): Delete fn.
14427         * cp-tree.h (is_friend_type): Delete decl.
14429         * decl.c (original_result_rtx, double_ftype_double,
14430         double_ftype_double_double, int_ftype_int, long_ftype_long,
14431         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
14432         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
14434         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
14435         fwd decls.
14436         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
14438         * decl.c (pushdecl_nonclass_level): #if 0, unused.
14439         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14441         * lex.c (reinit_lang_specific): #if 0, unused.
14442         * cp-tree.h (reinit_lang_specific): #if 0 decl.
14444         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14445         * cp-tree.h (revert_static_member_fn): Delete decl.
14447         * class.c (root_lang_context_p): Delete fn.
14448         * cp-tree.h (root_lang_context_p): Delete decl.
14450         * decl.c (set_current_level_tags_transparency): #if 0, unused.
14451         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14453         * lex.c (set_vardecl_interface_info): Make static.
14454         * cp-tree.h (set_vardecl_interface_info): Delete decl.
14456         * call.c (find_scoped_type): Make static.
14457         * cp-tree.h (find_scoped_type): Delete decl.
14459         * search.c (convert_pointer_to_vbase): Make static.
14460         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14462         * decl.c (const_ptr_type_node): Likewise.
14463         * cp-tree.h (const_ptr_type_node): Delete decl.
14465         * typeck.c (common_base_type): Make static.
14466         * cp-tree.h (common_base_types): Delete erroneous decl.
14468         * pt.c (classtype_mangled_name): Make static.
14469         * cp-tree.h (classtype_mangled_name): Delete decl.
14471         * lex.c (check_newline): Make static.
14472         * cp-tree.h (check_newline): Delete decl.
14474         * typeck.c (build_x_array_ref): Delete fn, same idea as
14475         grok_array_decl.
14476         * cp-tree.h (build_x_array_ref): Delete decl.
14478         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14479         copy_lang_decl.
14480         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14482         * class.c (build_vtable_entry): Make static.
14483         * cp-tree.h (build_vtable_entry): Delete decl.
14485         * class.c (build_vbase_pointer): Make static.
14486         * cp-tree.h (build_vbase_pointer): Delete decl.
14488         * sig.c (build_sptr_ref): Add forward decl and make static.
14489         * cp-tree.h (build_sptr_ref): Delete decl.
14491         * call.c (build_new_method_call): Add forward decl and make static.
14492         * cp-tree.h (build_new_method_call): Delete decl.
14494         * call.c (build_object_call): Make static.
14495         * class.c (check_for_override, complete_type_p, mark_overriders):
14496         Likewise.
14497         * decl.c (cp_function_chain): Likewise.
14498         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14499         Likewise.
14500         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14501         Likewise.
14502         * tree.c (build_cplus_array_type_1): Likewise.
14503         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14504         (comp_target_parms): Likewise.
14506         * init.c (build_builtin_call): Make static.
14507         * cp-tree.h (build_builtin_call): Delete decl.
14509         * typeck.c (binary_op_error): Delete decl.
14510         * cp-tree.h (binary_op_error): Likewise.
14512 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14514         * call.c (build_method_call): Compare against error_mark_node
14515         directly, rather than the ERROR_MARK tree code.
14516         * cvt.c (cp_convert): Likewise.
14517         * decl.c (print_binding_level): Likewise.
14518         (duplicate_decls): Likewise.
14519         (grokdeclarator): Likewise.
14520         (grokdeclarator): Likewise.
14521         * init.c (expand_aggr_init_1): Likewise.
14522         (decl_constant_value): Likewise.
14523         * method.c (build_opfncall): Likewise.
14524         (hack_identifier): Likewise.
14525         * typeck.c (build_modify_expr): Likewise.
14527         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14529 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14531         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14533         * pt.c (coerce_template_parms): Add new error message.
14535         * method.c (build_overload_value): Implement name mangling for
14536         floating-point template arguments.
14538         * method.c (build_overload_int, icat, dicat): Fix mangling of template
14539         arguments whose absolute value doesn't fit in a signed word.
14541 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14543         * friend.c: New file; put all of the friend stuff in here.
14544         * init.c: Instead of here.
14545         * Makefile.in (CXX_OBJS): Add friend.o.
14546         (friend.o): Add dependencies.
14547         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14549 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14551         * call.c (build_scoped_method_call): Complain if the scope isn't a
14552         base.
14554 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14556         * parse.y (left_curly): Don't crash on erroneous type.
14558         * init.c (build_delete): Fix type of ref.
14560 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14562         * search.c (get_vbase_1): Renamed from get_vbase.
14563         (get_vbase): Wrapper, now non-static.
14564         (convert_pointer_to_vbase): Now static.
14566         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14567         * init.c (build_delete): Pass one.
14568         (build_partial_cleanup_for): Use build_scoped_method_call.
14569         * decl.c (finish_function): Pass a binfo.
14571 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14573         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14575         * typeck.c (build_c_cast): Lose other reference to flag.
14577         * call.c (build_field_call): Don't look for [cd]tor_identifier.
14578         * decl2.c (delete_sanity): Remove meaningless use of
14579         LOOKUP_HAS_IN_CHARGE.
14580         * decl.c (finish_function): Use build_scoped_method_call instead
14581         of build_delete for running vbase dtors.
14582         * init.c (build_delete): Call overload resolution code instead of
14583         duplicating it badly.
14585 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14587         * call.c (build_over_call): Call mark_used before trying to elide
14588         the call.
14590         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14592 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14594         * typeck.c (build_modify_expr): Always pedwarn for a cast to
14595         non-reference used as an lvalue.
14597 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14599         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14601 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14603         * parse.y (handler): Fix template typo.
14605 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14607         * error.c (lang_decl_name): New fn.
14608         * tree.c (lang_printable_name): Use it.
14610 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
14612         * g++spec.c: Include config.h so that we can catch bzero #defines
14613         from the config file.
14615 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
14617         * new1.cc: Include a declaration for malloc, to avoid warning, and
14618         avoid lossing on systems that require one (ones that define malloc
14619         in xm.h).
14621 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14623         * decl2.c (max_tinst_depth): New variable.
14624         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14625         option.
14626         * pt.c (max_tinst_depth): Variable moved.
14627         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
14628         as legal.
14630 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14632         * decl.c (xref_basetypes): Allow a base class that depends on
14633         template parms to be incomplete.
14635         * decl2.c (build_expr_from_tree): Support typeid(type).
14636         * rtti.c (get_typeid): Support templates.
14637         (expand_si_desc, expand_class_desc): Fix string length.
14638         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
14640 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
14642         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
14644         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
14646 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14648         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
14649         smashes together template and non-template decls of the same
14650         signature.
14652 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14654         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
14656 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14658         * decl.c (duplicate_decls): Next route, pedwarn about different
14659         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
14661 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14663         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
14664         (struct lang_type): Delete has_default_implementation member.
14665         Increase dummy to 21.
14666         * decl.c (start_method): Delete usage.
14668         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
14669         store_after_parms, start_decl_1, auto_function): Add decls.
14670         (get_arglist_len_in_bytes, declare_implicit_exception,
14671         have_exceptions_p, make_type_decl, typedecl_for_tag,
14672         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
14673         build_component_type_expr, cplus_exception_name,
14674         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
14675         * call.c (build_this): Make static.
14676         (is_complete): Likewise.
14677         (implicit_conversion): Likewise.
14678         (reference_binding): Likewise.
14679         (standard_conversion): Likewise.
14680         (strip_top_quals): Likewise.
14681         (non_reference): Likewise.
14682         (build_conv): Likewise.
14683         (user_harshness): Likewise.
14684         (rank_for_ideal): Likewise.
14685         * decl.c (start_decl_1): Delete forward decl.
14686         (push_decl_level): Make static.
14687         (resume_binding_level): Make static.
14688         (namespace_bindings_p): Make static.
14689         (declare_namespace_level): Make static.
14690         (lookup_name_real): Make static.
14691         (duplicate_decls): Make static.  Take register off NEWDECL and
14692         OLDDECL parm decls.
14693         * decl2.c (get_sentry): Make static.
14694         (temp_name_p): Delete fn.
14695         * except.c (auto_function): Delete decl.
14696         * lex.c (handle_{cp,sysv}_pragma): Make static.
14697         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
14698         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
14699         * pt.c (tsubst_expr_values): Make static.
14700         * rtti.c (combine_strings): Delete decl.
14702 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14704         * pt.c (push_template_decl): Handle getting a typedef.
14706         * call.c (build_new_function_call): Complain about void arg.
14708 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14710         * decl.c (duplicate_decls): Give pedwarn of different exceptions
14711         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
14713 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
14715         * except.c (expand_throw): Don't expand the cleanup tree here,
14716         since we are not going to write the rtl out.  Fixes problem with
14717         -g -O on SPARC.
14719 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
14721         * Make-lang.in: Add $(exeext) as necessary.
14723 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
14725         * parse.y (handler_seq): Must have at least one catch clause.
14727 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14729         * call.c (add_builtin_candidate): Restore ?: hack.
14731         * decl.c (grok_op_properties): More warnings.
14733 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14735         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
14736         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
14738         * decl.c (duplicate_decls): Scale back to a warning, and only do
14739         'em if -pedantic.
14741 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
14743         * decl.c (duplicate_decls): pedwarn mismatched exception
14744         specifications.
14746 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
14748         * call.c (build_new_method_call): Don't display the invisible
14749         argument for controlling virtual bases.
14751 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
14753         * new: Add nothrow new and delete, bad_alloc and throw specifications
14754         for delete.
14755         * decl.c (init_decl_processing): Add throw specification for delete.
14756         * new.cc (nothrow): Define.
14757         * lex.c (real_yylex): Removing warning that throw and friends are
14758         keywords.
14759         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
14760         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
14761         * Make-lang.in: Add new{1,2}.{cc,o}.
14763 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14765         * lex.c (cons_up_default_function): Fix return type of synth op=.
14767         * init.c (emit_base_init): Add warnings for uninitialized members
14768         and bases.
14770         * decl.c (xref_basetypes): Add warning for non-polymorphic type
14771         with destructor used as base type.
14773         * decl.c (grok_op_properties): Add warning for op= returning void.
14774         * typeck.c (c_expand_return): Add warning for op= returning anything
14775         other than *this.
14777         * class.c (finish_struct_1): Add warning for class with pointers
14778         but not copy ctor or copy op=.
14780         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
14781         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
14782         (instantiate_template): If -fexternal-templates, add this
14783         instantiation to pending_templates.
14785         * decl2.c (copy_assignment_arg_p): Disable old hack to support
14786         Booch components.
14788 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
14790         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
14792 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
14794         * call.c (standard_conversion): Handle getting references.  Tack
14795         on RVALUE_CONV here.  Do it for non-class types, too.
14796         (reference_binding): Pass references to standard_conversion.
14797         (implicit_conversion): Likewise.
14798         (add_builtin_candidate): Disable one ?: kludge.
14799         (convert_like): Handle RVALUE_CONVs for non-class types.
14800         (joust): Disable the other ?: kludge.
14802 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14804         * decl.c (init_decl_processing): Add code to build up common
14805         function types beforehand, to avoid creation then removal of
14806         things already in the hash table.
14808 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14810         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
14811         the arguments.
14813         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
14814         current_template_parms.
14816 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
14818         * search.c (lookup_field): Don't return a function, check want_type.
14820 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14822         * init.c (build_new): Make sure PLACEMENT has a type.
14824 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14826         * init.c (build_new): Support new (nothrow).
14828 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14830         * pt.c (instantiate_decl): Also do push_to_top_level before setting
14831         up DECL_INITIAL.
14833         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
14834         * pt.c (tsubst): Defer instantiation of default args.
14835         * call.c (build_over_call): Until here.
14837 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14839         * search.c (lookup_field): Make sure we have an
14840         IDENTIFIER_CLASS_VALUE before we try to return it.
14842 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14844         * call.c (build_method_call): Delete unused var PARM.
14845         (build_overload_call_real): Likewise.
14846         (build_object_call): Delete unused var P.
14847         (build_new_op): Likewise.
14848         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
14849         var definitions, which are never used.
14850         (shadow_tag): Delete unused var FN.
14851         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
14852         * init.c (build_new): Delete unused var ALLOC_TEMP.
14853         * method.c (hack_identifier): Delete unused var CONTEXT.
14854         (do_build_copy_constructor): Delete unused var NAME.
14855         (synthesize_method): Delete unused var BASE.
14856         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
14857         * rtti.c (build_headof): Delete unused var VPTR.
14858         (get_typeid): Delete unused var T.
14859         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
14860         and ORIG_OP2.
14861         (build_ptrmemfunc): Delete unused vars U and NINDEX.
14862         * typeck2.c (build_functional_cast): Delete unused var BINFO.
14864 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14866         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
14867         things in a type being defined.
14868         * decl.c (finish_enum): Reverse the values so that they are in
14869         the correct order.
14871         * pt.c (instantiate_class_template): Don't initialize
14872         BINFO_BASETYPES until the vector is filled out.
14873         (unify): Don't abort on conflicting bindings, just fail.
14874         (instantiate_decl): Do push_tinst_level before any tsubsting.
14876         * method.c (build_overload_value): Handle getting a
14877         TEMPLATE_CONST_PARM for a pointer.
14879 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
14881         * init.c (expand_member_init): Don't give 'not a base' error for
14882         templates.
14884         * pt.c (instantiate_decl): Call import_export_decl later.
14886         * pt.c (instantiate_class_template): Return a value.
14888         * parse.y (extension): New rule for __extension__.
14889         (extdef, unary_expr, decl, component_decl): Use it.
14891 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
14893         * class.c (base_binfo): Remove unused base_has_virtual member.
14894         (finish_base_struct): Likewise.
14895         (finish_struct_1): Likewise.
14897 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
14899         * search.c (expand_upcast_fixups): Fix bogus code generation
14900         problem where the generated code uses the wrong index into the
14901         runtime built vtable on the stack.  Old code could clobber random
14902         stack values.
14904 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
14906         * init.c (perform_member_init): Make sure the partial EH cleanups
14907         live on the function_obstack.
14909 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
14911         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
14912         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
14914 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
14916         * decl.c (grokvardecl): Avoid ANSI style initialization.
14918 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
14920         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
14922 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
14924         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
14926 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14928         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
14929         arguments we compare against.  Start the count of I at 1, not 0,
14930         since argv[0] is still the command.
14932 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
14934         * lang-specs.h: Accept .cp as an C++ extension.
14936 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14938         * cp-tree.h (ptr_reasonably_similar): Add decl.
14940 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14942         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14943         pointer.  New local SPECBITS with the parm's value.
14944         (grokdeclarator): Pass &specbits down.
14946         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14947         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14949         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14950         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14952         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14953         not an error_mark_node.
14955 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14957         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14958         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14960 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
14962         * decl.c (grokdeclarator): When giving an anonymous struct a name,
14963         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14964         not affected).
14966         * typeck2.c (build_m_component_ref): If component is a pointer
14967         to data member, resolve the OFFSET_REF now.
14969         * call.c (convert_like): Don't go into infinite recursion.
14971         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14973         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14974         * tree.c (layout_basetypes): And on the vbase ptr.
14976 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14978         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14979         CHAR_TYPE_SIZE so bool is always the same size as another type.
14981         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14983 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
14985         * decl2.c (grok_x_components): Remove synthesized methods from
14986         TYPE_METHODS of an anonymous union, complain about member
14987         functions.
14988         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14989         anonymous unions.
14990         (finish_function): Just clear the DECL_RTL of our arguments.
14992 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14994         * decl2.c (finish_file): Emit DWARF debugging info for static data
14995         members.
14997         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14999 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
15001         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
15002         IDENTIFIER_NODE.
15004 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15006         * Make-lang.in (g++-cross$(exeext)): Fix typo.
15008 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15010         Make the g++ driver now be a standalone program, rather than one
15011         that tries to run the gcc driver after munging up the options.
15012         * Make-lang.in (g++.c, g++spec.o): New rules.
15013         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
15014         added.
15015         (g++$(exeext)): New rule, based on xgcc rule.
15016         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
15017         * g++spec.c: New file.
15018         * g++.c: Removed file.
15020 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
15022         * cvt.c (build_up_reference): Arrange for any temporary values
15023         that have been keep in registers until now to be put into memory.
15025 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15027         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
15028         that make -j3 bootstrap works better.
15030 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
15032         * decl.c (pushtag): Do pushdecl for anon tags.
15034 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15036         * typeck.c (c_expand_return): Fix logic.
15037         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
15039 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
15041         * g++.c (main): Make sure arglist has a final NULL entry.  Add
15042         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
15043         stdin/stdout of the invoked program are redirected to
15044         nowheresville.
15046 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15048         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
15050 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
15052         * init.c (resolve_offset_ref): Handle obj.vfn better.
15053         * typeck.c (build_component_ref): Set TREE_TYPE on result from
15054         build_vfn_ref.
15056 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
15058         * typeck.c (convert_for_assignment): Also handle anachronistic
15059         implicit conversions from (::*)() to cv void*.
15060         * cvt.c (cp_convert_to_pointer): Likewise.
15062 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15064         * lex.c (handle_cp_pragma): Fix bogus warning.
15066 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
15068         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
15069         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
15071 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15073         * class.c (finish_struct_1): Support DWARF2_DEBUG.
15074         * search.c (dfs_debug_mark): Likewise.
15075         * decl2.c (finish_vtable_vardecl): Likewise.
15076         * decl.c (pushtag, finish_enum): Likewise.
15077         * lex.c (check_newline): Use debug_* instead of calling *out
15078         functions directly.
15080 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15082         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
15083         on some picky hosts.
15085 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15087         * class.c (finish_struct_1): A class has a non-trivial copy
15088         constructor if it has virtual functions.
15090         * cvt.c (cp_convert): Always call a constructor.
15092         * call.c (reference_binding): Still tack on a REF_BIND
15093         for bad conversions.
15094         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
15096         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
15097         (c_expand_return): Likewise.
15098         * typeck2.c (digest_init): Likewise for { }.
15099         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
15100         * cvt.c (cp_convert): Handle failure better.
15102 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15104         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
15105         of GCC be path-relative.
15107 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15109         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
15110         it does need choose-temp.o and pexecute.o.
15112 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15114         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
15115         that we still use it.
15116         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
15118 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15120         * init.c (expand_default_init): Avoid calling constructors to
15121         initialize reference temps.
15123         * cvt.c (convert_to_reference): Fix.
15125 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15127         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
15128         (convert_to_reference): Likewise.
15129         * typeck.c (convert_for_initialization): Likewise.
15130         * init.c (expand_default_init): Likewise.
15131         (expand_aggr_init_1): Likewise.
15132         * cp-tree.h (CONV_NONCONVERTING): Lose.
15133         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
15134         * *.c: Adjust.
15135         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
15137 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
15139         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
15141 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15143         * init.c (expand_aggr_init_1): Don't crash on non-constructor
15144         TARGET_EXPR.
15146 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15148         * g++.c: Include gansidecl.h.
15149         (VPROTO, PVPROTO, VA_START): Delete.
15150         (choose_temp_base_try, choose_temp_base, perror_exec,
15151         run_dos) [__MSDOS__]: Delete fns.
15152         (pfatal_with_name): Delete fn.
15153         (temp_filename): Declare like in gcc.c.
15154         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
15155         (error_count, signal_count): Define.
15156         (error): Delete both definitions.
15157         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
15158         (pfatal_pexecute): Add fn from gcc.c.
15159         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
15160         code to use the pexecute stuff also used by gcc.c.
15161         (MIN_FATAL_STATUS): Define.
15162         * Make-lang.in (g++): Add dependency on and linking with
15163         choose-temp.o and pexecute.o.
15165         * cp-tree.h: Include gansidecl.h.
15166         (STDIO_PROTO): Delete #undef/#define.
15167         * cvt.c (NULL): Delete #undef/#define.
15168         * expr.c (NULL): Likewise.
15169         * init.c (NULL): Likewise.
15170         * rtti.c (NULL): Likewise.
15171         * xref.c (NULL): Likewise.
15173         * cp-tree.h (build_user_type_conversion): Add prototype.
15174         * call.c (build_user_type_conversion): Delete prototype.  Correct
15175         decl of FLAGS arg to be an int.
15176         * cvt.c (build_user_type_conversion): Likewise.
15178 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
15180         * cp-tree.def: Add TRY_BLOCK and HANDLER.
15181         * except.c (expand_start_catch_block): Support templates.
15182         * parse.y (try_block, handler_seq): Likewise.
15183         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
15185 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15187         * pt.c (current_template_args): New fn.
15188         (push_template_decl): Use it.
15189         * decl.c (grokdeclarator): Use it.
15191         * decl2.c (build_expr_from_tree): Dereference ref vars.
15193         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
15194         the decl-specifier-seq.
15196         * decl.c (grok_op_properties): Don't force the type of a conversion
15197         op to be complete.  Don't warn about converting to the same type
15198         for template instantiations.
15200         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
15201         methods.
15203 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
15205         * typeck.c (get_delta_difference): Remove previous bogusness.
15206         Don't give errors if force is set.
15208 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15210         * decl2.c (finish_file): Don't emit debug info.
15211         * decl.c (pushdecl): Lose obsolete code.
15212         (grokdeclarator): Still do the long long thing after complaining.
15213         * search.c (note_debug_info_needed): Don't do anything if we're in a
15214         template.
15215         * method.c (synthesize_method): For non-local classes,
15216         push_to_top_level first.
15218 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
15220         * typeck.c (get_delta_difference): Add no_error parameter.
15221         (build_ptrmemfunc): Call get_delta_difference with no_error set;
15222         we don't want error messages when converting unrelated
15223         pointer-to-member functions.
15225 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
15227         * error.c (dump_expr): Improve the wording on error messages that
15228         involve pointer to member functions.
15230 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
15232         * cvt.c (cp_convert_to_pointer): Move code for conversions from
15233         (::*)() to void* or (*)() up a bit, so that we can convert from
15234         METHOD_TYPEs as well.
15236 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15238         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
15239         There are no 'member' types.
15240         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
15241         (build_x_typeid): Handle errors.
15243 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
15245         * typeck.c (convert_for_assignment): Handle anachronistic implicit
15246         conversions from (::*)() to void* or (*)().
15247         * cvt.c (cp_convert_to_pointer): Likewise.
15248         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
15249         conversions from here.
15250         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
15251         * lang-options.h: Likewise.
15252         * decl2.c (warn_pmf2ptr): Define.
15253         * cp-tree.h: Declare it.
15254         * typeck2.c (digest_init): Allow pmfs down into
15255         convert_for_initialization.
15257 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15259         * typeck.c (c_expand_return): Fix for returning overloaded fn.
15261 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15263         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
15264         * decl.c (grok_reference_init): Pass DIRECT_BIND.
15265         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
15266         DIRECT_BIND.
15267         * call.c (convert_like): Don't pass INDIRECT_BIND.
15268         * typeck.c (convert_arguments): Likewise.
15269         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
15271 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15273         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
15274         similar code in build_up_ref.
15275         * cvt.c (build_up_reference): Drastically simplify.
15277 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
15279         * typeck.c (signed_or_unsigned_type): If the given type already
15280         as the correct signedness, then just return it.
15282         * typeck.c ({un,}signed_type): If can't do anything, call
15283         signed_or_unsigned_type.
15285 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
15287         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
15288         current_class_type is NULL.
15290 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
15292         * class.c (finish_struct_1): Avoid empty structs by adding a field
15293         so layout_type gets the mode right.
15295         * typeck.c (c_expand_return): Drastically simplify.
15297 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15299         * typeck.c (decay_conversion): Handle overloaded methods.
15301 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15303         * call.c (build_over_call): A TARGET_EXPR has side-effects.
15305 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
15307         * cvt.c (convert_to_pointer_force): Add code to support pointer to
15308         member function to pointer to function conversions.
15309         * init.c (resolve_offset_ref): Add code to allow faked up objects,
15310         ignoring them if they are not used, and giving an error, if they
15311         are needed.
15312         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
15313         code, and so that we can give an error, if we needed an object,
15314         and one was not provided.
15315         (build_c_cast): Don't call default_conversion when we want to
15316         convert to pointer to function from a METHOD_TYPE.
15318 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
15320         * Make-lang.in (cplib2.ready): Fix logic.
15322         * decl.c (shadow_tag): Only complain about non-artificial function
15323         members.
15325         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
15327 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
15329         * expr.c (cplus_expand_expr): Pre-tweak call_target like
15330         expand_inline_function would.
15332         * pt.c (mark_decl_instantiated): If extern_p, call
15333         mark_inline_for_output.
15335 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
15337         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
15338         pmd conversions.
15340         * typeck.c (get_delta_difference): Fix wording, as we can be used
15341         for pointer to data members.
15343 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
15345         * pt.c (tsubst): If the function decl isn't a member of this
15346         template, return a copy of the decl (including copying the
15347         lang-specific part) so we don't hose ourselves later.
15349 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15351         * class.c (finish_struct): Remove DWARF-specific tag handling.
15352         * decl.c (pushtag): Likewise.
15353         (finish_function): Always clear DECL_ARGUMENTS on function decls with
15354         no saved RTX.
15355         * decl2.c (finish_file): Emit DWARF debugging info for static data
15356         members.
15358 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
15360         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
15361         isn't the same as the new one before we whack it.
15363 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15365         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
15366         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
15367         warn_traditional and warn_strict_prototypes; remove ancient
15368         'overload' code; remove references to flag_traditional.
15370 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
15372         * input.c (sub_getch): Handle 8-bit characters in string literals.
15374 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
15376         * tree.c (mapcar): Handle CONSTRUCTORs.
15377         (copy_to_permanent): Handle expression_obstack properly.
15379         * Make-lang.in (cplib2.txt): Also depend on the headers.
15381         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
15382         INT_TYPE_SIZE.
15383         (expand_class_desc): Use USItype for offset field.
15384         * tinfo.h (struct __class_type_info): Likewise.
15386         * method.c (build_overload_int): TYPE_PRECISION should be applied
15387         to types.
15389 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15391         * call.c (build_new_op): A COND_EXPR involving void must be a
15392         builtin.
15394 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15396         * typeck.c (build_x_component_ref): New fn.
15397         (build_object_ref): Use it.
15398         * parse.y (primary): Use it.
15399         * decl2.c (build_expr_from_tree): Use it.
15400         * cp-tree.h: Declare it.
15402         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
15403         * error.c (dump_type_suffix): Handle variable arrays.
15405 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15407         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
15409 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15411         * decl.c (lookup_name_real): Don't try to look up anything in a
15412         TYPENAME_TYPE.
15414         * tinfo2.cc (__throw_type_match_rtti): Oops.
15416 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15418         * Make-lang.in (exception.o): Use -fno-PIC for now.
15420 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15422         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
15423         calling them.
15424         (get_tinfo_fn_dynamic): Extracted from build_typeid.
15425         * tinfo2.cc (__dynamic_cast): Adjust.
15427         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
15428         (build_x_typeid): Likewise.
15430         * parse.y: Call build_x_typeid instead of build_typeid.
15431         * cp-tree.def: Add TYPEID_EXPR.
15432         * pt.c (tsubst_copy): Handle typeid.
15433         * decl2.c (build_expr_from_tree): Likewise.
15434         * rtti.c (build_x_typeid): Throw bad_typeid from here.
15435         (build_typeid): Not here.
15436         * cp-tree.h: Declare build_x_typeid.
15438 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
15440         * call.c (convert_like): Pull out constant values.
15442         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15444 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15446         * decl.c (init_decl_processing): Create short int types before
15447         creating size_t in case a machine description needs to use
15448         unsigned short for size_t.
15450 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15452         * Make-lang.in (exception.o): Turn off pic.
15454         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15455         type, multi-level ptr conversions.
15457         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15458         (throw_bad_cast): Use it.
15459         (throw_bad_typeid): New fn.
15460         (build_typeid): Throw bad_typeid as needed.
15461         Use build_call.
15462         (synthesize_tinfo_fn): Handle functions and arrays before checking
15463         for cv-quals.
15465         * Remove .h from standard C++ headers, add new.h, move into inc
15466         subdirectory.
15468         * exception*: Remove pointer from object, constructors.  Add
15469         default exception::what that uses type_info::name.  Add
15470         __throw_bad_typeid.
15472         * init.c (build_new): Don't add a cookie to new (void *) T[2].
15474 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
15476         * Make-lang.in: Building C++ code depends on cc1plus.
15478 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15480         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15481         a HOST_WIDE_INT, not a tree.
15483 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15485         * exception.cc: Don't include <stdlib.h>.
15487         * Make-lang.in (c++.clean): Remove cplib2.*.
15489 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
15491         * parse.y (component_decl_1, component_costructor_declarator case):
15492         Pass attributes/prefix_attributes in tree list.
15494 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15496         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15498 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15500         * lex.c (do_identifier): Don't do deferred lookup in a template
15501         header.
15503         * typeck2.c (store_init_value): Oops.
15505         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15506         New files for C++ lang-support library.
15507         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15508         (CXX_LIB2FUNCS): Define.
15509         And rules for building the C++ lang-support code.
15510         * config-lang.in (headers): Define.
15511         (lib2funcs): Define.
15513 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15515         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15516         digest_init.
15517         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15518         * typeck2.c (store_init_value): Check for initializing pmf with { }
15519         here.
15520         (process_init_constructor): Not here.
15522 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15524         * pt.c (begin_template_parm_list): Increment
15525         processing_template_decl here.
15526         (end_template_parm_list): Not here.
15527         (process_template_parm): No need to add 1 to it now.
15528         * *.c: Use processing_template_decl instead of current_template_parms
15529         to check for being in a template.
15531         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
15532         (tsubst_copy): Handle CONSTRUCTOR.
15533         (instantiate_decl): Set up context properly for variables.
15534         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15535         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15537 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15539         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15541 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15543         * method.c (make_thunk): Call comdat_linkage before setting the
15544         TREE_CODE.
15546         * decl2.c (comdat_linkage): Use make_decl_one_only.
15547         (import_export_decl): Likewise.
15548         * decl.c (init_decl_processing): Check supports_one_only instead of
15549         SUPPORTS_WEAK.
15551 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15553         * decl2.c (grokfield): Tighten checking for access decls.
15555         * decl.c (make_typename_type): Resolve references to
15556         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
15557         (lookup_name_real): Types that depend on a template parameter get
15558         an implicit 'typename' unless they're in the current scope.
15559         (start_decl_1): We don't care about incomplete types that depend
15560         on a template parm.
15561         (grokdeclarator): Resolve 'typename's in the type specifier that
15562         refer to members of the current scope.
15564         * call.c (build_over_call): Remove 'inline called before
15565         definition' diagnostic.
15566         (build_method_call): Likewise.
15567         * decl.c (duplicate_decls): Downgrade 'used before declared
15568         inline' to a warning, only with -Winline.
15570 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
15572         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15574 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15576         * call.c (build_method_call): When calling a signature
15577         default implementation, as in other cases, let instance_ptr simply
15578         be instance.
15580 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
15582         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15584 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
15586         * except.c (expand_start_catch_block): Add a pushlevel so that -g
15587         works on hppa and SPARC.
15589 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15591         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15593 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15595         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15596         before testing whether it's a signature.
15598 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15600         * call.c (build_new_method_call): Don't complain about signature
15601         pointers and references not being an aggr type.
15602         (build_this): If a signature pointer or reference was passed in,
15603         just return it.
15604         (build_new_method_call): If instance is a signature pointer, set
15605         basetype to the signature type of instance.
15606         * sig.c (build_signature_method_call): Deleted basetype and
15607         instance parameters, they can be found as the DECL_CONTEXT of
15608         function and as the first argument passed in.
15609         * cp-tree.h: Changed declaration of build_signature_method_call.
15610         * call.c (build_method_call): Deleted first two arguments in call
15611         of build_signature_method_call.
15612         (build_over_call): Added call to build_signature_method_call.
15614 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15616         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15617         target_expr.
15619 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15621         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15623 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
15625         * except.c (expand_start_try_stmts): Move to except.c in the backend.
15626         (expand_end_try_stmts): Remove.
15628         * init.c (perform_member_init): Use add_partial_entry () instead
15629         of directly manipulating lists.
15630         (emit_base_init): Likewise.
15632 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
15634         * except.c (expand_exception_blocks): Always make sure USE and
15635         CLOBBER insns that came at the end still do, the backend relies
15636         upon this.
15638 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15640         * call.c (build_over_call): We can only use a TARGET_EXPR of the
15641         right type.
15643 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
15645         * cvt.c (convert_to_reference): Revert last change, don't complain
15646         about temp without target decl.
15648 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
15650         * decl.c (grokdeclarator): Don't core dump when void() is given.
15652 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
15654         * decl.c (copy_args_p): Don't crash.
15656 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
15658         * pt.c (tsubst): And support template args inside the exception
15659         specification.
15661         * pt.c (tsubst): Add support for exception specifications in
15662         template functions.
15664 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
15666         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
15667         fields now.
15668         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
15669         (start_function): Likewise.
15670         (start_method): Likewise.
15671         (grokfield): Likewise.
15672         (make_call_declarator): Add throw spec parameter.
15673         (set_quals_and_spec): Add routine.
15674         * lex.c (set_quals_and_spec): Likewise.
15675         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
15676         * decl.c (shadow_tag): Eliminate the throw spec parameter to
15677         grokdeclarator.
15678         (groktypename): Likewise.
15679         (start_decl): Eliminate the throw spec parameter.  Eliminate the
15680         throw spec parameter to grokdeclarator.  Eliminate the throw spec
15681         field in DECL_STMT.
15682         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
15683         (grokfndecl): Remove useless set of raises.
15684         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
15685         the throw spec parameter to start_decl.  Pull the throw spec out
15686         of the call declarator.
15687         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
15688         (start_function): Eliminate the throw spec parameter.  Eliminate
15689         the throw spec parameter to grokdeclarator.
15690         (start_method): Likewise.
15691         * decl2.c (grokfield): Likewise.
15692         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
15693         (grokoptypename): Likewise.
15694         (finish_file): Eliminate the throw spec parameter to
15695         start_function.  Add throw spec to make_call_declarator.
15696         * except.c (init_exception_processing): Add throw spec to
15697         make_call_declarator.  Eliminate the throw spec parameter to
15698         start_decl.
15699         (expand_start_catch_block): Eliminate the throw spec parameter to
15700         grokdeclarator.
15701         (expand_builtin_throw): Add throw spec to make_call_declarator.
15702         Eliminate the throw spec parameter to start_function.
15703         (start_anon_func): Likewise.
15704         * lex.c (make_call_declarator): Add throw spec parameter.
15705         (set_quals_and_spec): New routine.
15706         (cons_up_default_function): Add throw spec to make_call_declarator.
15707         Eliminate the throw spec parameter to grokfield.
15708         * method.c (synthesize_method): Eliminate the throw spec parameter
15709         to start_function.
15710         * pt.c (process_template_parm): Eliminate the throw spec parameter
15711         to grokdeclarator.
15712         (tsubst): Add throw spec to make_call_declarator.
15713         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
15714         (do_function_instantiation): Eliminate the throw spec parameter to
15715         grokdeclarator.  Eliminate the throw spec parameter to
15716         start_function.
15717         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
15718         to start_function.
15719         * parse.y (datadef): Remove non-winning optimization.
15720         (decl): Likewise.
15721         (fndef): Remove ambiguous error productions uncovered by grammar
15722         fixing.
15723         (constructor_declarator): Add exception_specification_opt here.
15724         (component_constructor_declarator): Likewise.
15725         (direct_after_type_declarator): Likewise.
15726         (complex_direct_notype_declarator): Likewise.
15727         (direct_abstract_declarator): Likewise.
15728         (fn.def1): Remove exception_specification_opt.
15729         (fn.def2): Likewise.
15730         (condition): Likewise.
15731         (initdcl0): Likewise.
15732         (initdcl): Likewise.
15733         (notype_initdcl0): Likewise.
15734         (nomods_initdcl0): Likewise.
15735         (component_decl_1): Likewise.
15736         (component_declarator): Likewise.
15737         (after_type_component_declarator0): Likewise.
15738         (after_type_component_declarator): Likewise.
15739         (notype_component_declarator): Likewise.
15741 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15743         * call.c (build_over_call): Also use an INIT_EXPR when
15744         initializing anything from an rvalue.
15746         * call.c (build_over_call): Call stabilize_reference when building
15747         an INIT_EXPR instead of calling the copy ctor.
15749         * call.c (joust): Extend the previous change to all comparisons.
15751         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
15752         NO_LINKAGE_HEURISTICS.
15754         * decl2.c (finish_file): Emit any statics that weren't already.
15756         * typeck.c (build_static_cast): Implement.
15757         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
15758         * decl.c (grokparms): Use can_convert_arg instead of
15759         implicit_conversion directly.
15760         (copy_args_p): New fn.
15761         * cvt.c (convert_to_reference): Don't complain about temp with
15762         static_cast.
15763         (build_up_reference): Handle TARGET_EXPRs.
15764         * call.c (build_over_call): Elide unnecessary temps.
15765         (can_convert*): Use new overloading code.
15767 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
15769         * call.c: Move TYPE_PTR*_MACROS ...
15770         * cp-tree.h: To here.
15771         * typeck.c (build_reinterpret_cast): Implement.
15773         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
15774         ptr_complete_ob.
15775         (joust): If we're comparing a function to a builtin and the worst
15776         conversion for the builtin is worse than the worst conversion for the
15777         function, take the function.
15779         * typeck.c (build_const_cast): Implement.
15780         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
15781         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
15783 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
15785         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
15786         too early.  Make sure we explode if exprtype turns out to be a
15787         NULL_TREE when it shouldn't be.
15789 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
15791         * cp-tree.h: New routine make_call_declarator.
15792         * lex.c (make_call_declarator): Define it.
15793         * except.c (init_exception_processing): Use it.
15794         (expand_builtin_throw): Likewise.
15795         (start_anon_func): Likewise.
15796         * decl2.c (finish_file): Likewise.
15797         * lex.c (cons_up_default_function): Likewise.
15798         * parse.y: Likewise.
15799         * pt.c (tsubst): Likewise.
15801 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
15803         * decl2.c (groktypefield): Remove unused code.
15805 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
15807         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
15808         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
15809         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
15810         nonempty_cv_qualifiers.
15811         * hash.h: Rebuild.
15813         * lex.c (make_pointer_declarator): Change type_quals into
15814         cv_qualifiers.
15815         (make_reference_declarator): Likewise.
15817 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15819         * decl.c (start_function): Only check interface_* for templates
15820         with flag_alt_external_templates.
15822         * call.c (build_new_op): Check for comparison of different enum types.
15823         (build_over_call): Fix arg # output.
15825         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
15827 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
15829         * call.c (build_new_op): Check for erroneous args.
15831         * call.c (build_new_method_call): Add missing args to cp_error.
15833         * tree.c (error_type): Don't print reference-to-array.
15835         * typeck.c (convert_for_assignment): Don't say contravariance for
15836         removing const.
15838 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15840         * call.c (build_over_call): Diagnose bad convs for `this'.
15842         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
15843         on _ctor_arg.
15845         * call.c (convert_like): Handle bad convs.
15846         (build_over_call): Handle bad convs better.
15848         * decl2.c: -fansi-overloading is now the default.
15850         * call.c (build_new_method_call): Check for erroneous args.
15852         * pt.c (instantiate_class_template): Propagate
15853         TYPE_USES_MULTIPLE_INHERITANCE.
15855 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
15857         * call.c (enforce_access): Add static to routine.
15859 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
15861         * call.c (build_user_type_conversion_1): Fix bad handling.
15862         (compare_ics): Likewise.
15864 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15866         * call.c (standard_conversion): Oops.
15868 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
15870         * g++.c: Update test for win32 (&& ! cygwin32).
15872 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15874         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
15875         (ptr_reasonably_similar): New fn.
15876         * call.c (BAD_RANK): New rank.
15877         (ICS_BAD_FLAG): New macro.
15878         (standard_conversion): Handle almost-right pointer conversions.
15879         (reference_binding): Handle bad rvalue bindings.
15880         (add_*_candidate): Stuff.
15881         (build_over_call): Pass bad conversions to convert_for_initialization.
15882         (compare_ics): Handle bad convs.
15883         (joust): Likewise.
15885 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
15887         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
15888         integer_type_node when computing pointer offsets.
15890 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
15892         * tree.c (lvalue_type): New fn.
15893         (error_type): New fn.
15894         * call.c (op_error): Use error_type.
15895         (add_conv_candidate): Use lvalue_type.
15896         (add_builtin_candidates): Likewise.
15897         * error.c (args_as_string): Use error_type.
15899 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15901         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
15902         (tsubst): Not here.
15904         * decl.c (init_decl_processing): With -ansi, __null's type is the
15905         signed integral type with the same number of bits as a pointer.
15906         Introduce a new variable null_node for it.
15907         * cp-tree.h: Adjust.
15908         * call.c (null_ptr_cst_p): Adjust.
15910 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
15912         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
15913         optimize.
15915 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15917         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
15918         fns of classes without virtual functions.
15920         * call.c (add_function_candidate): Handle `this' specially.
15921         (compare_ics): Likewise.
15923 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
15925         * typeck.c (build_conditional_expr): Fix handling of __null.
15927         * decl2.c (comdat_linkage): New fn.
15928         (import_export_vtable): Use it.
15929         (import_export_decl): Use it.
15930         * method.c (make_thunk): Use it.
15932 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15934         * pt.c (end_template_decl): If we don't actually have parms, return.
15935         * parse.y (template_header): Accept 'template <>'.
15937         * errfn.c: Allow 5 args.
15939 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
15941         * tree.c (make_temp_vec): New fn.
15942         * pt.c (push_template_decl): Handle partial specs.
15943         (instantiate_class_template): Likewise.
15944         (more_specialized): Use get_bindings.
15945         (more_specialized_class): New fn.
15946         (get_class_bindings): New fn.
15947         (most_specialized_class): New fn.
15948         (do_function_instantiation): List candidates for ambiguous case.
15949         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15950         (shadow_tag): Call push_template_decl for partial specializations.
15951         * parse.y: Likewise.
15952         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15953         DECL_TEMPLATE_MEMBERS.
15954         * call.c (print_z_candidates): Reduce duplication.
15956 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15958         * decl2.c (lang_decode_option): Allow -fansi-overloading.
15960 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15962         * pt.c (get_bindings): New fn.
15963         (most_specialized): Likewise.
15964         (do_function_instantiation): Use them.
15965         (add_maybe_template): New fn.
15966         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15967         * call.c (build_new_op): Handle guiding decls.
15968         (build_new_function_call): Likewise.
15969         * decl2.c (finish_file): Likewise.
15971         * decl2.c (mark_used): Do synthesis here.
15972         * call.c (build_method_call): Not here.
15973         (build_over_call): Or here.
15974         * typeck.c (build_function_call_real): Or here.
15975         * tree.c (bot_manip): Call mark_used on functions used in default
15976         args.
15978 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15980         * decl2.c (import_export_vtable): Delete code that disabled vtable
15981         heuristic on systems with ASM_OUTPUT_EXTERNAL.
15983 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15985         * typeck.c (build_x_function_call): Handle static call context
15986         better.
15988         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15989         the function, not its outer block.
15991         * call.c (build_field_call): Pass fields on to build_opfncall
15992         regardless of TYPE_OVERLOADS_CALL_EXPR.
15993         (build_method_call): Pass on to build_new_method_call sooner.
15995         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15996         gives us.
15997         * class.c (instantiate_type): Don't put a POINTER_TYPE to
15998         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
15999         modifying it.
16001 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16003         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
16004         (add_builtin_candidate): Don't take enums for ++.
16005         (build_new_method_call): Handle non-aggregates and field calls.
16006         Move new overloading code from...
16007         * cvt.c: Here.
16009         * decl.c (grokparms): Don't check default args in templates.
16011 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
16013         * cvt.c (build_new_op): Fix args to build_unary_op.
16014         (add_builtin_candidates): Don't call type_promotes_to on float.
16016         * decl.c (grokparms): Check the type of the default arg.
16018         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
16019         returning NULL_TREE.
16021         * typeck.c (build_x_binary_op): Avoid doing extra work.
16022         (build_x_unary_op): Likewise.
16023         (build_x_conditional_expr): Likewise.
16024         * cvt.c (build_over_call): Return.
16025         (add_builtin_candidate): Fix MEMBER_REF.
16026         (build_new_op): Likewise.
16028 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
16030         * method.c (build_overload_name): Put bug fix into code but leave
16031         disabled for now so we can be bug compatible with older releases
16032         that do repeats incorrectly.  In the future, we can enable it.
16034 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
16036         * cvt.c (convert_like): Don't call build_cplus_new twice.
16038         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
16039         Control new overloading code with -fansi-overloading.
16041 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16043         * cvt.c (build_over_call): Call build_cplus_new.
16044         * call.c (build_method_call): Likewise.
16045         * typeck.c (build_function_call_real): Likewise.
16046         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
16047         the COND_EXPR in a TARGET_EXPR so they use the same slot.
16049         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
16050         recursive calls.
16051         * typeck.c (complete_type): Propagate
16052         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
16054 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
16056         * cvt.c (joust): More ?: kludging.  Sigh.
16057         (build_over_call): Don't try to synthesize global fns.
16059         * search.c (lookup_conversions): Use binfo marking.
16061 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
16063         * search.c (build_mi_matrix): Use the correct value of cid
16064         when determining the new mi_size.
16066 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16068         * cvt.c (add_builtin_candidates): Do consider type conversion ops
16069         for the first parms of += et al.
16070         (strip_top_quals): New fn.
16071         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
16072         (implicit_conversion): Likewise.
16073         (add_builtin_candidates): Be careful about arrays.
16074         (build_new_method_call): Handle vtable optimization.
16076 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16078         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
16079         * cvt.c (reference_binding): Use it.
16080         (implicit_conversion): Use it.
16081         (add_builtin_candidate, COND_EXPR): Use it.
16083         * cvt.c (build_new_function_call): Check for error args.
16085         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
16087         * gxx.gperf: Add __null.
16088         * hash.h: Regenerate.
16089         * lex.h: Add RID_NULL.
16090         * lex.c (init_lex): Create null_pointer_node here, stick it in
16091         RID_NULL.
16092         * decl.c (init_decl_processing): Still set its type here.
16093         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
16094         (convert_to_pointer_force): Likewise.
16095         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
16096         if (! pedantic).
16097         * call.c (convert_harshness): Use null_ptr_cst_p.
16098         * typeck.c (convert_for_assignment): Likewise.  Don't produce
16099         null_pointer_node.
16101         * error.c (args_as_string): Handle lists of actual args, too.
16102         * cvt.c (null_ptr_cst): Support (void*)0 for now.
16103         (build_user_type_conversion_1): Improve diagnostics.
16104         (build_new_function_call): Likewise.
16105         (build_object_call): Likewise.
16106         (build_new_method_call): Likewise.  Move call before def diagnostic...
16107         (build_over_call): Here.
16109         * cvt.c (build_new_method_call): Don't complain about no match if
16110         LOOKUP_SPECULATIVELY.
16111         (build_over_call): Fix 'this' for virtual fn.
16112         (build_new_method_call): Add diagnostic.
16114 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16116         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
16117         constructors to be passed in.
16118         (build_over_call): Likewise.
16119         (build_user_type_conversion_1): Pass them in.
16120         (convert_like): Likewise.
16121         (build_object_call): Handle overloaded conversions.
16122         (build_over_call): Pass the right args to build_vfn_ref.
16123         (standard_conversion): Fix pmf convs.
16124         (joust): Handle comparing statics and non-statics.
16125         (build_new_method_call): New fn.
16126         * call.c (build_method_call): Call it if NEW_OVER.
16128 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
16130         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
16131         %D instead.
16133 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
16135         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
16136         instead of just maybe_build_cleanup so that we deallocate the
16137         thrown object.
16139 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16141         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
16142         * cp-tree.h (finish_prevtable_vardecl): Add decl.
16144 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
16146         * pt.c (instantiate_class_template): Call complete_type.  Also, if
16147         we're at the end of the file and we just instantiated a template
16148         class with a vtable, call finish_prevtable_vardecl.
16150         * error.c (dump_decl): Don't explode (or explode more gracefully
16151         as appropriate) if the object being dumped has a null type.
16152         (dump_expr): Likewise.
16154         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
16155         by counting the number of nodes that we'll need before allocating
16156         the array.
16157         (lookup_fnfields): Fix comment.
16158         (breadth_first_search): Fix comment.
16160 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
16162         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
16163         TYPE_ALIGN.
16164         * class.c (finish_struct): Call cplus_decl_attributes here.
16165         (finish_struct_1): Not here.
16166         * cp-tree.h: Adjust.
16168         * pt.c (type_unification): New parameter STRICT.
16169         (unify): If STRICT, don't allow cv addition or base deduction.
16170         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
16172 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16174         * search.c (get_template_base{_recursive}): New fns.
16175         * pt.c (more_specialized): New fn.
16176         (do_function_instantiation): Use it.
16177         (unify): Handle base deduction.
16178         * cvt.c (joust): Use more_specialized.
16179         Don't arbitrarily choose between non-builtin candidates.
16180         (build_over_call): Call require_complete_type.
16182         * decl.c (start_function): Statics are static even in a #pragma
16183         interface file.
16185         * decl2.c (import_export_vtable): Disable vtable heuristic on
16186         systems with ASM_OUTPUT_EXTERNAL.
16188         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
16189         (standard_conversion): No std conv to enum type.
16191         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
16192         for ptm's.
16194         * cvt.c (reference_binding): Bind directly to a base subobject of
16195         a class rvalue.
16197         * cvt.c (build_new_op): Enforce access control.
16199 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16201         * typeck2.c (process_init_constructor): When scanning the
16202         union for a named field, skip things that aren't FIELD_DECLs.
16204         * method.c (synthesize_method): Don't scan fndecl's rtl if
16205         we're at the end of the file; just assume the function can't
16206         be inlined.
16208 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16210         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
16211         it failed.
16213         * cvt.c (build_user_type_conversion_1): Handle overloaded
16214         conversion ops.
16216         * cvt.c (add_builtin_candidates): Don't consider type conversion
16217         operators for the first parameter of operator=.
16219 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16221         * typeck.c (complete_type): Only call layout_type if we're not
16222         expanding a template.
16224 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16226         * cvt.c (compare_ics): Oops.
16228         * cvt.c (op_error): Oops.
16230         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
16231         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
16232         (build_conv): Use them.
16233         (implicit_conversion): Use them.
16234         (convert_like): Handle them.
16235         (build_new_op): Handle builtin COND_EXPR again.
16236         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
16237         in lists of types for COND_EXPR.
16238         (add_builtin_candidate): Add enum candidates for COND_EXPR.
16240 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16242         * typeck.c (build_modify_expr): Always attempt to build a call to
16243         the assignment operator, even if we're using a default one.
16244         (convert_for_initialization): Call complete_type.
16246 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16248         * cvt.c (reference_binding): A REF_BIND gets the reference type.
16249         (implicit_conversion): Likewise.
16250         (convert_like): Likewise.
16251         (compare_ics): Likewise.
16252         (compare_qual): Likewise.
16253         (print_z_candidates): Handle no candidates.
16254         (build_new_op): Don't handle builtin COND_EXPR for now.
16256 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
16258         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
16260 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16262         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
16264         * cvt.c (build_builtin_candidate): Oops.
16265         (build_new_op): Oops.
16267         * method.c (build_opfncall): Pass COND_EXPR on.
16268         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
16269         (add_builtin_candidate{,s}): Likewise.
16270         (add_builtin_candidates): Likewise.
16271         (print_z_candidates, op_error, build_new_op): Likewise.
16272         (type_decays_to): New fn.
16273         * lex.c (init_lex): Just say ?: for COND_EXPR.
16275 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16277         * typeck.c (complete_type): Call layout_type rather than building
16278         a new array type.
16280         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
16281         only use ptrdiff_t.
16283 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16285         * cvt.c: Always compile the new overloading code (but don't use it).
16286         (implicit_conversion): Add a BASE_CONV when converting to
16287         the same class type.
16288         (convert_like): Handle BASE_CONV.
16290 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16292         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
16293         (add_builtin_candidate): Likewise.
16295         NEW_OVER changes:
16296         * typeck.c (build_x_function_call): Try an operator function
16297         whenever we call an object of class type.
16298         * method.c (build_opfncall): Pass CALL_EXPRs through.
16299         * cvt.c (implicit_conversion): Do const-ref case first.
16300         (add_conv_candidate, build_object_call, op_error): New fns.
16301         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
16302         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
16303         builtin candidates.
16304         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
16305         Fall back on preincrement handling.  Use op_error.
16306         Handle warn_synth.
16307         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
16308         an error_mark_node.
16309         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
16310         properly.
16312 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16314         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
16316 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
16318         * typeck.c (build_component_ref_1): Use build_component_ref
16319         instead of open coding it here.
16321 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16323         * g++.c (main): Don't link with -lg++.
16325         NEW_OVER changes:
16326         * cvt.c (convert_to_reference): Don't use convert_from_reference on
16327         result of build_type_conversion.
16328         (cp_convert): Only call build_method_call for ctors if
16329         build_type_conversion failed.
16330         (ptr_complete_ob): New function.
16331         (TYPE_PTR{,OB,MEM}_P): New macros.
16332         ({add,build}_builtin_candidate{,s}): New functions.
16333         (print_z_candidates): Handle builtins.
16334         (build_user_type_conversion_1): Don't use conversion fns for
16335         converting to a base type.
16336         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
16337         (build_user_type_conversion): Use convert_from_reference.
16338         (build_new_op): New function.
16339         (build_over_call): Fix handling of methods.
16340         (compare_ics): Handle AMBIG_CONV properly.
16341         * typeck2.c: Increment abort count.
16342         * method.c (build_opfncall): Forward most requests to build_new_op.
16343         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
16345 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16347         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
16348         invalid second argument to dump_expr_list.
16350 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
16352         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
16354 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
16356         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
16357         ASSEMBLE_EXTERNAL.
16359 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
16361         * typeck2.c (process_init_constructor): New pedwarn for using { }
16362         to initialize a pointer to member function.
16363         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
16364         we can avoid the new error.
16366 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
16368         * typeck.c (build_ptrmemfunc1): New function to hide details of
16369         pointer to member functions better.
16371 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
16373         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
16374         methods into the actual method, as we know the implied object is
16375         not used.
16377 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16379         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
16380         inside a system header.
16382 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
16384         * call.c (build_method_call): Call complete_type on the
16385         instance type.
16387 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
16389         * typeck.c (build_component_ref): Always build up an OFFSET_REF
16390         for obj_ptr->func so that we can know which object to use in a
16391         method call.
16393 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
16395         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
16396         around things.  Also improve maintainability.
16398 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
16400         * decl.c (grokdeclarator): Check for overflow when evaluating an
16401         array dimension.
16403 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16405         * cvt.c (cp_convert): Don't check for ambiguity with constructor
16406         if NEW_OVER.
16408         * typeck.c (build_x_function_call): Pass function overload
16409         questions to new overloading code if NEW_OVER.
16410         * init.c (expand_aggr_init_1): Only check for type conversion ops
16411         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
16412         Don't check for ambiguity with constructor if NEW_OVER.
16413         * cvt.c (convert_to_reference): Dereference the result of a type
16414         conversion operator.
16415         (build_conv): Propagate ICS_USER_FLAG.
16416         (implicit_conversion): Call instantiate_type.
16417         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
16418         (add_function_candidate): Fix cv-quals on argtype.
16419         (print_z_candidates): New function.
16420         (build_new_function_call): Call it.
16421         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
16422         consider non-converting constructors.
16423         Call print_z_candidates.
16424         Return an AMBIG_CONV for an ambiguous conversion.
16425         (build_user_type_conversion): Handle AMBIG_CONV.
16426         (convert_like): Fix test for building TARGET_EXPR.
16427         Call instantiate_type.
16428         Handle AMBIG_CONV and LVALUE_CONV.
16429         (build_over_call): Handle 0 args and ellipsis.
16430         * cp-tree.def: Add AMBIG_CONV.
16432 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
16434         * decl.c (lookup_name_real): If we find mem in obj when parsing
16435         `obj->mem', make sure we return the right value.
16437 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
16439         * search.c (get_base_distance): Call complete_type.
16441 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
16443         * decl.c (store_bindings): Make static.
16445 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16447         * init.c (expand_aggr_init_1): Don't check type conversions if
16448         NEW_OVER.
16450         * cvt.c (z_candidate): Put back template field.
16451         (add_function_candidate): Set it.
16452         (add_template_candidate): Likewise.
16453         (joust): Use it.
16454         (compare_qual): Handle references and pointers to members.
16455         (compare_ics): Handle reference bindings.
16457         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16459 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
16461         * call.c (compute_conversion_costs): Call complete_type.
16463         * tree.c (vec_binfo_member): Use comptypes instead of comparing
16464         pointers, so we can handle template parameters.
16466 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16468         * cvt.c (cp_convert_to_pointer): We have to call complete_type
16469         here; let's make it explicit instead of a side effect of an
16470         error check.
16472 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16474         * cvt.c (z_candidate): Remove template field.
16475         (reference_binding): Handle binding to temporary.
16476         (implicit_conversion): Likewise.
16477         (add_function_candidate): Handle artificial constructor parms.
16478         Handle functions with too few parms.
16479         (add_template_candidate): New function.
16480         (build_user_type_conversion_1): Handle constructors.
16481         (convert_like): Likewise.
16482         (build_over_call): Likewise.
16483         (build_new_function_call): Support templates.
16484         (compare_ics): Fix reference, inheritance handling.
16486 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16488         * decl.c: Add signed_size_zero_node.
16489         (init_decl_processing): Build it.
16490         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16491         when we're trying to make a negative delta.
16493 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16495         Stop doing this damn index==strchr variable name confusion.
16496         * class.c (add_virtual_function): Change local var INDEX to be
16497         named IDX.
16498         (add_method): Likewise.
16499         * lex.c (print_parse_statistics): Likewise.
16500         * search.c (make_memoized_table_entry): Likewise.
16501         (lookup_fnfields_here): Likewise.
16502         (lookup_field): Likewise.
16503         (lookup_fnfields): Likewise.
16504         (get_baselinks): Likewise.
16505         * sig.c (build_signature_table_constructor): Likewise.
16506         (build_signature_method_call): Likewise.
16507         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16508         (get_member_function_from_ptrfunc): Likewise.
16509         (build_ptrmemfunc): Change local var INDEX to be IDX.
16510         (c_expand_start_case): Likewise.
16512 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16514         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16515         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16516         (convert_to_reference): Use build_type_conversion to convert to
16517         the reference type directly.
16518         (standard_conversion): Fix void* case, non-conversions.
16519         (reference_binding): Fix expr == 0 case, non-conversions.
16520         (convert_like): Support REF_BIND.
16521         (compare_qual): Split out from compare_ics.
16522         (compare_ics): Use it, handle icses with only a qual_conv.
16524         * init.c (expand_vec_init): Don't crash if decl is NULL.
16526 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
16528         * mpw-config.in: New file, configury for Mac MPW.
16529         * mpw-make.sed: New file, makefile editing for MPW.
16531 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16533         * pt.c (instantiate_class_template): Call repo_template_used.
16535         * search.c (lookup_conversions): Only lookup conversions in
16536         complete types.
16538 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16540         * cp-tree.def: Renamed from tree.def, to avoid confusion with
16541         gcc's tree.def.
16542         * cp-tree.h, lex.c: Include cp-tree.def.
16543         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16545 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16547         * init.c (build_vec_delete_1): Call complete_type.
16549 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
16551         * except.c (start_anon_func): Make sure anonymous functions are
16552         never external.
16554 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16556         * decl.c (finish_function): If function_depth > 1, set nested.
16558         * decl2.c (grokbitfield): Revert Bob's change.
16559         * class.c (finish_struct_1): Fix handling of named bitfield widths.
16561 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16563         * pt.c (add_pending_template): Handle types.
16564         (lookup_template_class): With -fexternal-templates, just add the class
16565         to pending_templates instead of instantiating it now.
16566         * decl2.c (finish_file): Handle types in pending_templates.
16568 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16570         * decl2.c (grokbitfield): Handle constant decls appropriately.
16571         Give an appropriate error message now instead of spewing core
16572         later.
16574 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16576         * decl2.c: Don't turn on thunks by default for now.
16578 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
16580         * typeck.c (complete_type): Handle error_mark_node.
16581         (common_type, OFFSET_TYPE): Handle template_type_parms.
16583 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16585         * pt.c (instantiate_decl): If at_eof, call import_export_decl
16586         regardless of DECL_INLINE.
16588         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16590         * class.c (finish_struct_bits): Copy TYPE_SIZE.
16592         * rtti.c (build_dynamic_cast): Support templates.
16593         * tree.def: Support DYNAMIC_CAST_EXPR.
16594         * pt.c (tsubst_copy): Likewise.
16595         * decl2.c (build_expr_from_tree): Likewise.
16597 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16599         * typeck.c (build_static_cast): Support templates.
16600         (build_const_cast): Likewise.
16601         * tree.def: Support CONST/STATIC_CAST_EXPR.
16602         * pt.c (tsubst_copy): Likewise.
16603         * decl2.c (build_expr_from_tree): Likewise.
16605 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16607         * decl2.c (finish_vtable_vardecl): Don't trust
16608         TREE_SYMBOL_REFERENCED for vtables of local classes.
16610 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16612         * pt.c (tsubst_copy): Handle operator T.
16614 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16616         * init.c (build_delete): Move creation of PARMS inside test of
16617         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16619 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16621         * typeck.c (build_conditional_expr): Don't assume that
16622         the arguments to ?: are always pointers or records.
16624 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16626         * decl2.c (import_export_decl): Still emit static/weak/comdat
16627         copies of inline template functions with -fno-implicit-templates.
16629 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
16631         * init.c (build_delete): Determine the complete basetype
16632         path to the destructor we're calling.
16634 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
16636         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
16637         initialize the enum, because we really and truly don't know where
16638         it came from.
16639         (start_enum): Don't copy integer_zero_node because
16640         build_enumerator will do it.
16642 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16644         * decl.c (finish_function): Do access control on base destructors.
16646         * pt.c (tsubst, case FUNCTION_DECL): Set up
16647         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
16648         hose us.
16650 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
16652         * cvt.c (build_up_reference): If we have already extended the
16653         lifetime of the temporary, don't try it again.
16654         * typeck.c (c_expand_return): Don't try and convert the return
16655         value twice when we want a reference, once is enough.
16657 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
16659         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
16660         LOOKUP_ONLYCONVERTING at all for now.
16662         * search.c (add_conversions): Put the conversion function in
16663         TREE_VALUE, the basetype in TREE_PURPOSE.
16664         * cvt.c (build_type_conversion): Adjust.
16665         * cvt.c (build_expr_type_conversion): Adjust.
16666         * call.c (user_harshness): Adjust.
16668 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16670         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
16671         backend's benefit.
16673 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
16675         * except.c (expand_start_catch_block): Add a dummy region, if we
16676         get an error, so that we can avoid core dumping later.
16678 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
16680         * cp-tree.h (OFFSET_REF): Remove.
16681         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
16682         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
16683         * init.c (expand_aggr_init_1): Likewise.
16684         (build_new): Likewise.
16685         * typeck.c (expand_target_expr): Likewise.
16687 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16689         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
16690         TARGET_EXPR.
16692 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
16694         * cvt.c (build_up_reference): Redo how and when temporaries are
16695         created.
16696         * decl.c (grok_reference_init): Don't try and be smart about
16697         running cleanups.
16699 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
16701         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
16702         (TARGET_EXPR...), now that it has 4 arguments.
16703         * tree.c (build_cplus_new): Likewise.
16705 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16707         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
16709         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
16710         * decl.c (struct saved_scope): Remove named_labels,
16711         {base,member}_init_list.
16712         (maybe_push_to_top_level): Don't set them.  Call
16713         push_cp_function_context if appropriate.
16714         (pop_from_top_level): Likewise.
16716         * method.c (do_build_assign_ref): Remove obsolete check of
16717         TYPE_HAS_ASSIGN_REF (basetype).
16719         * decl.c (grokfndecl): Diagnose user definition of
16720         implicitly-declared methods.
16722 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
16724         * method.c (do_build_copy_constructor): Add code to give
16725         meaningful error messages instead of crashing.
16726         (do_build_assign_ref): Don't synthesize assignment operators for
16727         classes containing reference or const members.
16729         * class.c (struct base_info): Remove cant_synth_copy_ctor
16730         and cant_synth_asn_ref.
16731         (finish_base_struct): Remove the code that tries to conditionalize
16732         synthesis of copy constructors & assignment operators based on
16733         access permissions.  Instead, let it fail when it tries to
16734         synthesize the copy constructor.  This will give meaningful error
16735         messages instead of silently generating code to perform a bitcopy.
16737 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
16739         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
16740         determining types for constant values.
16742         * decl.c (struct named_label_list): Use instead of stuffing
16743         random items into a TREE_LIST node.
16744         (named_label_uses): Use the new struct.
16745         (poplevel): Likewise.
16746         (lookup_label): Likewise.
16747         (define_label): Add an error message to tell the user the line
16748         where the goto is located in addition to the destination of the
16749         goto.
16750         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
16751         named_label_uses.
16752         (finish_function): Likewise.
16754         (start_decl): Complain about defining a static data member
16755         in a different type from which it was declared.
16757 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16759         * cvt.c (build_expr_type_conversion): Adjust.
16761 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
16763         * call.c (build_method_call): Always convert 'this' to the
16764         appropriate type.
16766         * search.c (add_conversions): Put the conversion function in
16767         TREE_VALUE, the type in TREE_PURPOSE.
16768         * cvt.c (build_type_conversion): Adjust.
16769         * call.c (user_harshness): Adjust.
16771         * method.c (emit_thunk): Call temporary_allocation and
16772         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
16774         * tree.c (build_cplus_array_type): Handle tweaking of
16775         TYPE_MAIN_VARIANT here.
16776         * typeck.c (common_type): Not here.
16778         * typeck.c (complete_type): Only try to complete an array type if
16779         it has a domain.
16781 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16783         * decl.c (grokvardecl): Call complete_type.
16784         (grokdeclarator): Call complete_type for PARM_DECLs.
16786 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16788         * pt.c (instantiate_class_template): Re-set
16789         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
16791 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
16793         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
16794         smart enough to do it right.
16795         * tree.c (cp_expand_decl_cleanup): Likewise.
16796         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
16797         cp_expand_decl_cleanup.
16798         (store_parm_decls): Likewise.
16799         (hack_incomplete_structures): Likewise.
16800         * except.c (push_eh_cleanup): Likewise.
16802 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
16804         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
16805         frontend to the backend where it belongs.
16806         * tree.c (unsave_expr): Likewise.
16807         (unsave_expr_now): Likewise.
16808         * tree.def (UNSAVE_EXPR): Likewise.
16809         * cp-tree.h (unsave_expr): Likewise.
16810         (unsave_expr_now): Likewise.
16812 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
16814         * init.c (emit_base_init): Make sure the partial EH cleanups live
16815         on the function_obstack.
16817 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
16819         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
16820         when checking for pointer types.
16822 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16824         * pt.c (instantiate_class_template): Remove obsolete check for
16825         access declarations.
16827 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
16829         * call.c (build_overload_call): Simplify calls to
16830         build_overload_call by removing last parameter.
16831         (build_method_call): Likewise.
16832         * cp-tree.h: Likewise.
16833         * method.c (build_opfncall): Likewise.
16834         * typeck.c (build_x_function_call): Likewise.
16836 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
16838         * call.c (default_parm_conversions): Factor out common code.
16839         (build_method_call): Use it.
16840         (build_overload_call_real): Use it.
16842 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
16844         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
16845         but pedwarn as the code is bogus.
16846         * typeck.c (decay_conversion): Likewise.
16847         (build_function_call_real): Use build_addr_func instead of
16848         default_conversion.  Don't allow pointer-to-method functions down
16849         here.
16850         (build_unary_op): Use real pointer-to-member functions instead of
16851         fake ones.
16852         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
16853         (convert_for_assignment): Removed some obsolete code.
16854         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
16855         build_x_function_call instead of current_class_ptr.  Only call
16856         digest_init once on an initializer, we do this just checking
16857         TREE_TYPE.
16858         (build_expr_from_tree): Pass current_class_ref to
16859         build_x_function_call instead of current_class_ptr.
16860         * init.c (build_member_call): Likewise.
16861         * pase.y: Likewise.
16862         * error.c (dump_expr): Handle OFFSET_REFs better.
16863         * pt.c (unify): Handle pointer-to-member functions better.
16864         * decl.c (finish_function): Clear out current_class_ref just like
16865         we do for current_class_ptr.
16867         * typeck.c (get_delta_difference): Handle virtual bases better.
16869 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
16871         * sig.c (build_signature_table_constructor): Use the delta for
16872         the original basetype for this virtual function with thunks.
16873         (build_signature_method_call): We still need to adjust 'this'
16874         with thunks.
16876 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
16878         * call.c (build_addr_func): New routine.  Used to get the `real'
16879         address of a function or a method.  Needed to avoid getting a
16880         pointer-to-member function.
16881         (build_call): New routine to build CALL_EXPRs.
16882         (build_method_call): Use it.
16883         * cvt.c (convert_to_aggr): Likewise.
16884         * typeck.c (build_function_call_real): Likewise.
16885         * sig.c (build_signature_table_constructor): Use build_addr_func.
16886         * cp-tree.h (build_call, build_addr_func): Declare them.
16888 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
16890         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
16891         * parse.y: Remove uses of LOOKUP_AGGR.
16893 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
16895         * *.[chy]: Rename current_class_decl to current_class_ptr, and
16896         C_C_D to current_class_ref.
16898 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16900         * call.c (convert_harshness): Tighten up pointer conversions.
16902 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
16904         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
16905         (finish_file): Likewise.
16907 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16909         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
16911         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
16912         code.
16914 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16916         * decl2.c: Turn on thunks by default where supported.
16918 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
16920         * cp-tree.h (build_overload_call_maybe): Removed.
16921         * call.c (build_overload_call_real): Invert meaning of last arg to
16922         be require_complete.
16923         (build_overload_call): Likewise.
16924         * typeck.c (build_x_function_call): Use build_overload_call_real
16925         instead of build_overload_call_maybe.
16927 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
16929         * decl2.c (finish_file): Don't try to emit functions that haven't
16930         been compiled.
16932 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16934         * decl2.c (finish_vtable_vardecl): Oops.
16936         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
16937         Also store the bindings from previous_class_values.
16938         (pop_from_top_level): Restore them.
16940 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16942         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16943         symbol has been referenced.
16944         (finish_file): Re-join synthesis/vtable loop with inline emission
16945         loop, disable inlining when an inline is output.
16947 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
16949         * except.c (init_exception_processing): Setup saved_in_catch.
16950         (push_eh_cleanup): Reset __eh_in_catch.
16951         (expand_start_catch_block): Set __eh_in_catch.
16953 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
16955         * except.c (push_eh_cleanup): Add tracking for whether or not we
16956         have an active exception object.
16957         (expand_builtin_throw): Use it to make sure a rethrow without an
16958         exception object is caught.
16960 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16962         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16963         cache.
16965 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16967         * decl2.c (finish_file): Also use sentries for vars with
16968         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16969         created).
16971         * lex.c (handle_cp_pragma): Disable #pragma
16972         interface/implementation if SUPPORTS_ONE_ONLY > 1.
16974 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16976         * method.c (emit_thunk): Wrap default case in
16977         temporary/permanent_allocation.
16979         * method.c (make_thunk): Use DECL_ONE_ONLY.
16980         (emit_thunk): Call assemble_end_function.
16982 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16984         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16985         (import_export_decl): Likewise.
16986         (finish_prevtable_vardecl): Disable vtable hack if
16987         SUPPORTS_ONE_ONLY > 1.
16989 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
16991         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16992         PREDECREMENT_EXPRs take two arguments, not one.
16994 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
16996         * class.c (build_vtable_entry): Don't build thunks for abstract
16997         virtuals.
16999         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
17000         frontend.
17002 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17004         * class.c (set_rtti_entry): Use size_zero_node.
17005         (build_vtable): Likewise.
17007 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
17009         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
17010         (prepare_fresh_vtable): Likewise.
17012 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
17014         * method.c (emit_thunk): Call mark_used on the target function.
17016         * call.c (build_method_call): Don't warn about pending templates.
17018 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17020         * decl2.c (finish_file): Fix list walking logic.
17022         * typeck2.c (check_for_new_type): Only warn if -pedantic.
17024 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
17026         * class.c (finish_struct_1): Remove old code for
17027         dont_allow_type_definitions.
17028         * cp-tree.h: Likewise.
17029         * spew.c: Make sure cp-tree.h is included before parse.h, so the
17030         definition of flagged_type_tree is found before it is used.
17031         * lex.c: Likewise.
17032         * parse.y: Added the ftype member to the type union, and changed a
17033         number of rules to use it instead of ttype.  Added calls to
17034         check_for_new_type() as appropriate.
17035         * typeck2.c (check_for_new_type): New function for checking
17036         if a newly defined type appears in the specified tree.
17037         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
17038         for check_for_new_type().
17040 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
17042         * decl2.c (finish_file): Only use a sentry if the decl is public.
17044         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
17045         don't pass LOOKUP_ONLYCONVERTING.
17047 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
17049         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
17050         properly keeps track of const and volatile type modifiers.
17052 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
17054         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
17055         * pt.c (comp_template_args): Use it.
17057         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
17058         assemble_external for artificial function decls.
17060         * decl.c (cp_finish_decl): Oops.
17062 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17064         * decl2.c (import_export_decl): Put static data member templates
17065         into common storage, or make them weak, depending on whether they
17066         are dynamically or statically initialized.
17067         (get_sentry): New function.
17068         (finish_file): Do import_export_decl for static data members before
17069         building the init/fini functions.  Don't init/fini a variable that's
17070         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
17071         push/pop_temp_slots.
17072         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
17073         expand_static_init thang.
17074         * method.c (get_id_2): New function.
17076 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
17078         * parse.y (empty_parms): Make sure we use C++-style prototypes
17079         when we're declaring member functions.
17081 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17083         * Makefile.in (CONFLICTS): 16 s/r conflicts.
17084         * parse.y (self_template_type): New nonterminal.
17086 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17088         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
17089         name.
17090         * parse.y (base_class.1): Allow 'typename foo::bar'.
17092         * lex.c (check_newline): Remove #pragma code that plays with the
17093         input stream, since we now deal with tokens.  Clear nextchar when
17094         we're done.
17095         (handle_cp_pragma): Use real_yylex.
17096         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
17097         in one place.
17099         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
17101         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
17103 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17105         * parse.y: New token SELFNAME for potential constructor.
17106         * spew.c (yylex): Handle it.
17107         * lex.c (identifier_type): Produce it.
17109         * parse.y (complete_type_name): In :: case, don't push class binding.
17110         (complex_type_name): Likewise.
17112 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
17114         * typeck.c (build_reinterpret_cast): Handle pointer to member
17115         functions.
17117 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17119         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
17120         pragmas.
17121         (check_newline): Put the vtable/unit/implementation/interface pragma
17122         code into handle_cp_pragma, replacing it with a call.
17123         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
17124         args.  Get the next token after handling the pragma token.
17126 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17128         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
17129         (convert_to_pointer_force): Likewise.
17131         * init.c (build_new): Fix array new without -fcheck-new.
17133 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
17135         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
17136         tree.c: Lose TYPE_NESTED_NAME.
17138         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
17139         as identifiers.
17141         * tree.def: Add VEC_INIT_EXPR.
17142         * expr.c (cplus_expand_expr): Handle it.
17143         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
17144         the extra file-scope symbol nastiness.
17146 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17148         * method.c (make_thunk): Thunks are static.
17149         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
17151         * decl2.c (mark_vtable_entries): Emit thunks as needed.
17152         (finish_file): Don't emit them here.
17154 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17156         * rtti.c (build_dynamic_cast): Handle null pointers.
17157         (ifnonnull): New function.
17159 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
17161         * call.c (build_method_call): Remember the original basetype we
17162         were called with.  Give an error message instead of trying
17163         (incorrectly) to call a non-static member function through a
17164         non-inherited class.
17166         * search.c (expand_upcast_fixups): Mark the new fixup as
17167         DECL_ARTIFICIAL.
17169 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17171         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
17173         * class.c (set_rtti_entry): Fix for thunks.
17175         * decl2.c (import_export_decl): Still emit typeinfo fns for
17176         cv-variants of builtin types.
17178         * rtti.c (expand_class_desc): Set up base_info_type_node here.
17179         (init_rtti_processing): Instead of here.
17181 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
17183         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
17184         (build_typeid): Only complain about taking dynamic typeid without
17185         -frtti.
17187         * decl2.c: flag_rtti defaults to 1.
17189         * rtti.c (get_tinfo_var): The general class case is now smaller.
17190         (init_rtti_processing): Pack the latter three fields of base_info
17191         into 32 bits.
17193 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
17195         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
17197 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
17199         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
17200         (push_memoized_context): Split out code to undefer pop_type_level to
17201         (clear_memoized_cache): here.
17202         (pop_memoized_context): We can only handle one layer of deferral of
17203         pop_type_level so clear the cache, if there was a previous level.
17205 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17207         * rtti.c (init_rtti_processing): Build up base_info_type_node.
17208         (expand_class_desc): Use one pointer to an array of base_info
17209         structs, passed using a CONSTRUCTOR.
17211 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
17213         * class.c (build_vbase_path): Remove block extern for
17214         flag_assume_nonnull_objects here.
17215         (build_vfn_ref): Split out functionality into build_vtbl_ref.
17216         (build_vtbl_ref): New routine.
17217         (build_vtable): Set up rtti info here.
17218         (add_virtual_function): Note in CLASSTYPE_RTTI the best
17219         place where we can get the rtti pointers from to avoid having to
17220         search around for a place.
17221         (finish_base_struct): Likewise.
17222         (finish_struct_1): Likewise.  Never create totally new vtables
17223         with totally new vtable pointers for rtti.  Disable code to layout
17224         vtable pointers better until we want to break binary
17225         compatibility.
17226         * rtti.c (build_headof_sub): New routine to convert down to a
17227         sub-object that has an rtti pointer in the vtable.
17228         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
17229         maintainable.
17230         (build_dynamic_cast): Make sure we have saved it, if we need to.
17231         * search.c (dfs_init_vbase_pointers): Disable code that deals with
17232         a more efficient vtable layout, enable later.
17233         * call.c (flag_assume_nonnull_objects): Moved declaration to
17234         * cp-tree.h: here.  Declare build_vtbl_ref.
17235         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
17236         function calls that want a tree.
17238 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17240         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
17241         other X subobjects in the most derived type.  Ack.
17243         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
17244         get_typeid will do it for us.
17245         (get_typeid_1): Break out call-building for expand_*_desc to use.
17246         (get_typeid): Call it.
17247         (expand_*_desc): Likewise.
17248         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
17249         and void *.
17250         (init_decl_processing): Lose builtin_type_tdescs lossage.
17251         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
17253 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
17255         * pt.c (tsubst): When calling set_nested_typename, use
17256         TYPE_NESTED_NAME (current_class_type) instead of
17257         current_class_name.
17259         * decl.c (pushdecl): Likewise.
17260         (pushdecl_class_level): Likewise.
17261         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
17262         set_nested_typename.
17264 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
17266         * rtti.c (synthesize_tinfo_fn): Handle arrays.
17268         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
17270 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17272         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
17273         (init_rtti_processing): Lose bad_cast_type.
17274         (build_dynamic_cast): Use throw_bad_cast.
17276         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
17278         * decl2.c (finish_file): Don't synthesize artificial functions
17279         that are external and not inline.
17281         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
17283         * decl2.c (finish_file): Handle having new inlines added to
17284         saved_inlines by synthesis.
17286         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
17288 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17290         RTTI rewrite to initialize nodes as needed, not require that
17291         users #include <typeinfo>, complete functionality and reduce wasted
17292         space.
17293         * rtti.c (init_rtti_processing): New fn.
17294         (build_typeid): The vtable entry is now a function.
17295         (get_tinfo_var): New fn.
17296         (get_tinfo_fn): Likewise.
17297         (get_typeid): Use it.
17298         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
17299         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
17300         points __rtti_*.
17301         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
17302         (synthesize_tinfo_fn): New fn.
17303         * method.c (build_t_desc_overload): Lose.
17304         (build_overload_with_type): More generic.
17305         * decl.c (init_decl_processing): Call init_rtti_processing.
17306         * class.c (set_rtti_entry): Use get_tinfo_fn.
17307         * decl2.c (mark_vtable_entries): Mark the rtti function.
17308         (finish_prevtable_vardecl): Don't build_t_desc.
17309         (import_export_decl): Handle tinfo functions.
17310         (finish_file): Likewise.
17311         * typeck.c (inline_conversion): New fn.
17312         (build_function_call_real): Use it.
17313         * cp-tree.h: Add decls.
17315         * method.c (hack_identifier): Also convert component_refs from
17316         references.
17318         * lex.c (cons_up_default_function): Use the type, not the name, in
17319         declspecs.
17321         * decl2.c (import_export_vtable): Fix weak vtables.
17323 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
17325         * search.c (get_base_distance_recursive): Fix access checks for
17326         protected bases.
17328 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17330         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
17331         cp-tree.h.
17332         (convert_harshness): Add prototypes wrapped by PROTO.
17333         * decl2.c (grok_function_init): Likewise.
17334         (do_toplevel_using_decl): Change to void return type.
17335         * class.c (build_vtable_entry): Remove decl of make_thunk.
17336         (merge_overrides): Fix order of arg definitions.
17337         (finish_vtbls): Likewise.
17338         (fixup_vtable_deltas): Likewise.
17339         (modify_all_direct_vtables): Likewise.
17340         (modify_all_indirect_vtables): Likewise.
17341         * search.c (get_base_distance_recursive): Likewise.
17342         (get_abstract_virtuals_1): Likewise.
17343         (fixup_virtual_upcast_offsets): Likewise.
17344         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
17345         * init.c (perform_member_init): Fix order of arg definitions.
17346         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
17347         * cp-tree.h (make_thunk): Add decl.
17348         (overload_template_name, push_template_decl): Add decls.
17349         (do_toplevel_using_decl): Change to void return type.
17350         (vec_binfo_member): Add decl.
17352 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17354         * typeck.c (mark_addressable, convert_for_assignment,
17355         convert_for_initialization, pointer_int_sum, pointer_diff,
17356         unary_complex_lvalue): Add prototypes wrapped by PROTO.
17357         (convert_sequence): #if 0 fn decl, since definition also is.
17359 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
17361         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
17362         cast to pointer types for type searching.
17364 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17366         * typeck.c (get_delta_difference): Use cp_error, not error, in the
17367         case where BINFO == 0.
17369 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
17371         * call.c (build_method_call): Fix wording of error messages so
17372         constructors come out right.
17374 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
17376         * decl.c (push_overloaded_decl): Don't warn about hidden
17377         constructors when both the type and the function are declared
17378         in a system header file.
17380 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
17382         * class.c (finish_struct_1): Propagate the TYPE_PACKED
17383         flag for the type to the type's fields.
17385 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17387         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
17389 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
17391         * class.c (base_info, finish_base_struct): Replace
17392         needs_virtual_dtor with base_has_virtual.
17394         (finish_struct_1): Remove the old code that tried to make default
17395         destructors virtual.  Use base_has_virtual when checking if we need
17396         to add a vtable entry for the rtti code.
17398 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17400         * pt.c (push_template_decl): Complain about template decl with
17401         inappropriate declaration.
17403 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17405         * typeck.c (build_x_unary_op): Remove bogus check for taking
17406         the address of a member function.
17408 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17410         * parse.y (constructor_declarator): Only push the class if
17411         we are not already in the class.
17413 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
17415         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
17416         Add additional argument to INIT_CUMULATIVE_ARGS.
17418 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17420         * decl.c (shadow_tag): Fix error about anon union with methods.
17422         * parse.y (self_reference): Only generate a self-reference if this
17423         is a non-template class.
17424         (opt.component_decl_list): Only use it if it was generated.
17426         * parse.y (component_decl_1): Use constructor_declarator.
17427         (fn.def2): Likewise.
17428         (notype_component_declarator0): Likewise.
17430 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17432         * typeck.c (build_x_unary_op): Add checks for taking the address
17433         of a TARGET_EXPR or of a member function, and give appropriate
17434         warnings.
17436 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17438         * pt.c (process_template_parm): Allow template type parms to be
17439         used as types for template const parms.
17441 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
17443         * init.c (expand_vec_init): Ensure the eh cleanups are on the
17444         function_obstack.
17446 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17448         * decl.c (lookup_name_real): Be even more picky about the
17449         ambiguous lookup warning.
17450         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17451         * parse.y (constructor_declarator): Rather than here.
17453         * parse.y (constructor_declarator): New nonterminal.
17454         (fn.def1): Use it.
17455         (explicit_instantiation): Likewise.
17457 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17459         Add implicit declaration of class name at class scope.
17460         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17461         * parse.y (self_reference): New nonterminal.
17462         (opt.component_decl_list): Use it.
17463         (fn.def1): Add nested_name_specifier type_name cases.
17464         * class.c (build_self_reference): New function.
17465         (finish_struct): Handle access_default later, move self-reference
17466         decl to the end.
17467         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17468         * cp-tree.h: Adjust.
17470         * pt.c (do_function_instantiation): Separate handling of member
17471         functions and non-member functions properly.
17473 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17475         * pt.c (process_template_parm): Improve error for 'volatile class K'.
17477         * class.c (finish_struct_1): Check the right slot for destructors.
17479         * decl.c (start_enum): Complain about enum templates.
17481 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
17483         * init.c (resolve_offset_ref): Offset pointers to member data by one.
17484         * typeck.c (unary_complex_lvalue): Likewise.
17486 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
17488         * typeck.c (c_expand_return): Check for a returned local
17489         array name, similar to the check for an ADDR_EXPR.
17491 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17493         * decl.c (cp_finish_decl): Don't build cleanups for static
17494         variables here.
17496 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
17498         * typeck.c (build_modify_expr): Fix error messages to be more
17499         accurate.
17500         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17501         assignment operators.
17502         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
17503         assignment operators.
17505 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17507         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
17508         give an error if initialized.  pedwarn about nested type with the
17509         same name as its enclosing class.
17511         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17513         * typeck.c (require_complete_type): Be sure to instantiate the
17514         MAIN_VARIANT of the type.
17516         * decl2.c (finish_file): Instantiate pending templates before
17517         processing static constructors and destructors.
17519         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17520         unless at_eof.
17522 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
17524         * decl2.c (delete_sanity): If error_mark_node is passed
17525         in as an expression, quit while we're ahead.
17527         * decl.c (grokdeclarator): Give an error message if `friend'
17528         is combined with any storage class specifiers.
17530 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
17532         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17533         definition of nonexistent nested type.
17535         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17536         not to say 'typedef'.
17538 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17540         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17541         * search.c (dfs_walk, dfs_init_vbase_pointers,
17542         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17543         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17545 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17547         * except.c (build_throw): Support minimal parse.
17548         * pt.c (tsubst_copy): Support THROW_EXPR.
17549         * decl2.c (build_expr_from_tree): Likewise.
17551         * pt.c (mangle_class_name_for_template): Always allocate
17552         scratch_firstobj.
17554 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
17556         * cvt.c (cp_convert_to_pointer): Give an appropriate error
17557         when trying to cast from an incomplete type.
17559 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17561         * pt.c (instantiate_class_template): Don't bother setting up
17562         CLASSTYPE_TAGS explicitly, as the nested types will add
17563         themselves.
17565 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
17567         * decl.c (shadow_tag): Remove old error check for usage of
17568         an enum without a previous declaration.
17569         (xref_tag): Add error message about usage of enums without a
17570         previous declaration.
17572 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17574         * lex.c (do_identifier): Only do name consistency check if we're
17575         parsing.
17577         * pt.c (push_template_decl): Don't crash if we get a member defn
17578         that doesn't match.
17580         * decl.c (xref_tag_from_type): New function to do an xref without
17581         always having to figure out code_type_node.
17582         * cp-tree.h: Declare it.
17583         * pt.c (instantiate_class_template): Use it for friend classes.
17584         (lookup_template_class): Use it.
17586         * typeck2.c (build_functional_cast): Pull out a single parm before
17587         passing it to build_c_cast.
17589 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
17591         * expr.c (do_case): Give an error message if a pointer is
17592         given as a case value.
17594 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17596         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17597         an overload list.
17599         * lex.c (cons_up_default_function): Really, now, interface hackery
17600         does not apply to synthesized methods.
17602 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
17604         * call.c (build_method_call): Ctors and dtors now have special names
17605         with respect to lookups.
17606         * class.c (add_method): Likewise.
17607         (grow_method): Likewise.
17608         (finish_struct_methods): Likewise.
17609         (warn_hidden): Likewise.
17610         (finish_struct_1): Likewise.
17611         * cvt.c (convert_to_reference): Likewise.
17612         (convert_to_aggr): Likewise.
17613         (cp_convert): Likewise.
17614         * decl2.c (check_classfn): Likewise.
17615         * init.c (expand_member_init): Likewise.
17616         (expand_default_init): Likewise.
17617         (expand_aggr_init_1): Likewise.
17618         (build_offset_ref): Likewise.
17619         (build_new): Likewise.
17620         (build_delete): Likewise.
17621         * lex.c (do_inline_function_hair): Likewise.
17622         * search.c (lookup_field_1): Likewise.
17623         (lookup_fnfields_here): Likewise.
17624         (lookup_field): Likewise.
17625         (lookup_fnfields): Likewise.
17626         (get_virtual_destructor): Likewise.
17627         (dfs_debug_mark): Likewise.
17628         (dfs_pushdecls): Likewise.
17629         (dfs_compress_decls): Likewise.
17630         * tree.c (layout_basetypes): Likewise.
17631         * typeck.c (build_component_ref): Likewise.
17632         (build_x_function_call): Likewise.
17633         (build_modify_expr): Likewise.
17634         (convert_for_initialization): Likewise.
17635         (build_functional_cast): Likewise.
17636         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
17637         (CTOR_NAME): New.
17638         (DTOR_NAME): New.
17639         * decl.c (ctor_identifier): New.
17640         (dtor_identifier): New.
17641         (init_decl_processing): Set them.
17643 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
17645         * typeck.c (build_component_ref): Don't get confused by fields whose
17646         context has no type name, like pointer to member functions.
17648 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17650         * decl.c (grokdeclarator): Handle typedef without declarator.
17652         * pt.c (tsubst): Handle SCOPE_REF in declarator.
17654         * parse.y (bad_parm): Catch another case of missing `typename'.
17656         * lex.c (yyprint): Handle TYPE_DECLs.
17658         * decl.c (start_function): Don't try to be clever.
17660         * lex.c: Lose compiler_error_with_decl.
17661         * typeck2.c: Lose error_with_aggr_type.
17662         (incomplete_type_error): Use cp_* instead of old functions.
17663         (readonly_error): Likewise.
17664         * typeck.c (convert_arguments): Likewise.
17665         * search.c (lookup_nested_field): Likewise.
17666         * method.c (make_thunk): Likewise.
17667         * decl.c (grokparms): Likewise.
17668         * cp-tree.h: Update.
17670         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
17671         and value.
17673 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
17675         * method.c (build_opfncall): When deleting a pointer to an
17676         array, build a new pointer to the tree past any ARRAY_TYPE
17677         nodes.
17679 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17681         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
17683 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
17685         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
17686         and ! DECL_INLINE.
17688         * decl.c (finish_function): Don't set nested based on
17689         hack_decl_function_context.
17690         * parse.y (function_try_block): Check for nested function.
17691         (pending_inlines): Likewise.
17693         * decl2.c (build_expr_from_tree): If a unary op already has a
17694         type, just return it.
17696         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
17698         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
17699         (finish_file): Check the return value of walk_vtables.
17700         (finish_prevtable_vardecl): Return int.
17701         (finish_vtable_vardecl): Likewise.
17702         (prune_vtable_vardecl): Likewise.
17703         * lex.c (set_vardecl_interface_info): Likewise.
17704         * cp-tree.h: Adjust return types.
17706         * class.c (delete_duplicate_fields_1): Don't complain about
17707         duplicate nested types if they're the same type.
17708         (finish_struct): Remove check for duplicate.
17709         * decl2.c (grokfield): Don't check for typedef of anonymous type.
17711 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17713         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
17715         * decl.c (grokdeclarator): Lose special handling of class-level
17716         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
17717         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
17719         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
17721         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
17723         * search.c (compute_access): Fix handling of anonymous union
17724         members.
17725         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
17726         from anonymous unions to their members.
17728         * typeck.c (build_x_function_call): For static member functions,
17729         hand off to build_member_call.
17731 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17733         * typeck.c (build_component_ref): Handle OFFSET_REFs.
17735         * init.c (expand_vec_init): Fix init == 0 case.
17737 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17739         * init.c (build_new): pedwarn about init and array new.
17740         (expand_vec_init): Handle lists, use convert_for_initialization.
17742         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
17743         when converting to an aggregate type.
17744         * cvt.c (cp_convert): Pass it through.
17746         * typeck.c (build_conditional_expr): Handle user-defined
17747         conversions to slightly different types.
17749         * decl.c (grokdeclarator): Force an array type in a parm to be
17750         permanent.
17752         * decl2.c (do_using_directive): Sorry.
17753         (do_namespace_alias): Likewise.
17754         * lex.c (real_yylex): Warn about using the `namespace' keyword.
17756 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17758         * parse.y (datadef): Move call to note_list_got_semicolon up.
17760 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
17762         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
17764 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
17766         * decl.c (cp_finish_decl): The exception regions have to be
17767         nested, not overlapping.  We start the exception region for a
17768         decl, after it has been fully built, and all temporaries for it
17769         have been cleaned up.
17771 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
17773         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
17775 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
17777         * tree.def: Add RETURN_INIT.
17778         * pt.c (instantiate_decl): Handle RETURN_INIT.
17779         * decl.c (store_return_init): Handle minimal_parse_mode.
17781         * tree.c (cp_build_type_variant): Just return an error_mark_node.
17782         * decl.c (make_typename_type): Don't try to get the file and line
17783         of an identifier.
17784         * typeck.c (comptypes): Handle TYPENAME_TYPE.
17786 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
17788         * decl.c (poplevel): Make sure we clear out and restore old local
17789         non-VAR_DECL values by default when they go out of scope.
17791 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17793         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
17794         referring to addresses of variables and functions.
17796         * error.c (dump_expr): Support SIZEOF_EXPR.
17798         * init.c (do_friend): Use the return value of check_classfn.
17800         * typeck.c (convert_arguments): Call complete_type.
17802         * method.c (hack_identifier): After giving an error, set value to
17803         error_mark_node.
17805 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17807         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
17808         lossage for local classes.
17809         * cp-tree.h: Declare it.
17810         * decl.c (lookup_name_real): Evil, painful hack for local classes.
17811         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
17812         Use hack_decl_function_context.
17813         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
17814         (start_function): Use hack_decl_function_context.
17815         (finish_function): Likewise.
17816         * method.c (synthesize_method): Likewise.
17817         * lex.c (process_next_inline): Likewise.
17818         (do_pending_inlines): Likewise.
17819         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
17820         done with it.
17822 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
17824         * sig.c (build_signature_pointer_or_reference_type): Align
17825         signature pointers/references on 8-byte boundaries so they can be
17826         grabbed 2 words at a time on a Sparc.
17828 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
17830         * method.c (hack_identifier): Requiring a static chain is now a
17831         hard error.
17832         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
17833         functions.
17835 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17837         * init.c (build_offset_ref): Call complete_type.
17839         * decl.c (pop_from_top_level): Always pop previous_class_type.
17841         * parse.y: Handle multiple decls in a for-init-statement.
17842         * pt.c (tsubst_expr): Likewise.
17844         * pt.c (tsubst): Use tsubst_expr for the second operand of an
17845         ARRAY_REF.
17847         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
17848         (poplevel_class): Set it here.
17849         (pop_from_top_level): Pop it here if we're returning to class scope.
17850         * class.c (pushclass): Don't set it here.
17852         * decl.c (maybe_push_to_top_level): Save current_template_parms,
17853         and clear it if !pseudo.
17854         (pop_from_top_level): Restore it.
17856         * decl2.c (finish_file): Push the dummy each time we walk the list
17857         of vtables.
17859         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
17860         something for CAST_EXPR.
17862 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17864         * cvt.c (cp_convert): Warn about implicit conversion of the
17865         address of a function to bool, as it is always true.
17867 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17869         * typeck.c (c_expand_return): Fix warning for local externs returned.
17871 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
17873         * tree.c (mapcar): Propagate const and volatile properly.
17875         * typeck.c (complete_type): Be sure to instantiate the
17876         MAIN_VARIANT of the type.
17878         * method.c (synthesize_method): Class interface hackery does not
17879         apply to synthesized methods.
17881 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
17883         * pt.c (comp_template_args): Use comptypes rather than just
17884         checking for TEMPLATE_TYPE_PARM equivalence.
17886         * typeck.c (build_x_function_call): Call complete_type before
17887         checking TYPE_OVERLOADS_CALL_EXPR.
17889 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
17891         * g++.c (main): Check also for new define ALT_LIBM.
17893 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17895         * pt.c (instantiate_class_template): If we don't have a pattern
17896         yet, that's OK.
17897         (coerce_template_parms): If we see a local class, bail.
17899         * decl.c (grok_reference_init): Make sure there's a type before
17900         checking its code.
17902         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
17903         (push_template_decl): Likewise.
17905         * parse.y (named_class_head): Set
17906         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
17908         * decl.c (xref_tag): Diagnose redeclaration of template
17909         type-parameter name.
17911         * error.c (dump_type): Handle anonymous template type parms.
17913         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
17914         TYPE_STUB_DECL.
17915         (coerce_template_parms): Likewise.
17917 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
17919         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
17920         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
17922 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
17924         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
17925         before trying to get its STUB_DECL.
17926         (coerce_template_parms): Likewise.
17928         * parse.y (template_type_parm): If they didn't use 'class',
17929         pretend they did after giving an error.
17931         * pt.c (coerce_template_parms): Diagnose use of local class.
17933         * decl.c (grok_reference_init): Use instantiate_type.
17935         * error.c (dump_expr): Handle TEMPLATE_DECLs.
17937         * parse.y (named_class_head): Diagnose mismatching types and tags.
17939         * decl.c (pushdecl): Type decls and class templates clash with
17940         artificial type decls, not hide them.
17942         * decl.c (redeclaration_error_message): Diagnose redefinition of
17943         templates properly.
17944         (duplicate_decls): Diagnose disallowed overloads for template
17945         functions, too.
17947         * decl.c (start_decl): Call complete_type before checking for a
17948         destructor.
17950         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17952         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17954 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17956         * decl.c (grok_op_properties): Don't check for operator++(int) in
17957         a template.
17959         * tree.c (perm_manip): Return a copy of variable and function
17960         decls with external linkage.
17962         * tree.def: Change some of the min tree codes to type "1".
17963         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17964         * method.c (build_overload_int): Emit something arbitrary for
17965         anything but an INTEGER_CST if we're in a template.
17967         * decl.c (cp_finish_decl): Call complete_type before deciding
17968         whether or not to lay out the decl.
17970         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17972 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17974         * typeck2.c (build_x_arrow): Call complete_type.
17976         * pt.c (add_pending_template): Broken out.
17977         (lookup_template_class): If -fexternal-templates, call it for all
17978         the methods of implemented types.
17979         (instantiate_class_template): Instead of instantiating them here.
17980         (instantiate_decl): Handle -fexternal-templates earlier.
17982 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17984         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17985         memoized lookup stuff inside GATHER_STATISTICS.
17987 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17989         * decl.c (start_decl): Complain about array of incomplete type
17990         here.
17991         (grokdeclarator): Not here.
17993         * parse.y (template_parm): Expand full_parm inline so we can set
17994         the rule's precedence.
17996         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17997         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17998         * decl2.c (grokbitfield): Don't check for integer constant here.
17999         * class.c (finish_struct_1): Check here.
18001         * decl.c (define_label): Make the min decl go on permanent_obstack.
18003         * pt.c (unify): Don't handle CONST_DECLs.
18004         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
18005         (tsubst_copy): Likewise.
18007         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
18008         CONST_DECL for a template parm.
18010 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
18012         * decl.c (grokdeclarator): Complain about array of incomplete type
18013         here.
18014         (start_decl_1): Not here.
18016         * pt.c (tsubst): Handle pointer-to-function declarators.
18018         * method.c (hack_identifier): If pedantic, diagnose local class
18019         methods that require a static chain.
18021         * decl.c (grok_op_properties): No longer static.
18022         * cp-tree.h: Declare it.
18023         * pt.c (tsubst): Call it for operators.
18024         Use tsubst_copy for TREE_VECs.
18026         * parse.y (template_arg): The expr has precedence like '>'.
18028 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
18030         * pt.c (coerce_template_parms): Don't coerce an expression using
18031         template parms.
18032         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
18033         (tsubst): Don't use build_index_2_type if the max_value uses template
18034         parms.
18035         * method.c (build_overload_int): Emit something arbitrary for an
18036         expression using template parms.
18038         * parse.y (template_close_bracket): New non-terminal to catch use
18039         of '>>' instead of '> >' in template class names.
18040         (template_type): Use it.
18041         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
18043         * tree.def: Add CAST_EXPR.
18044         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
18045         CONVERT_EXPR for minimal_parse_mode.
18046         * typeck.c (build_c_cast): Likewise.
18047         * pt.c (tsubst_copy): Likewise.
18048         * decl2.c (build_expr_from_tree): Likewise.
18049         * error.c (dump_expr): Likewise.
18051 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18053         * except.c (SetTerminate, SetUnexpected): Put back global vars.
18054         (init_exception_processing): Put back decl/init of
18055         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
18056         fns from libstdc++.
18058         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
18059         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
18060         Delete unused fns.
18061         * cp-tree.h (declare_uninstantiated_type_level,
18062         uninstantiated_type_level_p): Delete prototypes.
18064 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
18066         * pt.c (tsubst_expr): Add default return.
18068 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18070         * error.c (fndecl_as_string): Delete unused arg CNAME.
18071         * sig.c (build_signature_table_constructor,
18072         build_signature_method_call): Fix calls.
18074         * class.c (the_null_vtable_entry): Delete var definition.
18075         (init_class_processing): Delete tree the_null_vtable_entry init.
18076         * decl.c (no_print_{functions, builtins}): Declare as static.
18077         (__tp_desc_type_node): #if 0 var definition.
18078         (init_type_desc): #if 0 init of __tp_desc_type_node.
18079         (vb_off_identifier): Move var decl into init_decl_processing.
18080         (current_function_assigns_this): Declare as static.
18081         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
18082         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
18083         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
18084         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
18085         * init.c (BI_header_type, BI_header_size): Declare as static.
18086         * pt.c (template_classes): Delete unused var.
18087         (add_pending_template): Delete decl for non-existent fn.
18088         (lookup_template_class): Delete vars CODE and TAG_CODE.
18089         (instantiate_template): Delete unused var TARGS.
18090         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
18091         Delete decls.
18092         (__tp_desc_type_node): #if 0 var decl.
18093         (fndecl_as_string): Fix prototype.
18095 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
18097         * tree.def: Add GOTO_STMT.
18098         * pt.c (tsubst_expr): Support goto and labels.
18099         * decl.c (define_label): Support minimal parsing.
18100         * parse.y (simple_stmt): Likewise.
18102 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18104         * xref.c (GNU_xref_member): Only define/set var I if
18105         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
18106         used.
18107         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
18108         (GNU_xref_end): Fix call.
18109         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
18110         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
18112         * tree.c (build_exception_variant): Delete unused vars I, A, T,
18113         T2, and CNAME.
18114         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
18115         (mapcar): Delete unused var CODE.
18116         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
18117         (break_out_cleanups): Fix call.
18118         (bot_manip): Likewise.
18119         * call.c (build_method_call): Likewise.
18120         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
18121         Likewise.
18122         * typeck.c (unary_complex_lvalue, build_modify_expr,
18123         convert_for_initialization): Likewise.
18124         * typeck2.c (build_functional_cast): Likewise.
18125         * cp-tree.h (build_cplus_new): Fix prototype.
18127         * repo.c (open_repo_file): Delete unused var Q.
18128         (repo_compile_flags, repo_template_declared,
18129         repo_template_defined, repo_class_defined, repo_inline_used,
18130         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
18131         (repo_get_id, repo_vtable_used): Declare as static.
18132         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
18133         prototypes.
18135 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
18137         * parse.y (pending_inlines): Add function_try_block case.
18139         * pt.c (unify): Fix for template const parms.
18141 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18143         * lex.c (extract_interface_info): Delete forward decl.
18144         (default_copy_constructor_body, default_assign_ref_body): Delete
18145         decls for non-existent functions.
18146         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
18147         (init_lex): Delete setting them.
18148         (cons_up_default_function): Delete unused vars FUNC_BUF,
18149         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
18150         #if 0'd synth code.
18151         (toplevel, expression_obstack): Delete unused extern decls.
18152         (tree_node_kind): Delete unused enum.
18153         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
18154         GATHER_STATISTICS.
18155         (tree_node_kind_names): Delete unused extern decl.
18156         (synth_obstack): Delete unused var.
18157         (init_lex): Don't set it.
18158         (init_parse): Add decl before use.
18159         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
18160         (current_unit_{name, language}): Delete unused vars.
18161         (check_newline): Don't bother setting them, just accept the #pragma.
18162         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
18163         (current_unit_{name, language}): Delete decls.
18165         * search.c: Wrap all of the memoized functions, macros, and
18166         variables inside #ifdef GATHER_STATISTICS.
18167         (lookup_field, lookup_fnfields): Likewise.
18168         (init_search_processing): Likewise.
18169         (reinit_search_statistics): Wrap whole function.
18170         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
18172         * decl.c (finish_function): Only call pop_memoized_context if
18173         GATHER_STATISTICS is defined.
18174         (start_function): Likewise for push_memoized_context.
18175         * class.c (pushclass, popclass): Likewise.
18177         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
18178         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
18180         * cvt.c (cp_convert): Delete unused local var FORM.
18181         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
18182         prototypes.
18184 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18186         * pt.c (do_poplevel): Oops; really return what we get from
18187         poplevel this time.
18189 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18191         * cp-tree.h (is_aggr_type): Add prototype.
18193         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
18194         * method.c ({push,pop}_cp_function_context): Delete decls.
18195         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
18196         (SetUnexpected, SetTerminate): Delete unused vars.
18197         (init_exception_processing): Don't set SetUnexpected or
18198         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
18199         (output_exception_table_entry): Delete unused array LABEL.
18200         (expand_internal_throw): Delete unused var PARAMS.
18201         (expand_start_catch_block): Delete unused var CLEANUP.
18202         (emit_exception_table): Delete unused var EH_NODE_DECL.
18203         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
18204         GOTO_UNWIND_AND_THROW.  Don't set them.
18205         (end_eh_unwinder): Add top decl.
18206         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
18207         (exception_section, push_rtl_perm, do_function_call,
18208         lang_interim_eh, push_eh_cleanup, eh_outer_context,
18209         expand_end_eh_spec, end_eh_unwinder): Declare as static.
18210         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
18211         throw_used): Likewise.
18212         * cp-tree.h (expand_end_eh_spec): Delete prototype.
18214         * search.c (dfs_mark, dfs_mark_vtable_path,
18215         dfs_unmark_vtable_path, dfs_mark_new_vtable,
18216         dfs_unmark_new_vtable, dfs_clear_search_slot,
18217         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
18218         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
18219         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
18220         functions.
18221         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
18222         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
18223         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
18224         Only define #ifdef GATHER_STATISTICS.
18225         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
18226         is defined.
18227         (vbase_decl): Delete var definition.
18228         (init_search): Delete old decl.
18229         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
18230         never actually used.
18231         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
18232         (get_base_distance_recursive): Delete unused fourth arg
18233         BASETYPE_PATH.  Fix call .
18234         (get_base_distance): Fix call.
18235         (push_class_decls): Delete unused var ID.
18236         (make_memoized_table_entry): Declare as static.
18237         (breadth_first_search): Declare as static.
18238         (tree_has_any_destructor_p): Declare as static.
18239         (pop_class_decls): Delete unused arg pop_class_decls.
18240         * class.c (popclass): Fix call to pop_class_decls.
18241         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
18242         tree_has_any_destructor_p): Delete prototypes.
18244         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
18245         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
18246         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
18247         (build_user_desc): Delete unused var T.
18248         (build_class_desc): Delete unused vars T and OFF.
18249         (build_t_desc): Delete unused var NAME_STRING.
18250         (build_headof): Make static.
18251         (get_bad_cast_node): Likewise.
18252         (get_def_to_follow): Likewise.
18253         * cp-tree.h (init_type_desc): Add prototype.
18254         (build_headof): Remove prototype.
18256 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18258         * pt.c (tsubst): Only look for matching decls at file scope for
18259         non-member functions.
18261         * call.c (build_scoped_method_call): Handle scoped destructor
18262         calls in templates.
18264         * decl.c (*_top_level): Also save previous_class_values.
18266         * pt.c (tsubst_expr): Support do {} while loops.
18267         * parse.y (simple_stmt): Likewise.
18268         * tree.def: Likewise.
18270         * method.c (build_overload_identifier): For a class nested in a
18271         template class, don't mangle in the template parms from our
18272         context.
18274         * lex.c, cp-tree.h: Remove support for template instantiations in
18275         the pending_inlines code.
18276         * pt.c: Remove dead functions and unused arguments.
18277         (uses_template_parms): TYPENAME_TYPEs always use template parms.
18278         * parse.y: Stop passing anything to end_template_decl.
18279         * tree.c (print_lang_statistics): Only print tinst info #ifdef
18280         GATHER_STATISTICS.
18282 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18284         * init.c (expand_recursive_init{,_1}): Delete decls.
18285         (sort_member_init): Delete unused var INIT.
18286         (emit_base_init): Delete unused var X.
18287         (build_offset_ref): Delete unused var CNAME.
18288         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
18289         (emit_base_init): Delete unused local var BASE.  Delete extern
18290         decl of IN_CHARGE_IDENTIFIER.
18291         (build_delete): Delete unused local var VIRTUAL_SIZE.
18293         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
18294         (build_delete): Fix call.
18295         * decl2.c (delete_sanity): Likewise.
18296         * cp-tree.h (build_vec_delete): Update prototype.
18298         * typeck.c (common_base_type): Delete unused var TMP.
18299         (build_binary_op): Delete local var ARGS_SAVE.
18300         (build_array_ref): Delete unused var ITYPE.
18301         (c_expand_return): Delete unused var USE_TEMP.
18303         * typeck.c (compexcepttypes): Delete unused arg STRICT.
18304         (comptypes): Fix calls.
18305         * decl.c (duplicate_decls): Likewise.
18306         * cp-tree.h (compexcepttypes): Delete extra arg.
18308         * decl2.c (check_classfn): Delete unused second arg CNAME.
18309         * decl.c (start_decl, grokfndecl): Fix calls.
18310         * init.c (do_friend): Likewise.
18311         * cp-tree.h (check_classfn): Update prototype.
18313         * cp-tree.h (signature_error, import_export_vtable,
18314         append_signature_fields, id_in_current_class, mark_used,
18315         copy_assignment_arg_p): Add decls.
18316         * decl2.c (mark_used): Delete decl.
18318         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
18320         * class.c (get_vtable_entry): Disable unused function.
18321         (doing_hard_virtuals): Delete unused static global var.
18322         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
18323         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
18324         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
18325         (modify_one_vtable): Delete unused var OLD_RTTI.
18326         (finish_struct_anon): Delete unused vars OFFSET and X.
18327         (finish_struct_bits): Delete unused var METHOD_VEC.
18328         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
18329         for-scope local variable METHODS.
18331         * call.c (user_harshness): Delete unused/unneeded arg PARM.
18332         (ideal_candidate): Delete unused args BASETYPE and PARMS.
18333         (build_method_call): Delete unused args passed into ideal_candidate.
18334         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
18335         * cp-tree.h (synthesize_method): Add decl.
18337         * decl.c (note_level_for_for): Give void return type.
18338         (pushdecl_nonclass_level): Likewise.
18339         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
18340         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
18341         (suspend_binding_level): Delete unused var LEVEL.
18342         (duplicate_decls): Delete unused var CTYPE.
18343         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
18344         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
18345         PTR_ENDLINK.
18346         (grokdeclarator): Delete unused var C.
18347         (grokdeclarator): Delete unused var SIZE_VARIES.
18348         (grokparms): Delete unused var SAW_VOID.
18349         (start_function): Delete unused var OLDDECL.
18350         (cplus_expand_expr_stmt): Delete unused var
18351         REMOVE_IMPLICIT_IMMEDIATELY.
18353         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
18355         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
18357 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18359         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
18360         (build_min_nt): Likewise.
18361         * pt.c (do_pushlevel): Emit line note.
18362         (do_poplevel): Return what we get from poplevel.
18363         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
18364         * parse.y: Use do_pushlevel and do_poplevel.
18365         * cp-tree.h: Declare do_poplevel.
18367         * cp-tree.h: Declare at_eof.
18368         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
18369         * decl2.c (import_export_decl): Renamed from import_export_inline.
18370         (finish_file): Call it to do interface handling for statics.
18371         * pt.c (tsubst_copy): Call mark_used on variables and functions
18372         used here.
18374         * decl2.c (finish_file): Don't emit statics we can't generate.
18375         * pt.c (instantiate_decl): Don't set interface on instantiations
18376         we can't generate.
18378         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
18379         * tree.c (print_lang_statistics): Print max template depth.
18380         * pt.c (push_tinst_level): Dump entire instantiation context.
18381         (instantiate_class_template): Use it and pop_tinst_level.
18382         (instantiate_decl): Likewise.
18384         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
18385         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
18387 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18389         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
18390         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
18391         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
18392         the new template implementation.
18394 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18396         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
18398 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
18400         * decl.c (cp_finish_decl): Delay emitting the debug information for
18401         a typedef that has been installed as the canonical typedef, if the
18402         type has not yet been defined.
18404 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18406         * decl2.c (grokfield): Still call pop_nested_class for access decls.
18408 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18410         * decl.c (lookup_label): Call label_rtx.
18412         * decl.c (make_binding_level): New function.
18413         (pushlevel, pushlevel_class): Call it instead of explicit
18414         duplicate calls to xmalloc.
18416         * decl.c (init_decl_processing): Delete useless build_pointer_type
18417         call.
18419         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
18420         (sizet_ftype_string): Delete variable.
18421         (init_decl_processing): Add built-in functions fabsf, fabsl,
18422         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
18423         variable strlen_ftype, used for strlen.
18425 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18427         * decl.c (push_to_top_level): Start from current_binding_level
18428         again for now; the stl hacks depend on g++ being broken in this
18429         way, and it'll be fixed in the template rewrite.
18431         * tree.def: Add USING_DECL.
18432         * decl2.c (do_class_using_decl): Implement.
18433         (grokfield): Pass access decls off to do_class_using_decl instead of
18434         grokdeclarator.
18435         * error.c (dump_decl): Handle USING_DECLs.
18436         * decl.c (grokdeclarator): Remove code for handling access decls.
18437         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18438         as access decls for now.
18439         (finish_struct): Don't check USING_DECLs for other uses of the name.
18441         * search.c (get_matching_virtual): Use cp_error_at.
18443 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18445         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18446         match c-typeck.c.
18447         (self_promoting_args_p): Move the check that TYPE is non-nil
18448         before trying to look at its main variant.
18449         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18451         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18452         Delete macros.
18453         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18454         (do_friend): Delete call to xref_friend.
18455         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18457         * typeck.c (convert_sequence): #if 0 unused function.
18459         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18460         be in decl_in_memory_p.
18461         (decl_in_memory_p): Delete decl.
18462         * expr.c (decl_in_memory_p): Delete fn.
18463         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18465         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18467 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18469         * class.c (finish_struct_1): Check for a pure-specifier on a
18470         non-virtual function here.
18472         * decl2.c (grok_function_init): Don't check whether the function
18473         is virtual here.
18474         (grokfield): Don't call check_for_override here.
18476         * decl.c (push_to_top_level): Start from inner_binding_level,
18477         check class_shadowed in class levels.
18479 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
18481         * decl.c (resume_level): Ignore things that don't have names, instead
18482         of core dumping.
18484 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18486         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18488 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
18490         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18491         synthesized dtor.
18493         * parse.y (complete_type_name): Bind global_scope earlier.
18494         (complex_type_name): Likewise.
18495         (qualified_type_name): Remove.
18497 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
18499         * decl.c (grokfndecl): Move code that looks for virtuals in base
18500         classes...
18501         * class.c (check_for_override): ... to a new function.
18502         (finish_struct_1): Call it.
18504         * cp-tree.h: Declare warn_sign_compare.
18506         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18507         rather than extra_warnings to decide whether to warn about
18508         comparison of signed and unsigned.
18510         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
18511         implies -Wsign-compare.  -Wall doesn't imply -W.
18513 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
18515         * typeck.c (build_component_ref): Fix to handle anon unions in base
18516         classes as well.
18518 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18520         * class.c (resolves_to_fixed_type_p): Delete code dealing with
18521         a WITH_CLEANUP_EXPR, since we don't generate them any more.
18522         * cvt.c (build_up_reference): Likewise.
18523         * decl.c (grok_reference_init): Likewise.
18524         (cp_finish_decl): Likewise.
18525         * error.c (dump_expr): Likewise.
18526         * tree.c (real_lvalue_p): Likewise.
18527         (lvalue_p): Likewise.
18528         (build_cplus_new): Likewise.
18529         (unsave_expr_now): Likewise.
18530         * typeck.c (unary_complex_lvalue, build_modify_expr,
18531         c_expand_return): Likewise.
18533 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18535         Make the C++ front-end pay attention to attributes for structures.
18536         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18537         finish_struct_1.
18538         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18539         Take out old round_up_size use and setting the DECL_ALIGN possibly
18540         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
18541         can override what the attribute set.
18542         * cp-tree.h (finish_struct): Update prototype.
18543         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18544         attributes to finish_struct.
18545         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18546         value down into finish_struct.
18547         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18549 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
18551         * decl.c (poplevel):  Re-word dead for local handling.
18552         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
18553         (cp_finish_decl):  If is_for_scope, check for duplicates so
18554         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
18556         * lex.c (do_identifier):  Use global binding in preference of
18557         dead for local variable.
18559 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
18561         * init.c (initializing_context): Handle anon union changes, the
18562         context where fields of anon unions can be initialized now has to be
18563         found by walking up the TYPE_CONTEXT chain.
18565 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
18567         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18568         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18569         (obscure_complex_init): If bss is supported, always set
18570         DECL_INITIAL to error_mark_node.
18572 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18574         * init.c (is_friend): Make sure there's a context before we see if
18575         it's an aggr type.
18577 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
18579         * init.c (is_friend): Classes are not friendly with nested classes.
18581 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
18583         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18584         and record its result.
18586 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
18588         * class.c (finish_struct_anon): Switch around code to not move anon
18589         union elements around, nor mess up their contexts, nor offsets,
18590         instead we now build up the right number of COMPONENT_REFs for all
18591         the anon unions that may be present at build_component_ref time.
18592         * typeck.c (lookup_anon_field): New routine to handle field lookup
18593         on fields without names.  We find them, based upon their unique type
18594         instead.
18595         * typeck.c (build_component_ref): Allow FIELD_DECL components.
18596         Handle finding components in anonymous unions, and ensure that a
18597         COMPONENT_REF is built for each level as necessary.
18599 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
18601         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18602         code that ensures that copy ctors are used if appropriate.
18604 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18606         * init.c (build_vec_delete): Only give an error if base isn't an
18607         error_mark_node.
18609 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
18611         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18612         (yylex): If we see `new', keep slurping.
18614 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
18616         * class.c (finish_struct_1): Move code for handling anon unions...
18617         (finish_struct_anon): to here.  Fixup so that we do the offset
18618         calculations right, and so that the fields are physically moved to
18619         the containers's chain.
18621 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18623         * decl.c (grokdeclarator): Avoid trying to get an operand off an
18624         identifier node.
18626 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
18628         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
18629         POINTER_SIZE to agree with expr.c.
18631 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
18633         * search.c (lookup_field): Don't report ambiguities if protect is 0,
18634         instead return NULL_TREE.
18636 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
18638         * class.c (finish_struct_1): Call warn_hidden if we want warnings
18639         about overloaded virtual functions.
18640         (warn_hidden): New routine to warn of virtual functions that are
18641         hidden by other virtual functions, that are not overridden.
18642         (get_basefndecls): New routine, used by warn_hidden.
18643         (mark_overriders): New routine, used by warn_hidden.
18644         * search.c (get_matching_virtual): Remove old warning that just
18645         isn't very useful.
18647 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18649         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
18651         * typeck.c (null_ptr_cst_p): Delete unused fn.
18652         (build_function_call_maybe): Delete unused fn.
18654         * expr.c (extract_init): #if 0 the code after unconditional return 0
18655         for now.
18657         Delete old cadillac code.
18658         * edsel.c: Remove file.
18659         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
18660         * Makefile.in (CXX_OBJS): Delete edsel.o.
18661         (edsel.o): Delete rule.
18662         * cp-tree.h (flag_cadillac): Delete var decl.
18663         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
18664         * decl2.c (flag_cadillac): Delete var definition.
18665         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
18666         (grokfield): Delete code depending on flag_cadillac.
18667         (finish_anon_union): Likewise.
18668         * class.c (finish_struct_1): Likewise.
18669         (pushclass): Likewise.
18670         (popclass): Likewise.
18671         (push_lang_context): Likewise.
18672         (pop_lang_context): Likewise.
18673         * decl.c (init_decl_processing): Likewise.
18674         (start_decl): Likewise.
18675         (cp_finish_decl): Likewise.
18676         (xref_tag): Likewise.
18677         (finish_enum): Likewise.
18678         (start_function): Likewise.
18679         (finish_function): Likewise.
18680         (finish_stmt): Likewise.
18681         * lex.c (lang_init): Likewise.
18682         (check_newline): Likewise.
18684         * lex.c (do_pending_inlines): Delete synthesized method kludge.
18686         Delete defunct, ancient garbage collection implementation.
18687         * rtti.c: New file with the RTTI stuff from gc.c.
18688         * gc.c: Removed file (moved the remaining stuff into rtti.c).
18689         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
18690         (rtti.o): New rule, replacing gc.o.
18691         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
18692         * cp-tree.h: Delete gc-related fn decls.
18693         (DECL_GC_OFFSET): Delete macro.
18694         (flag_gc): Delete extern decl.
18695         * decl.c (current_function_obstack_index): Delete var decl.
18696         (current_function_obstack_usage): Delete var decl.
18697         (start_function): Delete clearing of current_function_obstack_index
18698         and current_function_obstack_usage.
18699         (init_decl_processing): Delete code relying on -fgc.
18700         Delete call to init_gc_processing.
18701         (cp_finish_decl): Delete calls to build_static_gc_entry and
18702         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
18703         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
18704         and to expand_expr of a __gc_main call.
18705         (maybe_gc_cleanup): Delete var decl.
18706         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
18707         * decl2.c (flag_gc): Delete var decl.
18708         (lang_f_options): Delete offering of -fgc.
18709         (lang_decode_option): Delete -fgc and -fno-gc handling.
18710         (get_temp_regvar): Delete gc code.
18711         * init.c (build_new): Delete gc code.
18712         * lex.c (init_lex): Delete checking of flag_gc.
18714         * typeck.c (convert_arguments): Delete gc code.
18715         (build_component_addr): Delete -fgc warning.
18716         (build_modify_expr): Delete gc code.
18718         * decl2.c (build_push_scope): Delete fn.
18719         * cp-tree.h (build_push_scope): Delete decl.
18721         * search.c (clear_search_slots): Delete fn.
18722         * cp-tree.h (clear_search_slots): Delete decl.
18724         * search.c (tree_needs_constructor_p): Delete fn.
18725         * cp-tree.h (tree_needs_constructor_p): Delete decl.
18727         * tree.c (id_cmp): Delete fn.
18729         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
18730         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
18732         * tree.c (decl_value_member): Delete fn.
18733         * cp-tree.h (decl_value_member): Delete decl.
18735         * tree.c (list_hash_lookup_or_cons): Delete fn.
18736         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
18738         * method.c (cplus_exception_name): Delete fn.
18739         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
18741         * spew.c (shift_tokens): Delete fn.
18743 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18745         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
18746         to cp_finish_decl.
18747         * parse.y: Likewise.
18749 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18751         * tree.c (build_cplus_staticfn_type): Delete function definition;
18752         never used.
18753         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
18755         * tree.c (virtual_member): Delete function definition; never used.
18756         * cp-tree.h (virtual_member): Delete decl.
18758 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
18760         * typeck.c (build_component_ref): Handle getting vbase pointers
18761         out of complex multiple inheritance better.
18763 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
18765         * typeck.c (build_object_ref): Make sure we use the real type, not
18766         any reference type.
18768 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
18770         * tree.c (build_exception_variant): Don't create new types if we
18771         don't have to, also build new types on the right obstack.
18773 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18775         * decl.c (store_bindings): Split out from push_to_top_level.
18776         (push_to_top_level): Call it for b->type_shadowed on class binding
18777         levels.
18779 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
18781         * search.c (expand_upcast_fixups): Fix so that offsets stored in
18782         vbase_offsets are always right.  Fixes a problem where virtual base
18783         upcasting and downcasting could be wrong during conversions on this
18784         during virtual function dispatch at ctor/dtor time when dynamic
18785         vtable fixups for deltas are needed.  This only sounds easier than
18786         it is.  :-)
18787         (fixup_virtual_upcast_offsets): Change to reflect new calling
18788         convention for expand_upcast_fixups.
18790 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18792         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
18793         check that it's usable as the bitfield width.
18795 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18797         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
18798         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
18799         only ever used for functions in it.
18801 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18803         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
18804         (nested_type): Likewise.
18805         (nested_name_specifier): Use lastiddecl.
18807         * decl.c (grokdeclarator): Adjust accordingly.
18808         * init.c (expand_member_init): Likewise.
18809         * parse.y (base_class): Likewise.
18810         * typeck2.c (build_functional_cast): Likewise.
18812         * typeck2.c (build_functional_cast): Fill in name after we've
18813         checked for non-aggr type.
18815 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
18817         * decl2.c (warn_pointer_arith): Default to on.
18819 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18821         * lex.c (is_rid): New function.
18822         * decl.c (grokdeclarator): Diagnose reserved words used as
18823         declarator-ids.
18825 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
18827         * tree.c (get_decl_list): Don't lose cv-quals.
18829         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
18830         typespecs used as declarator-ids.
18832 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
18834         * decl.c (poplevel): When poping a level, don't give a warning for
18835         any subblocks that already exist.
18837 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18839         * typeck.c (build_object_ref): Finish what I started.
18841         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
18843         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
18845         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
18846         scope.
18848 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18850         * decl.c (xref_tag): Handle passing a type in directly.
18852         * parse.y (qualified_type_name): Pull out the type.
18853         (nested_type): Likewise.
18854         Take types directly instead of as identifiers.
18855         * call.c (build_scoped_method_call): Take types directly instead of
18856         as identifiers.
18857         * decl.c (xref_basetypes): Likewise.
18858         * init.c (expand_member_init): Likewise.
18859         (build_member_call): Likewise.
18860         (build_offset_ref): Likewise.
18861         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
18862         * method.c (do_build_assign_ref): Likewise.
18863         * decl.c (grokdeclarator): Handle a type appearing as the
18864         declarator-id for constructors.
18865         * method.c (do_build_copy_constructor): current_base_init_list now
18866         uses the types directly, not their names.
18867         * init.c (sort_base_init): Likewise.
18868         (expand_member_init): Likewise.
18869         * init.c (is_aggr_type): New function, like is_aggr_typedef.
18871 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
18873         * tree.c (layout_basetypes): Call build_lang_field_decl instead
18874         of build_lang_decl if first arg is a FIELD_DECL.
18876 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18878         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
18879         non-empty.
18880         * except.c (expand_start_catch_block): Set TREE_USED to avoid
18881         warnings about the catch handler.
18883 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
18885         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
18886         expand_target_expr.
18888 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18890         Fix access control to use trees rather than integers.
18891         * class.c (access_{default, public, protected, private,
18892         default_virtual, public_virtual, private_virtual}_node): Add
18893         definitions.
18894         (init_class_processing): Do creation of those nodes.
18895         * cp-tree.h (access_type): Delete enum decl.
18896         (access_{default, public, protected, private, default_virtual,
18897         public_virtual, private_virtual}_node): Add decls.
18898         (compute_access): Change return type.
18899         * search.c (compute_access): Have tree return type, instead of enum.
18900         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
18901         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
18902         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
18903         * parse.y (VISSPEC): Make ttype rather than itype.
18904         (base_class_access_list): Likewise.
18905         * *.[cy]: Change all refs of `access_public' to `access_public_node',
18906         etc.
18907         * call.c (build_method_call): Make ACCESS be a tree.
18908         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
18909         * cvt.c (convert_to_aggr): Likewise.
18910         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
18911         Likewise.
18912         * method.c (hack_identifier): Likewise.
18913         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
18915 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
18917         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
18918         frontend, and make it more consistent with respect to
18919         warn_pointer_arith.
18921 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
18923         * decl.c (pushdecl): Check for duplicate parameter names.
18925 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
18927         * decl.c (expand_static_init): Call assemble_external for atexit.
18929 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
18931         * except.c (do_unwind): Remove some generated dead code.
18932         (eh_outer_context): New routine, factor out some common code from
18933         expand_builtin_throw and end_eh_unwinder.  Add code to do return
18934         address masking for the PA.
18935         (expand_builtin_throw): Use eh_outer_context instead of open coding
18936         it here.
18937         (end_eh_unwinder): Likewise.
18939 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
18941         * except.c (expand_throw): Call assemble_external for __empty, if we
18942         use it.
18944 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
18946         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18947         NORMAL_RETURN_ADDR_OFFSET.
18948         (end_eh_unwinder): Likewise.
18950 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
18952         * gc.c (build_dynamic_cast): Make sure we don't cast away const
18953         when dealing with references, and make sure we handle dynamic
18954         casting to a cv qualified reference.
18956 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
18958         * except.c (struct eh_context): New structure top hold eh context
18959         information.
18960         (push_eh_context): New routine.
18961         (pop_eh_context): Likewise.
18962         * decl.c (push_cp_function_context): Use them.
18963         (pop_cp_function_context): Likewise.
18965 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
18967         * decl2.c (finish_file): Also prune uninteresting functions in the
18968         inline emission loop.
18970 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
18972         * sig.c (build_signature_table_constructor): Mark functions
18973         in the signature as referenced.
18975 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
18977         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18978         the inline emission stuff.
18980 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
18982         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18983         weak symbols.
18984         * lang-options.h: Add -f{no-,}weak.
18985         * decl.c (init_decl_processing): If the target does not support weak
18986         symbols, don't use them.
18987         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18989 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
18991         * init.c (expand_member_init): warning for base init after members.
18993 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
18995         * cvt.c (build_expr_type_conversion): Don't convert to a reference
18996         type.
18998 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
19000         * method.c (report_type_mismatch): Improve wording for volatile
19001         mismatches.
19003 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
19005         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
19006         expand_assignment, as the later doesn't handle things that have
19007         copy constructors well.  The compiler would do bitwise copying,
19008         instead of ctor calling in some cases.
19010 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
19012         * g++.c (my_strerror): Return "cannot access" if errno is 0.
19013         (pfatal_with_name, perror_exec): Don't assume that
19014         the returned value from my_strerror contains no '%'s.
19015         (concat): Remove.
19016         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
19018 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
19020         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
19021         TYPE_METHODS/TREE_CHAIN mean what they used to.
19022         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
19023         instead of TYPE_METHODS.
19024         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
19025         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
19026         * cp-tree.h (CLASSTYPE_METHODS): Lose.
19027         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
19028         TYPE_METHODS.
19029         (struct lang_decl): Lose next_method field.
19030         (DECL_NEXT_METHOD): Lose.
19031         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
19032         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
19033         anymore.
19034         (finish_struct_methods): Don't mess with the TREE_CHAINs in
19035         fn_fields.
19037         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
19038         vector.
19040         * call.c (build_method_call): Synthesize here even when not inlining.
19041         * typeck.c (build_function_call_real): Likewise.
19043 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
19045         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
19046         == DBX_DEBUG, call dbxout_start_new_source_file and
19047         dbxout_resume_previous_source_file when appropriate.
19049 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
19051         * except.c (start_anon_func): Push to the top level.
19052         (end_anon_func): Pop from the top level.
19054 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
19056         * cp-tree.h (build_cleanup): New routine to build cleanups.
19057         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
19058         call at ctor time and use atexit to run it later.
19059         * decl2.c (build_cleanup): New routine, taken from finish_file.
19060         (finish_file): Use build_cleanup instead, and don't put function
19061         local statics in global dtor list.
19063 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
19065         * except.c (expand_throw): Ensure that we have cleanups, if we try
19066         and expand cleanups.
19068 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
19070         * except.c (expand_throw): Add logic to manage dynamic cleanups for
19071         the EH object.
19072         (expand_end_catch_block): Use the magic of expand_goto, instead of
19073         emit_jump so that we get the cleanup for any catch clause parameter
19074         and the cleanup for the exception object.  Update to reflect label
19075         changes.
19076         (push_eh_cleanup): New routine to register a cleanup for an
19077         exception object.
19078         (empty_fndecl): Used to default cleanup actions to
19079         nothing.
19080         (init_exception_processing): Setup empty_fndecl.  Setup
19081         saved_cleanup.
19082         (expand_start_catch_block): Update to reflect label changes.  Call
19083         push_eh_object to register the cleanup for the EH object.
19084         (start_anon_func): New routine to start building lambda expressions
19085         from trees.
19086         (end_anon_func): New routine to end them.
19087         (struct labelNode): Change so that we can use tree labels, or rtx
19088         labels.
19089         (saved_cleanup): Object to check for dynamic cleanups for the
19090         exception handling object.
19091         (push_label_entry): Change so that we can use tree labels, or rtx
19092         labels.
19093         (pop_label_entry): Likewise.
19094         (top_label_entry): Likewise.
19095         (expand_start_all_catch): Use tree label instead of rtx label, so
19096         that we can get the magic of expand_goto.
19097         (expand_end_all_catch): Update to reflect label changes.
19099         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
19100         use UNSAVE_EXPRs.
19101         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
19102         building_cleanup logic, as we now use UNSAVE_EXPRs.
19103         * cp-tree.h (unsave_expr): Declare it.
19104         * decl.c (building_cleanup): Remove.
19105         (maybe_build_cleanup): Remove building_cleanup logic, and use
19106         UNSAVE_EXPR instead.
19108 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
19110         * gc.c (build_t_desc): Update error message to say <typeinfo>.
19112 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19114         * decl.c (pushdecl): Only warn about shadowing a local variable if
19115         warn_shadow is true.
19117 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
19119         * typeck.c (build_binary_op_nodefault): Added warning about
19120         comparisons between different enum types with -Wall, unless
19121         -fenum-int-equiv set.
19123 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
19125         * class.c (finish_struct_1): Skip down to the inner type in
19126         multidimensional arrays.  Ensures ctors will be made for types that
19127         need constructing.
19129 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
19131         * decl.c (last_dtor_insn): New to track the last compiler generated
19132         insn in a dtor.
19133         (store_parm_decls): Set it.
19134         (finish_function): Use it to see if the dtor is empty.  Avoid doing
19135         vtable setup all the time, if we can.
19136         (struct cp_function): Add last_dtor_insn.
19137         (push_cp_function_context): Save it.
19138         (pop_cp_function_context): Restore it.
19140 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
19142         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
19143         warnings.
19145 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
19147         * typeck.c (expand_target_expr): Make sure targets get put into the
19148         current temp_slot_level, so that the free_temp_slots call will reuse
19149         them.
19151 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
19153         * class.c (finish_struct_1): Delay delta fixups for virtual bases
19154         until after we have done the hard virtuals, to avoid a bogus `every
19155         virtual function must have a unique final overrider' for virtual
19156         functions that are only overridden by hard virtuals.
19158 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19160         * pt.c (do_function_instantiation): Don't try to find a file-scope
19161         template for a member function.
19163 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
19165         * g++.c (main): Add handling of -nodefaultlibs.
19167 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
19169         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
19170         distinguish between direct bindings of reference variables, and
19171         indirect bindings of reference variables.
19172         * cvt.c (build_up_reference): Use it.
19173         * typeck.c (convert_arguments): Use it to indicate this is an
19174         indirect binding.
19175         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
19176         as they are unused.
19177         (expand_static_init): Likewise.
19178         (cplus_expand_expr_stmt): Likewise.
19179         * decl2.c (finish_file): Likewise.
19180         * init.c (perform_member_init): Likewise.
19181         (emit_base_init): Likewise.
19182         (expand_aggr_vbase_init_1): Likewise.
19184 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19186         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
19187         get a DECL_LANG_SPECIFIC node.
19188         * cp-tree.h (lang_decl_flags): Add new member `level'.
19189         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
19190         decl_flags level member.
19192 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19194         * call.c (build_method_call): Make sure instance has a
19195         TYPE_LANG_SPECIFIC node before we dive into it.
19197 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
19199         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
19201 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
19203         * decl.c (duplicate_decls): When smashing decls, smash staticness in
19204         the usual way.
19206 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
19208         * decl.c (poplevel): Handle the merging of subblocks of cleanups
19209         when finishing blocks that have already been created (usually due to
19210         the fixup goto code).  Fixes bad debugging information.
19212 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
19214         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
19215         that's not a list of overloaded functions.
19217 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19219         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
19220         before trying to use DECL_ABSTRACT_VIRTUAL_P.
19222 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
19224         * decl2.c (mark_used): New function for hooking into setting of
19225         TREE_USED on decls.
19226         * call.c (build_method_call): Use it.
19227         * class.c (instantiate_type): Likewise.
19228         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
19229         for all like-named functions.
19230         * method.c (hack_identifier): Likewise.
19231         (emit_thunk): Don't call assemble_external.
19232         (make_thunk): Create thunk as a FUNCTION_DECL so that it
19233         gets the right mode and ENCODE_SECTION_INFO works.
19235         * parse.y: Use mark_used.  Pass operator names to do_identifier.
19236         * lex.c (do_identifier): Handle operator names.
19238         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
19240 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19242         * errfn.c: Include stdio.h.
19243         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
19245 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
19247         * typeck2.c (digest_init): Always convert initializers to the
19248         right type.
19250 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
19252         * init.c (member_init_ok_or_else): Don't allow member initializers
19253         for indirect members, as it is invalid.
19255 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19257         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
19259 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
19261         * parse.y (for.init.statement): Catch compound statements inside for
19262         initializations, if we're being pedantic.
19264 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
19266         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
19267         looking for.
19269 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
19271         * error.c (dump_expr): Don't core dump when a boolean expression is
19272         used as a default argument.
19274 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19276         * class.c (finish_struct_bits): Check aggregate_value_p instead of
19277         RETURN_IN_MEMORY.
19279 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
19281         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
19282         BLKmode type that would otherwise be returned in registers.
19284 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19286         * g++.c (WITHLIBC): New macro.
19287         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
19288         saw_libc and pass it at the end if it was set.
19290 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19292         * parse.y (fn.def1): Call split_specs_attrs in
19293         declmods notype_declarator case.